An Architect's View

CFML, Clojure, Software Design, Frameworks and more...

An Architect's View

Clojure/conj 2012

November 18, 2012 ·

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.

Paul deGrandis talked about "production ready" ClojureScript (as I said earlier, quite the theme of this year's conj). He covered a lot of ground in his talk: EDN, Enfocus (to use HTML on a CDN and populate it dynamically via ClojureScript on the client), architecturally evident project structures, the benefits of protocols (one of the more convincing explanations I've heard so far), his shoreleave library providing lots of useful abstractions and declarative publish/subscribe, it's OK to rely on the server for "hard stuff", don't apply JavaScript "lessons" and "best practices" to ClojureScript - draw from Clojure instead.

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.

Tags: clojure

10 responses

  • 1 Alexander // Nov 19, 2012 at 12:04 AM

    Will be some videos available?
  • 2 Hiram // Nov 19, 2012 at 3:19 AM

    Thank you very much for sharing your vision of clojure conj 2012. I can' wait for the videos !
  • 3 Donald Parish // Nov 19, 2012 at 7:01 AM

    Thanks for the nice summary! I tried to follow the conj on Twitter, but this is the first blog summary I'd seen.
  • 4 Sean Corfield // Nov 19, 2012 at 9:47 AM

    @Alexander, @Hiram, the whole conj was videotaped so it will be published somewhere (not sure where - I can't remember the name of the company videoing it).
  • 5 Ustun Ozgur // Nov 19, 2012 at 11:11 AM

    Great writeup Sean. It was great meeting you and other Clojurians (I'm the guy from Turkey, btw.), hopefully I will make it to the conj next year too.

    One particular omission in this list is Conrad Barski's talk on webfui. ClojureScript has indeed been a recurring theme during the conference, though there is still a void to be filled in terms of pointers for developing modern clientside applications. We have seen a proliferation of libraries for JavaScript; and it will be interesting to see what ClojureScript will offer in that arena. webfui seems like a promising start, helping with binding ui elements, containing state properly, and updating only the parts of dom that need updating.

    One suggestion given to me by Paul deGrandis was to actually ignore the popular JavaScript MVC frameworks since they were designed by JS in mind, and to roll your own -- there seems to be too much impedance mismatch when using ClojureScript with JS MVC frameworks like Knockout or Backbone it seems.
  • 6 Sean Corfield // Nov 19, 2012 at 11:26 AM

    @Üstün (did I get that right?), Conrad's talk didn't resonate with me for some reason, but it was interesting to see Bodil use Webfui in her talk. You're right that Conrad's talk was yet another strong in the ClojureScript bow...
  • 7 Avram Aelony // Nov 19, 2012 at 11:46 AM

    The best incanter docs I've found are located here:
  • 8 Sean Corfield // Nov 19, 2012 at 12:49 PM

    @Avram, even tho' hasn't been updated in two years and the downloads page only lists 1.2.x? (it's on 1.4.0 now I believe).
  • 9 Avram Aelony // Nov 19, 2012 at 12:56 PM

    @Sean, yes 1.4.0 is the latest. If you know of better docs (other than the source) pass them along. :)
  • 10 Lynn Grogan // Nov 20, 2012 at 3:10 AM

    Great write up, Sean! For the folks asking about videos, we expect to start releasing them in about a month to 6 weeks time depending on when we get the edited versions back from the videographers. Keep watching the Clojure/conj Twitter stream for updates.