Lapce: Fast and Powerful Code Editor Written in Rust
github.com
github.com
That said, I can totally see why it would matter to some people why language something is written in: you may want to study or contribute to an editor and you may prefer to focus on your preferred language
- Designed from the beginning to support an extension API with a richness comparable to VS Code's (unlike Sublime, Jetbrains etc)
- Presumably aiming to put performance as a higher priority than is usual
All these things materially impact how interested I am in using and contributing to the project.
So Emacs' staying power is due to being written in LISP ?!
The big lie of open source is "you have the source, so you can extend it and fix bugs yourself". Of course in theory (with enough expertise and motivation) you can do these, but in practice most open source users don't contribute to the project, so the language it is written in is entirely irrelevant.
When was the last time (if ever) you submitted a bug fix (not a report) for an open source tool you are using, let alone joined the project as a contributor?!
“Irrelevant” is a very strong statement. It claims no effect at all. A single example does not justify the claim. You need at least some statistical evidence to support that claim.
For your last question, yes I do. I sometimes take over the abandoned project to maintain it too. Some open source users never contribute in any way, some do. I’m not sure why there’s a need to dismiss the existence of the latter kind of users. No one is claiming all users should be like that.
My argument is that Rust is certainly going to remain relevant for the next 20 years or so. When this project is no longer maintained, it probably won't be because Rust is no longer being developed, and it probably won't be because nobody writes Rust around.
If Lapce were written in something like Zig or Crystal, I wouldn't feel so certain about that. (Not a knock to Zig or Crystal.)
Just that Emacs was written almost a half century ago, and is still thriving despite being written in a language (LISP) that is basically obsolete.
> My argument is that Rust is certainly going to remain relevant for the next 20 years or so
Maybe, maybe not. Look at how quickly Perl (so promising to begin with) disappeared to be replaced by Python. Many new languages have tried, and continue to try, to replace C++ as a better alternative, and I'm sure the next 20 years will see more popup too. Is Rust the one?
If the likelihood of being around in 20 years with a still up-to-date library/tool ecosystem was the main decision making factor, then Java would probably be a safer bet.
Yes, this is true. I still stand by my point that the longevity of a language has implications for the longevity of most projects. It's a probabilistic statement with exceptions, and Emacs is exceptional.
It's also worth noting that Emacs is written in Emacs Lisp, a language which is regularly updated.
> Look at how quickly Perl (so promising to begin with) disappeared to be replaced by Python.
Don't get me wrong, Rust's longevity is a guess. It's in the Linux kernel now, so that gives me hope that learning Rust is paying off.
Cargo is fantastically nicer to use than most other languages tooling. If I'm wrong, then that means something even nicer than cargo is around, which would be very nice indeed.
> If the likelihood of being around in 20 years ... was the main decision making factor, then Java would probably be a safer bet.
This is true, but the premise doesn't hold. The longevity isn't the main decision making factor. No decision is even being made, and you're arguing against a point nobody is making.
Please refer to my original comment: I'm only listing reasons why I like knowing something is written in Rust.
Sure you do. If I offered you a version of your current editor in the Befunge programming language, you'd rightly decline!
Programming languages aren't just all "basically the same".
Programming language choice, communicates something because programming languages have values.
Would you prefer a text editor written in Ruby or one written in Python?
This relates to a favorite article of mine:
It's not what programming languages do, it's what they shepherd you to.
https://nibblestew.blogspot.com/2020/03/its-not-what-program...
To tie in one of the article's examples:
> Perl shepherds you into using regexps
If you believe that regexes are hard to debug and overly complex, you might resist a text editor written in perl because it's likely that regexes are used everywhere (even when they shouldn't be).
0/10, not inclined to try again.
#[repr(f32)]
enum Float32 {
PositiveInfinity,
NegativeInfinity,
Nan(NanPayload32),
Finite(FiniteFloat32),
}
You could also then define NonNanFloat32 etc which could be used for certain operations. Of course on machine level its all the sameLike, if I'm doing x + y, and y just accidentally happens to contain the wrong data because of a mistake in the code, a NaN means the code will proceed as normal, and nobody will notice anything is wrong. If it's not a noticeable bug, it might be a long time until it's spotted by someone. And when they do, who knows how much damage it will have caused.
As a program author, I'd expect that it's my choice how to handle this situation. I don't want libraries making arbitrary decisions about how my code should work.
Segfaults are only one of many ways for software to go wrong.
But there’s bound to be unsafe code somewhere in a complex enough project.
EDIT: IOW, why don't projects just eschew unsafe in order to truly leverage one of Rust's primary claims to fame?
Sticking to safe rust is an ideal and it should be a goal but the primary use is to accomplish a task. If safe rust is getting in the way and there’s no way to do it easily otherwise, don’t feel bad about unsafe. The amount of unsafe should be minimized of course which reduces the surface area of issues greatly compared with c/C++ where every line is unsafe. Practical code is always >> ideological purity.
In Rust’s case, I take it as a promise not to do anything memory-unsafe. Lapce did not keep this promise when I tried it.
I think few categories undersells it. Just having Optional/Maybe in a language legitimately does make bugs disappear.
Segfaults shouldn't happen in Rust, but there is widespread use of `.unwrap`
That said, it does not seem yet ready to be a daily driver, small rough edges in the terminal behavior or the editor when using Vim mode were too distracting to do a long programming session.
Kudos to the authors, looking forward to giving it a spin again the future.
Lapce Editor 0.3 - https://news.ycombinator.com/item?id=38262775 - Nov 2023 (98 comments)
Lapce – A code editor with LSP and DAP support - https://news.ycombinator.com/item?id=38100570 - Nov 2023 (2 comments)
Lapce Editor, Release v0.2.0 - https://news.ycombinator.com/item?id=32714191 - Sept 2022 (40 comments)
Lapce – Fast open-source code editor - https://news.ycombinator.com/item?id=30708505 - March 2022 (224 comments)
Lapce – Fast and Powerful Code Editor written in Rust - https://news.ycombinator.com/item?id=29549173 - Dec 2021 (145 comments)
That said, I'll give this a shot because:
- no funky telemetry - the stack used (wgpu etc) means this might be sufficiently low level to be much more resource efficient than alternatives - it sounds like the plugin architecture will allow for a vibrant extension ecosystem if this gets some adoption
VSCode does this feature the best. No other IDE comes close. I'm a jetbrains guy and I would've given up on vscode completely if it were not for this feature. This thing is extremely important for embedded systems and development on the edge and only vscode really does it well enough to be useable.
Glad to see Lapce has it to. Going to try it out.
It is really good, I'm sure a lot of people feel like they have to use VSCode because of it.
How convenient it's not open source huh?
For jetbrains it's java and for vscode it's an html rendering engine. An IDE built from vulkan or some other low level graphics API can likely be even faster then vim depending on the console it's running within.
Coincidentally this is actually a problem I faced when writing my alternative shell.
I was just saying that you can make the text editor as lightning fast as you want but the moment you need to do anything useful with an IDE you become dependent on the performance of your plugins.
This is why I’m a little jaded when people talk about IDE performance. Unless that IDE is using its own bespoke plugins, and the trend these days is (thankfully) moving away from that, it’s really not a good benchmark any longer.
https://github.com/lapce/lapce/blob/master/docs/installing-w...