Here's a zero-dep (no dialect binary or backing language required) way to try 10 different Clojure dialects' repls, with one simple command:
$ make -f <(curl -sL gloathub.org/repl.mk) help | head
Instant Clojure Dialect REPLs!
Start an auto-installed Clojure dialect CLI repl client:
make -f <(curl -sL gloathub.org/repl)
make -f <(curl -sL gloathub.org/repl) -VERSION=1.2.3
Names of repl targets and their VERSION variables:
$ make -f <(curl -sL gloathub.org/repl.mk) bb
* Installing 'bb' locally
curl+ > /tmp/gloathub-repl/local/cache/babashka-1.12.218-linux-amd64-static.tar.gz
Cached: /home/ingy/.cache/makes/github.com__babashka__babashka__releases__download__v1.12.218__babashka-1.12.218-linux-amd64-static.tar.gz
tar -C /tmp/gloathub-repl/local/cache -xf /tmp/gloathub-repl/local/cache/babashka-1.12.218-linux-amd64-static.tar.gz
[[ -e /tmp/gloathub-repl/local/cache/bb ]]
mv /tmp/gloathub-repl/local/cache/bb /tmp/gloathub-repl/local/bin/
touch /tmp/gloathub-repl/local/bin/bb
bb
Babashka v1.12.218
Type :repl/help for help
user=>
Currently supports: bb, clj, glj, gloat, hy, janet, joker, lein, lg (let-go) and phel.Linux and macOS supported (and tested).
$ echo $OSTYPE
darwin23.0
$ make -f <(curl -sL gloathub.org/repl.mk) joker
joker
Welcome to joker v1.7.2. Use '(exit)', EOF (Ctrl-D), or SIGINT (Ctrl-C) to exit.
user=> *joker-version*
{:major 1, :minor 7, :incremental 1}
user=>
🙂Nifty. Is this in the GloatHub docs somewhere?
not yet.
it's not really gloat related per se. I just needed a good place to host the http://repl.mk file 🙂
if some more clojure central site wanted to host it, I'd be glad to help
Yeah, I can see how it's not gloat related. We don't really have a "central" site that is devoted to cross-dialect concerns either.
Just added janet support.
make -f <(curl -sL gloathub.org/repl.mk) janet
Also try:
make -f <(curl -sL gloathub.org/repl.mk) shell
to start a shell with all the dialects installed and in your PATH.Note, the <(...) process substitution is available in bash and zsh. If you use fish or something else, try:
bash -c 'make -f <(curl -sL ) janet'