Quality assessment of Haskell programs

One of the greatest things about writing code in Haskell is the wonderful libraries (incidently, one of the worst things about writing code in Haskell is the libraries). In particular the libraries for assessing the quality of your own code. Iā€™m especially found of: QuickCheck for a quick testing of the correctness of my code, […]

I Am Going to JAOO 2008 As A F# Expert

Microsoft Denmark have invited me to participate in JAOO 2008. If I in return spend some time in the Microsoft stand demoing F# and answering questions about F# and functional programming in general. When Martin Esmann (Microsoft Academic Developer Evangelist) approached me, I told him that I’d be happy to show up, but I’m not […]

Getting Ready for the ICFP 2008 Programming Contest

I’m getting ready to participate in the eleventh ICFP programming contest. So far everything works like a charm, KVM can run the LiveCD for the contest without a problem: kvm -cdrom ICFPCD15.iso & I hope I’ll be able to spend more time on the contest compared to last time I participated.

Decoding Morse Code With F# Comprehensions

In my last post I showed how to decode morse code in Python using list comprehensions. In this post I show how to do it in F# instead. First using list comprehensions: let codes = [(“A”,”.-“); (“B”,”-…”); (“C”,”-.-.”); (“D”,”-..”); (“E”,”.”); (“F”,”..-.”); (“G”,”–.”); (“H”,”….”); (“I”,”..”); (“J”,”.—“); (“K”,”-.-“); (“L”,”.-..”); (“M”,”–“); (“N”,”-.”); (“O”,”—“); (“P”,”.–.”); (“Q”,”–.-“); (“R”,”.-.”); (“S”,”…”); (“T”,”-“); […]

Morse Code Decoding With Python List Comprehensions

As a small exercise for getting up to speed with Python I decided to solve ruby quiz #121, which is to to write a function that finds all possible decodings of a string of Morse codes without letter- and word-separators. Given the nature of the problem I decided to use python’s list comprehensions for the […]

Recursive Descent Parsers in C#

Peter Sestoft and I have written a note about how to write scanners and parsers in C#. The note is based on earlier versions for SML and Java. The note contains an thorough introduction to grammars on Backus–Naur form (BNF). This includes a description of properties your grammar should have so that it can be […]

ICFP Contest 2006, Team KFL

In 1967, during excavation for the construction of a new shopping center in Monroeville, Pennsylvania, workers uncovered a vault containing a cache of ancient scrolls. Most were severely damaged, but those that could be recovered confirmed the existence of a secret society long suspected to have been active in the region around the year 200 […]

Refactoring SML Quiz, Part 2

The answer to yesterdays quiz is: Yes, types are necessary for lambda-lifting refactoring. Namely, if the lifted function contains an overloaded operator such as, e.g., +. For example, given the program: fun foo x = let fun add y = x + y in add 5.0 end where we want to lift the function add. […]

Refactoring SML Quiz, Part 1

Yesterday, I discussed with some students who are implementing an SML plug-in for eclipse, whether types are necessary for a lambda-lifting refactoring for SML. So today’s quiz is simply: Are types necessary for lambda-lifting refactoring in SML? Why/Why not? Remember, the refactoring works on valid SML programs, and after the transformation the program should still […]

Implementing the generic IEnumerable interface

Say you want to implement a class that implements the IEnumerable interface in C#. Then you have two choices, either to implement the old-style non-generic IEnumerable interface or you can implements the generic IEnumerable<T> interface. Given those choices we of course want to implement the new generic version of the interface. Because otherwise lots of […]

Team “What A Summer Party”, Round 1

I have hangovers. Not from partying, but from lack of sleep and bad nutrition. The contest was lots of fun. Despite that the end-result for our team was rather disappointing. Below the description I wrote for our team. The Story Of Team “What A Summer Party” Round 1 The prospect for the ICFP contest was […]

Cops and Robbers

Live update from the life of Ken. I’m currently participating in the ICFP 2005 Contest on a team of colleagues from the IT University. The task in the contest is to make robot brains for cop robots and robber robots. We have a bunch of wild ideas, but it is by no means clear (to […]

Review: The Inmates are Running the Asylum

I have seen Alan Cooper’s book The Inmates Are Running The Asylum recommended many places and I finally got around to read it myself. Overall I liked the book. It is not too long and Alan Cooper is a really good and entertaining writer. However, Alan Cooper spends almost half the book ranting over programmers […]

GADTs in C++

My good friends Claudio Russo and Andrew Kennedy have been kind enough to send me a draft paper about Generalized Algebraic Data Types (GADTs) and Object-Oriented Programming. GADTs generalize the datatypes of ML and Haskell by permitting constructors to produce different type-instantiations of the same datatype. One of Andrew and Claudio’s examples is a slightly […]

Review: The Art of Interactive Design

I have read Chris Crawford’s book The Art of Interactive Design: A Euphonious and Illuminating Guide to Building Successful Software. This book was quite a bit of an eye-opener for me. Not that I completely agree nor disagree with Chris Crawford, but mostly because it helped me articulate some of my thoughts. Also, while Chris […]

SQLite for Moscow ML

Stop The Press! Henning has started to make a binding of SQLite for Moscow ML. This absolutelly great news. I’m looking so much forward to play with this binding (hint, hint, Henning). At work we are using SQLite with great success. I think that SQLite fills an important, but somewhat overlooked, niche: a small, efficient, […]


Yesterday I attended a talk by Olin Shivers about a clever way to representing lambda terms as DAGs. Olin talking about uplinks. (Yes, I mainly took the picture to test my new camera mobile phone.) It was a nifty technique Olin presented clever but simple. After the talk you had a feeling that you completely […]

My backup script works

Earlier I wrote about my home-rolled backup script. Yesterday, I got the unfortunate optunity to test for real if the script worked as inteded, as my home partition’s filesystem was corrupted. I’m happy to report that the script worked perfectly. I got all my data back without any data loss šŸ˜€ The thing that took […]

That is the Xmas spirit

Today Maria took care of most of the Xmas present for the children we know. We left the presents in the trunk of our car while we had dinner, so that Kamille would see them. After Kamille was put to bed I went out to get the presents. What I found was our car with […]

mGTK pre-release 0.93

Tonight Henning and managed to make a release of mGTK. We call it a prerelease becase we have not written any documentation, the release has only been tested on my laptop (running Debian Sarge/Sid), and we have not made a Windows port yet. Still, now you can download it from Sourceforge and play with it.

Search Engines

Would it not be great if Citeseer was more like Amazon? Don’t get me wrong I think that Citeseer is an extreamly valuable tool, and I would not like to be without it. I just think that it has potential to be much more useful. Imagine how nice it would be if when you looked […]

Broke all Permalinks

I just upgraded WordPress, and apparently my Permalink rewrite setup no longer works, my apologies. I’ll probably break them again in near future, be warned.

A Unicode editor for Michael

Michael claims that he does not have an editor that can handle Unicode. Thus, Henning and I whipped up an editor using mGTK that can handle Unicode. Oh, and did I mention that you can it compile with either Moscow ML or MLton without changing the source? The real story is of course that I […]

More mGTK Progress

Henning and I have been working hard (leisure time hard, that is) on mGTK since my last mGTK progress report. We have ported all the interesting Gtk# examples from Mono: A Developer’s Notebook Chapter 4. Currently the only missing bits are better support for the lower levels of the library stack most notably GDK, but […]

callcc for Moscow ML

The last few days I have tried to recreate my implementation of callcc for Moscow ML. My original (incomplete) implementation was lost last fall when my old laptop was stolen (or it is still lurking somewhere in mess which is my old backup system). The code almost works. For example, the following code, which just […]

Half a year

These days it is six months since I started working at Laerdal Sophus. It is amazing how quickly that time has passed. So far it has been just as educational and fun as I had hoped for.

The birth of Naja

A bit delayed, but here is the account of Naja’s birth. Maria started to have contractions Monday (the 13’th) morning. While the contractions where painful, they where also short of of duration and irregular in frequency. In the evening Kamille showed the first symptoms of chickenpox. Tuesday morning Kamille was showing quite a few chickenpox. […]