Onward; to Haskell.

In my rather short computing career, I’ve had the fortune of coming across Haskell and getting the chance to experiment with it and learn it. It has been one of the most profound experiences I’ve had so far and it has set me off on a path. I’m going to try and express the gist of it in this post.

I’ve only recently started using Haskell at my day job and tooling was quite an adventure for me. It was an adventure that in the end worked out very well and has had profound side effects. When I started getting curious and then seriously interested in Haskell, I was working with Scala on a well supported and actively developed IDE. Things used to work quite well with the occasional mishap. I’ve heard that Scala isn’t the easiest platform to build tooling for, given the myriad language features. But an IDE gives you a very “ready-made” platform to start off with.

Since I was quite comfortable with working within this IDE and its ecosystem, my first search for Haskell tooling started with looking for Haskell support for this IDE. I did find some initiatives, but none of them turned out to be too reliable. They’d often mysteriously stop working after some time and sometimes just throw error stacktraces that would require I dig into their code, and so forth. I was lazy and just wanted the benefits so I didn’t really care to debug much.

If you’re in the Haskell community and you ask for tooling suggestions, two things come up quite regulary: Emacs and Vim. Somehow, these seem to be the editors of choice for Haskell programmers. At least thats the impression I got based on my interactions in #haskell. Both of these seemed daunting to me – although I do have basic proficiency with Vim via a terminal since a lot of my work happens on remote machines via ssh. Emacs seemed to be quite appealing, so I took the plunge. I installed Emacs on my machine and went to Emacs cold turkey. I still needed a reliable editor for my day job dealing with Scala and luckily Emacs has the wonderful ensime. Learning the keybindings was a challenge. But Emacs is much easier than you think – and oh so powerful. Before I knew it, I was writing my little lisp functions to do some things I had long desired in my IDE.

It took me about a month to get good with the keybindings. I got productive with Emacs quite fast though – just that the productivity increased quite exponentially over time.

Emacs also made the brilliant Intero available to me, which is one of the best Haskell tooling experiences there is to be had in Emacs (in my experience). Not before too long, I realised that most of what I wanted and liked in an IDE was also available to me via Emacs. My productivity started to surge as I learnt more Haskell.

But things didn’t stop there. Starting off with Emacs and Haskell seemed to set me off on a more purist approach towards programming and computer science in general. I was quite comfortable with working on MacOS on a nice Macbook Pro, with little to no customisability. I somehow started longing for more. Arguably, you do have more people oriented towards FOSS in the Emacs world than in the IDE world wherein comfort and the just works ethos is more important. While it can be a matter of preference, the recent changes in the Apple ecosystem also didn’t appeal much to me. For example, the addition of a new touchbar makes no sense to me since I’m spending most of my time on a keyboard than a mouse. Not to forget, there’s something about a keystroke that you can never replace with a touchscreen. Not just that, I wanted to work with FOSS and having experienced Linux during university, I wanted to go back. I do give large companies credit for innovation when there is innovation, but one must not forget the very large pools of money these companies have access to. So when Apple innovates, its very impressive but one must not forget the profits they make. That way, the Linux ecosystem, in my opinion, is a landmark, an innovation achieved not by a company, but by humanity. It is a movement that has been largely free and has been backed by people like you and I – but not necessarily associated with large companies. A pool of smart people, getting together to lead a movement to develop a system that is developed and scrutinised in the open, is free, is a human landmark. As an engineer, this is incredibly appealing; in my case, too appealing to stay away from.

I then started looking into migrating, and I started picking up the pieces of my interest in Linux since my college days. I started my research into Linux and was awed by how far things have come in the 6 or so years I’ve spent on a Mac. The amount of customisability blew me away – just consider the vast number of choices one can make in the WM department. You have xmonad, i3, Gnome, KDE to name a few. Each of these are highly customisable and you can have multiple of them installed on the same system. You can either settle on one after you’ve given them a fair shot, or you can use based on your mood. And since I was on this purist drive, I came across Arch and was blown away. It somehow seemed like love at first sight – just the idea that you could and should build your own system by assembling the components by choice is very appealing. You simply cannot have that amount of flexibility on MacOS; for better or worse.

I don’t think this journey would’ve started had I not been interested in Haskell. Its a bit convoluted for me to credit this to Haskell, but thats how I sincerely feel about this. When you’re working in an IDE you’re in your comfort zone. That holds especially for a JVM based IDE catering mainly to JVM based tooling. You’re used to things working without much of your involvement, and that also abstracts their workings and their potential for customisation. Now, that is not to say that these limitations are bad, per se. There’s also the paradox of choice which can be counterproducive for many. In my experience, the key is to first deeply analyse what is important to you and then to strike the right balance between the two. Many people think they’re bound by time to come to these conclusions, but that is not the case. These interests and desires are also evolving.

I personally feel more at home with the Haskell ecosystem and the philosophy surrounding it. It has definitely led me on toward what I consider a more pure path towards computing. It has moved me off an IDE into an editor that is infinitely extensible, to an extent that it becomes an IDE you’ve built yourself. And that somewhat got me dienchanted with a system pre-assembled for you (MacOS).

In the end, the goal is not just to be productive at your job but to take computing forward as a whole.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s