Pre-West Interview: James MacAulay

Free Beginner Workshop

From OO to Clojure Workshop!

Watch my free workshop to help you learn Clojure faster and shift your paradigm to functional.

Talk: Composing interactive applications with Zelkova

James MacAulay's talk at Clojure/West is about Zelkova, his Functional Reactive Programming library.


Zelkova is a Functional Reactive Programming (FRP) library inspired by the Elm FRP model. FRP is a model for building composable "signals" that maintain the state of the system over time. The talk promises to show us how to use it with Om to create interactive applications.

There are many resources out there, but I recommend this talk about Functional Reactive Programming in Elm by Elm's creator Evan Czaplicki. It shows the possibilities of FRP. His thesis, which describes the basic constructs of Elm, is surprisingly approachable. I recommend that highly. Also, James MacAulay himself did a Papers We Love presentation about it, which is worth watching.

About James MacAulay

GitHub - Twitter


James MacAulay is the next interview participant. He is giving a talk at Clojure/West about Functional Reactive Programming with the clojure library Zelkova. The background to his talk is available, if you like.

Interview with James MacAulay

Nola: How long have you been doing clojure and how did you get into it?

James: I've been writing Clojure in my spare time on-and-off for about three years.

In late 2011 I was on a small team developing a JavaScript MVC framework, and we had this problem of managing state in the browser over long periods of time. Our response was to let mutation happen all over the place and keep track of it all with a network of observed properties. It felt fun and empowering at first, but unfortunately it resulted in systems that were very difficult to reason about.

At some point I looked at the system and realized that all it needed to do was handle external events one at a time, and render some views based on those events. It was all starting to look like one big function to I figured I should give a serious look at what functional programming was all about. Clojure had some really compelling answers to the questions I had, and soon I was hooked.

Nola: Any suggestions for someone wanting to dive into clojure?

James: If you're coming from an Object-Oriented background, take your time just getting used to writing different kinds of functions without relying on mutable state. The more you do it, the more fun it is, and it ends up being a really valuable habit to have when writing software in any language.

Nola: What languages did you do before clojure?

James: Mainly Ruby and JavaScript. In university it was Java more than anything else, but we were exposed to a number of other languages in smaller doses: Scheme, Prolog, C, x86 Assembly are the ones I'm most thankful for. When I first got interested in functional programming I dug into Haskell for a bit before Clojure really grabbed me.

Nola: Your talk is about Zelkova which is heavily inspired by Elm. Have you done much with Elm or implemented Functional Reactive Programming in other languages?

James: I first really got the Elm bug at Strange Loop 2013, where I saw Evan Czaplicki live code the Mario demo first-hand. I started playing with both Elm and Bacon.js, a JavaScript FRP library. Last summer I decided to try my hand at implementing FRP in Clojure, and figured I should read Evan's thesis to see how Elm works. I hadn't implemented any kind of FRP before, but Clojure seemed like a great language to do it in.

My experience with the Elm thesis was very similar to the one Eric Normand described having at around the same time — the code in the paper was just begging for a core.async implementation. I started hacking away, and learned a ton about both Elm and core.async in the process.

At Strange Loop 2014, I got to meet Evan and we had a really great chat about Elm and my work on porting its FRP system to Clojure and ClojureScript. He encouraged me to share my work and clarified a lot of things for me, and I've been poking away at Zelkova ever since.

Nola: What is the average airspeed velocity of an unladed Clojure REPL?

James: I try not to throw my laptop across the room when I get frustrated :)

Nola: Thanks for the interview. It was very informative.