By my measure, the second Clojure Conj was a smashing success. I wrote summaries of the mainline Conj activities and the unconference activities if you need some context. The amount of brain power on tap at the conference was intoxicating. In an attempt to present a feel for the topics of discussion in the lecture hall and hallways I’ll post with links to posts, papers, presentations, and tidbits of information for learning more.
I’ve limited the scope of this post to cover only the initial released talks, but as more are released so too will I post more.
Learning Clojure – Next Steps
- Extending the Clojure reader
- Using Clojure from Java
- Using the JVM’s base concurrency primitives
- Using Clojure’s rich data-structures instead of JSON
- And others…
From this talk there are a couple of interesting follow ups at your disposal. First, the idea of using Clojure’s rich data formats as a replacement for JSON was a topic of discussion during my DevIgnition talk on December 2nd, 2011 entitled *Code as data as code. The slides are only partially helpful, but I hope that a video will be available soon. In any case I will likely explore this idea in a later post. Second, the idea of an extensible Clojure reader via tagged literals was discussed deeper in Rich Hickey’s keynote at the Conj and is currently under design and implementation.
Concurrent Stream Processing
While Clojure’s official fork-join story is incomplete, David’s talk discusses Revelytix’s approach to concurrent data stream processing in their query processing engine. With a bevy of nice images, he walked through the high-level architecture of a system designed to combine large data streams as one might connect the ends of hoses. Related to this point, and of critical importance to Clojure, is the focus on leveraging topnotch Java libraries in achieving their goals. The near-seamless Java interop in Clojure is an incredible boon to companies and individuals using Clojure in their projects.
One of the interesting aspects of David’s talk was his discussion of how he and his team discovered ways to improve the design of their system, specifically how they might refactor protocols to split orthogonal concerns. This kind of thought-process and its benefits was recently summarized beautifully by Steve Losh on Hacker News.
Anthony’s talk on his Clojail library that provides a sandboxed environment for Clojure execution has a long and storied precedent. For example, Racket’s sandboxing capability is at least superficially very similar to Clojail. However, Racket’s runtime security mechanism called Custodians are very different from the JVM model absorbed by Clojail, although the goals for each are similar.
Before Racket (and PLT-Scheme on which it’s built) there was some research an implementation for Scheme48 of a security kernel by Jonathan Rees called W7.1 The approach of W7 is quite breathtaking and there may be some lessons to take away for Clojail itself.
Chouser’s presentation on ClojureScript was given on a nifty little piece of presentation software written in ClojureScript named Traction. This is just an interesting aside.
In his talk he talked about how ClojureScript’s data structures are currently copy-on-write, mimicking Clojure’s behavior below a certain threshold. Reading over Clojure’s implementation of PersistentVector and PersistentHashMap provides some insight into this approach.
Protocols and types
Clojure’s approach for implementing types and protocols is built on the pseudo-classical inheritance pattern that stands in contrast to the functional inheritance pattern espoused by Douglas Crockford. Crockford’s pattern isn’t exactly Crockford’s pattern at all, but instead has a rich history. Some interesting implementations using this pattern to create class-based OO models include:
- Oleg’s purely functional OO library for Scheme
- Bryan O’Sullivan’s BOS for Scheme48
- Chouser and I talk briefly about this approach in section 7.2 of The Joy of Clojure
- and many many more…
In addition to a nice talk, he and his company put together a ClojureScript pamphlet that although a bit outdated at the moment2 is still a useful reference. Since his talk ClojureScript has matured thanks in no small part to his own efforts and comments.
Tune in next time
There are more Conj 2011 videos due for release soon, so I will try to keep up as they are released.