Menu
Sign In Search Podcasts Charts People & Topics Add Podcast API Pricing

Conrad Irwin

๐Ÿ‘ค Speaker
459 total appearances

Appearances Over Time

Podcast Appearances

Rust in Production
Zed with Conrad Irwin

So TreeSitter, each language in TreeSitter has its own kind of definitions. And then Zed has a couple of things that map from those definitions to our definitions. And so each supported language has a mapping of like, OK, in the TreeSitter grammar, there's a thing called comment. In the Z code highlighting, there's a thing called comment. Those are the same thing.

Rust in Production
Zed with Conrad Irwin

So TreeSitter, each language in TreeSitter has its own kind of definitions. And then Zed has a couple of things that map from those definitions to our definitions. And so each supported language has a mapping of like, OK, in the TreeSitter grammar, there's a thing called comment. In the Z code highlighting, there's a thing called comment. Those are the same thing.

Rust in Production
Zed with Conrad Irwin

So we have that mapping for each language. Similarly, it's like, OK, if you want to extract all the function definitions from a file, this is the TreeSitter query used to get that. And those queries can all run on the background thread. And TreeSitter itself is kind of crazy. It's a bunch of C libraries written for each language.

Rust in Production
Zed with Conrad Irwin

So we have that mapping for each language. Similarly, it's like, OK, if you want to extract all the function definitions from a file, this is the TreeSitter query used to get that. And those queries can all run on the background thread. And TreeSitter itself is kind of crazy. It's a bunch of C libraries written for each language.

Rust in Production
Zed with Conrad Irwin

So we have that mapping for each language. Similarly, it's like, OK, if you want to extract all the function definitions from a file, this is the TreeSitter query used to get that. And those queries can all run on the background thread. And TreeSitter itself is kind of crazy. It's a bunch of C libraries written for each language.

Rust in Production
Zed with Conrad Irwin

So we run those inside a WebAssembly module to avoid the obvious problems with running C libraries. And that's been good for reliability.

Rust in Production
Zed with Conrad Irwin

So we run those inside a WebAssembly module to avoid the obvious problems with running C libraries. And that's been good for reliability.

Rust in Production
Zed with Conrad Irwin

So we run those inside a WebAssembly module to avoid the obvious problems with running C libraries. And that's been good for reliability.

Rust in Production
Zed with Conrad Irwin

No idea. I do know that kind of the key feature of it as opposed to like a pauser for a compiler is that it's error tolerant. So if you have a trailing quote mark, it's not going to throw it off. It can always do something. And so it has optimized small edits in the text lead to small changes in the tree. So I guess it monitors or babysits your tree. Maybe that's where it comes from. I don't know.

Rust in Production
Zed with Conrad Irwin

No idea. I do know that kind of the key feature of it as opposed to like a pauser for a compiler is that it's error tolerant. So if you have a trailing quote mark, it's not going to throw it off. It can always do something. And so it has optimized small edits in the text lead to small changes in the tree. So I guess it monitors or babysits your tree. Maybe that's where it comes from. I don't know.

Rust in Production
Zed with Conrad Irwin

No idea. I do know that kind of the key feature of it as opposed to like a pauser for a compiler is that it's error tolerant. So if you have a trailing quote mark, it's not going to throw it off. It can always do something. And so it has optimized small edits in the text lead to small changes in the tree. So I guess it monitors or babysits your tree. Maybe that's where it comes from. I don't know.

Rust in Production
Zed with Conrad Irwin

Do you know Semgrep? I know the name, but you'd have to remind me.

Rust in Production
Zed with Conrad Irwin

Do you know Semgrep? I know the name, but you'd have to remind me.

Rust in Production
Zed with Conrad Irwin

Do you know Semgrep? I know the name, but you'd have to remind me.

Rust in Production
Zed with Conrad Irwin

Yes, is kind of the answer. So yeah, we don't have much built on that right now, but it's kind of there in the background. One of the most obvious things we can do, there are bindings, select more and select less, and they work on the tree setter definition. So you can kind of, okay, I start in this quote, then I expand more until I have the whole function or less until I'm back down to the thing.

Rust in Production
Zed with Conrad Irwin

Yes, is kind of the answer. So yeah, we don't have much built on that right now, but it's kind of there in the background. One of the most obvious things we can do, there are bindings, select more and select less, and they work on the tree setter definition. So you can kind of, okay, I start in this quote, then I expand more until I have the whole function or less until I'm back down to the thing.

Rust in Production
Zed with Conrad Irwin

Yes, is kind of the answer. So yeah, we don't have much built on that right now, but it's kind of there in the background. One of the most obvious things we can do, there are bindings, select more and select less, and they work on the tree setter definition. So you can kind of, okay, I start in this quote, then I expand more until I have the whole function or less until I'm back down to the thing.

Rust in Production
Zed with Conrad Irwin

But we don't really have many go edit via syntax tree stuff right now. One small example of something we do have in Vim, we have an argument object. So you can select an argument with VIA, you know, select inside an argument. And that uses the tree set of grammar to find the argument that you're in.

Rust in Production
Zed with Conrad Irwin

But we don't really have many go edit via syntax tree stuff right now. One small example of something we do have in Vim, we have an argument object. So you can select an argument with VIA, you know, select inside an argument. And that uses the tree set of grammar to find the argument that you're in.

Rust in Production
Zed with Conrad Irwin

But we don't really have many go edit via syntax tree stuff right now. One small example of something we do have in Vim, we have an argument object. So you can select an argument with VIA, you know, select inside an argument. And that uses the tree set of grammar to find the argument that you're in.