Live data from Hacker News

How Stylo Brought Rust and Servo to Firefox

bholley.net

161–170 of 199 posts

Re: How Stylo Brought Rust and Servo to Firefox

#161
post #91

Earlier quoted context omitted.

Is there anything specific about Rust that you don’t think a commercial organisation would do? Obviously, commercial organisations have a long track record of developing and supporting programming languages.

> Is there anything specific about Rust that you don’t think a commercial organisation would do? A good job. Most commercial PL efforts kind of suck. There are a small number of exceptions, and Rust is one of them.

Java, C#, Ada, JavaScript, etc are more successful that Rust. The comparison is not good though because Rust is younger.

You could argue survivorship bias but that applies to Rust as well.

Re: How Stylo Brought Rust and Servo to Firefox

#162
For example, register allocation is a tedious process that bedeviled assembly programmers,

Yet more propaganda. I’ve been part of the cracking and demo scene since my early childhood. If you didn’t code in assembler you might as well not have taken part in it at all, because small fast code was everything. None of us ever had an issue with register allocation, nor do we face such issues today. Not 30+ years ago, not now.

Re: How Stylo Brought Rust and Servo to Firefox

#163

Earlier quoted context omitted.

(Nitpick: Traditional WMs composite as well, they just do it on the CPU instead of the GPU.) That's interesting. I remember the developer of KWin (KDE's window manager) saying that he considered disabling GPU compositing when the battery runs low, but he couldn't prove that this actually saves energy. In fact, on some configurations, GPU compositing was less power-intensive than CPU compositing.

I thought traditional WMs had the clients send the draw commands directly to the server, rather than doing any compositing themselves? It's definitely true that different GPUs have different power profiles (and even the same GPU with different drivers).

Don't forget "race to sleep". If the GPU takes 3x more power but completes 10x faster and can go back into low power mode sooner that could be another power savings.

Re: How Stylo Brought Rust and Servo to Firefox

#164

Earlier quoted context omitted.

Yeah but Firefox is already struggling while supporting all the possible standards and more ("sorry our site is better view with Google IE4... ehm Google Chrome"). The whole Mozilla strategy of corroding Firefox piece by piece is actually very professional. Big backwards-incompatible transitions in technology almost always fail.

> sorry our site is better view with Google IE4... ehm Google Chrome FWIW this is usually due to folks doing performance work in only one browser or not really testing well and slapping that label on after the fact. Or stuff like Hangouts and Allo where they use nonstandard features. The major things Firefox doesn't support that Chrome does are U2F (it does support it now, but flipped off, will flip on soon I think)…

I've been using a U2F plugin that works everywhere except google, which insists that you cannot possibly have U2F on firefox.

Re: How Stylo Brought Rust and Servo to Firefox

#165
post #59

Earlier quoted context omitted.

What I wonder, and I do not mean this in negative way, is whether this would have happened in a more commercially oriented organisation. Mozilla remains a foundation, and I consider Rust a fruit of their labour in itself. To put it another way, I find it hard to justify developing Rust just for a web browser. But if you consider it from the perspective of a foundation developing tools for the developer community as a…

> I find it hard to justify developing Rust just for a web browser "just for", our browsers are already very complex. The browser is responsible for sandboxing and in effect taming the wild web.. and the web is not looking to become less wild :) in the future browsers will have to prioritize CPU time between tabs seeking to mine bitcoin, crazy ad schemes, and battery power. In terms of security, browser bugs scares m…

The browser is the only program on my computer that has a complexity that scares me.

I can look at the Linux source and figure out what is going on. There are some hard parts (synchronisation stuff and virtual memory is quite opaque on the first look) The code to handle layout and document processing in libreoffice is hairy, but I think I could manage.

A browser on the other hand. Layout and years of accumulated corner cases (handling the infinite variety of bad code out there) proper CSS rendering, multiple JITs, a shit-tonne of state and sandboxing of things that weren't meant to be sandboxed in the first place. Most, or maybe even all at the very bleeding edge of CS research.

Re: How Stylo Brought Rust and Servo to Firefox

#166

Earlier quoted context omitted.

Optimal register allocation has been polynomial time for more than 10 years - for some definition of optimal. IIRC it started with programs in SSA form and has dropped that requirement more recently. Modern GCC uses SSA form and I think LLVM might too.

GCC and LLVM do not retain SSA form by the time register allocation happens (they both convert to a non-SSA low-level IR before then). It's also worth pointing out that "optimal" in theory doesn't necessarily correspond to optimal in practice. The hard problem of register allocation isn't coloring the interference graph (since there's not enough registers most of the time), it's deciding how best to spill (or split l…

Yes, the fun in compilers: Even if every phase and every optimization actually produces optimal results, the combination is probably not optimal.

One deep problem is that there is no good optimization goal. Today's CPUs are too complex and unpredictable performance-wise.

Another problem is: Register pressure is one of the most important things to minimize, but how can the phases before register allocation do that? They use a surrogate, like virtual registers, and thus become heuristics even if they solve their theoretical problem optimally.

Re: How Stylo Brought Rust and Servo to Firefox

#167

Earlier quoted context omitted.

(Nitpick: Traditional WMs composite as well, they just do it on the CPU instead of the GPU.) That's interesting. I remember the developer of KWin (KDE's window manager) saying that he considered disabling GPU compositing when the battery runs low, but he couldn't prove that this actually saves energy. In fact, on some configurations, GPU compositing was less power-intensive than CPU compositing.

I thought traditional WMs had the clients send the draw commands directly to the server, rather than doing any compositing themselves? It's definitely true that different GPUs have different power profiles (and even the same GPU with different drivers).

No Qt or GTK application sends draw commands to the X server anymore (except for the final "draw window-sized pixmap"). That only applies to xterm or maybe Tcl/Tk stuff.

Re: How Stylo Brought Rust and Servo to Firefox

#168
post #96
post #93

Earlier quoted context omitted.

In Joel's defense, we don't know that gecko is better than X years of incremental changes to Netscape 4. One of the big issues with software engineering advice is that it is really hard to find apples-to-apples comparisons for outcomes.

True. I think we can say that Gecko ended up technically better than incremental changes to Internet Explorer, which I think was starting off from a more maintainable codebase than Netscape 4. That's hardly conclusive but it's some evidence.

And, as far as I know, Microsoft has developed Edge from scratch after all. The years of incremental updates to IE are now maintained for legacy support.

Re: How Stylo Brought Rust and Servo to Firefox

#169
post #161
post #91

Earlier quoted context omitted.

> Is there anything specific about Rust that you don’t think a commercial organisation would do? A good job. Most commercial PL efforts kind of suck. There are a small number of exceptions, and Rust is one of them.

Java, C#, Ada, JavaScript, etc are more successful that Rust. The comparison is not good though because Rust is younger. You could argue survivorship bias but that applies to Rust as well.

They're not just older. JavaScript has a very special position, and both C# and Java had a tremendous marketing push.
Post reply on HN