Using Djblue's portal for tap in Babashka
Jul 18, 2023
It’s often the case one has to deal with a repl-crashing amount of data via Babashka. In clojure I reach for hashp but this time I thought I’d try out Chris Badahdah’s Portal which describes itself as the following: “A clojure tool to navigate through your data”. Amazingly, you can even try it out online!
Here’s how to set it up:
In bb.edn:
{
...
:deps {djblue/portal {:mvn/version "0.42.1"}}
...
}
Then in the REPL:
(do
(.addShutdownHook (Runtime/getRuntime)
(Thread. (fn [] (p/close))))
(def portal (p/open {:app true}))
(add-tap #'p/submit))
If you have Chrom(ium?) installed, you should get a new window and from this point, tap>
will send data there ready to be explored.