unrepl

discussing specification of an edn-based repl and its implementations.
mkvlr 2019-05-06T14:07:16.001900Z

hey 👋 we’re using unrepl at Nextjournal for our Clojure eval. Any recommendation how to make it play nice with notebooks where you want to show an error if an expression is incomplete?

mkvlr 2019-05-06T14:07:53.002600Z

we recently introduced reading on the clojure side to check it’s complete but now realised this breaks on namespaced keywords etc

cgrand 2019-05-06T14:17:43.004100Z

It’s crude but: take your input (notebook cell) and send `(eval (read-string ~cell)) to unrepl thus the reading will occur on the other side

cgrand 2019-05-06T14:18:37.004700Z

(ok it’s too crude: you have to take into account that the cell may contain multiple forms but you get the idea)

mkvlr 2019-05-06T14:19:39.005Z

hehe

mkvlr 2019-05-06T14:20:09.005400Z

that’s a simpler workaround than what we could have thought of

mkvlr 2019-05-06T14:20:20.005700Z

is that what you do in IClojure as well?

mkvlr 2019-05-06T14:20:47.006Z

thanks a lot! 🙏

mkvlr 2019-05-06T14:32:09.006800Z

do you also get line number info out in IClojure?

cgrand 2019-05-06T14:33:38.007700Z

on exceptions? yes but the top frames of the exceptions are from the above wrapping

mkvlr 2019-05-06T15:32:16.008400Z

@cgrand thanks again, your solution works like a charm and is now deployed on http://nextjournal.com