Live data from Hacker News

Rust Glancer: Rust LSP using 100x less RAM

rust-glancer.github.io

101–110 of 129 posts

Re: Rust Glancer: Rust LSP using 100x less RAM

#101
post #40

Earlier quoted context omitted.

Super nice! Are you planning support for Zed editor?

The point of language servers is to support all editors that speak LSP.

Zed is an editor that requires you to still write a tiny plugin basically telling it how to download and start the server, unlike something like emacs where this is just user config

Re: Rust Glancer: Rust LSP using 100x less RAM

#102
post #55

I personally don’t agree with “LLMs are just a tool” but I’m honestly impressed by the author’s description of LLM usage and taking the responsibility for the code. IMHO, without having looked at the code base itself, this sounds like a pretty healthy way to approach LLM usage!

"I personally don’t agree with “LLMs are just a tool”" Then what are they?

I’ve observed that people saying “LLMs are just a tool” usually compare them to language server implementations, compilers, and more. I disagree with this view because the tools they’re compared to are usually deterministic in the sense of they’re not just a blackbox that sometimes answers one way, sometimes another depending on whether the API provider changes the model weights, the temperature, etc.

Re: Rust Glancer: Rust LSP using 100x less RAM

#103

Earlier quoted context omitted.

The point of language servers is to support all editors that speak LSP.

Zed is an editor that requires you to still write a tiny plugin basically telling it how to download and start the server, unlike something like emacs where this is just user config

Internet is dead.

Re: Rust Glancer: Rust LSP using 100x less RAM

#104

Earlier quoted context omitted.

Zed is an editor that requires you to still write a tiny plugin basically telling it how to download and start the server, unlike something like emacs where this is just user config

Internet is dead.

Huh, first time getting called a bot for me. I assume it’s the “Zed is an editor”, I was originally going to say something like “Zed is one of those editors like VScode that requires plugins for LSPs” and then shortened it

Re: Rust Glancer: Rust LSP using 100x less RAM

#105
post #50

While I respect the work behind rust-analyzer greatly and think it's a good part of how cool the language is, I will NEVER understand the design decision to flat out refuse using disk cache. I understand the argument that implementing this puts less pressure behind speeding up the indexing process, but honestly with the price of ram today I'm tired of the memory and cpu usage each rust-analyzer process takes up. Espe…

I can shed some light here! This is going to be longish comment, but hopefully by the end of it you should understand _why_ we decided to avoid using the disk initially, even if you don't agree with that decision. Historically, the decision to not use disk traces back to this comment https://github.com/rust-lang/rfcs/pull/1317#issuecomment-150... , which is perhaps the single GitHub comment that influenced my life mo…

Feels like you are missing the point a little bit. LSP is a human facing tool, so providing a good user experience should be the ultimate goal of it. What you described, feels to me, is not quite aligned with this goal.

Of course, since you describe RA as "explicitly an experimental project to prototype the right architecture for an IDE", all that doesn't matter and you can set the project's goal to be whatever you want. However, it just sucks for us, the users, because RA is the only thing we have. I'm just glad to see someone else is trying to do something different. And may the best project win.

Re: Rust Glancer: Rust LSP using 100x less RAM

#107
This is coming full circle back to how `rust-analyzer` originally got introduced: it was an alternative to the official `rls` (Rust lanaguage server) intended to provide better performance and eventually became the new official one. I've seen enough issues with rust-analyzer in the wild with coworkers having trouble getting it working well for their setups that I'm open to the idea that an alternative might be needed again, but I can't help but also be disappointed that we've gotten to this point yet again (not blaming the author of this tool of course; they're not the cause, just responding to the symptom).

Re: Rust Glancer: Rust LSP using 100x less RAM

#108

Earlier quoted context omitted.

Internet is dead.

Huh, first time getting called a bot for me. I assume it’s the “Zed is an editor”, I was originally going to say something like “Zed is one of those editors like VScode that requires plugins for LSPs” and then shortened it

No, even the humans are dead.

Both the "user configuration" and the library are configuration masquerading as code. One is dynamically evaluated, the other compiled.

I just figure users of Zed know this... so what are we pretending to talk about?

Re: Rust Glancer: Rust LSP using 100x less RAM

#109
post #90
post #88

Tangential, but I've found something LLMs are actually ridiculously good at is making LSP servers. I couldn't find good TLA+ bindings for Neovim, so I got Claude to hack together an LSP server for it [1]. It works shockingly well, and it only took about an hour of arguing with Claude to do it. I find it's not terribly good at actually writing TLA+ (with some very recent tests with Fable), so I'm not completely useles…

I would say that LLMs have really good understanding of LSPs, but they are not necessarily good at building them. Had I blindly followed the proposed flow, Rust Glancer wouldn't have reached a stage where it is at least remotely usable. At some point the size of the project becomes too big for LLM to fit in its context window, and with the tendence to add code rather than remove, the bloat can explode really quickly.…

> LLMs can be good _domain experts_ when you build an LSP, but a) I wouldn't trust them blindly, and b) the quality of code is still very much your responsibility.

That's the feeling I have with these models as well. When I read about companies replacing devs due to AI I really hope its not actual coding/design jobs they're replacing. Unless they want to become evolutionary dead ends.

Re: Rust Glancer: Rust LSP using 100x less RAM

#110
post #75
post #69

Earlier quoted context omitted.

I would think there has to be some decent middle ground like storing some structures on disk mmap'd and letting the kernel handle back pressure and caching

Storing structures mmapp'd is actually very tricky. I have experimented with rkyv initially having this idea in mind, but gave up because the machinery just to power the archive types was causing complexity to explode. The thing with zero-deserialization frameworks is that they are very limited in what they can abstract away, and it gets ugly pretty quickly. So I don't deny the idea, just stating that it's probably _…

[deleted]
Post reply on HN