• The March Towards Go

    marching Today, TJ Holowaychuk, one of node.js’ most prolific module writers (express, jade, mocha, koa) has announced he’s leaving node.js for Go:

    I’ve been fighting with Node.js long enough in production now that I don’t enjoy working with it anymore unfortunately, so at least for now this my formal farewell!


    Node does some things well, but ultimately it’s not the right tool for the type of software I’m interested in these days. I still plan on using Node for web sites.


    The more I’ve been working with distributed systems, the more I’m frustrated by Node’s direction, which favors performance over usability and robustness. In the past week I’ve rewritten a relatively large distributed system in Go, and it’s robust, performs better, it’s easier to maintain, and has better test coverage since synchronous code is generally nicer and simpler to work with.

    Read more

  • The Wolfram Language Is Here — Now What?

    Wolfram just launched Wolfram Cloud, a development and deployment environment for building applications using the Wolfram Language. The Wolfram Language introduction video (that I recommend you watch before reading on) went viral in programmer circles — people got really excited about this.

    As a programmer watching the demo video of the Wolfram Language you are immediately overwhelmed with the sense that this is the future. This is the programming language we’ve all been waiting for. One language to rule them all. Finally. Mission accomplished.

    Read more

  • nthings

    Paul Graham wrote an essay back in 2009 entitled “The List of N Things”:

    I bet you the current issue of Cosmopolitan has an article whose title begins with a number. “7 Things He Won’t Tell You about Sex,” or something like that. Some popular magazines feature articles of this type on the cover of every issue. That can’t be happening by accident. Editors must know they attract readers.
    Why do readers like the list of n things so much? Mainly because it’s easier to read than a regular article. Structurally, the list of n things is a degenerate case of essay. An essay can go anywhere the writer wants. In a list of n things the writer agrees to constrain himself to a collection of points of roughly equal importance, and he tells the reader explicitly what they are.

    After reading this essay I distinctly remember getting an idea for a web app immediately. Although only now I realize it has been 5 years since that essay came out, it was only last week that I decided to use the spare 3 days left in the week after a vacation to actually build it. I challenged myself to build the whole from scratch app during those three workdays (altogether 20 effective hours).

    I did. I had fun. And I’m pretty pleased with the result.

    Read more

  • NixOS Introductory Article

    I’ve written a bit about Nix in the past. Nix’ author (and colleague) Eelco Dolstra now has published a great article on InfoQ about Nix and NixOS. Very clearly indicates why Nix is different — and if you ask me — clearly the right way to do package/configuration management:

    NixOS is a Linux distribution with a fully declarative approach to configuration management designed to overcome these problems. It builds on Nix, a package manager that builds and stores packages in a way that does away with the “destructive” model of package managers like RPM or Apt. NixOS extends this approach to the configuration management of an entire Linux system. This gives many advantages, most importantly:

    • Atomic upgrades: during a package or system upgrade, the system remains in a consistent state. If you run a program at any point in time, you’ll get the old or the new version, but not something in between. Similarly, if the system crashes half-way through an upgrade, it will still work. Put in another way, upgrades are transactional.
    • Rollbacks: upgrades don’t overwrite the old packages and configuration files, so if a new configuration doesn’t work, you can revert to the previous state. This also makes testing configuration changes less scary.
    • Reproducibility: Nix tries very hard to ensure that a package build always produces the same result. This property extends to NixOS: deploying a NixOS configuration on another machine will yield the same result, regardless of whether this machine is a clean install or already had a previous configuration.

    If you never got the value of Nix from any of my posts, give this article a try. Actually, even if you did: read this article.

  • On My Own

    I just realized I never posted about the “life changing event” that occurred April 1st on this blog. To quickly recap: as of April 2014 I became CEO, Sole Proprietor and Sanitary Manager of Caelum, a software product company that produces Zed. The business model that I cooked up is experimental: everything is open source, but I ask users to pay without getting anything back other than the fact that they contribute to the cause of Zed development. It’s been 2.5 months, time for a small update.

    Read more

  • Candy Crush Level 23

    Every Dutch kid experiences this at some point in their early childhood: Sinterklaas — think Santa Claus, but three weeks earlier and more racist — is not real. The boat with Sinterklaas, his black “friends”, and all those presents — it’s all an act. In reality, your parents bought you all those presents.

    You feel betrayed when you find out. You’ve been lied to your whole life. What’s next — the easter bunny is not real either?

    At a certain age you assume you found out about all the lies. All the myths and fairy tales.

    But as it turns out, I was wrong. I’m 30 years old and I just realized that is there still a myth kept alive and everybody is still pretending.

    Read more

  • Callback-Free Harmonious Node.js

    For a long time, JavaScript has been my go-to language. Of course, in the browser, but on the server too. When I started with JavaScript I spent a lot of time finding ways to reduce “callback hell”, but eventually I just gave in: code generators and systems that require a patched JavaScript engine are just not the way forward — they’re not “native” JavaScript solutions.

    So, for years I wrote callbacks like everybod else until I they became part of my muscle memory. They’re manageable, but you have to do a little more work.

    A few weeks ago I did some work with Python, after a long Python break, and: Wow — Python code is succinct. You can actually do stuff like this:

    output = subprocess.checked_call(["ls", "-l"])

    and output would contain the output of running ls -l. If it would fail, it would raise an exception. Insanity! I had gotten so used to the node.js way that it seemed it was the only way to do it:

    subprocess.exec("ls -l", function(err, output) {
        if(err) {
            return callback(err);

    Believe it or not, in Python you can perform IO inside of a regular for-loop, something that is not generally recommended in JavaScript. Did I suffer from JavaScript callback Stockholm Syndrome all this time?

    Then, after seeing some reference to the upcoming EcmaScript 6 (next version of JavaScript) generator feature, I found Tim’s post about generators vs fibers. Now, I don’t find fibers all that interesting, but the generators captured my interest, especially since you can enable support for them in node.js 0.11.x already using the --harmony flag. Then I found TJ Holowaychuk co module and I knew:

    There is a callback-free node.js future in sight.

    Read more

  • Deploying WordPress Using nix-docker

    Yesterday I wrote about nix-docker, a way to use Nix to provision Docker images in a nice way. Today I spent a little bit of time on a sample nix-docker configuration to deploy WordPress to a Docker container to demonstrate that nix-docker is not just a toy, but can be used to deploy a “real” complex-ish system implementing best practices like storing all state (mysql data, uploads, logs) that needs to persist between container restarts in a volume.

    The result can be found here. It’s ~130 lines long, but quite a bit of that is comments. It implements the following:

    • MySQL storing its data in the Docker volume /data under /data/mysql
    • Apache with PHP5 enabled listening on exposed port 80 and storing logs in /data/log
    • WordPress with an extra theme (to show how to do that), configured to store uploads in /data/uploads so that they, too, survive container restarts.

    That’s it!

    The result is a container that stores all important data in a volume, which you can mount from the host machine for easy back-up. To use:

    # nix-docker -b -t wordpress-app wordpress.nix
    # mkdir -p /data
    # docker run -v /data:/data -p 80:80 -t -i wordpress-app

    And voila!

    wordpress screenshot