How to solve the “aborting due to worker thread panic” error message while compiling Firefox on a virtual machine

Short answer: allocate more memory to your virtual machine.

The error is produced because the build process ran out of memory when compiling Servo’s style crate.

I tried with 4096Mb and it seems to be happily chugging along now. I guess your mileage may vary, yadda yadda… 💁🏻

This is nothing short of miraculous as it’s a Virtual Machine running Linux in a Macbook retina (with 8 Gb of RAM), which is a moderately underpowered-for-compiling-things laptop. But hey, lightweight, right?

Notes on CSSConf Australia 2016

I attended CSSConf Australia in Melbourne on the 30th of November. A couple days ago, I wrote some generic notes about my experience in this conference and JSConf. This post covers specifically my notes for CSSConf.

The videos for the talks have not been published individually, but the conference was streamed live via YouTube, so you can watch the archived stream (you will have to “jump” to each talk):

And now, to my notes!
Continue reading “Notes on CSSConf Australia 2016”

Talking about Servo in Hackference Birmingham 2016

I visited Birmingham for the very first time last week, to give a talk at Hackference. Apparently the organiser always swears that it will always be the last hackference, and it has been “the last one” for the last four editions. Teehehe!

I spoke about Servo. They didn’t record the talks but I did an screencast, so here’s it:

📽 Here are the slides, if you want to follow along (or maybe run the demos!). The demos come from the servo-experiments repository, if you want to try more demos than the ones I showed.

If you watched this talk at ColdFrontConf, this one has more clarifications added to it, so complicated aspects should be easier to follow now (specially the explanations about layout calculations, optimisations, parallelisation and work stealing algorithms).

People enjoyed the talk!

Someone even forked one the dogemania experiment to display other images:

And Martin got so intrigued about Servo, he even sent a PR!

I didn’t get to see much of the city, to be honest, but two things caught my attention:

a) it was quite empty even during ‘rush hours’
b) people were quite calm and chill

That’s perhaps why Jessica Rose is always saying that Birmingham is The Absolute Best place. I will have to find out some other time!

A very funny thing / activity / experiment happened in the slot before my talk. It was a reenactment of the BBC’s Just A Minute show, which I have never watched in my life. Essentially you have 4 participants and each one has a little device to “stop the show” when the active participant messes up. The active participant has to speak for a minute on a given topic, but they cannot hesitate or repeat words, so it starts getting challenging! This was organised and conducted by Andrew Faraday, who also helped run the Web Audio London meetup a while ago and is always an interesting nice person to talk to.

So this, this was hilarious beyond anything I expected. I guess because I didn’t expect any funny thing in particular, and also because I didn’t have any preconception of any of the participants being a “funny person” per se, so the whole comedy came from the situation and their reactions. It had some memorable moments, such as Terence Eden’s “unexploded item in bagging area” (in relation to the Samsung Galaxy Note 7 exploding fiasco, plus the very annoying voice that anyone who’s ever used a self-service checkout till in the UK will recognise 😏).

After so much laughing, I was super relaxed when the time for my talk came! Every conference should have Andrew doing this. It was excellent!

Other interesting talks and things:

  • Felienne Hermans’ on machine learning and bridge playing AIs built with DSLs built with F# – I basically don’t know much about any of these subjects, so I figured this could be an interesting challenge. You can watch this recording of this talk from another conference, if intrigued.
  • Martin Splitt’s aka geekonaut talk on WebGL – if you have the chance to watch it, it will be quite informative for people who want to get started in WebGL and learn about what it can do for you
  • I’m certainly not a Web Audio beginner, but I tend to watch those talks anyway as I am always curious to see how other people present on Web Audio. Hugh Rawlinson‘s presentation on Web Audio had a few interesting nuggets like Audiocrawl, which showcases the most interesting things in Web Audio. He also worked on meyda, which is a library to do feature detection using Web Audio.
  • Jonathan Kingsley gave one of the most depressing and hilarious talks I’ve seen in a long time. IoT is such a disaster, and the Dyn DDoS attack via IoT devices, just a couple hours after this talk, was so on point, it almost seemed deliberate.
  • Finally Remy declared his love for the web and encouraged everyone to get better and be better to others – and also stressed that you don’t need to use all the latest fashions in order to be a web developer. It’s good when renowned speakers like Remy admit to not to like frameworks, despite also seeing their strengths. A bit of balance never hurt anyone!

The conference had a very low key tone, let’s say that it was a bit “organise as you go”, but due to the small scale of the conference that wasn’t much of a problem. As I mentioned before, everything was pretty chill and everyone was very approachable and willing to help you sort things out. It’s not like a had a terrible problem, anyway: my biggest problem was that my badge had been temporarily lost, but no one told me off for not wearing a badge while inside the venue, and I eventually got it, heheh. So yeah, nice and friendly people, both attendees and organisers.

I also liked that everything was super close to the train station. So there was no need for additional transportation, and we could use the many food places in the station to have lunch, which was super convenient.

Oh and Jessica as MC was the best, I really enjoyed the introductions she prepared for each speaker, and the way she led the time between talks, and she was really funny, unless presenters that think they are funny (but aren’t).

If you have the chance, attend the next Hackference! It might the last one! 😝

Here are other conference write ups: from Dan Pope and from Flaki (who stayed for the hackathon during the week-end).

ColdFront 2016

I spoke at ColdFront in Copenhagen last week. I joked that I just accepted the invitation because I wanted to go back to Copenhagen, and it actually wasn’t far from the truth as it’s a lovely city and I had a great time when I went there for At The FrontEnd last May: going through the airport is easy, the trains and metros are spotless and easy to buy tickets for, the city is beautiful in its flat Nordic way (Stockholm and Oslo are quite hilly), lots of interesting design stuff to look at, people were super kind and nice to me at every single point, attendees were really polite and so on and so on. How would you not want to go back to a place like this?

So when Kenneth reached out to see if someone could talk about Servo and given that I was working on Servo this summer, it sounded like the Perfect Plan.

Fast forward a few months, and I was in Copenhagen again.

I unfortunately had to miss the first talks of the day as Perfectionist Sole was obsessing over her talk and her slides, but what I saw was really interesting. It was a very good exercise of curation.

Bruce Lawson delivered a very interesting talk loaded with facts about how to deliver the web for everyone—not just rich people on the Western world! Lots of technical insights about Opera Mini optimisations and infrastructure (this was fascinating), lots of research insights as to how do people with unreliable expensive networks use their phones and data plan, etc. Building Proper Web Apps (my new rebranding for PWA, haha) is the answer to these issues. So… learn your tools for a brighter, speedier and more reliable future!

Then there was the break in which we tested our laptops with the A/V system. It turned out that the system was having some fun and introducing random glitches and red jitter so things could occasionally look funny. I was happy with the aesthetics but “sadly” the technicians fixed it during lunch—while we were enjoying the tacos and rye bread sandwiches outside!

It was then the turn for Mathias Bynens who talked about ways in which your browser can be fingerprinted via timing attacks, and other terrible things that left all of us really scared. Good talk explaining complex topics quite clearly.

I talked about Servo and how it is solving many problems, one at a time. You can watch it here:

Glen Maddern talked about strategies to avoid ending with “😈 Demonic CSS 😈”. He suggested a number of design ideas and even ‘tricks’ that you can actually use in most browsers (like currentColor), without having to add CSS preprocessors to a project. I think a gist could be: Just because you can write complicated stuff doesn’t mean you should. He also has started a series of screencasts where he talks about similar front-end topics in his funny and approachable way, be sure to check it out: Front End Center.

Finally Estelle Weyl talked about the need to go back to basics—again, to know your tools—for front-end developers. She asked urged people to reconsider bringing in another JS framework into a project if whatever they wanted to accomplish could not be done in a simpler way with “vanilla” JavaScript, and showed a few examples of ways front end developers are reimplementing things that the browser already provides support for, due to ignorance.

At the end of the talks, the two main organisers Kenneth and Daniel went on stage to tell us a bit about the history of the conference, how they started it, the debt they accidentally incurred in last year and how unhappy their accountant was, the terror of not selling tickets, and how this would be the last conference as Kenneth now lives in Vancouver and it’s very hard to organise a conference when you live so far away.

At this point everything got very emotional but fortunately Daniel and Kenneth hugged and said thanks, before we all broke down and started to cry. Then we clapped to thank them, Kenneth and Daniel took a deep breath and asked us to reposition to take the JS family photo, and we were off to the closing party which was at a well stocked brewery like 40 metres away (I had an alcohol free drink following my self-pledge).

It was lovely to talk with all the people there… I mean—I didn’t talk to all of them, but to the ones I talked to! Plus the weather was quite nice and we could be outside instead of yelling at each other inside the loud brewery.

Sadly, there won’t be another Cold Front so if you want to relive this, check the talks when they are published in their website. Or watch the talks from previous years in their YouTube channel!

Thanks for the lovely conference!

This summer, Sam and me are exploring Servo’s capabilities and building cool demos to showcase them (and most specially, WebRender, its engine “that aims to draw web content like a modern game engine”).

We could say there are two ways of experimenting. One in which you go and try out things as you think of them, and another one in which you look at what works first, and build a catalogue of resources that you can use to experiment with. An imperfect metaphor would be a comparison between going into an arts store and pick a tool… try something… then try something else with another tool as you see fit, etc (if the store would allow this), versus establishing what tools you can use before you go to the store to buy them to build your experiment.

WebRender is very good at CSS, but we didn’t know for sure what worked. We kept having “ideas” but stumbled upon walls of lack of implementation, or we would forget that X or Y didn’t work, and then we’d try to use that feature again and found that it was still not working.

To avoid that, we built two demo/tests that repeatedly render the same type of element and a different feature applied to each one: CSS transformations and CSS filters.

CSS transformations test

This way we can quickly determine what works, and we can also compare the behaviour between browsers, which is really neat when things look “weird”. And each time we want to build a new demo, we can look at the demos and be “ah, this didn’t work, but maybe I could use that other thing”.

Our tests use two types of element for now: a DIV with the unofficial but de facto Servo logo (a doge inside a cog wheel), and an IFRAME with an image as well. We chose those elements for two reasons: because the DIV is a sort of minimum building block, and because IFRAMEs tend to be a little “difficult”, with them being their own document and etc… they raise the rendering bar, so to speak 😉

All together, the tests looked so poignantly funny to me, I couldn’t but share them with the rest of the world:

and Eddy Bruel said something that inspired us to build another test… how many doges can your computer render before it slows down?

I love challenges, so it didn’t take me much to build the dogemania test.

It can ridiculise my MacBook retina very quickly, while people using desktop computers were like “so what’s the fuss, I get 9000 doges with no sweat?”

It was also very funny when people sent me their screenshots of trying the test on their office screen systems:

Servo engineers were quite amused and excited! That was cool! We also seemed to have surfaced new bugs which is always exciting. And look at the title of the bug: Doges disappear unless they are large and perfectly upright. Beautiful!

To add to the excitement, this morning I found this message on my idling IRC window:

7:22 PM <jack>
7:22 PM <jack> we all love it so much i thought it needed it's own domain :)

So you can now send everyone to 🎉

Thanks, Jack!