4 ms·
Why not go work on redox, or write something new? I don't get this fixation rust proponents have to try and force-jam it into pre-existing projects, instead of
by snvzz 2y ago
Why not go work on redox, or write something new?
I don't get this fixation rust proponents have to try and force-jam it into pre-existing projects, instead of writing their own rust software.
- bluejekyll 2y agoI think you need to consider the intention of why you would want to write base components of FreeBSD in Rust. It’s not to make a Rust operating system with its own new features, it’s to maintain and develop on an in existing system with current users, fixing bugs, offering an upgrade path that’s generally backward compatible with existing usage. New features in Rust, old features probably kept in C, unless they are highly problematic.
- Xylakant 2y agoSpecifically, rust was designed and created for this use case. It’s the language created to rewrite Firefox in a memory safe language, component by component. This means rust is uniquely capable of integrating into C/C++ code bases, unlike for example go. So it makes sense to do exactly that - take existing projects and slowly migrate them to a memory safe version.
- gwervc 2y agoWhich percentage of Firefox is now written in Rust? If the project it was started for still isn't totally migrated, it makes sense for others to remain skeptical. There's value in simplicity, like having to use a single language for a projet instead of two.
- fnord123 2y agoOf the 32,373,275 lines in Firefox that tokei reports, 3,439,065 is Rust. 5,740,010 is in C (C + C Headers). And 5,643,721 is C++ (C++ + C++ Headers). 7,343,459 is JS. Using the "Code" column to ignore comments and blanks. This is based on the mozilla-central-78a5d30a370f bundle. (Also, holy crap it took tokei 10m to run this analysis).
- EasyMark 2y agoI don’t think the relative % of rust has changed a lot in the past few years though, has it? After they got the obvious low lying fruit it slowed down dramatically didn’t it?
- fnord123 2y agoIt's a good question but I have no plans to write a script that walks mercurial history and plots the relative percentages of the code based on language. If you find the time and urge I'd be interested to know the results.
- ycombinatrix 2y ago1 line of rust != 1 line of C
- Xylakant 2y agoI don't see why this is a reason to be skeptical. Firefox is a huge codebase. Substantial chunks of it have been rewritten using Rust while maintaining the entire app and adding features. This is entirely the plan: You can slowly, as you touch parts, migrate the codebase. Firefox (and many other projects) was already a mix of multiple languages - it uses C, C++, Javascript, ... and now Rust. And while there is value in having less languages to deal with, there is equally value to use multiple languages and apply them where you see major benefit. For example, replacing exposed and high-risk components (image/file parsers for example) with a language that de-risks those implementations. Like all of the things in software engineering, this is a tradeoff. It may not make sense for your application, but it can make sense for others.
- kelnos 2y agoI think your use of "force-jam" suggests a bias you may have. Making existing, well-used OS kernels safer is probably a lot easier than writing a new kernel from scratch, porting drivers, marketing it, and gaining a larger user base. Not saying that's not a worthwhile endeavor, but it's up to everyone to decide what they want to do. Ultimately the maintainers of a non-Rust project will decide if they want Rust in there. No amount of "force-jamming" is going to make it happen without their considered consent.
- JackSlateur 2y agoQuick note: "rewrite in <..>" should be consider kind of harmful FFI are not fine, an insane amount of care must be taken around them It means that rewriting part of something in rust has chances to reduce the overall security of the software
- bbatha 2y agoThis wasn't a request to rewrite anything in Rust. This was a request to have the facilities to build Rust in FreeBSD base (which includes userland and kernel code). Specifically the request was to write new code in Rust.
- snvzz 2y agoThe request was to -metaphorically- extend the red carpet to some external rust proponents.
- snvzz 2y ago>I think your use of "force-jam" suggests a bias I find my use of force-jam was entirely appropriate, after careful consideration informed by the How rust proponents push rust into pre-existing projects. As well as the drama they bring alongside them, and their propensity to resort to personal attacks.
- silisili 2y agoWhen all you own is a hammer, every problem looks like a nail.
- timeon 2y agoIronically, so is use of analogies.
- gspr 2y ago> Why not go work on redox, or write something new? Because the BSDs and Linux are actually used in hundreds of millions of systems and provide clear value to lots of people. Redox is cool, but it's in an entirely different league. It's not surprising that some people prefer to work on brand new stuff (like Redox), and some people prefer to work on improving old stuff that is actually in widespread use. > I don't get this fixation rust proponents have to try and force-jam it into pre-existing projects, instead of writing their own rust software. I take it you prefer to always demolish your house and build a new one whenever any renovation, nomatter how small, involves a significant change in materials or methods or technology?
- snvzz 2y ago>whenever any renovation, nomatter how small When such an analogy is put forth, I cannot believe there is any intent to discuss the subject in good faith.