8 ms·
Who knew using already existing data race analysis tools is much more feasible than shoehoning a huge project into a brand new language. Way to go mozilla!
by ChiefOBrien 5y ago
Who knew using already existing data race analysis tools is much more feasible than shoehoning a huge project into a brand new language. Way to go mozilla!
- Jweb_Guru 5y agoIf you believe that this tool has found all the data races in the C++ code, or even a majority of them, I have a bridge to sell you.
- ChiefOBrien 5y agoOh come on now. If it was really important for them then why did they chose C++ a long time ago after deciding to rewrite Netscape from scratch? Their history is full of dumb choices and now suddenly going full Rust is the most important thing because... the codebase is lousy? It's not gonna bring back any new/old users, and right now the web needs a healthy marketshare.
- steveklabnik 5y ago> now suddenly going full Rust is the most important thing As said above, Mozilla does not seem to have ever suggested, in the past or now, that "going full Rust" is a goal, let alone "the most important thing."
- ChiefOBrien 5y agoYeah and Webrender, Stylo, and Servo just happen to appear out of thin air.
- dralley 5y agoFirefox has something like 8 million lines of C++. Stylo replaced about 150,000 lines of that, and WebRender is more of a fast path than a true replacement of anything. Both of those rewrites came with massive speedups due to the amount of parallelism they were able to use, which was impractical in C++. Other parts of Firefox are not as critical or parallelizable, hence why they aren't being replaced any time soon. You seem to be quite aggressively misinformed, if you are not deliberately trolling.
- ChiefOBrien 5y ago> the amount of parallelism they were able to use, which was impractical in C++ You mean after not using OpenMP, basic multithreading core guidelines, and not doing the refactoring with sanity checkup in TLA+, tools that end up on the frontpage everytime people rediscover them.
- Yoric 5y agoOut of curiosity, have you used OpenMP or TLA+? I seem to remember that solve problems that are really, really different from the use cases for which Rust is designed.
- monocasa 5y agoAlso, I'll throw out there that TLA+ is nearly as handy for Rust as it is for C++. Safe Rust will keep you from data races that break it's safety guarantees, but there's more to correct use of concurrent algorithms than that. TLA+ is a great tool for modelling those other concerns if you need to apply a little more engineering rigor to some of those problems.
- Jweb_Guru 5y agoDo you believe that "just applying TLA+ to the rendering code in Firefox" is a useful thing to recommend to people? TLA+ cannot scale to that size of a codebase without such dramatic simplifications that it's not going to catch any of these kinds of bugs. This is the entire reason why proving safe encapsulation of `unsafe` blocks is possible was so important, it lets you focus the proof engineering effort on a much tinier part of the program. Sure, it can't prove the kind of global invariants TLA+ aims for, but you can also actually apply it to a very large codebase like Firefox (and keep it in sync--another problem you need to deal with when using tools like TLA+).
- steveklabnik 5y agoWebrender and Stylo were big projects, but they’re already in tree, and that means about 10% of Firefox is Rust. That’s hardly “full Rust,” and even less so “at all cost.” You would have to show intent to actually re-write all of Firefox, you’d have to somehow deal with the fact that the number of engineers writing more C++ and continuing to do so is far greater than those writing Rust... there’s a ton of evidence that “full Rust at all cost” is not intended, desired, or being worked on. It sounds like you’re objecting to any Rust being included at all, if I’m being honest. EDIT: Like, for example, this article is about committing engineering time to help improve their C++. If the goal was 100% Rust at all costs, that would be a waste. Even this article is an indication that this thesis is incorrect.
- dralley 5y agoPlease a more productive use of time than constructing ridiculous strawmen on the internet.
- dang 5y agoHey, could you please not take HN threads into flamewar, including programming language flamewar? It's tedious, and one reason this site got started was to have a forum that avoids that kind of thing. Thoughtful critique is welcome, but that would require (a) adding solid information, and (b) taking out the swipes. https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html