Challenging Clojure in Common Lisp

Clojure is a dialect of the Lisp programming language created by Rich Hickey [Clojure]. According to Wikipedia, Mr. Hickey created Clojure “because he wanted a modern Lisp for functional programming, symbiotic with the established Java platform, and designed for concurrency.[Clojure]. Since then, Clojure has gathered somewhat of a following in the functional programming community, the other chief contender for functional programming on the JVM being the Scala programming language. This blog will attempt to document my quest to achieve two of Mr. Hickey’s goals using straight-up Common Lisp: idiomatic functional programming & concurrency. Why am I doing this? I tried Clojure and was disheartened by two aspects of the language: lackluster performance and the constant resurfacing of the Java and the JVM in error messages and other aspects of working with Clojure. I know of ClojureScript and the ability to run it on Google V8, but I suppose I really wanted a non-hosted language where I can intuitively map abstractions to assembler code by calling something like (disassemble … ) on a simple function. I tried Scala and missed homoiconic macros. Somehow I could not shake the feeling that homoiconic macros were intimately tied to the very essence of functional programming. I was also puzzled by the suggestion that Lisp, in its current form, somehow lacked modernity. Popularity, yes, modernity I wasn’t sure of… We will add one twist to the story. With Lisp being a programmable programming language, I can surely re-engineer any design goals of Clojure using Common Lisp by way of macros — but the challenge here is to do without such an effort. Therefore there are two rules in this game: 1) I am not allowed to write the keyword “defmacro” 2) I must rely on stock libraries / frameworks. “Stock” will be defined as installable via Common Lisp’s package manager Quicklisp [QuickLisp]. The “long and short of it is” that I want the utility of Clojure with the performance of Common Lisp. As Dough Hoyte points out in the book Let Over Lambda [Let-Over-Lambda], Lisp is not precisely a functional programming language, not in the the sense that Haskell and ML are functional programming language. I aim to challenge that. In [Lisp-Converge-C++] we showed how to bring Lisp close to C in performance by matching the generated Assembler code.  In this blog we aim to “bring Lisp in line” with idiomatic functional programming concepts. With our two rules in mind, let us see how far we can travel on this road…

The Idea of Lisp

LISP. It conjures up visions of a bygone age of computers the size of refrigerators, ALL CAPS CODE, and parentheses. Oh! so many parentheses! So why is Object-Oriented Programming’s creator so enamored with the idea of Lisp? And what can he mean by a programming language being an idea anyway? Should I blame my Computer Science education for not teaching it to me?

hitchhiker-tree: Functional, persistent, off-heap, high performance data structure

Hitchhiker trees are a newly invented (by @dgrnbrg) datastructure, synthesizing fractal trees and functional data structures, to create fast, snapshottable, massively scalable databases.

What’s in this Repository?

The hitchhiker namespaces contain a complete implementation of a persistent, serializable, lazily-loaded hitchhiker tree. This is a sorted key-value datastructure, like a scalable sorted-map. It can incrementally persist and automatically lazily load itself from any backing store which implements a simple protocol.

Outboard is a sample application for the hitchhiker tree. It includes an implementation of the IO subsystem backed by Redis, and it manages all of the incremental serialization and flushing.

The hitchhiker tree is designed very similarly to how Datomic’s backing trees must work–I would love to see integration with DataScript for a fully open source Datomic.


“Clojure is a “robust, practical and fast programming language” whose original design goals were aimed at giving developers “succinctness, flexibility and productivity”. It turns out that most organizations today are interested in achieving those very goals – as the landscape evolves, they need technologies that help them move faster, respond more effectively, and to take advantage of new architectures and infrastructure. In short, they need simple tools that help them be more agile.

In this, the sixth consecutive year of the State of Clojure survey, we are seeing the evidence that Clojure is moving across the chasm from a niche tool used by explorers and hobbyists to becoming a critical part of the commercial development landscape, and that its adoption is spreading both broadly among companies, but also more deeply within them.

Before we get to the results, we’d like to first thank everyone who took the time to respond to the survey this year. Response was up more than 75% this year, with 2,445 total responses to analyze. This kind of data is invaluable to the people and organizations using (or considering) Clojure today. As always, we’d also like to thank Chas Emerick for starting the survey back in 2010…”

An opinionated CQRS/ES implementation using Onyx, Datomic, DynamoDB, Kafka and Zookeeper

“An opinionated CQRS/ES implementation using Onyx, Datomic, DynamoDB, Kafka and Zookeeper.

The problem

Best to start with the core problem at hand:

The current relational database is too limiting. We’re dropping all sorts of interesting data on the ground because we don’t have suitable pigeonholes to put it into.

Any system that has enough interesting interaction happening to it faces this problem. The data that we do end up putting into our database tends to inconsistent design. It is then risky to change down the line because it gets treated as our system of record.

To this end, we’ve been doing research into Event Sourcing (ES). This led to Command/Query Responsibility Segregation (CQRS) and touched on the area of Domain Driven Design (DDD)…”

Scala Vs Clojure – Let’s get down to business

“Of the new languages that are emerging these days, no two are as interesting as Scala and Clojure. Both claim to be functional and geared for concurrency, one is a Lisp the other a Curly braces language. On paper, they stack fairly well against each other, so let’s investigate how well they are suited for business…”