Links

Note: I don’t give choices here. If you’re a beginner, you don’t know enough to choose an option. Sometimes choice is a bad thing because it overwhelms.

Check to be sure you have Java.

java -version

“java” only comes with the JDK. You can add Java to your browser, but without the JDK, you don’t get the “java” command-line command.

If you get “No Java runtime present, requesting install”, you can dismiss the dialog and google for “Java SE Development Kit”. Go to Oracle and download and install the latest Java SE development kit. It should be a 64-bit .dmg file. Open the .dmg and run the installer.

Install Leiningen:

If ~/bin is not already on your path, edit ~/.bash_profile and add it to your path. Then run” ` . ~/bash_profile`”

Execute the command “lein” once (for the first time) to install Leiningen

Helpful lein command lines:

Start the Clojure “repl” (command-line interpreter)

lein repl

Create a new application (as opposed to library) project

lein new app my-project-name

Search clojars

lein search $TERM

Run the project in the current directory

lein run

Run tests

lein test

Learn Basic Clojure:

I found these helpful:

http://www.amazon.com/Living-Clojure-Carin-Meier-ebook/dp/B00W4DTCSW - If you already know how to program and you want to acquire Clojure efficiently and effectively.

https://www.cis.upenn.edu/~matuszek/Concise%20Guides/Concise%20Clojure.html - reminders of what you read in Living Clojure. (This was a little too terse for me, without Living Clojure to help.)

Install an IDE (or an editor and use leiningen projects to build jars (and auto-download Clojure as needed) – I haven’t decided yet):

Light Table - I’m sure this could be a wonderful IDE/editor. When I tried a Clojure “instarepl”, it exposed a bug in displaying the intermediate results. I found the solution online, which was to update the Clojure plugin. Of course, the directions said to click “upgrade”, which didn’t exist. I eventually did a Command window search and found a command to search for plugin updates, which revealed the missing “update”. After I updated the Clojure plugin, I started seeing a bunch of “Invalid behaviors file” messages in the console. The solution to that is to “just build from source”. No thanks. I didn’t really want to build an editor – I just wanted to try editing a little Clojure code.

Some Notes on Clojure

Note that these may not be strictly accurate. They are approximations/abbreviations/incantations to help remember some of Clojure.