Category Archives: General

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”,”.”); … Continue reading

Posted in Coding, F#, General, Python | 5 Comments

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. … Continue reading

Posted in Coding, General, Python | Leave a comment

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). … Continue reading

Posted in C#, Coding, General | 9 Comments

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 … Continue reading

Posted in Fun, General, Personal, SML | 2 Comments

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 = … Continue reading

Posted in Coding, General, SML | Leave a comment

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, … Continue reading

Posted in Coding, General, SML | Leave a comment

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 … Continue reading

Posted in C++, Coding, General | 9 Comments

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 … Continue reading

Posted in Fun, General, Personal | Leave a comment

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. … Continue reading

Posted in Fun, General, Personal | Leave a comment

Get Perpendicular

Wow! Next time I have to explain somthing technical I want to do something like that.

Posted in Fun, General | Leave a comment

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 … Continue reading

Posted in Coding, General | 3 Comments

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 … Continue reading

Posted in C++, Coding, General | 5 Comments

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 … Continue reading

Posted in Coding, General | Leave a comment

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 … Continue reading

Posted in General, SML | 6 Comments

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. … Continue reading

Posted in General | Leave a comment

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 … Continue reading

Posted in General, Personal | Leave a comment

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 … Continue reading

Posted in General | Leave a comment

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.

Posted in General | 1 Comment

Changing website

It is just a small change, yet it feels like a big step. This evening I made a new (sketchy) webpage in the friislarsen.net domain, and redirected my old page at the IT University to the new page. Now I … Continue reading

Posted in General, Personal | Leave a comment

Shared snapshots

Yesterday I bought an external hard-disk for backups. To make the backups I’ve rolled my own script (snapshot.sh) that uses rsync to make a snapshot of my home-partition and transfer it to the external hard-disk. The interesting part is, that … Continue reading

Posted in Coding, General | Leave a comment