Another conj, another three days of awesome. Hundreds of Clojurians met in Raleigh, NC for a single track of leading edge talks from the community. What did this year's Clojure/conj have to offer? Here's my view of the highlights...
There were several themes that kept coming up over and over again this year which I'll pull out first, then I'll go over all the sessions that I really enjoyed and/or that were especially applicable to my work at World Singles:
- ClojureScript is growing up fast! Several sessions showed just how solid it has already become, how it helps build sophisticated solutions in the browser, and how the tooling is constantly improving.
- The REPL is your friend! We saw a lot of REPL-based development this year, we saw huge improvements in REPL-based tooling. I'm finding I spend much more time in the REPL compared to a year ago, and my production code - and test suites - evolve out of my REPL-based experiments. What I saw at the conj confirmed that shift and showed that there's really no limit to what you can do with the REPL, given appropriate tooling.
- Data All Things. This message was starting to emerge last year, was echoed at Clojure/West in several talks, and was hammered home here. By abstracting the problem to a data structure and separating out all the logic, we get a clean, declarative way to represent problems, that is often much more extensible.
- Clojure continues to excel in machine learning, data analysis and visualization and logic programming. No real surprise there but there definitely seems to be quite a big uptake of Clojure in these areas compared to a year ago. The presentations in these areas also made the topics a lot more approachable for me.
Chris Granger was up first, talking about the architecture of LightTable, now built entirely in ClojureScript, on top of node-webkit.
Ambrose Bonnaire-Sergeant brought us up to speed on Typed Clojure, which offers optional type checking on standard Clojure code. This is a remarkable piece of work that offers both a way to sanity check your code and a way to provide explicit, verifiable types-as-documentation. I did some work on type inference systems back in the mid-80's so I found Typed Clojure particularly fascinating!
Jim Crossley showed us how far the JBoss Immutant project has come: an application server designed with Clojure in mind, providing clustered caching, messaging, failover and highly available singleton processes, while supporting standard Leiningen projects. Jim constructed a search engine that found (and fetched) URLs related to the search term using Twitter, with heavy reliance on the REPL for iterative development.
Mike Anderson talked about a machine learning toolkit, showing neural network training and visualization. His company, Nuroko, hopes to open source some of their work shortly.
Zach Tellman showed us how he built a program to play Go and looked at some of the performance optimizations he had to do in order to make the program fast enough to play a reasonable game. If you're not already using Hugo Duncan's Criterium library for benchmark timings, you should be!
Rich Hickey's keynote looked at communicating systems and how they are similar to objects at scale: stateful, mutating services. He suggested that we try to design systems using the lessons we've learned from the functional programming world: use unique names for entities, use epochal time, use queues to remove direct dependencies on endpoints, failure will happen - program for it, build human interfaces on top of programmatic APIs (not the other way around). As usual, lots of good ideas to take away and think about.
Edmund Jackson covered the use of Clojure for data science, using Incanter (it seems hard to find up to date documentation for this!) and Datomic. He noted that numerical performance with inherently poor on the JVM but can be mitigated with concurrency. It was the first time I'd looked at Incanter - I've been missing out!
Phil Hagelberg, battling a terrible cold, walked us thru the changes in Leiningen 2.0 as it evolves from "just" a build tool to a full project automation tool. He showed the power of profiles, how it was designed for extensibility and finished with some words on trusted library releases and signing uploads (with gpg). I use Leiningen 2.0 every day so it was good to hear more about the internals and the philosophy of the tool.
Next up was Laurel and Hardy, er, William Byrd and Dan Friedman, with an extremely entertaining talk and live coding session on miniKanren, the deduction engine that inspired core.logic. They showed a type inference engine, based on a Scheme interpreter (written in Scheme, of course), then ran it backwards so it generated programs that matched particular type signatures. Then they showed a logic version of the interpreter which could both evaluate programs and, when run backwards, generate programs that produced specific results. They finished off by showing how to generate quines: programs that evaluate to themselves (or, in most languages, that print their source code as their output). Using the logic version of the interpreter, they were also able to find chains of programs that evaluate to the next program in the chain (twines and thrines etc). Takeaway: core.logic is very, very powerful!
Kevin Lynagh showed the power of data in his talk about a grammar for graphics, developing a declarative format that separates the "what" (to display on the graph) from the "how" (to render it visually). "Data All Things" was a common theme through several other people's talks too.
Michael T. Nygard challenged us to consider the philosophy of complexity - separate from software - and showed how five forces can work in different combinations to create complexity and how you can (at least temporarily) battle these five forces together. Very thought-provoking!
Hugo Duncan showed us how far his Ritz Debugger project has come and that it supports both Swank and nREPL now. In particular, it can display locals in stack frames and, with Clojure 1.4.0, suppress local clearing (which made debugging much harder).
Bodil Stokke live coded an end-to-end ClojureScript to-do list on top of Node.js and MongoDB using her integrated Catnip editor. The workflow was particularly nice: as she saved each file, it was automatically compiled (to JS) and the built-in web browser in the editor automatically reloaded the application once compilation was complete. Unlike some of the other talks, Bodil didn't use pre-built snippets: beyond the namespace declarations, she hand-coded every function she needed to complete the app, testing it as she went along (and had only one glitch where an insert didn't update the UI immediately). Impressive, both in terms of live-coding in front of an audience and the tooling itself!
Daniel Gregoire, author of clj-webdriver showed how logic programming can be combined with DOM-based web testing to provide better coverage and even to show what DOM fragments were expected when tests fail (by running the logic tests backward). This logic-based extension to clj-webdriver is experimental at the moment but definitely an interesting area worthy of exploration!
Apologies to the handful of speakers whose sessions I've skipped here. In addition, I have not covered the lightning talks or the unconference sessions. Those were all interesting too but some sessions resonated more with me and/or were more applicable to my job.