Fork me on GitHub
#unrepl
<
2018-01-22
>
vschepik07:01:59

Does spiral support ClojureScript in the browser similar to piggieback and nrepl?

dominicm07:01:00

To my knowledge, not yet

volrath09:01:27

correct. cljs is still a wip in unrepl, in general

cgrand16:01:57

Selfhost cljs is a matter of implementation. Clojure cljs is not fully thought true yet.

urzds15:01:50

Hi! I am trying to understand how Unrepl works. Is it correct that I need to start my program using the Clojure Socket REPL, and the Unrepl client will use that to load the Unrepl server into my program and then start communicating with it?

cgrand17:01:32

That’s about it. Note that “need to start my program using the clojure socket repl” is just “start my program as usual except for an additional command line option.

urzds17:01:49

@cgrand The additional command line option is the java system property that makes clojure.main start a Socket REPL?

cgrand17:01:39

Yes. Technically there’s no direct dependence on clojure.main: these properties are checked during clojure init. So any app containing some clojure code will open a socket repl when this property is set. No matter the main entry point of the app.

urzds17:01:34

I am using Cursive, where the Socket REPL (and thus Unrepl) and clojure.main are more intertwined, since Cursive has no native support for the Socket REPL or Unrepl.

urzds17:01:02

@cgrand Does "the Unrepl client uses the process' Socket REPL to load the Unrepl server into the process and then starts communcating with it" mean that there is no such thing as a common "Unrepl server"? I.e. every Unrepl client implements its own version of it, but only adheres to the same / common Unrepl protocol?

urzds17:01:11

And if so, what is the benefit over every client implementing a different protocol? The REPL connection cannot be shared between different clients anyway, can it?

urzds17:01:59

(Since every client would try to load the Unrepl code into the process again, and start a new Unrepl server.)

cgrand17:01:15

Every client indeed embed its unrepl strain. The value is that there’s no setup to do (no middleware no versions etc) and also that authors are free to mutate (fix/extend) unrepl. Having a common ancestor, it’s easier for mutants to swap “genes”. So you can see unrepl as a blueprint for a family of private protocols.

urzds17:01:08

@cgrand Is this explanation included somewhere in the readme?

urzds17:01:37

@cgrand Is this summary correct? https://github.com/cursive-ide/cursive/issues/1928 (If so, please feel free to include it into the readme.)

cgrand09:01:22

I added a comment to make the upgrade process more clear.

urzds12:01:22

Are you interested in having such summary in your readme for educating others that might also be confused?

cgrand13:01:34

@U37339DBP this is what I was thinking of too: add such summary near the top of the README. And also specify that unrepl is meant for toolsmithes and that typical users don’t have to care.

urzds13:01:29

Is "scuh" jargon for something?

urzds13:01:57

ah, lol, ok 🙂

cgrand13:01:01

out-of-order typist

urzds14:01:54

You're also vulnerable to meltdown? 😉

urzds14:01:36

If the text proposed above is agreeable, I'd submit a PR.

cgrand14:01:41

yes, meltdown for humans is called freudian slip

cgrand14:01:19

@U37339DBP it’s a good basis, please open a PR and we’ll discuss changes there.