Posts

Floating on a sea of mud

Image
(Originally posted on Google+, May 10 2014.) Did I mention that this town is built on clay? A lot of clay. Over 80 meters deep, around where we live. And you only have to dig about 2 meters down to find it - pure clay, looking like you could just scoop it up and start making pots. As seen on these pictures from just across the road where they're making foundations for a couple of new buildings. (2018 update: We're now in fact living in the building that got built on this site.)

Erlang slave nodes and ssh login shells

The Erlang runtime environment is more similar to an operating system than to a traditional language runtime library. An Erlang "node" is an Erlang instance started with the flag -name (or -sname, for "short names" if your network does not rely on DNS). For example: $ erl -sname foo will give you an interactive Erlang shell with a prompt like this: Eshell V9.2.1 (abort with ^G) (foo@rocka)1> and you can see from the prompt that this is running as a "node" with the node name foo@rocka . In practice, this means that networking is enabled, allowing Erlang processes on this node to communicate with processes on other nodes, either on the same host machine or on other machines, through the ordinary Erlang message passing mechanism. Working with multiple nodes If I open a separate console and start another node  bar@rocka  in the same way, I can then connect these two and start doing interesting multi-node stuff: (foo@rocka)1> net_adm:ping(ba...

The Hobbit (1982 game) graphics engine in Javascript

Tunnel like hall Great river Trolls' path Narrow place Dragon's desolation Straight smooth passage Dale valley Trolls' cave Forest gate Lake town Goblins' dungeon Dark dungeon Trolls' clearing Elvish clearing Lonelands Elvenking's cellar Goblins' big cavern Gloomy bewitched place Running river Lower halls Spider place Front gate One of the first computer games that really fascinated me was the 1982 text adventure based on The Hobbit, for the ZX Spectrum. I was 12 years old when I first played it, and it was immediately clear that this was different from any other game I'd seen. It was a text adventure, but some locations had illustrations in brightly coloured graphics, which although crude by today's standards really helped transport you to another world back in those days of mostly monochrome screens and text-only adventure games. There is much more to be said about what made the game so special - in fact, the graphics ...

Rewriting history in Subversion with the help of Erlang

Note: This text was originally written for the redhoterlang.org blog in 2011, but since that is now defunct, I'm republishing it here to make it available online again. When I wrote this, we had only been using the resulting repository for a few months and our experience with git was quite limited. Now three years later, I can say that I'm very very happy indeed that I spent a lot of effort importing the entire development history into git. Being able to run "git log" or "git blame" and see every change back to when the initial code base was created almost 10 years ago is incredibly useful. Our development department at Klarna has grown quite a lot the last year [2009-2010], and because we are trying to be as agile as we can, using scrum and kanban, this has meant more teams, more branches, and more coordination and merging of branches. When summer came, we knew we had a big batch of recruits due to start in August, and that we had to do something about o...

Guest blogging

[Edit: since the redhoterlang.org blog is now defunct, I have republished the text here. ] As mentioned in my previous post, I did some work this summer with manipulating Subversion dump files using Erlang. I've written a probably way too long text about this for the RedHotErlang blog maintained by my friend and colleague, the legendary Tobbe T. If you're interested in this sort of thing - for example, if you're currently thinking about how to convert your messy Subversion repository to Git - you might want to read it. Or perhaps you just want something to help you go to sleep. Otherwise, you're forgiven if you don't follow that link.

It's been a long time...

Wow - I've not updated the blog for a year and a half. Amazing how writing a book can turn you off all other kinds of written expression (apart from the odd Tweet). The book's been out for a month now and I'm quite happy with how it turned out. But following the release, I haven't had the energy to do anything creative when I get home after work, so I've just been playing video games and, well, not writing . I've felt entitled to it, though: for the last year, I've not had time for anything else, so I've built up a huge backlog of books, films and games that I'm now suddenly able to start working my way through. The only problem with that is that it too can start to feel like work. In particular, my long list of TODO-notes and feature requests for my pet programming projects has felt too overwhelming to try to pick up. In many cases, I've completely forgotten where I was, so it typically takes half a day just to look over the code and figure out...

The midsummer report

Image
While midsummer eve was as cold and foggy as any I can remember, these following days have been beautiful. The winds are still a bit chilly, which can be deceptive since it makes you forget how much sun you're actually exposing your poor skin to. I spent most of a day mowing the grass around the house, and got myself a really superb redneck tan. An hour or two ago, a White-tailed eagle circled a few times over our house, as usual supremely unimpressed by the gang of annoyed seagulls that tried to chase it away. A cuckoo is, well, cuckooing, in the distance, and the water is glittering. In fact, it's bloody hard to get any real work done in a place like this. Over and out.