Haskell frustrations

In my two month odyssey to master haskell there have been many frustrations. The type and class extensions in GHC (and other modern haskells) has been an endless source of pain. Documentation is bad and there are infuriating syntactic snags. I spent an hour trying to use runST using the form


runST $ do
    ...

only to discover you can't use ($) in this situation but must use brackets instead. Why? It doesn't really make any sense.

I've tried to code to work over tuples substituting tuple pairs for the list constructor (:) but the class system just wont work this way

Subroutines in Haskell

Finally figured out how to make haskell process a big pile of data without passing each drop of data around as an explicit arguement. I can't believe it has taken me a month to achieve such a simple outcome. The difficulty with the most obvious approach of bundling all the data together into a record and just changing the fields you are interested in is that you rewrite the master record each time. That's a lot of bookkeeping for the savings. A Monadic approach using a state monad is the way around that problem but it still scares me from an efficiency point of view. Even though this will be a shallow copy per update and not that expensive it still rankles to be do all that work for no reason.

Haskell Classes

In dynamically typed languages object-orientation is nice but not necessary to reperesent arbitrarily complex data. Weakly typed compiled procedural langauges (of which C is the most prominant) can deal with the bit representation of memory directly and avoid the strictures of strong typing. C++ is weirdly both more and less flexible than C. Nothing matches the rigours of Haskell. Data definitions in Haskell (and other typed functional programming languages) are usually easier to use than structures in C but cannot be circumvented at all.

Functional programming

Not having a textbook to ease my introduction to Haskell, I have had to make do with what I could grab off net. It hasn't been very enlightening and the material on monads couldn't have been harder to digest. My years old copies of Byte Magazine have been great resources for all kinds of programming exotica including functional programming --- but Haskell and Monads are too old for Byte.

Upgrade to php 5.2

So the debian upgrade went so well that today I upgraded to php 5.2. My drupal sites are working without any configuration changes whatsoever. I'm happy.

Upgrade to etch

So the server is now running etch. The upgrade has gone effortlessly so far and I am terrified. Things can't be this easy.

Apropos OOXML

A quote from C.A.R. "Quicksort" Hoare's 1981 address to the ACM, The Emperor s Old Clothes. It was framed in reference to the design of PL/1 but resonates very broadly.

Head cold on New Year's Eve

So I have a cold. Sinuses blocked, pain, drooling, snot running down face, voice a whisper from the sore throat, and profoundly deaf. Time to go out to a midnight party! I think I'll hust go to bed early.

Yes, it finally works!

Blogging is back. Hurray. The filtering code now actually filters. I am so happy.

Christmas dinner

Christmas dinner at Bec's house with Trevor as a guest.

Pages

Subscribe to Matt's Blog RSS