3 ms·
The problem is that rust is being shoved in pointless places with a rewrite-everything-in-rust mentality. There's lunatics that want to replace basic Unix tool
by epolanski 1y ago
The problem is that rust is being shoved in pointless places with a rewrite-everything-in-rust mentality.
There's lunatics that want to replace basic Unix tools like sudo, etc, that are battle tested since ages which has been a mess of bugs till now.
Instead Rust should find it's niches beyond rewriting what works, but tackling what doesn't.
- VWWHFSfQ 1y agoIs the apt package manager a pointless place? It seems like a pretty foundational piece of supply chain software with a large surface area.
- metalforever 1y agoThe author of the rust software did not solve the platform problem, as a result it is not a solution. Since it is not a solution, it should be reverted. It's really that simple.
- genewitch 1y agoWe need lisp, cobol, and java in apt, too. and firefox.
- sidewndr46 1y agoI seem to remember going through this with systemD in Ubuntu. Lots of lessons learned seemed to come back as "didn't we fix this bug 3 years ago?"
- dralley 1y agoConverting parsers to Rust is not "pointless". Doing string manipulation in C is both an awful experience and also extremely fertile ground for serious issues.
- donkeybeer 1y agoapt is C++
- epolanski 1y agoIssues that are battle tested from ages.
- Cthulhu_ 1y agoSure, which is highly valuable information that hopefully made its way into a testing / verification suite. Which can then be used to rewrite the tool into a memory-safe language, which allows a lot of fixes and edge cases that were added over time to deal with said issues to be refactored out. Of course there's a risk that new issues are introduced, but again, that depends a lot on the verification suite for the existing tool. Also, just because someone did a port, doesn't mean it has to be adopted or that it should replace the original. That's open source / the UNIX mentality.
- dboon 1y agoIt’s very easy to write a string library in C which makes string operations high level (both in API and memory management). Sure, you shouldn’t HAVE to do this. I get it. But anyone writing a parser is definitely skilled enough to maintain a couple hundred lines of code for a linear allocator and a pointer plus length string. And to be frank, doing things like “string operations but cheaply allocated” is something you have to do ANYWAY if you’re writing e.g. a parser. This holds for many things in C
- criddell 1y ago> a pointer plus length What would length represent? Bytes? Code points? Anyway, I think what you are asking for already exists in the excellent ICU library. And it's not a very easy thing to maintain. Unicode stuff changes more often than you might think and it can be political.
- steveklabnik 1y agoThis is just a variation of the "skill issue" argument. If it were correct, we wouldn't see these issues continue to pop up. But we do.
- josefx 1y agoI think it is more a matter of convenience. There are countless string implementations for C, some tiny projects, others part of larger frameworks like Glib. At the end of the day a C developer has to decide if they are going to pull in half of gnome to handle a few lines of IO or if they are just going to use the functions the C standard conveniently ships with. Most people are going to do the later.
- mmastrac 1y agosudo is not fully battle tested, even today. You just don't really see the CVEs getting press. https://www.oligo.security/blog/new-sudo-vulnerabilities-cve-2025-32462-and-cve-2025-32463 https://www.oligo.security/blog/new-sudo-vulnerabilities-cve...
- deleted 1y ago[deleted]
- jamespo 1y agoNeither of those vulnerabilities look like rust would necessarily help however
- metaltyphoon 1y agoThats not the point OP was mentioning as in “battle tested” doesn’t mean free of bugs.
- saghm 1y agoFWIW sudo has been maintained by an OpenBSD developer for a while now but got replaced in the base system by doas. Independent of any concerns about Rust versus C, I don't think it's quite as unreasonable as you're claiming to consider alternatives to sudo given that the OS that maintains it felt that it was flawed enough to be worth writing a replacement for from scratch.
- SoftTalker 1y agosudo had grown a lot of features and a complicated config syntax over the years, which ended up being confusing and rarely needed in practice. doas is a lot simpler. It wasn't just a rewrite of a flawed utility but a simplification of it.
- saghm 1y agoRegardless of the exact terminology used to describe why it was done, my point is that assuming that people are "lunatics" because they want to replace sudo is not a particularly compelling claim, and that's what the comment I was responding to had said.
- honeycrispy 1y agoCalling it pointless comes across as jaded. It's not pointless. Supporting Rust attracts contributors, and those contributors are much less likely to introduce vulnerabilities in Rust when contributing vs alternatives.
- rrmm 1y agoto introduce certain common vulnerabilities ... not vulnerabilities in general.
- marcosdumay 1y agoCue for all those battle tested programs that people keep finding vulnerabilities several decades after they got considered "done". You should try looking at the test results once in a while. And by the way, we had to replace almost all of the basic Unix tools at the turn of the century because they were completely unfit for purpose. There aren't many left.
- anarki8 1y ago> The problem is that rust is being shoved in pointless places with a rewrite-everything-in-rust mentality. > There's lunatics ... I think the problem is people calling developers "lunatics" and telling them which languages they must use and which software they must not rewrite. Battle tested is not bulletproof: https://cybersecuritynews.com/sudo-linux-vulnerability/ https://cybersecuritynews.com/sudo-linux-vulnerability/ Applying strict compile time rules makes software better. And with time it will also become battle tested.
- epolanski 1y agoMy point had nothing to do with languages. My point is against rewrites of critical software for the point of rewriting it *insert my favorite language*. Zig is also a safer language than C, so are many other alternatives, yet the Zig community is not obsessed in rewriting old software but writing new one. And the Zig compiler has excellent C interop (in fact it can compile C/C++), yet the community is more focused in writing new software. There are many factors that make software reliable, it's not just a matter of pretty types and memory safety, there's factors like platform/language stability, skill and expertise of the authors, development speed and feedback.
- anarki8 1y ago> My point is against rewrites of critical software for the point of rewriting it insert my favorite language. In this specific case we are talking about the maintainer adding a new language into the existing codebase. I think refactoring parts of the software in the new language is what you call "rewrite" here, correct? So what improvements does it bring? You actually answered it yourself: > it's not just a matter of pretty types and memory safety So indeed, stricter/stronger type system and additional automatic compile time and runtime checks are a major improvement. > platform As already mentioned in this thread: neither of the platforms lacking Rust were supported officially anyways. > language stability Rust is extremely stable and backwards compatible - 1.0 code still compiles without any issues on 1.90 and will continue to do so for the forseeable future. > skill and expertise of the authors The same developers continuing to contribute and newcoming developers have more checks in place to prevent bugs. > development speed I guess you imply here that developing in C++ is faster. It's in fact not if your aim is to produce correct software. There are so many more things to keep in mind and take care of with C++, you have fewer automatic checks being done by the compiler and the type system. About Zig: it's a nice language and much more comfortable to use than C/C++ IMO, but compared to Rust it lacks in strictness and safety, so added benefits are smaller and fewer if you put away subjective preferences.