Building the Zed Text Editor (with Nathan Sobo)
Vložit
- čas přidán 16. 07. 2024
- I’ve often wondered how you build a text editor. Like many software projects, it’s a simple idea at the core with an almost infinite scope for features. How do you build a solid foundation to expand on? Which features matter for launch? And how do you hope to satisfy the needs of every programmer, working in every language?
My guest for this episode is Nathan Sobo. He’s tackled this problem once before with the Atom editor, and he’s back older & wiser with Zed - a new editor written completely from scratch in Rust. It has a modern UI, a wide spread of language support, and a completely different way of looking at team collaboration. But with so much ambition, what are Zed’s priorities, and what’s been left for a future version?
--
Zed Homepage: zed.dev/
Segment Trees: en.wikipedia.org/wiki/Segment...
Ropes: en.wikipedia.org/wiki/Rope_(d...)
Rust Executors: rust-lang.github.io/async-boo...
More about Roc: • Roc - A Functional Lan...
More about TigerBeetle: • Databases, Ambitions, ...
Kris on Mastodon: mastodon.social/@krisajenkins
Kris on LinkedIn: / krisjenkins
Kris on Twitter: / krisajenkins
--
0:00 Intro
2:00 Podcast
1:22:45 Outro
You're a great host, Kris, and I'm usually amazed by the guests you bring on. Thanks for the great content!
Thanks! Glad you enjoy it. 😊
Kris, you are hands down, the best interviewer I’ve seen for programming related topics. Your questions and genuinely thoughtful and I love how much room you give the interviewee to answer the questions while you take it in. Wonderful stuff
Wow, thank you. That's really kind of you to say. ❤️😊
This guy gives off the vibes of a funny drunk uncle at Christmas, who shakes your hand every five minutes. I love it.
That was a very interesting watch. Thanks, Chris & Nathan. Just decided to spend a day working with Zed.
Excellent content, thanks! Lots of technical and design choices in Zed that feel "right" to me, I'll definitely try it - fingers crossed for a huge success!
About the closing html tags - some (closing) tags are implicit and optional. Handling that correctly would be extra nifty.
You are the first Host that asked real questions like DSA and Project Design! God Bless You!
I gave Zed a try several months ago and was impressed by the performance. It has become my go to editor for anything else, where I don't need special debugger features or tool chain support. My wish would be, make it the go to editor for Rust! Rust really needs a good editor with toolchain support and remote debugging. Here all the big players have issues or are very complex to handle. I know that because I use it all the time.
But for the record, great work! Zed is outstanding and I love it!
Bro like, became a text editor 😂 Respect the dedication!
Always a pleasure watching Kris' interviews.
54:00 imagine a text editor getting a replay system before valorant does. that'd be funny
Ok
We've toyed around with the idea of being able to replay all of your edits in Zed!
I like Rust and Zed is looking good. I keep it updated. But my impression is that it's evolving slowly, possibly because Rust is slow for iterative development where you have to keep rethinking and redesigning how stuff works. It's not at the point where I want to use it for doing my actual coding in yet.
great interview! chapters would be super helpful.
fantastic podcast by the way!
Thanks!
Nice to hear rope become more and more well known. I recall an ICFP contest where the challenge problem needed to be done using rope or it was nearly impossible, but easy with rope. Rope wasn't well known enough and some folks complained at the gotcha.
The editors "xi" and "lapce" use ropes as well IIRC
@@fredoverflow I'm pretty sure that most do.
@@evarlast Emacs and Eclipse use gap buffers.
IntelliJ uses ropes, too, I believe
Great as always Kris!
I miss the theme fade in at the intro and outro
Yeah, sorry about that. It's in there, but I mixed it too quietly this week. 🤦♂️
If possible, would love to have someone from the warp terminal project on the show!
That's a great idea! Yes, I'll drop the team a line immediately. Thanks! 👍
I think for the "ambient awareness" social stuff they should maybe take some ideas from discord. I would sometimes have friends stream their work but actually have mic+headset muted (which is visible as an icon) - so you could join and look at what they do but they wouldn't get disturbed by you. Also different channels for different things, also both sides streaming at the same time. etc.
I work in a strongly regulated environment with heightened levels of security concerns, which has a tendency to be a little "isolationist," if you will. I've also said for a couple decades now that software development is a social endeavour, like any other creative acts have a strong social component. I absolutely loved the mentions here of the anthropological intersection. Concepts of subversion, of identity, of guile, of corruption, because of my work environment, are fascinating to me. On one hand, I think about orgs like ours being able to wrap the technology one day to leverage it within their isolated bubble, and on the other hand I think it would be so much more fascinating to think about how we might find ways to isolate and suppress those kinds of activities as a function of the technology itself. Is isolating a bad set of transformations from a hallucinating AI done asynchronously really any different functionally than an intentional set of malicious transformations by a subversive actor? At a lower level, what if these things were signed to ensure identity? So many fun questions.
Great interview, really got my brain engaged. Thanks Kris for the continued thoughtful way you engage in these interviews, and the guests you bring in with so many damn cool ideas :)
Great talk.
Sounds like they are using a take on a HAMT. Very cool!
once they get a proper vim integration (directly connected like the neovim extension for vscode) and Linux support, I might switch from neovim. also just better keybinding support with keychords and stuff.
seems like zed still doesn’t have basic ide functionality such as drill down to function/class body in c++. It is yet another editor with just syntax highlighting
Odd - it works for me in other languages, so it should just be a question of whether your LSP server supports it...
I think that relies on LSP and C++ is probably the most difficult language to make a really good LSP for.
@@andrewdunbar828 C++ has a first class LSP - clangd. Zed integrates clangd, but there are a few major issues with the integration atm.
I really see no issues with vs code.. a new x code though.. that would be cool!
Another vscode that’s maybe faster probably won’t win the war.
Boy it would be a lot of fun to work on though!
VSCode on electron only won because of extensibility.
Microsoft shot that in the foot with LSP, and Neovim is only slow on adoption because it isn’t as cool and doesn’t support gui-style (non modal) keybinds.
If Zed didn’t focus so much on that tr*** gpui and just used reliable solutions then it probably would have already been stable. Heck, it would’ve been awesome if they built it on bevy or something, just anything other than a completely new library that barely works.
using Neovide and I"m quite happy with it.
Are you using windows? Just curious
@@howdoiexitvim-sg2xl nope, macos (M1) :)
Does it support Remote Development using SSH? Can it connect to linux box? Many people use VSCode to develop on Linux from MacBook Pro.
Everyone is too busy with building a nice cozy caravan while these guys are going straight for the Ferrari
Need a windows release hopefully not too far in the future.
Zed sounds interesting, but I'm not buying a Mac to use it.
Linux and Windows releases can both be built from the source code.
TIL Zed is the opposite of everything i look for in an editor -- no git or plugins + live collab + LLMs? What is this - an editor for Gen Z?
It really makes absolutely no sense at all. Like no refactoring capability? If I don't like the name of a function do you seriously expect me to do a find and replace? I mean I was doing that back in 2000, but now we have actually smart tools that can do that properly. I mean wtf?
And also no editin capability?? Just watching random text appearing or changing without being able to do anything??
I liked Atom, but left it for Sublime Text
10:52
This guy is good vibes
Alright, I'll give Zed a try.
sure, but there is just no way this beats nvim + tmux for me. like it's not in the ballpark.
By assuming windows doesn’t exist?
the reality is who is zed for? people who have taken up vim/neovim for its configuration, speed, and simplicity zed will just never be able to compete. Maybe some of the vscode crowd or people looking for something in between vscode/vim? Even then i believe the reason a lot of people continue to use vs code is due to its integrations and ecosystem. Which means it would be a long long long time before zed gets there.
Them implementing AI stuff before a lot of other features just doesn't sit well with me. I think this is more like a jetbrains ide or maybe i think jetbrains fleet. But this is definitely not an editor that will become the top editor instead of vscode or even neovim.
You must implement AI if you want to be on the hype train or attract investor money. :(
AI needs so much infrastructure for its value to be fully realized. I’m starting to realize this. Probabilistic stochastic pattern matching machines still need stateful, reliable infrastructure to serve its users best. Platforms like iOS have so much reliable infrastructure and features for it to really deliver a tailored user experience with integration.
First, nice
Last
Thanks for that very interesting discussion & insight in the Zed development. Sadly, it is so disrespectful that the guest is regularly muted away...
No disrespect was intended. Sadly there were a few places where we talked over each other-almost inevitable on a transatlantic conversation-and for clarity's sake I muted Nathan or myself.
I _try_ to be impartial on that,and just pick whichever side kept the conversation flowing best in that moment. 🙂
What the actual f, when the guy was talking about segment trees/fold maps I did not understand literally anything. Judging by the reaction of the host, I don't think he understood much either. At around 13:20. Lots of hand gestures, trapezoids, ropes, CRDT's -- I guess the guest expects all viewers to be writing high performance text editors on their spare time, but I doubt it's the case..
You guys are really smart. A lot smarter than i am. I'm barley keeping up. I love it.
i don't get it. there's plenty of good fast editors. what's wrong with sublime text for example? its lightweight and instant and has lots of useful plugins
Sublime text is great, and I still rely on it for quickly poking around in SQL dumps.
But it's held back in some ways due to it being made before certain features were figured out in the editor space. Particularly in features that are hard to add if they weren't already planned to be added when the editor was first made.
For instance, it doesn't have any sharing features and AFAIK its plugins can't be as fast or sandboxed as something that runs in a wasm container.
@@spartanatreyu plugins are fast enough and i don't care if they're not sandboxed. sharing probably doesn't exist though so i guess if thhat's something you need, fair enough
Zed appears to be free and open source unlike Sublime. I also cannot think of another fast graphical editor, so it would be great to have more options.
Did Microsoft buy GitHub solely to give atom the axe? Lmao
I think it's more that they bought Github and didn't care what extras it came with. 😁
zed is a little too late
Way too late. And the extensions are coming at a crawl. By the time it’s viable i will have mastered both Vim & Sublime.
Fast, extensible, cross platform. Every editor on the market now let's you pick two, zed is the first going for all three.
@@JohnnySacc i think most people will say vscode is fast enough. and jetbrains products actually have 0 latency mode built in so they are really fast too.
@@JohnnySacc *ahem* what about NEOVIM
@@JohnnySacc They don't seem to go for the extensible part though. Ain't nobody compiling to wasm. Sad, I really like the guy and loved the discussion.
Programming, like writing or maths, is not real-time collaborative.
Exactly - the focus on collaboration features has largely been misguided, often times just straight up goofy and useless
That's just not true. I've done lots of pair programming, both in personal and professional work. It sounds pretty neat to be able to work on the same branch at the same time. Saves on merges which saves on CI which saves on time and resources.
@@JohnnySacc You could also just not use a language that requires a massive build system and unreasonable amount of resources and time to run - JS and Python I'm looking at you.
Sad state of affairs when my fellow devs like you are now assuming Resource Intensive CI is somehow just a given now.
"Save on merges..." ...wha?
@@JohnnySacc agreed, the amount of time I spend sharing control via a video call even when I'm not technicaly pairing dealing with problems with the call connection is a pain so it would be nice for me if there was low setup mechanism to be in the same space with imperceptible lag
There's also potential for some interesting efficiencies if your working in the same feature but different modules, potentially allowing the LSP to flag ideas concretely to eachother in realtime where you're still building up the interface between modules so the need to explain ideas is low and the conversation can just be more about what your trying to achieve rather than what you just did
@@JohnnySaccI agree, being able to properly pair program over a call is awesome. It's not a daily basis thing, buts it's pretty nice.
Hard disagree on the rust part. Its not going to perform as well as it should, and its going to be a nightmare to maintain and extend in the long term.
Zed will fade into obscurity
from high productivity js to low productivity rust….
It performs very well - I've used it quite a bit. It's noticably snappier than Emacs, VSCode and others. Not sure if you'd notice the difference against VIM, but then it does have a much richer UI. As for the maintainability piece, you may be right, I cannot say.
so tired of the mac-peepl doing the mac-peepl thing.
frustrating the number of “… anyway.” … in the middle of sentences.
Zed is the stupidest freaking thing I've ever seen. I don't need a text editor to be fast to be good at coding, what I need is good refactoring tools, discovery, and navigation. Not how fast I can fucking type.
Zed integrates language servers for every language - the exact same projects/code that gives VS Code its intellisense, navigation and refactoring features.
I mean it all matters. There’s too many development years into editors at this point that editors have tons of valuable features and the next editor has to compete against that and will have to catch up. Performance and language editing features are all important.