Live data from Hacker News

Lapce – Fast and Powerful Code Editor written in Rust

github.com

111–120 of 152 posts

Re: Lapce – Fast and Powerful Code Editor written in Rust

#111
post #95
post #88

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?

The lack of a GC is a pretty fundamental aspect of Rust's design, I don't see that changing in the foreseeable future. "As soon as memory management issue is solved" makes it sound like a small bug or missing feature that can be fixed with a little work.

Re: Lapce – Fast and Powerful Code Editor written in Rust

#112

Earlier 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).

I still prefer crap lightning fast code to crap tediously slow code though. If the only thing people do is build a native application instead of a webapp and that speeds my stuff up by 80% then that'll make me very happy.

Re: Lapce – Fast and Powerful Code Editor written in Rust

#113
post #47

Earlier 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?

> Is this possible in safe Rust code?

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

#114
post #30

Earlier 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.

I don't mind it using half my ram, but it needs to respond in less than 16ms in all instances. I don't want to type one letter only to find my editor frozen for 5 seconds.

Re: Lapce – Fast and Powerful Code Editor written in Rust

#115
post #95
post #88

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?

That wouldn't be a fix, it would be a regression.

Re: Lapce – Fast and Powerful Code Editor written in Rust

#116
post #61

Earlier 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.

$100 for a text editor seems quite expensive to me. I agree it is not much in comparison to many other professional tools.

Re: Lapce – Fast and Powerful Code Editor written in Rust

#117
post #84

Earlier 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 could be very extensible without being written in web technologies. For example, an IDE I worked on was written in C++ with Qt and had an embedded Python interpreter to allow extensions to be written easily. It also provided a .dll/.so extension mechanism for stuff that wanted more performance than Python could give.

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

#118
post #3

Author 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.

Damn this is really cool - thanks!

Re: Lapce – Fast and Powerful Code Editor written in Rust

#119
post #21

Earlier 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…

> Oh, yeah, and it's fucking expensive...

~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

#120
post #52

Earlier 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)...

Honestly "big companies, banks, governments" do sound like the usual suspects for writing programs insecurely to me (I work for one of those).
Post reply on HN