How I Got Into Clojure

November 14, 2019
Tags: clojure | learning

I had read wonderful things about Clojure many years ago in a blog post series. At that time it seemed very different from the type of programming I used to do at my day job. I had no idea that it could be used for creating any of the software programs I used.

StrangeLoop and Alda

I attended StrangeLoop for the first time in 2017 - and my mind was blown. I somehow picked up an intention to explore functional programming languages. This had never happened to me before. I mean, I was curious about functional programming, and had listened to lectures available on youtube, including some chapters of SICP. But nothing ever felt like something I was capable of trying out.

One of the most memorable sessions for me that year in StrangeLoop was an unsession on Alda by Dave Yarwood. I downloaded Alda, ran it, played with it, and looked at the source code. And then I realized - wow, this language is beautiful as well as powerful, because it can execute anything from any Java library.

Learning clojure

I started learning Clojure a while before my son was born. I picked up steam after he arrived, because I was not working and also barely sleeping. I had to keep my mind active in order to stay awake. I had my iPhone in one hand most of the time and I used to read the clojure website on the web browser. The documentation and the guides are very nice and the format is mobile-friendly. I rarely got time to sit in front of a laptop, but ideas were getting clear in my head before I ever started typing. I realized this is a good way of learning for me.

Leiningen vs The Ants

I had started using leiningen, and I noticed the picture of Leiningen on the leiningen project’s website. It is an impressive picture, and it made me curious enough to find out the story behind the name. I read the story ‘Leiningen Versus The Ants’ by Carl Stephenson. I cannot recommend this story enough - it made me confident that leiningen was the right choice for doing anything in Clojure. The story is also very inspirational - it gives your courage to face any adversity in life.

Reagent

I went to a few monthly events of the Boston Clojure Meetup group. The first time I went there I attended an excellent session on Reagent and the design pattern behind it - which is of course the same as the one behind ReactJS. This is also the first time I heard of Bret Victor and his talks.

Recurse Center

The real test of what I had learnt so far was my project in the Recurse Center mini batch I attended, in 2018. I tried to convert a small C++ program of mine to ClojureScript. I guess I succeeded in one sense - I could produce a browser-based program which did the exact same thing. I was not at all happy with my ClojureScript code, and I realized I had a long way to go before I could write ‘Clojure’-ish code.

Full circle - Alda again

This story which started with Alda came back to Alda again this year when I went to StrangeLoop 2019. This time Dave had a session on Alda, in which he described how a large part of Alda had been rewritten in Go. I don’t know if this will lead me to Go next!

Made using Hugo (source)