Live data from Hacker News

Mozilla Welcomes the Rust Foundation

blog.mozilla.org

41–50 of 184 posts

Re: Mozilla Welcomes the Rust Foundation

#41

Isn’t a million dollar yearly budget really low considering how rich those companies are? That’s like 4 full time engineers. Not even a 5 a side football team.

I guess that depends on where the engineers are, and how much they are paid - I've never known anyone (in coding) to be paid > £100k (~$140k) - but then maybe I move in the wrong circles!

So you could certainly get more than 4 engineers on board, plus some project managers etc

Re: Mozilla Welcomes the Rust Foundation

#42
post #23

> Mozilla used Rust to build Stylo, the CSS engine in Firefox (replacing approximately 160,000 lines of C++ with 85,000 lines of Rust). I would have loved to see two competing teams rewrite it, one in C++ and the other in Rust. Saying that the rewrite is better does nothing to say WHY it's better. Refactored code is almost always radically better, even when it's in the same language, for reasons that might be insulti…

Mozilla already tried re-writing the CSS engine in C++ before. They failed. C++ simply wasn't usable for writing a parallel CSS engine. "This top-down structure is ripe for parallelism; however, since styling is a complex process, it’s hard to get right. Mozilla made two previous attempts to parallelize its style system in C++, and both of them failed. But Rust’s fearless concurrency has made parallelism practical!"…

> C++ simply wasn't usable for writing a parallel CSS engine.

I think it can be said that Mozilla was able to use Rust to achieve what they failed to with achieve with C++. It's not justified to claim that C++ is/was not suitable for this purpose.

C++ offers direct, low-level control over memory, and C++ can be used to implement anything which can be implemented in Rust. Maybe Rust has certain advantages which made this problem a lot easier to solve for Mozilla, and I'm certainly happy to have Rust in the language landscape, but another team with other processes may have been able to use C++ to achieve similar goals.

Re: Mozilla Welcomes the Rust Foundation

#43

I've never seen the original introduction of Rust from Graydon Hoare before seeing the link in this post: http://venge.net/graydon/talks/intro-talk-2.pdf The original vision for Rust sounds a lot like a typed Erlang without the BEAM.

I started following it when he first started working on it back then, but I actually lost (some) interest once it became more about the memory safety features. It's not that I don't think the borrow checker etc. stuff is really awesome. I just find the original concept very appealing and incremental. Essentially an OCaml for systems level programming. A sane C++. I feel like Rust is making its moves slowly into that…

I'm just curious, feature-wise, what keeps OCaml from being an OCaml for systems level programming?

Re: Mozilla Welcomes the Rust Foundation

#44
post #34

Earlier quoted context omitted.

So you are telling me that a parallel CSS engine can't be usable if written in C++ but large scale particle/molecule simulators, AAA game engines and other high-fidelity simulator environments are 100% C++ codebases?

The quote says that a parallel CSS engine in C++ was hard to get right in their case.

The post's claim is:

> C++ simply wasn't usable for writing a parallel CSS engine.

That's a stronger claim than that C++ was hard to get right. It's a claim that the language is not up to the task.

Re: Mozilla Welcomes the Rust Foundation

#45
post #39

Earlier quoted context omitted.

Parallelism is hard in both Rust and C++. When I think about low level parallelism, like in the case of rendering, I believe that Safe Rust will only get you so far perfomance-wise. To get the best speed you will still need unsafe. I'm wondering how their engine fares compared to Chrome.

It's entirely a myth that unsafe is needed to get speed boosts in Rust. Usually, the standard library, as well as other crates, offer optimal performance without resorting to unsafe code. (If we go pedantic, Vec and other primitives do rely on unsafe, but the point is as an application developer you don't have to write unsafe code yourself.)

It's not entirely a myth. There are situations where you can't get the compiler to emit optimal code using only safe Rust. You can go a very long way with only safe Rust (and i do!), but not everywhere.

Re: Mozilla Welcomes the Rust Foundation

#46
post #23

Earlier quoted context omitted.

Mozilla already tried re-writing the CSS engine in C++ before. They failed. C++ simply wasn't usable for writing a parallel CSS engine. "This top-down structure is ripe for parallelism; however, since styling is a complex process, it’s hard to get right. Mozilla made two previous attempts to parallelize its style system in C++, and both of them failed. But Rust’s fearless concurrency has made parallelism practical!"…

So you are telling me that a parallel CSS engine can't be usable if written in C++ but large scale particle/molecule simulators, AAA game engines and other high-fidelity simulator environments are 100% C++ codebases?

Typically simulators don't benefit much from extremely fine-grained parallelism; while you likely can simulate each entities behavior in parallel, and then step the world, you don't have fine-grained dependencies within one step (and likely many entities computations have predictable and balanced computational costs, further simplifying parallelism). AAA games were certainly until recently renowned for their poor usage of parallelism, though perhaps there are exceptions - but remember, large scale data-parallelism akin to simulations isn't the problem; it's problematic once there are dependency cycles and/or parallelism needs to be particularly fine-grained.

Finally, many games and simulators are written in clearly, clearly sub-"optimal" fashion. Games are about fun; not necessarily about extracting maximal possible performance - and compared to browsers, even to minor players like Firefox, even large games have limited usage and especially limited lifetime usage, and they're likely less sensitive to security issues too. As a result, when a game's usage of of parallelism has a few very unlikely race conditions that might not be a show-stopper - whereas it could be an exploitable flaw in browsers.

All in all, it's extremely plausible that games+sims aren't quite as dramatically impacted by C++'s risks as a browser's styling engine is. It's perhaps no coincidence that the language was pretty much designed for it.

Re: Mozilla Welcomes the Rust Foundation

#47
post #25
post #6

Earlier quoted context omitted.

Mozilla also played a big part in this foundation being necessary after it laid off most of its employees involved in Rust last year. The foundation is a good idea of course, but they could have handled it better, e.g. setting up the foundation first, so that the Rust developers could transition to it without the disturbance and bad PR generated by the layoffs? It's not that Mozilla is so cash-strapped that it had to…

A brief reminder that Mozilla paid its top executive, Mitchell Baker, $2.4m in 2018. http://calpaterson.com/mozilla.html

This also exists in the broader context of tremendous growth in CEO pay over recent decades. There are widespread claims that executive pay is inflated. In one sentence:

> Importantly, rising CEO pay does not reflect rising value of skills, but rather CEOs’ use of their power to set their own pay.

Source: https://www.epi.org/publication/ceo-compensation-2018/

I find these arguments persuasive.

Re: Mozilla Welcomes the Rust Foundation

#48
post #25
post #6

Earlier quoted context omitted.

Mozilla also played a big part in this foundation being necessary after it laid off most of its employees involved in Rust last year. The foundation is a good idea of course, but they could have handled it better, e.g. setting up the foundation first, so that the Rust developers could transition to it without the disturbance and bad PR generated by the layoffs? It's not that Mozilla is so cash-strapped that it had to…

A brief reminder that Mozilla paid its top executive, Mitchell Baker, $2.4m in 2018. http://calpaterson.com/mozilla.html

She actually makes over $3 million now. https://www.zdnet.com/article/endangered-firefox-the-state-o...

Re: Mozilla Welcomes the Rust Foundation

#49
To put this in a slightly larger context, here are three articles that look at the history of open source foundations and compare them:

https://opensource.com/business/16/2/bright-lines

https://towardsdatascience.com/the-unsung-heroes-of-modern-s...

https://livablesoftware.com/study-open-source-foundations/

Re: Mozilla Welcomes the Rust Foundation

#50

Isn’t a million dollar yearly budget really low considering how rich those companies are? That’s like 4 full time engineers. Not even a 5 a side football team.

Amazon and Microsoft are building internal teams to work on the compiler, so the budget of the foundation is not necessarily representative of the total financial investment by these companies.

I hope that Amazon and MS will not represent the majority of investment in Rust's development. The incentive structure for an independent foundation is favorable for a variety of reasons.
Post reply on HN