Port unrepl to self hosted CLJS
There's only one unrepl server implementation currently. The next step is to have a self-hosted cljs one (so it can work with planck or lumo) and the easiest component to port is the print.clj while whose job is to produce machine readable prints (see README.md) or values.
(quoting @cgrand off Slack):
Let’s summarize the self-hosted cljs situation: • stock repls (lumo or planck) can’t be upgraded BUT using https://github.com/cgrand/cljs-js-repl one can have a server socket upgradable repl (maybe one day it could be the default socket repl for both — wishful thinking) • we have a print.cljc (https://github.com/plexus/unrepl/blob/lumo_support/src/unrepl/print.cljc) • what is missing is a repl.cljs (given the IO differences I’m not sure a repl.cljc is worth it) • and the blob gen (which is not high priority since stock socket repls are not upgradeable yet) That’s all
More Slack quotes:
- @mfikes Yeah, I don’t see any problem with putting something into Planck, once all the stuff has been worked out.
- @anmonteiro: happy to incorporate any needed changes to Lumo to support upgradable REPLs
- @mfikes: Planck: I need to finish off fundamental socket support. This branch https://github.com/mfikes/planck/tree/sockets is sufficient to to make ~Unrepl~ upgradeable REPLs work https://gist.github.com/mfikes/e44cf07e8217db2112facf90b550ab74
Alpha socket support for Planck has now landed in Planck master mfikes/planck@b230a6d64
It is exposed via a planck.socket.alpha namespace.
The gist (https://gist.github.com/mfikes/e44cf07e8217db2112facf90b550ab74) illustrating it working with cljs-js-repl has been updated, as well as the sample code mfikes/cljs-js-repl@ded18bee