
Servo: Building a Parallel Browser [video] - adamnemecek
https://www.youtube.com/watch?v=7q9vIMXSTzc
======
DecoPerson
I was at this presentation. Before the recording started, he said that the
volatility of the Rust standard and its library really inhibited productivity.

He said something along the lines of: "By the time we update the codebase for
a syntax update, there would be a library API change and vice versa."

I recommend checking out the rest of the LCA2015 talks; very informative if
they apply to your area, IMHO. Dave Chinner's talk about how important
"knowledge transfer between humans" was to kernel development and software
engineering in general resonated strongly with me.

~~~
lambda
Well, Rust is now at 1.0.0 alpha, which means that the language has almost all
of the planned breaking changes implemented (there are still a few corners
where there are a few breaking changes planned, but in things that are minor
enough to be unlikely to break much code).

The standard library is still in rapid iteration mode in the preparation for
1.0.0 beta, and thus large portions of it are marked unstable and so only
available if you opt-in via a feature gate, but the plan is to stabilize that
through the alpha and beta period and have a usable, stable standard library
at 1.0.0, which is planned to come out within a few 6-week release cycles from
now. And things which are not ready, or not really appropriate for a core
standard library, are being moved out into separate Cargo crates that can
iterate independently from the core language.

So yes, Rust has been iterating rapidly on the road to 1.0, which makes
keeping up with the treadmill painful, but it's finally settling down; very
soon you should be able to use it without constant breaking changes.

~~~
steveklabnik
> in things that are minor enough to be unlikely to break much code).

As much as I want this to be true, it's not. `io` is one of those libraries.
That's going to break a lot of stuff, probably.

Beta is the 'your code will almost absolutely not break' release.

~~~
lambda
Sorry, tried to make that distinction by saying that the _language_ has very
few breaking changes left, and those that are left are expected to be minor,
but the _standard library_ is still in rapid iteration mode and is expected to
break a lot.

------
themartorana
I keep hearing about Servo (and compiling it every now and again), but I
really don't know - is Servo meant to eventually, maybe replace Gecko? Or is
it/will it always be just a Rust playground?

It seems like it could seal Rust as a player if Servo became "A Thing" for
real. What's the plan?

~~~
higherpurpose
I believe they've already said that it will replace Gecko on Android and in
Firefox OS (this year). It's 2x faster than Gecko on a single core and 3x
faster on four cores.

If it's really that good (and so much safer, as Firefox tends to be the
browser with the most vulnerabilities) then it would be crazy for them not to
build it into a full browser eventually. Microsoft is doing it, so they should
do it as well.

Maybe with a new browser they can make Electrolysis be much more optimized as
well. I think the main reason it takes them so long to get multi-process to
work is because they have to optimize _around_ Firefox's quirks, and I'm
worried it still won't end up as safe or as quick as Chrome's multi-process
system, which was built for Chrome from day one. In a new browser it might
work much better.

~~~
lastontheboat
Not quite, and certainly not this year. We've said that we want to release an
alpha version of something powered by Servo on Android this year; the Firefox
OS work is just another good way to show viability of our ideas - it would be
a huge feat of engineering to get it ready to ship on devices under the
Firefox OS banner.

------
pjmlp
> 34 security vulnerabilities in WebAudio due to use-after-free and out-of-
> bounds errors

This is what happens to any language that builds on C's compatibility.

~~~
LinaLauneBaer
out-of-bound errors happen in other languages as well. use-after-free happens
in almost every language that is not gc'ed.

~~~
pjmlp
> out-of-bound errors happen in other languages as well.

In sane languages an out-of-bounds error causes program termination, unless it
was disabled on purpose (assuming it can be disabled). In C anything goes.

An out of bounds can cause the program to be injured, but not die, and
eventually have some kind of inconsistent state.

> use-after-free happens in almost every language that is not gc'ed.

Yes, true if we are speaking about Modula-2 or Extended Pascal dialects. The
most notable alternatives to C with manual memory management.

Everything else has at very least reference counting support.

~~~
LinaLauneBaer
Reference counting does not avoid using something after freeing it...

~~~
pjmlp
Then the reference counting is not properly implemented, otherwise reference
count would be greater than zero.

~~~
LinaLauneBaer

        object = create_object() // RC 1
        object.release() // RC 0 => will be released
        // ...
        object.doSomething() // Used after object was released
    
    ?

~~~
maemre
I think parent means reference counting built into the language (like Python)

------
zokier
I was looking at Servo some time ago for more general Rust GUI framework but
then the event-system was still incomplete, iirc you couldn't use Rust code
directly as handler for DOM events. What is the situation today?

~~~
lastontheboat
No different. Once we're able to run browser.html [1], using it as a GUI for
other things will be a more realistic proposition.

[1]
[https://github.com/mozilla/browser.html/](https://github.com/mozilla/browser.html/)

