Lapce – Fast and Powerful Code Editor written in Rust
github.com
github.com
The plugin system as described in the README hasn't been implemented yet.
i don't know anything about WASI, but it probably solves the problem of having to interface with different native compiled code ABIs.
Also, WASI is compelling to me because of the potential of writing plugins in different programming languages.
I think this is the future really, I've been pining for this to become a thing for so long.
* sandboxing, so plugins don't need to be as trusted
* Easy cross-platform distribution with a single build artifact
* plenty fast (if written in a language like Rust/C++ and paired with a good runtime)
Why don't plugins "need to be as trusted"? Obviously bad-actor plugins would be less effective and capable of inflicting any sort of attack on your development OS, but surely the development environment is the perfect vector for attacking the runtime environments that run your artifacts get deployed into?
Not to mention the potential for secrets-harvesting due to sloppy boot-strapping dev-env habits or other bad habits we often engage in during the early development process?
Or does WASI somehow provide protection from these issues?
The code is running inside a virtual machine rather than natively on the host.
Some advanced linters might want network access but you can show this to the user, so they can make an informed decision about whether to trust that linter and their author with this power.
This isn't airtight security to protect against obviously-malicious authors. This is about creating a system that can deal with the reality that "trust" in an app store entails "a million shades of gray". I might trust a plugin enough to check for errors in my code, but not enough to actually modify my code.
I hadn't really heard of WASI, let alone understand it, but it totally makes sense why you would want to leverage this approach, along with any IDE-specific plugin interfaces/integrations.
That sounds absolutely amazing. Are there any desktop apps delivered like this yet? Any operating systems or some sort of runtimes (browsers?) that support them?
I want to install apps on my desktop without worrying about it too much. Sadly currently restricted to PWAs.
Ever heard of apparmor?
That's per application security profiles, distributed with any applications on many Linux distributions.
WASM + WASI means a single binary has near-native performance, but can run on any CPU architecture and any OS.
The runtime can be an interpreter or a (JIT) compiler. The latter can get you relatively close to native performance.
WASI fits snuggly in between, being a common intermediate language
From https://en.wikipedia.org/wiki/Asm.js
> asm.js consists of a strict subset of JavaScript, to which code written in statically-typed languages with manual memory management (such as C) is translated by a source-to-source compiler such as Emscripten (based on LLVM).[2] Performance is improved by limiting language features to those amenable to ahead-of-time optimization and other performance improvements.
> asm.js is mostly rendered obsolete with the introduction of WebAssembly (wasm), which has a bytecode format that is faster to parse. Efforts to extend JavaScript with more low-level features like SIMD.js has also been suspended since 2017. asm.js remains useful primarily as a "fallback" for wasm
But nowadays WASM is much more suitable for the job. JavaScript was designed as a scripting language, not a low level intermediary language.
I'm not a Rust person, how do you install this? Is it something like "rustc install" or something like that?
Thanks!
"just keep rebooting to solve the problem, rather than fix it"
There's also Amp (Vim inspired, written in Rust) although it looks as though development has stopped https://amp.rs/
If you are a professional then just buy more RAM.
That cockiness sounds familiar, and it was the reason why people moved from Java based IDE's to vscode/atom/sublime.
It used 10-20 megs of RAM and loaded in about 2 seconds on the computers of the era (about 10-15 years ago).
It wasn't very good, but that's beside the point :-) It wasn't bad because of the technology stack it was built from.
Sufficient extensibility does not require software to be terrible.
That's the entire point? The functions don't exist because it's supposed to be lightweight.
If you're finding that you need 20+ plugins to add features then I've got news for you, you're looking for an IDE that has all these built in by default.
I have certainly around 20 plugins in my Vim and it runs faster than Usain Bolt.
I agree with your first point but the IDE argument is wrong. I could use 100 plugins and it still would not be an IDE nor would I want one.
I also have news for you, VS Code's whole selling point was "built-your-own-IDE" and big plugin ecosystem, not "here's yet another lightweight editor".
* LSP uses JSON. Even worse, VSCode uses UTF-16 internally (because Javascript does, more or less). But JSON uses UTF-8. So for correct operation VSCode converts the UTF-16 to UTF-8, and then your language server has to convert it back to UTF-16 to figure out the row/col positions (which are in UTF-16 units).
* LSP has an "easy mode" where the entire document is sent to the language server on every keypress!
* Some functions like `provideDocumentLinks()` operate on the entire document, so on every keypress (maybe it batches them I don't know), all linkifier extensions will run a load of regexes over the whole document.
There's definitely scope for a text editor with an extension API that encourages speed.
[0] That was last year, so maybe it was a buggy release (doubt it) or maybe they made big improvements since (possible)
apart from code folding.
Seriously?
Forget the exorbitant tech salaries, so many other industries charge way more for essential equipment. That's chaper than a single snap-on wrench out of the hundreds that an automative shop has to buy. It's two months of adobe bundle that most graphic designers subscribe to. I think the perspective here is important.
For some in tech, $100 is a hell of a lot of money.
Btw. I have used Sublime. It is a very nice Editor. Most importantly incredibly snappy and so far no other editor matched Sublime's intuitive `TAB` completion dynamics.
Oh, yeah, and it's fucking expensive...
So, just how the biggest companies, banks, governments, etc. in the world work (using e.g. Excel, Word, Visual Studio, etc)...
on a side note, banks and governments often actually audit closed-source code, as they get that worked out in their contracts. Go ahead and ask Microsoft, if you could do the same...
Why do you feel the need for ad-hominen arguments and pop-psychology BS? Do you feel personally validated because you use Open Source, compensating for other lacks in your life, perhaps not being loved enough as a kid?
See how two can play this game? Maybe stick to practical arguments?
My point was in practical use, trusting a proprietary commercial binary (from Microsoft, Oracle, whatever) is not a big issue for far more sensitive environments (banks, governents, etc) than the average user case.
But hey, I also gave you an actual argument, you ignored......
~80 USD per user (not per computer, per user), and then you have support for that version the X upcoming years. I understand 80 USD is a lot of money for some people, but I would argue for businesses it isn't and it isn't if you compare it to other stuff. Which requires subscription, or lets you pay with your data / advertising. Even if FOSS, that's arguably worse.
(I use Sublime and Vim, sometimes Vi, and on Citrix we got Notepad++ which is Windows-only.)
> Personally, I just don't feel comfortable working with sensitive information or proto-executables in closed-source software.
For starters, you could decide to not not hang it on a network 24/7. Or hang it in a different VLAN than the stuff on your network using Log4j.
I have access to Sublime Text 3, and even to the Sublime Text 4 beta.
I also pay the yearly Jetbrains full-suite subscription.
Also, apparently it's $100 USD now. C'mon, 100 bucks for a basic text editor?!
Also, developers are spoiled af. Imagine if you worked in industrial design or something. The standard there is something like solidworks or autocad. You’d get laughed out of the room if you tried to stumble through with some open source alternative. Just the software can be $x000/year and that’s not even considering the hardware that some might need to stay productive. You want to actually prototype something? Pony up another pile of money for a CNC or a laser cutter or whatever + the operator time (if you don’t know how to do it) + the materials.
Don't get started on the popups though!
And I don't use any extension
Windows issue: https://github.com/lapce/lapce/issues/9
macOS issue: https://github.com/lapce/lapce/issues/7
Just wonder, what is the point of promoting something as "being written in Rust", if at the end it crushed the same way as "being written in C/C++/whatever".
Well... This has me intrigued. This is basically the only thing that keeps me on vscode.
So maybe if you want a keypress that responds quickly you should press that key a few times, wait for the editor to respond, delete it, then press it again and you'll see how fast it really is. Seems to me this is tied in with the "lightning fast" claims here and the sneering dismissals in the comments "that doesn't mean ANYTHING"; it's a secret message which means "not heavyweight laggy Java". It's the Python-to-Java's-boilerplate, the Agile-to-Big-Design-Up-Front, the Go-single-binary-to-Python-virtualenv, a calling card rather than a specific performance claim.
[1] https://codereview.stackexchange.com/questions/152733/dijkst... (the answer is otherwise very detailed and interesting)
Lot of garbage about loading font config from /etc/fonts/conf.d/... and then:
memory allocation of 18446744073709551615 bytes failed
Aborted (core dumped)Yes.
> Is there a Rust build flag that would catch this behavior?
Runtime overflow checks (resulting in panics on over/underflow) are enabled by default in debug builds, but can also be enabled for release builds, or disabled for debug builds: https://doc.rust-lang.org/cargo/reference/profiles.html#over...
Additionally, you can use `Wrapping<T>` or `wrapping_sub` when wrapping is intentional, or `checked_sub` and explicit edge case handling when you want checks regardless of general build settings.
EDIT: that said, that's for integer overflow. Sibling comment references https://github.com/lapce/lapce/issues/9#issuecomment-9935004... which appears to:
1. Have a floating point div by zero.
2. Truncate when casting +inf floating point to integer.
Standard library & language checks won't catch either, although it'd be easy enough to roll your own checked math floating point type wrappers / conversion methods that would, or use an existing crate (e.g. using https://docs.rs/az/latest/az/fn.checked_cast.html to go from f64 -> usize instead of the `as` keyword would've caught #2. Since `as` is truncation-bait, some people prefer using the From/Into traits (infalliable, nontruncating) or TryFrom/TryInto traits (falliable, checked) as a matter of habit, avoiding the `as` keyword. However, neither of those traits cover f32 -> usize.
https://github.com/lapce/lapce/issues/9#issuecomment-9935004...
and a self-written wgpu backend hooked with druid. https://github.com/lapce/piet-wgpu
For xi, it only uses it for text manipulation.
I literally couldn't open any folder.
Also on windows by default it leaves a separate command window hanging which seems odd. Why isn't this logging done within the app terminal itself.
As soon as memory management issue is solved, i could see all future software will eventually be written in Rust (or similar language)
What does this refer to?
Will this editor allow me to run it with rust-analyzer code completion?