I recently decided to create my own browser, exactly fit to my needs, because the future of Firefox addons I strongly depend on is kind of uncertain.

Since I've also been using Rust quite heavily lately, I decided my browser would use the next-generation engine Servo.

Now, Servo uses Cargo, but the build system is also kept sane through mach, this means using Servo as a dependency from a common Rust project is not that straightforward.

The first thing that has to be done is to get the specific Rust version Servo is using, we have to do this because Servo heavily depends on Rust nightly features and other internals that may change between one commit and the other.

We'll be using multirust to keep things sane and smooth.

> git clone --depth=1 https://github.com/servo/servo
> cd servo
> ./mach bootstrap-cargo
> ./mach bootstrap-rust
> cd .servo
> cd cargo
> mv * cargo
> tar czf cargo.tar.gz cargo
> mv cargo.tar.gz ..
> cd ..
> cd rust/*
> mv * rust
> tar czf rust.tar.gz rust
> mv rust.tar.gz ../..
> cd ..
> multirust update servo --installer rust.tar.gz,cargo.tar.gz

Now that we have our Rust toolchain that matches the one used by Servo, add the following dependencies to your Cargo.toml.

# interaction dependencies
euclid = "0.1"
url    = "0.2"
layers = { git = "https://github.com/servo/rust-layers" }

# servo modules
[dependencies.compositing]
git  = "https://github.com/servo/servo"
path = "components/compositing"

[dependencies.net]
git  = "https://github.com/servo/servo"
path = "components/net"

[dependencies.net_traits]
git  = "https://github.com/servo/servo"
path = "components/net_traits"

[dependencies.msg]
git  = "https://github.com/servo/servo"
path = "components/msg"

[dependencies.profile]
git  = "https://github.com/servo/servo"
path = "components/profile"

[dependencies.profile_traits]
git  = "https://github.com/servo/servo"
path = "components/profile_traits"

[dependencies.script]
git  = "https://github.com/servo/servo"
path = "components/script"

[dependencies.script_traits]
git  = "https://github.com/servo/servo"
path = "components/script_traits"

[dependencies.layout]
git  = "https://github.com/servo/servo"
path = "components/layout"

[dependencies.gfx]
git  = "https://github.com/servo/servo"
path = "components/gfx"

[dependencies.util]
git  = "https://github.com/servo/servo"
path = "components/util"

This is the dependency set used by Servo, but it's not enough to make it compile, you also have to copy the Cargo.lock from the Servo repository to your project, this is because Servo as a whole uses locked dependencies even if its dependencies are fixed and updated in the meantime. There's also specifically an issue about aster that has to be pinned at version 0.4.1.

Now that our dependencies are ready you can run cargo build, wait a couple eons and it will be done.

To figure out how to actually use Servo my advice is to look here and here, or read the next post.


I was playing with DETS and I kept getting weird { error, { bad_object_header, * } } without understanding what was going on.

The table got broken permanently after the fact, but only one process was accessing the table so it wasn't a race.

Apparently if you use a tuple as key and you have differing shapes of it as key the table gets broken permanently.

So if you use as key { 1, 2 } and { 1, 2, 3 } you'll get a broken table, although you could use { 1, 2 } and { 1, { 2, 3 } }, and probably { { 1, 2 } } and { { 1, 2, 3 } }.

If you use asynchronous mode, everything works properly, the more you know.


My life is currently at its peak, the years of work have finally come to realize what I wanted to achieve.

For the past years I've been releasing most of my software under WTFPL, I'm probably the programmer with most projects under said license on this planet, but that aside, why did I choose WTFPL?

I could talk about the ethical reasoning behind it and the freedom the WTFPL gives to the user and other programmers, but no, the main reason for the choice is to cause butthurt. Sweet and lifelong butthurt.

Why? You may ask. Well, I release a lot of software, for free, anyone can use it, the only thing I want back is some irritation.

Licenses as fathers

At first it came from it being insulting to the free software movement, but it wasn't what I was going for.

I was going for companies not being able to use my software because of the license for various reasons, the one I hope for most is it containing non-professional language.

You may wonder why foul language in the license text would hinder such a thing, I mean, nobody forces them to read the LICENSE file all day.

Well, I, as a great man, put the license header in every single source file as the FSF advices to do.

The most hilarious part is they could rerelease my software under another license without getting into any legal troubles, in the end they can do what the fuck they want to with it.

But see, it's a hassle to mass edit all sources, and to maintain such edits when I release fixes or add features.

+ meh`: can you release your stuff under the MIT license?
+ oracle doesn't like the DWTFYW license
+ DWTFYWTPL*
- and I don't like Oracle

Of all companies I never thought I could be trolling Oracle, I don't know if it's for legal swamp land (it's an FSF approved license), or for foul language, but sincerely I don't care, I hate Oracle.

And I'm sorry developer that fell in my trap, I never meant to hurt you, only to bother you to some extent, and I thank you from the bottom of my heart, you made meh very happy.

PS: I'll never stop using the WTFPL.


Tabs? Spaces? Use both! [June 05, 2013]

Tabs! Spaces! Both?

No, really, use both, tabs for indentation and spaces for alignment, if you do anything else you're truly worse than Hitler.


Ruby inspect in C++ [March 17, 2013]

From the previous post about stringifying things, comes inspect, it's an improved version of stringify and actually returns inspecting strings like Ruby does, so it's not for stringifying, you should use an internal standard for that and use the appropriate methods and functions.

If you really want to just stringify things you can easily adapt inspect to do your biddings, it's WTFPL: do what the fuck you want with it.

It works on Clang, GCC and *gasp* MSVC.