I’ve been away awhile, working on a new project. It’s part of an educational effort about molecular dynamics simulation. Although I’ve been working a lot with Clojure using emacs for editing, this project required a return to Java. As a result, I’ve been using NetBeans again. The difference in productivity was amazing and not in the way I expected.
I’ve been updating some of my projects to use the newly released Java 8. That includes many Clojure projects. These are just “flow of consciousness” debugging notes.
One of the things about Clojure that is difficult for beginners is the process of creating and running programs. I would argue that it is more difficult than learning the language itself. There is no “one-button” provisioning system that would set up some sort of canonical development environment. This long post will talk about setting up Leiningen and Emacs to make a comfortable environment for developing in Clojure.
Ya know, this point just keeps slapping me in the face. It seems that people don’t stop trying to use Lisp because they don’t like the language. A lot of people stop because they don’t like the programming environment. Looking around the Q&A sites there seem to be many more questions about setting up a programming environment for the Lisp family of languages than there are for the more mainstream languages like Java and C++. Well, here are my suggestions.
Note: This is a re-post of an earlier entry recovered from another blogging system.
After innumerable attempts and false starts, I am now using emacs on a regular basis. What is different about this latest effort?
It’s a bit of a puzzler, but after thinking about it a bit, here are a few things that might be different this time.
- Repeated Exposure. Maybe after all of the other attempts, I am finally “ready” to grasp emacs.;-)
- Lisp Cabinet. This time, I installed emacs using Lisp Cabinet and it “just worked”. There was not the usual configuration and setup hassle. And it supports several Lisps, Clojure, and Racket.
The color scheme is nice. Indentation is automatic (in Lisp anyway). It is intended to work with Windows. It just seems easier to use.
- Land of Lisp. I started using emacs to work through the examples in Land of Lisp. The examples are long enough that they require actually learning some of the command keystrokes, but short enough that it doesn’t feel like a typing lesson.
A few years ago I worked through Practical Common Lisp, but it didn’t stick. In fact, I referred back to the early part of PCL to recall some of the emac keystrokes I needed to enter the LoL stuff. I used (the no longer supported) Lisp-in-a-Box for a bit, but it didn’t stick. The Lispbox project has tried to take up the slack, but it didn’t work for me when I tried it and I went down the usual configuration rabbit hole without getting it to work as I wanted, then gave up. (Again.)
So, after years of starts and stops and unmeasurable amounts of frustration, I’m finally getting comfortable with emacs.