News for hackers. Stuff that matters.
Re:I hate Rust (programming language) by tmtvl on Friday April 19, 2024 @05:30PM (#40092135)
I kind of have grown to like Rust, not for the language itself (I mean, I've got Common Lisp, so using another language is like chopping down a tree by biting off chunks with my teeth instead of using a chainsaw), but because various tools made with it, like Ripgrep, are very pleasant to use.

It's a shame, though, that people who want to 'rewrite it in Rust' always talk about rewriting things written in C or C++, when I really want them to rewrite stuff written in languages like Python or Ruby. Imagine if emerge was rewritten from Python to Rust, you could probably install Gentoo in 5 minutes, rather than the weekend it takes now. I wouldn't be surprised if rewriting all Python code in your average GNU/Linux system to Rust would make your computer run between 10^6 and 10^9 times faster.

Re:I hate Rust (programming language) by n8henrie on Friday April 19, 2024 @06:44PM (#40092742)
Interesting -- I usually wish people would RiiR because of running into segfaults that I presume would be impossible in (safe) rust, or because installing the (mostly) static binaries is often much easier than wrangling (non-wheel) Python dependencies.

I have found disappointing performance gains rewriting my small Python projects in Rust as most time is spent in IO and many / most CPU-intensive tasks in Python are done in C or C extensions that release the GIL and seem just as fast as Rust would be.

No doubt the improved responsiveness / startup time for rust CLI apps is much appreciated, and it is trivial to intentionally write a very poorly performing CPU-intensive task in Python.