The Weblog » 2008 » July

Halting Problem

The Weblog

Part of Roland Sadowski's website

July 20th, 2008

Functional

Recently I tried to rewrite a particular algorithm for generating permutations in a functional manner. The original was written in C#, therefore lots of mutable data structures etc. My first attempt at rewriting the code in Clojure went something like this:

As you can see, I got lost halfway through. But this is what you get when you try to write procedural/OO code in a functional language, using immutable data structures. Usually the right way to get out of a mess like the one above is to use map or its syntactic brother: list comprehension (Clojure’s for macro).

I ended up with a lazy list of permutations, where the laziness required zero effort from me - got that for free from the language.

I’m still stumbling while writing programming in Clojure, but not in the frustrating way like when I tried to write something of use in F#. Probably getting to know Scheme beforehand helped a bit.

§

July 6th, 2008

I’m no longer a student.

A little more than a week ago I defended my thesis and now have a Master’s degree in mathematics. The title of my thesis is "Particular classes of functions holomorphic in the unit circle," topic related to the Bieberbach conjecture, for those more oriented in math. For the next month and then some, I’ll be writing code and learning. I’d also like to finish Okami. After that I’ll start looking for a job.

§