Alex Collins – Blog

Things I'm learning; lessons or otherwise…

Clojure’s Concurrency: Futures and Agents in Harmony

by atc on July 29, 2012, no comments

I’ve previously written on the wonders of Clojure’s agents, giving the programmer a wonderfully easy way of writing asynchronous code with very little effort. Here’s a slightly more complex example for those wanting more context. Combining Futures and Agents We’ll use this (deliberately poor) inefficient find-primes in a (future) to allow for asynchronous processing in […]

Leiningen and standalone clojure programs

by atc on January 27, 2012, no comments

Hacking away at various clojure-related stuff lead me to start using Leiningen. “Lein” is a build tool similar to Maven (and interoperates in fact…) to help you concentrate on coding. At some point in the day’s coding I wanted to run my code standalone instead of in a REPL. I needed a main entry point […]