News for hackers. Stuff that matters.
Re:Lapce – Fast open-source code editor by ncmncm on Thursday March 17, 2022 @04:26AM (#30708823)
Nowadays when I see "written in Rust" in the title, it reads like special pleading: "It's maybe not as good as what you use, but we are really proud to have got it working at all."
Re:Lapce – Fast open-source code editor by _fat_santa on Thursday March 17, 2022 @10:23AM (#30711506)
The same reason "native MacOS app" is a selling point, it's all Electron's fault (only half kidding here).

For the tech savvy crowd, we care about stuff like this because we don't need another electron app hogging memory on our systems. Personally for me "written in rust" translates to "I care about performance" and "I care about my app not hogging your system memory"

Re:Lapce – Fast open-source code editor by hgomersall on Thursday March 17, 2022 @04:57AM (#30709000)
Really? I take it to mean "fast and won't randomly segfault".
Re:Lapce – Fast open-source code editor by mhh__ on Thursday March 17, 2022 @10:39AM (#30711672)
That should really apply to any systems language other than C for a text editor. As long as you have bounds checking and a test suite you're golden.
Re:Lapce – Fast open-source code editor by shakow on Thursday March 17, 2022 @11:18AM (#30712074)
> As long as you have bounds checking and a test suite you're golden.

And other hilarious jokes you can tell yourself

Re:Lapce – Fast open-source code editor by mhh__ on Thursday March 17, 2022 @08:29PM (#30717366)
I wouldn't recommend such a simple approach for something like a compiler, but for a text editor I don't think it's unreasonable. How many allocations can it actually need within any given subsystem which you can test individually?
Re:Lapce – Fast open-source code editor by mburee on Thursday March 17, 2022 @02:56PM (#30714643)
I can't remember the last time any C tool segfaulted on me
Re:Lapce – Fast open-source code editor by tekknik on Sunday March 20, 2022 @11:47AM (#30743645)
Sublime text is written in C, and before VSCode it was arguably the most popular editor on the planet.
Re:Lapce – Fast open-source code editor by lifty on Thursday March 17, 2022 @03:52PM (#30715203)
Which one is that?
Re:Lapce – Fast open-source code editor by gyulai on Thursday March 17, 2022 @04:46AM (#30708936)
I think that's a perfectly valid appeal to altruism in a tech-savvy audience. It makes sense to take a hit on your individual needs and wants as a user in the short term, if it helps with keeping the tech ecosystem which we collectively inhabit healthy in the long term.

Free market forces based on individual self-interest have proven to be really bad at doing that, so altruism is needed to fill the gap.

...by that logic, I prefer software written in Rust to software written in C++ or Java Script even if it's worse from a user perspective, as long as it's tolerably worse rather than just unusable.

Re:Lapce – Fast open-source code editor by eggy on Thursday March 17, 2022 @09:55AM (#30711188)
I'd prefer it written in Zig compared to Rust, C++, JavaScript, or Cobol ;)
Re:Lapce – Fast open-source code editor by whitten on Thursday March 17, 2022 @11:04PM (#30718354)
What is zig?
Re:Lapce – Fast open-source code editor by eggy on Sunday March 20, 2022 @12:16PM (#30743931)
Just a Google away: https://ziglang.org/
Re:Lapce – Fast open-source code editor by switchbak on Thursday March 17, 2022 @02:54PM (#30714617)
I moreso see this as "Written by someone who's quite concerned about runtime performance and efficiency".

Ripgrep has completely upended my expectations (in a good way) for what modern machines are capable of. I'm all for OCD perfectionism if it means the performance I dreamed of in the 90's in finally realized.

Re:Lapce – Fast open-source code editor by petr_tik on Thursday March 17, 2022 @04:23PM (#30715487)
> we are really proud to have got it working at all

On the contrary, the rust crate ecosystem and tooling means a lone developer can compose specialised libraries to produce a working artefact that scratches her own itch. Such productivity is the opposite of getting something working at all.

Trying to build an OSS cpp project or even worse, use an OSS Cpp library in your own project is more along the lines of "getting something working at all". Every third-party and some enterprise-internal Cpp libraries require one answers the following questions:

- how do I build the damn thing?

- how do I run the tests?

- how do I use the library? Vendor into the repo? apt install?

- what APIs does the system/library provide?

- where can I find the documentation and examples?

- how do I set up code completion?

- how do I know am using the library interface correctly?

- how do I know I didn't violate any invariants/safety guarantees?

Compare with the list of dependencies across the Cargo workspace members.

https://github.com/lapce/lapce/blob/master/lapce-core/Cargo....

https://github.com/lapce/lapce/blob/master/lapce-ui/Cargo.to...

https://github.com/lapce/lapce/blob/master/lapce-rpc/Cargo.t...

The cost of adding a new rust dependency when measured by the number of questions you need to answer beforehand is nearly constant. This means a layman can be more productive in rust.

Re:Lapce – Fast open-source code editor by ncmncm on Thursday March 17, 2022 @07:47PM (#30717111)
Correct use, documentation, and other concerns are imporant for all libraries, whether got via cargo or otherwise, so this amounts to special pleading again.

More importantly, though: how hard is it to use a library coded in C++ from your Rust program? You have to make and maintain some sort of shim layer. Even a C library needs some such effort. For any given need, you are much less likely to find an existing and suitable Rust library already written, released, and maintained than one in some other, more widely used, language.

Re:Lapce – Fast open-source code editor by follower on Friday March 18, 2022 @12:14AM (#30718685)
> Correct use, documentation, and other concerns are important for all libraries, whether got via cargo or otherwise

This is true.

However the Cargo/Rust ecosystem has one standard answer, read the associated crate docs, e.g.:

https://docs.rs/libloading

Coincidentally, the above linked crate `libloading` also shows how to access functionality in a shared library that exposes a C ABI compatible interface whatever the implementation language.

Re:Lapce – Fast open-source code editor by dingoegret12 on Thursday March 17, 2022 @04:34PM (#30715586)
I don't understand this sentiment. Rust is the only language ecosystem where I find that anything works at all. Whenever I have to build something not built in rust, I'm praying. With rust made tooling, I just never have problems.
Re:Lapce – Fast open-source code editor by ncmncm on Thursday March 17, 2022 @05:47PM (#30716245)
I don't know of any essential tool coded in Rust. Literally every single thing I rely on is coded in other some other language, and works. There is exactly one in Haskell: pandoc. No Java or C# (although I guess some people feel they need Minecraft or Kerbal Space Program). No Lisp, except Emacs. No Erlang, Clojure, Scala, OCaml, Dart, or Ada. Does TeX still count as Pascal?

The only case I know of where I would need a Rust program is to check a blake3 hash. That won't last.

Re:Lapce – Fast open-source code editor by MrJohz on Friday March 18, 2022 @02:19AM (#30719182)
Ripgrep is my essential codebase search tool. It's incredibly fast, very clear, and it just works how I expect. I use it a lot if I'm refactoring a larger codebase, particularly because it works well for more dynamic languages (where a compiler won't help) and for comments and documentation (where I want the naming to remain consistent).

I've heard good things about Bat and Exa - I personally have never felt a huge need for them, but other people claim that they're pretty essential to them.

Re:Lapce – Fast open-source code editor by nooorofe on Thursday March 17, 2022 @07:11PM (#30716881)
> No Java

I am not sure what "essential tool" means if pandoc included in it. For me Intellij, Eclipse, Dbeaver are more essential (+ few other Specific tools based on Eclipse).

C# - I am not sure, MS Office?

Re:Lapce – Fast open-source code editor by ncmncm on Thursday March 17, 2022 @07:54PM (#30717164)
I acknowledge that some people depend on Java and even C# programs.
Re:Lapce – Fast open-source code editor by tekknik on Sunday March 20, 2022 @11:50AM (#30743669)
Have you tried go at all?
Re:Lapce – Fast open-source code editor by omniscient_oce on Thursday March 17, 2022 @04:28AM (#30708834)
At least they went with "lighting-fast" instead of "blazing-fast"
Re:Lapce – Fast open-source code editor by infinitezest on Thursday March 17, 2022 @07:28AM (#30709897)
I myself only use software that is "made with <3"
Re:Lapce – Fast open-source code editor by seanw444 on Thursday March 17, 2022 @09:32AM (#30710963)
I cringe quite hard when I see projects with either of these now-cliche catchphrases. It's crazy how many people use them.
Re:Lapce – Fast open-source code editor by follower on Friday March 18, 2022 @12:17AM (#30718703)
I, too, only use software that is "made with binary".
Re:Lapce – Fast open-source code editor by ASalazarMX on Thursday March 17, 2022 @02:06PM (#30714139)
I still prefer it to the "performant and beautiful" Electron made famous. almost all of the applications that said that were neither performant or beautiful, unless you found web pages and their quirks more beautiful than native GUIs.
Re:Lapce – Fast open-source code editor by chrismorgan on Thursday March 17, 2022 @06:19AM (#30709494)
“Lightning fast” is no less meaningless in practice than “blazing fast”. Both get used extensively by projects in such languages as JavaScript and Rust, on projects of similar scope that nonetheless have at least an order or two of magnitude’s performance difference.
Re:Lapce – Fast open-source code editor by ncmncm on Thursday March 17, 2022 @08:00PM (#30717208)
If the title claims "lightning fast" or "blazing fast", I expect to see quantitative comparisons to alternatives. Which operations are faster than in other programs?

alacritty is a Rust program that is promoted as uniquely fast, but is substantially slower than (e.g.) kitty.

Re:Lapce – Fast open-source code editor by randomsearch on Thursday March 17, 2022 @08:50AM (#30710575)
Vite is a tool that deserves this moniker
Re:Lapce – Fast open-source code editor by ncmncm on Thursday March 17, 2022 @08:02PM (#30717215)
What would one use Vite in place of?
Re:Lapce – Fast open-source code editor by randomsearch on Monday March 21, 2022 @01:13PM (#30756804)
webpack
Re:Lapce – Fast open-source code editor by jstx1 on Thursday March 17, 2022 @05:59AM (#30709379)
Aaand "written in Rust" got removed from the title.
Re:Lapce – Fast open-source code editor by Findecanor on Thursday March 17, 2022 @07:27AM (#30709893)
I take it as a declaration about the author: that he knows Rust now and can be hired to write Rust.
Re:Lapce – Fast open-source code editor by playcache on Thursday March 17, 2022 @07:49AM (#30710072)
I think 'safe'
Re:Lapce – Fast open-source code editor by tekknik on Sunday March 20, 2022 @11:53AM (#30743700)
What makes you think rust is more safe? The platform itself it’s flawed, so any language running on the platform is also flawed.

Load a rust program into mem, change mem, run rust program. You’ve just lost safety.