Instant Clojure Dialect Commands¶
A single command, no prerequisites, a working local Clojure dialect command.
You can use this to try a dialect REPL or command, or share a command with others, regardless of whether they have the dialect installed to run it.
The Makefile is hosted at clojure.cc/cmd.mk.
It uses Makes to auto-install both the
dialect and its host language (Java, Go, Python, PHP, etc.) into a local
cache directory.
Your system stays clean.
NOTE: The command above should work in the Bash and Zsh shells. Fish users can use this instead:
Starting Dialect REPLs¶
| Name | Dialect | Host | REPL Command |
|---|---|---|---|
bb |
Babashka | GraalVM | $(make -f <(curl -sL clojure.cc/cmd.mk) bb) |
clj |
Clojure | Java | $(make -f <(curl -sL clojure.cc/cmd.mk) clj) |
glj |
Glojure | Go | $(make -f <(curl -sL clojure.cc/cmd.mk) glj) |
gloat |
Gloat | Go | $(make -f <(curl -sL clojure.cc/cmd.mk) gloat) --repl |
hy |
Hy | Python | $(make -f <(curl -sL clojure.cc/cmd.mk) hy) |
janet |
Janet | C | $(make -f <(curl -sL clojure.cc/cmd.mk) janet) |
joker |
Joker | Go | $(make -f <(curl -sL clojure.cc/cmd.mk) joker) |
jolt |
Jolt | Chez Scheme | $(make -f <(curl -sL clojure.cc/cmd.mk) jolt) repl |
lein |
Leiningen | Java | $(make -f <(curl -sL clojure.cc/cmd.mk) lein) repl |
lg |
let-go | Go | $(make -f <(curl -sL clojure.cc/cmd.mk) lg) |
phel |
Phel | PHP | $(make -f <(curl -sL clojure.cc/cmd.mk) phel) |
Plus:
| Command | Purpose |
|---|---|
make -f <(curl -sL clojure.cc/cmd.mk) shell |
Start a shell with all of the above installed |
make -f <(curl -sL clojure.cc/cmd.mk) reset |
Delete the installation cache |
make -f <(curl -sL clojure.cc/cmd.mk) help |
Print the help text |
Gloat REPL Client¶
The Gloat REPL client is more featureful than the plain dialect REPLs, with many modern fetures including:
- Rainbow syntax highlighting
- Tab completion
- Stateful URL sharing
- Multiline forms and history scrolling
See https://gloathub.org/doc/gloat-repl/ for full details.
gloat can connect to dialect nREPL servers started through these launchers:
| Server | Command |
|---|---|
| Babashka | $(make -f <(curl -sL clojure.cc/cmd.mk) gloat) --repl=+bb |
| Jolt | $(make -f <(curl -sL clojure.cc/cmd.mk) gloat) --repl=+jolt |
| let-go | $(make -f <(curl -sL clojure.cc/cmd.mk) gloat) --repl=+lg |
Examples¶
Launch a Glojure REPL:
Evaluate a let-go expression:
Pin a Babashka version:
Or simplify with a shell function:
ccc() (
dialect=$1; shift
$(make -f <(curl -sL clojure.cc/cmd.mk) "$dialect") "$@"
)
ccc clj
ccc bb BABASHKA-VERSION=1.12.218
ccc shell
How it works¶
The launcher is a small Makefile that:
- Clones makeplus/makes into a temp
directory (
$TMPDIR/clojure-cc-cmd/). - Loads the language-specific module for the requested dialect.
- Downloads the host language toolchain (Java, Go, Python...).
- Downloads and installs the dialect.
- Drops you straight into its REPL.
Everything lives under that single temp directory and can be cleared with:
See makeplus/makes for the implementation details.
Want more dialects?¶
The launcher currently ships with the dialects listed above. If you'd like to see another Clojure dialect supported here, please open an issue on GitHub.