Earlier quoted context omitted.
And what issue related to Rust's memory management is to be resolved?
The fact that it makes you think about it all the time, rather than using a garbage collector?
Lapce – Fast and Powerful Code Editor written in Rust
111–120 of 152 posts
Re: Lapce – Fast and Powerful Code Editor written in Rust
#112Earlier quoted context omitted.
This looks very nice. However, the description mentions "lightning fast" and "powerful". Unfortunately, those things don't mean anything without further clarification. If you really want to show your editor is faster than other commonly used editors, consider posting a benchmark of cases where speed matters (like loading a large file, inserting in the middle of a large file, search/replace, latency of pressing a key…
Standard rust marketing, it's a bit tedious tbh, and I don't think anyone who is honest is surprised any more. Everything is "lightning fast" by default just because it compiles to native. I thought we were past that. Never mind that you can write crap code in any language (not making any comment about the editor's author here).
Re: Lapce – Fast and Powerful Code Editor written in Rust
#113Earlier quoted context omitted.
Sadly can't get it to run on linux :( Lot of garbage about loading font config from /etc/fonts/conf.d/... and then: memory allocation of 18446744073709551615 bytes failed Aborted (core dumped)
Trying to allocate memory the size of an underflowed uint64 does not seem safe. Is this possible in safe Rust code? Is there a Rust build flag that would catch this behavior?
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` 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.
Re: Lapce – Fast and Powerful Code Editor written in Rust
#114Earlier quoted context omitted.
Jetbrains is trying to catch up on this, and in some cases has.
If I escape vscode I'd rather it be to something lighter rather than heavier. I used sublime before vscode and I'm tired of my editor using up half my ram.
Re: Lapce – Fast and Powerful Code Editor written in Rust
#115Re: Lapce – Fast and Powerful Code Editor written in Rust
#116Earlier quoted context omitted.
Only problem with sublime is the exorbitant price. It's just too much!
$100 for what one (three?) years? 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.
Re: Lapce – Fast and Powerful Code Editor written in Rust
#117Earlier quoted context omitted.
Not sure if eating memory like complex 3d modeling software (with model in it) for something what is at the end of the day basically just text editing is the right tool for the job. Energy with excluded externalities is cheap. So modern personal computers can bear anything. But should they?
It's a tradeoff. Because they are written using web technologies it means that they are very extensible. If you are a professional then just buy more RAM.
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.
Re: Lapce – Fast and Powerful Code Editor written in Rust
#118Author here. I didn't expect this will go on Hacker News. Although the editor has been my daily drive for almost one year now, it's really rough on the edges. The plugin system as described in the README hasn't been implemented yet.
Re: Lapce – Fast and Powerful Code Editor written in Rust
#119Earlier quoted context omitted.
sublime text is the best editor currently, in my view. apart from code folding.
Not FOSS. For many, that's an issue. Personally, I just don't feel comfortable working with sensitive information or proto-executables in closed-source software. I get the appeal, if you come from macOS or Windows, but for Linux it's often the first "dirty" thing you would introduce, so it feels like a big deal. Btw. I have used Sublime. It is a very nice Editor. Most importantly incredibly snappy and so far no other…
~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.
Re: Lapce – Fast and Powerful Code Editor written in Rust
#120Earlier quoted context omitted.
Not FOSS. For many, that's an issue. Personally, I just don't feel comfortable working with sensitive information or proto-executables in closed-source software. I get the appeal, if you come from macOS or Windows, but for Linux it's often the first "dirty" thing you would introduce, so it feels like a big deal. Btw. I have used Sublime. It is a very nice Editor. Most importantly incredibly snappy and so far no other…
> Personally, I just don't feel comfortable working with sensitive information or proto-executables in closed-source software. So, just how the biggest companies, banks, governments, etc. in the world work (using e.g. Excel, Word, Visual Studio, etc)...