Clojure

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-1.10.3.967.sh
chmod +x linux-install-1.10.3.967.sh
sudo ./linux-install-1.10.3.967.sh
rm linux-install-1.10.3.967.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 1.10.3.967

❯ 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

Emacs in Clojure mode

Supergood!