Learning Haskell

Written by Austin Keeley

I am spending some time learning Haskell. This is partly because I want to learn about functional programming, but also because Haskell has this aura of hipster programming that I kind of enjoy.

When your industry is growing at a fast pace, it’s a good idea to stay on the edge of things.

Imgur

I’ve attempted to collect together a bunch of Haskell and post them here for my own benefit, but also you can join with me as we throw off the shackles of OOP and welcome our brave new world of functional development.

Intros and Motivations

Functional Programming should be your #1 priority for 2015 by Ju Gonçalves.

A very good brief introduction to what functional programming is. This article argues that functional programming is the next big thing in computing thanks to distributed architectures (better known as The Cloud). Obviously, this article was written nearly a year ago, hence the title. The collapse of OOP didn’t occur in 2015 and it probably won’t happen anytime soon. Still, this was one of the first articles I came across that motivated me to take functional programming seriously.

This quote sums up the whole article nicely:

That promised time when we’d have applications running distributed and concurrently finally has come. Unfortunately, we are not ready: our “current” (i.e., most used) model for concurrency and parallelism, even though might solve the problem, it adds a lot of complexity.

The Dao of Immutability by Eric Elliott.

A fun meditation on the simplicity of functional programming.

All Evidence Points to OOP Being Bullshit by John Barker

Another cathartic rant on object oriented programming. There seems to be a common theme here…

10 Interview Questions every JavaScript Developer Should Know by Eric Elliott.

Wait, a JavaScript article? In your post about Haskell? Whaaaat? Really this is a functional programming rant in disguise. We all know that JavaScript has a bunch of cruft, but in this article, Elliot argues that one of the most damaging aspects of the language is the class.

I advise people to hire based on whether or not a developer believes in class inheritance. Why? Because people who love it are obstinately stubborn about it. They will go to their graves clutching to it … I won’t hire them. You shouldn’t, either. I’ve seen classes wreak havoc on projects, companies, and lives.

According to the author, that’s not hyperbole. Elliott advocates that the best way to develop JavaScript is to adopt some of the functional traits of langues like Haskell. Being a full-time JavaScript developer, this was the first article that caused me to sit up and take note of functional programming.

Why Haskell Matters from the Haskell.org Wiki

Although it’s fairly dense, this is reasoning for Haskell from the people behind it.

Books

Unless otherwise noted, all these books are freely available online.

Learn You a Haskell for Great Good! by Miran Lipovača

This is the definitive beginner’s guide to Haskell. I remember picking this book up at a Barnes and Noble and thinking what the hell is going on with this language? Years later I actually read the book and I enjoyed the nice pace and quirky illustrations.

Real World Haskell by Bryan O’Sullivan, Don Stewart, and John Goerzen

Haskell is often unfairly categorized as an “academic” language that should remain confined within the realm of computer science theory. This book is both a tutorial and counter-argument to prove Haskell can be used in software development for serious development.

The Structure and Interpretation of Computer Programs by Harold Abelson and Gerald Jay Sussman with Julie Sussman

To be honest, I haven’t read this text. Also, it’s not actually about Haskell, but rather the overall concept of programming language design. It also makes use of Lisp instead of Haskell. I’m only including it here because it’s a monumental work that is often recommended when learning about functional programming.

Videos

Make Haste: Fast Track to Functional Thinking by Katie Miller at CampJS

This is a very fun talk given at a JavaScript conference. It includes a brief overview of functional programming, Haskell, and a framework called Haste used for building web applications in 100% Haskell.

Interesting Projects

Purescript

A Haskell-inspired language that compiles to JavaScript. The language itself is implemented in Haskell, of course.

Haxl

A Facebook open source project for simplifying remote data access.

PostgREST

Arguably the most popular Haskell project around for now. This is a web application that gives your PostgreSQL database a REST API. It’s written in Haskell. I find this to be an interesting project since it is something that most people wouldn’t consider using Haskell for.

Hakyll

Everyone knows about Jekyll, the Ruby static site generator. Hakyll is a Haskell implemented static site generator.

Posted December 18, 2015