News for hackers. Stuff that matters.
Re:“The colored boxes indicate which CPU core performed layo... by kibwen on Thursday April 02, 2015 @07:58PM (#9313878)
Piggybacking off of this, if anyone would like to try their hand at contributing to Servo I recommend checking out the "E-Easy" bugs on the issue tracker ( https://github.com/servo/servo/labels/E-easy ) and hitting up #servo on irc.mozilla.org ( http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23se... ). It's not often that you get to be a part of rewriting a browser engine from scratch. :)

And you don't need to be a Rust expert to contribute (not least because essentially nobody in the world fits that description)! It's totally common for initial commits to be the first serious lines of Rust a contributor has ever written ( https://twitter.com/chimeracoder/status/583755185899626496 ).

Re:“The colored boxes indicate which CPU core performed layo... by sanxiyn on Thursday April 02, 2015 @08:24PM (#9313945)
I think this is a great advantage of Rust. Even with code review, you won't want to contribute your first C++ code to WebKit. But it's totally possible to contribute your first Rust code to Servo (I witnessed this multiple times), and damage you can cause is quite limited.
Re:“The colored boxes indicate which CPU core performed layo... by gsnedders on Thursday April 02, 2015 @08:31PM (#9313958)
WebKit actually has quite a lot of fairly nice, simple easy-to-read C++, especially around the DOM. Or at least did a few years ago, and I believe it's still mostly the case.

I remember asking for advice years ago where to cut my teeth on C++ and getting suggested WebKit by several — and people who weren't trying to lead me massively into a pit of doom. (Admittedly, I've still practically never contributed to WebKit, and I ended up doing my first larger bits of C++ on Presto. But hey, I've still read plenty of WebKit code over the years.)

Re:“The colored boxes indicate which CPU core performed layo... by pcwalton on Thursday April 02, 2015 @08:44PM (#9313983)
One nice—and, I think, underappreciated—thing about Servo layout is that the parallelism forces you to organize your algorithms cleanly. Unlike every other engine, render objects in Servo are not responsible for laying out their children recursively; the higher-level parallel traversal driver does that. That means that you must write your layout code in such a way that the right information is available at the time the traversal invokes your layout method. You are also limited in what you can access: your render object can't access your parent (because that would be racy), nor can it access the DOM (because we can run layout off the main thread). This requires a fair bit of up-front thought, but once that's finished it's easy to read the resulting code, because the layout code is grouped into specific functions ("assign-inline-sizes", "assign-block-sizes", and so forth) that do just one thing. This goes a long way toward making layout easier to understand, especially when it comes to complex situations like tables.
Re:“The colored boxes indicate which CPU core performed layo... by gsnedders on Friday April 03, 2015 @11:15AM (#9316319)
Right — and it's hardly surprising that Servo's codebase is in many ways nicer than existing browsers (both because of the inherent separation parallelization causes, and the lessons learnt from existing browsers). And given layout has always been arguably the worst part, it's hardly surprising that Servo shows good gains there.