4 ms·
Am I the only one who thinks we need less short-lived tools written in memory-safe languages an more system infrastructure written in said languages? Don't tak
by teo_zero 2y ago
Am I the only one who thinks we need less short-lived tools written in memory-safe languages an more system infrastructure written in said languages?
Don't take me wrong, I like when someone creates a better version of something existing. For example, ripgrep is fantastic. But seeing the recent trend of rewriting whatever in Rust just because, I can't help wondering why I should bother whether bc leaks or not...
- dijit 2y agoThose will take time, nobody will re-invent Linux, likely it will come with the OS systems knowledge advancements from the last 30 years. Redox-OS is one such effort.
- uecker 2y agoRust does not guarantee absence of memory leaks, does it? I think this is the general "rewriting solves all problems" fallacy, which is rarely true, but who wants to maintain existing code, if there is something new and cool? So we get rewrites which largely just add new projects that then have to be maintained in parallel, because they rarely are to completely replace the old (if at all) and at some point the new is not cool anymore and that it is just another thing. I like some key ideas of Rust, but overall I still like many things about C much more (stability, fast compile times, simplicity), so I would much prefer people improving memory safety in C projects.
- ilius2 2y agoI like Zig's approach much more than Rust. When you get fixated on one aspect and sacrifice everything for that, you get things like Perl, Java or Rust.
- tialaramex 2y agoSo, massive success ?
- pjmlp 2y agoMajor adoption across the industry,being taught at university courses, bootcamps, shipping in commercial OSes?
- steveklabnik 2y agoRust does not guarantee the absence of memory leaks, that's correct.
- nineteen999 2y agoMaybe we are not seeing rewrites of large OSS projects in Rust yet (eg. Linux kernel, Blender, LibreOffice) because the language is not (yet) ready for projects of that scale and complexity.
- maxbond 2y agoWhat is the lack of a Rust equivalent to all those projects is because they already exist and work well, and Rust programmers aren't as mad to rewrite things as the stereotype suggests?
- mrob 2y agoI disagree that they work well. A quick search of the CVE database will find many vulnerabilities that could have been prevented by rewriting in a memory safe language. Ideally, it should be done. However, rewriting those large projects would be a very difficult task, so it's probably not the best use of resources when there are still relatively easy security improvements available, such as implementing OpenBSD's pledge/unveil system.
- yjftsjthsd-h 2y agoOversimplifying, there are two metrics: Bugs, and features. You're pointing out that the existing ones have bugs, parent comment is pointing out that the existing ones have features. Rewrites tend to have less of both.
- nineteen999 2y ago> so it's probably not the best use of resources Cool, so what useful software are rust programmers writing with all that free time? Where is it? Where's the "killer app"? Whatever it is, nobody is talking about it.
- steveklabnik 2y agoThere’s millions of lines of production Rust at tons of companies. It’s beyond one single killer app. Basically every major tech company relies on at least some Rust at this point.
- cjk2 2y agoI’d sleep better knowing the existing bc can’t write to ~/.profile than if it’s written in rust or not.
- jgarzik 2y agoMost utils are 25+ years old. It is worth revisiting, dropping old cruft, entrenching UTF-8 support, and other areas. Smaller and fresher.
- majke 2y agoSounds like second system syndrome.
- stefs 2y agoI don't think that's necessarily the case. Maybe the original version was designed around limitations and assumptions that made sense back then, which aren't there or true anymore. Maybe there were design decisions that turned out to be mistakes in hindsight but can't be dropped due to compatibility reasons.
- Thiez 2y agoAdding UTF-8 support in 2024 is hardly second system syndrome. Note that these re-implementations generally try to be compatible with the original rather than starting with a completely new vision, another sign that we're not suffering from SSS here.
- teo_zero 2y ago> dropping old cruft, entrenching UTF-8 support, and other areas. I couldn't possibly disagree. My point is that focusing on ownership, lifetime, etc. (the most prominent features of Rust) shouldn't be goals for a tool that's invoked to perform a few quick calculations and shut down immediately after.
- yjftsjthsd-h 2y ago> It is worth revisiting, dropping old cruft, entrenching UTF-8 support, and other areas. I certainly won't say anything against supporting UTF-8 absolutely everywhere, but "dropping old cruft" is IME usually what people say right before dropping useful features or breaking platforms that are actively in use.