This is a blog about me, Seinfeld, okonomiyaki, japanese toilet seats, and other things of interest

Thursday, July 26, 2007

If in doubt, use brute force

When it comes to the history of computing I'm not an atheist - Ken Thompson is the main man, king of beards, hacker god. This is what a proper hacker should look like:


Even Garth finds Unix hot!:

Wednesday, July 25, 2007

Nice run

Nice run tonight from Victoria Rise to Tate Modern and back. I didn't run that fast - about 19.5km in 102min - but it was nice to do a proper long run again. I've started logging my training on shapelink together with da_sealboy and da_slope from da_clan.

Erlang: The movie

No one can make geeky films like Ericsson! Check out this Erlang film from 1990 or so (starring the four main developers of Erlang):

Monday, July 23, 2007

Erlang

So I've finally written my first Erlang program:


diaspora:~/projects/erlang lars$ cat test.erl
-module(test).
-export([fac/1]).

fac(0) -> 1;
fac(N) -> N * fac(N - 1).
diaspora:~/projects/erlang lars$ erl
1> c(test).
{ok,test}
2> test:fac(5).
120
3>

I used to think that the name Erlang came from the words Ericsson + language, but the language is named after the father of queue theory, Agner Krarup Erlang. It looks a lot like Prolog, and I have a feeling that has to with that the first version of Erlang was implemented in Prolog. As you can see, functions are defined as a collection of clauses where the clause to execute is found using pattern matching. Here's another classic example:
sum([H|T]) -> H + sum(T);
sum([]) -> 0.

The function sum returns 0 if it is called with an empty list ([]), and if the list is non empty the head of the list (H) is added to the sum of the rest (tail) of the list (T). This is of course equivalent to car and cdr in Lisp.

Wednesday, July 11, 2007

The Lawn Chair Pilot


Imagine flying 5000 meters up in the air in this chair with helium filled balloons attached to it. That's what Larry Walters did July the 2nd of 1982. What a guy!

Monday, July 02, 2007

Pimp my van

Move over Xzibit, here's pimp my van!