Recently I had my first experience writing Clojure for a real world desktop application. Previous to this experience I had only written a handful of scripts and read a couple of books (Programming Clojure and The Joy of Clojure). One of the challenges I faced writing Clojure in a complex desktop application versus contrived exercises […]
We learned two major performance lessons very quickly while working on the hottest part of our recent Clojure application: Laziness Laziness is amazing. As Debasish Ghosh explained on his blog, laziness lets you effectively reify and compose loops. Code that looks like it’s producing intermediate data structures is actually composing together patterns of iteration. When […]
A lot of functions in Clojure take the form (f args1* f2 args2*), where (f args1) represents a context and (f2 args2) represents a computation to perform in that context. I’m going to call this Clojure’s “contextual function” pattern (since I’ve never seen it named before). This pattern is easy to overlook, but it’s powerful, […]
Starting a Clojure Desktop Application We’re starting up our first desktop application in Clojure. We’re a heavy vim and ruby shop. We’ve done several desktop applications in JRuby. This is the first time we’ve tackled swing UIs and GUI testing in Clojure. It’s still early in the process, but here’s what we’ve found so far.
You are a drug trafficker. Every day you meet with a different nice old lady (the mule) and find out how much weight she can carry in her handbag. You then meet with your supplier who has packed various drugs into a myriad of collectible porcelain dolls. Once packed with drugs, each of the precious […]
One of the things I find myself yearning for in a lot of programming languages is a powerful pattern matching system. I wrote one for ruby, but ruby’s syntax just wasn’t flexible enough to make something as elegant as I’d like. When I started using clojure, it seemed like a great little project for getting […]