All posts in General

  • 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

  • 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

  • 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

  • Declaratively Provision Docker Images Using Nix

    I like Docker. If you don’t understand why, read the 3.5k word epic that I wrote about it at InfoQ. In this post I’ll assume you’ve read my InfoQ article, or are at least somewhat familiar with Docker and its features. Here’s two features that I care about in particular:

    • It makes applications portable to any cloud provider that supports Ubuntu 12.04+ (and in the upcoming 0.7 release CentOS too), which is basically every cloud provider in existence (although I hear that Google’s doesn’t yet support it. FAIL).
    • It makes trying out applications super simple: you no longer have to set up a hundred libraries and services that the applications to be able to run, everything comes in a single package, ready to run and ditch if it doesn’t work.

    After playing with Docker a while and deploying some apps with it, one thing that I feel could some help is the provisioning aspect of it: how do get your application and its dependencies into a container image? Read more

  • Opening the LogicBlox Gates

    As you may remember, I changed jobs at the beginning of the year and now work at LogicBlox, a very exciting company that aims to change the way software is developed by making it much more declarative using the LogicBlox smart database. Until last week, only customers and academic collaborators could have a peek to see what LogicBlox is all about, but, finally, this is now changing step by step. I’m personally extremely happy about this, because it’s just not as much fun to work on something that you can’t share with the outside world (at least for me).

    Read more

  • Zed Update

    It’s been quiet around the Zed editor project for a while, but over the past days I’ve put some time into it again. As it turns out, I ended using it less and less over time. The reason is simple: it was too much hassle to get started editing files. The procedure always consisted of cloning the Zed repository on the remote server where I wanted to edit files, cd ing into the right directory and then firing up a Python script to start the WebFS server. Then figuring out if the server want to edit files on is directly accessible from the Zed editor over HTTP or I have to open up some ports on a firewall. Bleh. Too much hassle.

    Last week I figured out a way to improve this situation while reading a ZeroMQ book. Even though I did not end up using ZeroMQ (which is amazing by the way) to keep dependencies low, it did lead me onto the idea of a proxy solution. But before I get into the technical nitty gritty, let’s have a look at what the flow looks like now.

    Read more

  • Who Needs Git When You Got ZFS?

    This post is also available in Japanese.

    I’ve been playing a little bit with ZFS, Oracle’s (previously Sun’s) next-generation file system. Originally developed for Solaris, but since it’s open source also ported to Linux (as of 0.6.1 considered stable for production use) and Mac. While called a file system, ZFS is also a volume manager, so also takes over the job of partitioning your disk as well. Why is ZFS cool? It includes protection against data corruption, built-in support for RAID, snapshots and copy-on-write clones, and flexible and efficient ways of transferring data, e.g. for backups. To show what’s possible and push the limits somewhat, I’ll show how we get implement various features of Git, the version control system (or any version control system, for that matter) using ZFS. Of course, I’m not seriously suggesting you’d ditch a “proper” version control system, but it gives a good sense of what’s possible at the file system level.

    Read more

  • Parenthesical Culture and ParEdit

    After a few years of doing zero Clojure hacking, recently I’ve picked up a side project in Clojure again. Rather than using my usual editors to edit Clojure code, I chose to go the all-in hardcore Lisp route: Emacs with Paredit (I followed these instructions to set it up). And during that time I developed a theory of why people feel like they drown in the parentheses in Lisps and why the Lisp community fails to be bothered by this issue. Hint: ParEdit.

    Read more