From the blog

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, by lettin…

Read the post

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 using F# fr…

Read the post

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.

Read the post

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",&quot…

Read the post

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 solution. Without further ado he…

Read the post

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 mechanically translated to a…

Read the post

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 …

Read the post

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. Our first attempt might be to transfo…

Read the post

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 transformat…

Read the post

Browse all 39 posts →