Hacker News new | ask | show | jobs
by infraredcabbage 2230 days ago
Consider this. If a program is written in Python, and becomes popular, it is usually a matter of time before it gets rewritten in, and replaced by an implementation in a faster language.

There are fast implementations (C) and there are somewhat safe implementations (Python, Java, ...). If I were to place Rust in this hierarcy - it is both fast AND safe, and there's rarely a good reason to replace it, so you've software that's already at the top of the hierarcy. This means that the particular implementation is likely to be the one that doesn't get replaced.

"...in Rust" has a lot of implications other than being an exercise in marketing.

2 comments

So why not write "fast and safe implementations of popular command line utilities" rather than focusing on the implementation language? If there were a safe and fast implementation of, for example, find in Ada why should it be excluded from this list?
I don't see any reason why people who write these tools in Ada shouldn't add that to the headline as well. People who are interested in Ada would be even more likely to read the article then.
Writing fast and safe implementations of popular CLI utilities is already happening.

There's also some advocacy involved which many people obviously find distasteful. To me it's a bonus though: tell me why your tech choice makes a difference, I'll check and maybe learn it.

Anything wrong what that?

Except Rust isn't a direct replacement for c. Rust's system requirements are perhaps acceptable for what'll be normal in computers five years from now.

We don't need to re-stratify development so that only people with expensive computers with > 4 gigs of memory can compile what they run.

My laptop is a €500 bought in 2012 (it has 4Gb which is the minimum of every laptop since around 2010), and it runs rustc fine. Of course I'm not going to build a release version of any big project on it, but I won't be able to build Firefox or Chromium either on it.
You're exaggerating for effect, I assume. Rust compile does not require that much RAM.

Now, by default the "cargo" build uses all CPU threads, so if you have a 32 core Threadripper then yes, running 64 simultaneous "rustc" compiles will use 6 or 7 gigabytes.

Last I checked Rust needed more than 4GB of RAM to compile itself.

That's one of the reasons it was rejected in OpenBSD: https://marc.info/?l=openbsd-misc&m=151233345723889&w=2

clang needs more than 4GB to compile itself too.
"expensive computers"

"> 4 gigs of memory"

https://www.ebay.com/sch/i.html?_fsrp=1&_nkw=computer&_sacat...

by my standards, $5 is not an "expensive computer".

and more to the point, the language has little to do with the compilation memory required. Firefox and Chrome require significantly more memory than that to compile nowadays; they passed the 4 GB mark that could be compiled on a 32-bit machine many years ago, and both Firefox and Chrome were written entirely in C++ at the time. furthermore, you can always enable swap. it'll be slow, but if you can't afford a $5 computer, you take what you can get.

Used computers with 4GB of RAM are cheap, but not $5 cheap. The cheapest I saw at that link was $43 including shipping, for a 2008-era system. An Ivy Bridge SFF desktop with 8G RAM is $67 shipped (I have a couple, theyre nice little systems).