Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Try out Clojure libraries via rebel-readline (github.com/eval)
70 points by todsacerdoti on April 6, 2023 | hide | past | favorite | 8 comments


The setup seems a bit convoluted. You can just launch a REPL with 'add-libs' (and whatever other dependency you want) and then add any libs/dependencies you wanna poke at at runtime

This isnt to be dismissive. It's still handy to have an alias that runs an 'add-libs' enabled REPL. And nice to have a shortcut to fetch the latest version of a lib from maven or GitHub


I'm on Mac. I installed bbin, and followed the repo instructions to install deps-try with bbin, but deps-try is not on my path.


Is ~/.babashka/bbin/bin on PATH? Does installing any of the other libs from https://github.com/babashka/bbin#usage work?


Gah, I missed step 2 on bbin installation instructions: echo 'export PATH="$PATH:$HOME/.babashka/bbin/bin"' >> ~/.$(basename $SHELL)rc && exec $SHELL

Working now, thanks. I love these kinds of sandbox development tools so this is very much appreciated.


Can someone contrast this with the long existing lein-try or a setup like using Pomegranate with an injection in a Leiningen project so that you can add arbitrary dependencies to a live REPL?


This is indeed the lein-try for tools-deps. Published libraries can be loaded but also github/gitlab/sourcehut-projects (as long as $project_root/deps.edn exists).

Rebel-readline (vendored and extended in this project) is essentially a tiny IDE as it provides syntax highlighting, formatting, code completion, docs, show source, show examples etc.


How to start the thing if you are on macOS?





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: