hi - trying to figure out how much clojure I can use with obb… wondering if I can slurp a file in the same directory as the script - currently getting an Error (Could not resolve symbol slurp) - thanks!
Hey there!
obb is a ClojureScript interpreter, and slurp is Clojure-only.
whoops - didn’t read enough of the docs… hopped over from babashka - my bad
No worries!
For reading a file you’ll want to fall back on JavaScript (JXA) interop.
Here’s an example of one way to do it: https://github.com/babashka/obb/blob/main/src/obb/impl/core.cljs#L22...L25
excellent - thanks for the help!
You’re welcome! Thanks for trying out obb!
we could expose slurp in obb.core perhaps, this is what I've done in nbb too, but there I made the result a promise so I can eventually supporting slurping urls too ;)
this needs careful consideration