Archive 8. July 2005

For those who don't feel comfortable with English as a language for introductory literature, there is an online German-language Haskell course to work through. It looks quite decent - although I find that a bit little is explained.

larger Haskell sources

Who like me prefers to dig through sources to learn languages, here are a few larger Haskell projects to choose from:

  • [Haskell User-Submitted Libraries][0] is a collection of partially older but still interesting Haskell projects. Downloadable is an IRC bot and in the CVS there is also a web server with a plugin interface.
  • [Pugs][1] is a Perl 6 implementation in Haskell. [I've already mentioned it][2], it's still cool |:-)|
  • [darcs][3] is a distributed source control system. [I've also mentioned it][4], but it's still cool.

Helium - Haskell Learning System

Helium is a Haskell subset compiler specifically developed for teaching. It provides more detailed error messages and further analyzes sources to make these messages possible. However, it is really only a subset of Haskell - and since type classes are missing, a quite important part is missing. But to get a taste of functional programming, it is quite useful.

As textbooks, The Craft of Functional Programming and The Haskell School of Expression are recommended. I ordered both - my Haskell knowledge is more than primitive and hopelessly outdated (if that is even possible with a relatively young language like Haskell).

Sometimes DarwinPorts Drives Me to Despair

For example, if I want to install ghc (a Haskell compiler), but it first wants to install Perl 5.8. As if I didn't already have a quite usable Perl 5.8.6 on the disk under Tiger, no, the DarwinPorts want their own versions of it. And then, depending on the path setting, I have either the Apple-Perl or the one from DarwinPorts active. Quite stupid - I think there should be pseudo-packages in the DarwinPorts that then refer to the pre-installed versions from Apple.

This causes problems especially when I also install packages manually. Because then sometimes the Perl accessible via the path is used - and with active DarwinPorts, that is the one there. But this is absolutely not the desired effect - after all, the Perl in this case only got in because the port for ghc has a build-dependency. But I don't want to use the DarwinPorts Perl at all ...

For the same reason, I find all the Python and Ruby modules in DarwinPorts unusable: they automatically pull in a new installation of Python and Ruby and do not use the pre-installed version. Rarely stupid ...

As a result, you can only use DarwinPorts on an OS X box for well-isolated tools - which is a bit of a shame, because the idea and the implementation itself are pretty great. Only too little consideration is given to the already installed stuff.

By the way, I installed ghc simply via the binary package from haskell.org. It says there that it is for 10.3, but it also works with 10.4 - at least what I do with it. And it saves me from having to build all that stuff.

One of the more complex topics in Haskell are the Monads - a way to simulate things like side effects and sequentiality in a purely functional language with lazy evaluation - simply because you sometimes want the output before the input, for example when querying data from the user, or when you want to save a state that is called again later. The tutorial helps to understand the concept of Monads.