unrepl

discussing specification of an edn-based repl and its implementations.
rarous 2018-01-23T07:08:38.000276Z

@urzds You can connect to Socket REPL via Tubular and use it in Cursive, see http://planck-repl.org/ides.html

cfleming 2018-01-23T10:12:44.000460Z

I definitely plan to provide more REPL support, tubular is pretty fiddly and not ideal.

cfleming 2018-01-23T10:13:13.000224Z

I’d like to provide a decent unrepl client, and a raw socket REPL one.

dominicm 2018-01-23T10:16:37.000119Z

@cfleming Just to be clear, it's not the intention of unrepl that users start it directly. A client (e.g. cursive) should "bring along" it's own version of unrepl.

dominicm 2018-01-23T10:17:01.000264Z

Supporting raw socket REPL could involve using the Unrepl protocol.

cfleming 2018-01-23T10:22:22.000106Z

Right, so at some point the user will select “I’d like to start an unrepl”, and Cursive will connect the socket REPL and send its blob.

dominicm 2018-01-23T10:23:27.000250Z

@cfleming I'm not sure that unrepl is much more than an implementation detail though, is it?

cgrand 2018-01-23T10:57:12.000558Z

@dominicm yeah I don’t think “unrepl inside” stickers are worthy 🙂

dominicm 2018-01-23T10:57:46.000175Z

@cgrand You just wrote the message I will be writing into replant when I connect to a socket 😛

dominicm 2018-01-23T10:58:08.000206Z

@cgrand The only thing that makes me hesitate on that slightly, is the concept of BYOB.

cgrand 2018-01-23T11:00:52.000096Z

For now l consider that BYOB is for “power” users but I’m not done with it.

dominicm 2018-01-23T11:04:19.000585Z

Which makes sense. So, no "unrepl inside" stickers 😛

cfleming 2018-01-23T11:18:53.000405Z

Presumably users will want to choose, right? Not all socket REPL users will want unrepl, so at some point the user will have to say if they want one or the other.

cgrand 2018-01-23T11:36:21.000130Z

technically you can have unrepl on top of nrepl too...

cgrand 2018-01-23T11:37:14.000027Z

maybe the choice should rather be “nrepl/socket/raw socket”

urzds 2018-01-23T12:54:55.000018Z

As I understand it, the Cursive REPL could be "Unrepl-based-Cursive-REPL over Socket REPL". And "Unrepl-based-Cursive-REPL" would mean regular REPL features plus anything that Cursive needs in order to support hot reloading, auto-completion, live variable inspection, etc.

cgrand 2018-01-23T12:57:37.000514Z

@urzds yes, so why advertise unrepl to the end user?

urzds 2018-01-23T13:00:45.000136Z

Seems unnecessary, yes.

urzds 2018-01-23T13:01:55.000232Z

But Unrepl would help in having a good support of Socket REPLs, as far as I understand, because it implements a common process to upgrade the Socket REPL to something with the features that e.g. Cursive needs to implement good IDE experience on top of the REPL.

urzds 2018-01-23T13:02:13.000552Z

So choosing between nREPL and Socket REPL would be sufficient in the Cursive "Run Configuration" settings, I guess.

rarous 2018-01-23T07:09:37.000013Z

But, Unrepl needs another layer to work in Cursive

cfleming 2018-01-23T10:13:55.000163Z

@urzds Thanks for the issues!

volrath 2018-01-23T10:21:55.000010Z

@cgrand what do you think of this?: @gcast reported a problem in spiral when working with datomic transactions... long story short, the objects that @gcast is dealing with are represented in unrepl by deeply nested maps, and at some point, I'm getting objects which contents are elided, i.e. #unrepl/object [#unrepl/... {:get (unrepl.replG__8056/fetch :G__8577)}] -- so my #unrepl/object reader fails in this case. I'm guessing this is happening because of :nesting-depth restrictions.

volrath 2018-01-23T10:22:15.000420Z

here's a snippet of an evaluation

volrath 2018-01-23T10:22:48.000160Z

@volrath uploaded a file: https://clojurians.slack.com/files/U1D1GTBR7/F8WG95PTK/-.clj

cgrand 2018-01-23T10:37:43.000168Z

@volrath looks like a regression of my printer rework

volrath 2018-01-23T10:39:56.000548Z

hmm not sure which one you are talking about, was that before or after my global-print-settings branch? right now spiral is dispatching a merge between that branch and master

volrath 2018-01-23T10:50:42.000206Z

alright

volrath 2018-01-23T10:51:45.000380Z

I'll open an issue for the time being

volrath 2018-01-23T10:53:28.000390Z

haha or not

cgrand 2018-01-23T10:53:46.000382Z

it should fix the issue

volrath 2018-01-23T10:53:53.000189Z

perfect 🙂

cgrand 2018-01-23T10:54:09.000273Z

but you can open an issue to give more context

volrath 2018-01-23T10:54:20.000297Z

ok I will

cgrand 2018-01-23T11:38:10.000216Z

@volrath solved or not?

volrath 2018-01-23T11:38:59.000096Z

we'll have to wait for @gcast to try it out, I do not have an easy way to reproduce it

cgrand 2018-01-23T11:55:09.000195Z

before:

((apply comp (repeat 6 vector)) (java.util.ArrayList. [1 2 3]))
[:eval [[[[[[#unrepl/object [#unrepl/... {:get (unrepl.replG__152/fetch :G__654)}]]]]]]] 1]
after:
((apply comp (repeat 6 vector)) (java.util.ArrayList. [1 2 3]))
[:eval [[[[[[#unrepl/object [#unrepl.java/class java.util.ArrayList "0x3704122f" "[1, 2, 3]" {#unrepl/... nil #unrepl/... {:get (unrepl.replG__152/fetch :G__660)}}]]]]]]] 1]

👍 1
volrath 2018-01-23T13:01:52.000129Z

shouldn't we also 'un-elide' the object's 4th element? the map where you can get :beam? otherwise is kind of the same problem

cgrand 2018-01-23T13:02:48.000111Z

good point

cgrand 2018-01-23T14:41:27.000902Z

@volrath

((apply comp (repeat 6 vector)) (java.util.ArrayList. [1 2 3]))
[:eval [[[[[[#unrepl/object [#unrepl.java/class java.util.ArrayList "0x3704122f" "[1, 2, 3]" {:bean {#unrepl/... nil #unrepl/... {:get (unrepl.replG__152/fetch :G__660)}}}]]]]]]] 1]

gcast 2018-01-23T16:27:37.000463Z

@volrath ready to try out the fix. is it in SPIRAL? [EDIT] nvm. just saw the commit message

volrath 2018-01-23T16:48:21.000736Z

Correct. I don't know if it's in MELPA unstable yet, but i guess it should be..

gcast 2018-01-23T18:41:33.000488Z

did not fix.

error in process filter: spiral-loop-side-loader-handler: [side-loader] Unrecognized message \.\.\.
error in process filter: [side-loader] Unrecognized message \.\.\.

volrath 2018-01-23T19:16:42.000380Z

@gcast maybe that's the second error that @cgrand fixed, I just realized I didn't push that fix to spiral