This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-04-29
Channels
- # announcements (1)
- # babashka (15)
- # beginners (37)
- # calva (94)
- # cider (3)
- # clj-kondo (17)
- # cljsrn (2)
- # clojure (45)
- # clojure-europe (39)
- # clojure-germany (1)
- # clojure-norway (2)
- # clojurescript (16)
- # component (18)
- # conjure (1)
- # cursive (13)
- # datalevin (3)
- # datomic (12)
- # docker (2)
- # duct (5)
- # eastwood (2)
- # emacs (4)
- # events (8)
- # fulcro (8)
- # inf-clojure (5)
- # kaocha (8)
- # lsp (24)
- # malli (11)
- # meander (3)
- # off-topic (19)
- # polylith (11)
- # remote-jobs (4)
- # sci (61)
- # shadow-cljs (9)
- # spacemacs (34)
- # sql (10)
- # tools-deps (27)
- # xtdb (9)
Playing around with bb today creating a little language interpreter and found that I don't have access to the clojure.main
ns nor the babashka.impl.clojure.main
ns to leverage the existing REPLs. Rather than write my own REPL (which I'm not opposed to of course) I'd love to use the ones available if possible. Any insights?
Hey @U050WRF8X!
Babashka exposes clojure.main/repl
to scripts. Would that be sufficient?
Ah yes. I see that now. I read my error too hastily. It's actually complaining about clojure.main/repl-read
but I suppose I can use read
directly or wrap it a little if needed.
clojure.main/repl might not work exactly the same as in JVM Clojure, but if you find bugs/need support, we can get that fixed and you can try a development binary
Is there some sort of a var that I can use in a bb script to detect if bb interpreter has running nrepl server vs just running a script? The use case is that I want to use script's functions in a bb nrepl session, and prevent the script from running System/exit