I haven't done a whole lot of Clojure lately, but that's no reason not to install it. It officially supports Java LTS releases (currently, Java 11). I skipped 11 and installed OpenJDK 17 the other day. That's not an LTS, but I think it will be okay. It also says, "Ensure that the following dependencies are installed: bash, curl, rlwrap, and Java." I think I have bash, curl, and Java, but I still need rlwrap
sudo apt install rlwrap
This is a wrapper for GNU Readline, perhaps my favorite library ever.
Now we're ready to get Clojure!
curl -O https://download.clojure.org/install/linux-install-220.127.116.117.sh chmod +x linux-install-18.104.22.1687.sh sudo ./linux-install-22.214.171.1247.sh rm linux-install-126.96.36.1997.sh
That's that and that's that!
❯ which clj /usr/local/bin/clj ❯ which clojure /usr/local/bin/clojure ❯ clojure -version Clojure CLI version 188.8.131.527 ❯ clj Clojure 1.10.3 (println "Hello, world!") Hello, world! nil
Get clojure mode for Emacs.
M-x package-install RET clojure-mode RET
It has lots of customizations you can make
M-x customize-group RET clojure
by I didn't make any.
❯ cat hello.clj (println "Hello, World!") ❯ clojure hello.clj WARNING: Implicit use of clojure.main with options is deprecated, use -M Hello, World! ❯ clojure -M hello.clj Hello, World!
I guess I have to learn about
-M. Here's a shot of Emacs with clojure-mode in action