Fork me on GitHub
#unrepl
<
2017-04-25
>
cgrand08:04:04

(interactions done using nc connected to a socket repl laucnhed from lumo (but now lumo’s own socket repl))

cljs.user=>(require '[net.cgrand.cljs.js.repl.main :as m])
nil
cljs.user=>(m/repl :eval r/eval :prompt #(print"nested=>") :read (fn [rp re cb] (m/repl-read rp re (fn [form e] (cb ({'exit re} form form) e)))))
nested=>nested=>true
The double prompt occurs with clojure.main/repl too. The true is the result of the above evaluation (because it’s async)
12 ; input
12
nested=>(+ 2 3)
5
nested=>exit
cljs.user=>

dominicm09:04:07

That's awesome

cgrand09:04:34

works only with lumo for now because writing the socket server was easier (for Planck I would have to look at its impl)

cgrand09:04:50

I would really appreciate a cljs or cljc port of unrepl.print