6 ms·
Zed Decoded: Async Rust
- epistasis 3y agoThere's a ton of really good Rust content on the Zed blog. As somebody new to Rust, I've learned a lot from it. For example, how they do ownership in a GUI setting, in a language for which even writing a doubly-linked list is a challenge: https://zed.dev/blog/gpui-ownership https://zed.dev/blog/gpui-ownership
- cptroot 3y agoThis was a really neat dive into GPUI. The discussion about main thread vs background thread was interesting, especially as it relates to choices the rest of the async ecosystem has made.
- mamidon 3y agoHow are these guys funding a startup for the Nth text editor? If they have the guts to try this full time I suppose there's really no excuse for me not having a go at my own thing.
- deleted 3y ago[deleted]
- refulgentis 3y ago[dead]
- simonerlic 3y agoTo be fair, this isn't just a random group of people - they're the people who made Atom, Electron, and Tree-sitter.
- alberth 3y agoAdditionally, it’s also not yet another “text editor”. It’s very clear the differentiation of Zed will come in the form of the collaboration functionality it will have.
- fori1to10 3y agoAnd speed. Startup time is instantaneous, in comparison to VS code say.
- wmf 3y agoThe same team that "erased" native editors is now selling us the solution to the problem they created.
- eikenberry 3y agoErased? On the contrary it seems, to me at least, like new editor development has really grown over the last few years. Editors like Kakoune, Helix, Micro are coming along nicely. I'm looking to switch, at least partially, to Helix soon myself.
- hobs 3y agoHow much are you going to pay for the 5 seconds per day you open up your editor? Most people dont even close it in the first place.
- bobbylarrybobby 3y agoPresumably speed is an overall important factor for the creators — not just startup speed — and I'd imagine it translates into speed elsewhere, such as input latency and UI responsiveness.
- mamidon 3y agoIn the FAQ they indicate they raised funds from investors.
- IshKebab 3y agoThey meant how are they going to fund it long-term.
- IshKebab 3y agoThey say: > Rather than selling you a proprietary editor, we'd much prefer to sell you services that seamlessly integrate with your editor to make you and your team more productive. Zed Channels is one example of such a service. It's free for anyone today, but we intend to begin charging for private use after a beta period of experimentation. Providing server-side compute to power AI features is another monetization scheme we're seeing getting traction. But I'm with you. I can't see paying-for-shared-editing working. There are too many people using other random editors. AI? Yeah maybe. I've paid for Copilot. But now they have to fund an AI research team as well. I really really hope they succeed but I'd probably still bet against them.
- autoexecbat 3y agoInterviewer: What editor do you use? Interviewee: Vim Interviewer: Sorry, we use Zed here
- andruby 3y agoHow would that be a problem? Either the candidate adapts and uses Zed in vim-mode, or the business allows the candidate to use vim. I certainly wouldn't make that a blocker.
- autoexecbat 3y agoI meant it in jest
- 38 3y agomac only: https://github.com/zed-industries/zed/issues/5394 https://github.com/zed-industries/zed/issues/5394
- scientist4397 3y agoAvailable in AUR
- simonerlic 3y agoI don't mean to reply-guy this thread, but it builds on Windows (and Linux) https://github.com/zed-industries/zed/blob/main/docs/src/developing_zed__building_zed_windows.md https://github.com/zed-industries/zed/blob/main/docs/src/dev...
- drcongo 3y agoIt's fine. Every time Zed gets a mention on here someone finds it incredibly important to post the words "Mac only" without checking, even when, as with this thread, the topic has absolutely nothing to do with running Zed or what operating systems it can run on.
- 38 3y ago[flagged]
- yogorenapan 3y agoThat’s just how things are on Windows. Building just about anything requires Visual Studio (not the UI but the tooling that comes with it. E.g. msbuild and C++ headers) You won’t have to do this on Linux or if you use a pre-built exe
- mamcx 3y agoI have a tip on how to install it faster and easier with Chocolatey: https://www.elmalabarista.com/blog/2020-install-rust-windows-build-tools/ https://www.elmalabarista.com/blog/2020-install-rust-windows... choco install visualstudio2019-workload-vctools, llvm
- pornel 3y agogtk-rs also supports Rust's futures on top of GTK's event loop, and you can .await dialog windows and button presses. https://docs.rs/glib/latest/glib/struct.MainContext.html#impl-MainContext-3 https://docs.rs/glib/latest/glib/struct.MainContext.html#imp...
- jenadine 3y agoI guess every rust toolkit supports that by now. Eg, Slint: https://docs.rs/slint/latest/slint/fn.spawn_local.html https://docs.rs/slint/latest/slint/fn.spawn_local.html
- __s 3y agoBack in 2012 I threw together something like this for managing UI dialogs in C#. For all the hate async/await gets about being an over optimization, it's good to see people find use for it as an ergonomic tool outside of concurrency
- fanf2 3y agoUser interfaces are not outside of concurrency.
- imron 3y ago> Where other applications use tokio or smol, Zed uses thin wrappers around GCD and crates such as async_task This is an amazing idea.
- extr 3y agoZed is super nice. As soon as they iron out some of challenges with python development I’ll switch from VS Code.
- rhodysurf 3y agoYeah it really needs notebooks and automatic venv discovery for me to use it for python. Having to define the venv in each projects config is just not needed in other pythons ides
- darthrupert 3y agoSeems like a low cost to pay for that part being robustabd controlled by you. But this is from an emacs user perspective, perhaps ypu vscode guys have it better.
- rhodysurf 3y agothe notebooks are definitely a bigger deal than the auto venv stuff
- brianzelip 3y agoInforming article. We are rooting for Zed, keep up the great work y’all!
- haolez 3y agoSlightly related, but does it support Linux already?
- SoothingSorbet 3y agoIt claims to support it if you build it from source, but it's experimental / in development.
- xpl 3y agoThe biggest shortcoming of Zed is the lack of "remote development". We almost exclusively write code in Codespaces-like setup, where you spin dev containers in the cloud, attaching to it from VSCode, so you don't have to run builds on your local laptop, and also heavy LSPs (like clangd) could run remotely on a fat RAM-heavy machine in K8S. This is possible because VSCode had client-server architecture from the get-go, so it can run itself in an remote container, only having the GUI (light client part) running on your local machine.
- ivanjermakov 3y agoDoes this mean that you have to wait for the network hop for LSP completions? I would go insane.
- xpl 3y agoThere are LSPs that can be slower than the network, so having an extra hop doesn't impact the UX too much (in that case). I don't usually even notice. Networks can vary also, depending on your/DC location, routes, VPNs, providers (and etc.), it can be under 50ms latency (which isn't even noticeable completions-wise) or over 1000ms. The most important thing is that the typing itself is fast, as it happens on the local machine. Compared e.g. to vim running in an SSH session — that can feel really bad, especially if the remote machine is on the other side of the ocean. So compared to that, VSCode is a big upgrade.
- epistasis 3y ago
- ozozozd 3y agoI love Zed and it’s been my daily driver for the last 2 months or so. It was very fast until recently. I am guessing it’s the Rust stuff that caused the performance hit since I keep seeing a Rust-y error in the logs. Jumps, search and even saving files started lagging up to multiple seconds in some instances. I think we also need an easy way to disable /configure LSPs etc. I know it’s through the local JSON config but getting the keys and the values right and determining if it did what it’s supposed to do is a bit cumbersome.
- robinsonrc 3y agoIs the whole thing not written in Rust?
- sapiogram 3y ago> I am guessing it’s the Rust stuff that caused the performance hit From Github's code stats, Zed is 97.3% Rust, so Rust is almost certainly both the problem and the solution here.
- noch 3y agoThe words `debug` or `debugging` don't appear in the article. How easy is it to attach gdb and step through Rust async stuff?