4 May 2020

Well, it's been a rainy week under lockdown. Plenty of time to put time into projects.

[Haskell] Over the last few weeks I've been realising a programming ambition I've had for several years — to get to grips with functional programming on an intuitive level. I've worked with Clojure in a previous job working with mobile keyboards. Before that, I worked with the related paradigm of logic programming for several years using Prolog for various projects in academia and industry, but it's time to dig deeper into functional programming.

Specifically, I'm learning Haskell. I have had a copy of Learn You A Haskell For Great Good for a few years now, but I'm actually just working through the Haskell Wikibook. I'm currently diving a bit deeper into monoids, having completed the Beginner's Track of the book and heading into the Advanced Track. People also seem to recommend School of Haskell, but I haven't looked at it much yet.

I'll come back to Learn You A Haskell this week to try to see the core concepts from another perspective, and when Haskell Programming from First Principles is produced in dead tree form, I'll get that, read through it, and scribble all over it, I expect. And then there's always Structure and Interpretation of Computer Programs to intend to read one day.

There are and have been quite a few community events and meetups. There was always BrisFunctional, which I never ended up going to (though I went to Bristol Clojurians), and I missed this year's Hackathon too. I did used to go to London Haskell meetups when I lived there. I'd enjoy them, getting the gist and appreciating most of the ideas. However, I really always wanted to understand Haskell and functional programming on more than a superficial level. So here I am.

At the moment I use Haskell for Mac (which has its own tutorial) for playing around with code. I installed the Hasklig code font which applies ligatures to make the code look really attractive and readable. FiraCode's readme file demonstrates this well for a bunch of languages. Another example of this sort of font is Monoid. I haven't tried that one out yet.

Depending on my mood, I seem to alternate between (a) writing out code (particularly type class definitions) from web tutorials and breaking down what it means, and (b) just jumping onto the computer and trying out whatever confirms the intuitions I'm trying to build, either in the IDE playground, the GHCi prompt or even an in-browser tutorial environment like TryHaskell. If I have the afternoon free, I'll think of a script I've hacked up in Perl or something, and try to re-implement it in Haskell in three hours or so. The time usually flies.

It's too early to report any substantial coding progress, but for these notes, I'll list some resources which are helping me along the way.