333 points · by agluszak · 4y ago · 145 comments
The plugin system as described in the README hasn't been implemented yet.
I'm not a Rust person, how do you install this? Is it something like "rustc install" or something like that?
Thanks!
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?
WASM + WASI means a single binary has near-native performance, but can run on any CPU architecture and any OS.
i don't know anything about WASI, but it probably solves the problem of having to interface with different native compiled code ABIs.
WASI fits snuggly in between, being a common intermediate language
There's also Amp (Vim inspired, written in Rust) although it looks as though development has stopped https://amp.rs/
* 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.
apart from code folding.
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)...
~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.
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.
[0] That was last year, so maybe it was a buggy release (doubt it) or maybe they made big improvements since (possible)
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".
Don't get started on the popups though!
And I don't use any extension
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".
Windows issue: https://github.com/lapce/lapce/issues/9
macOS issue: https://github.com/lapce/lapce/issues/7
Well... This has me intrigued. This is basically the only thing that keeps me on vscode.
Lot of garbage about loading font config from /etc/fonts/conf.d/... and then:
memory allocation of 18446744073709551615 bytes failed
Aborted (core dumped)https://github.com/lapce/lapce/issues/9#issuecomment-9935004...
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.
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)
Will this editor allow me to run it with rust-analyzer code completion?