unrepl

discussing specification of an edn-based repl and its implementations.
cgrand 2017-12-16T09:31:15.000060Z

@volrath did you consider porting nrepl bridge to el?

volrath 2017-12-16T09:45:05.000049Z

@cgrand I modularized the two things that are closely related to unrepl: the loop (`unrepl-loop.el`) and the transport format (edn messages parsing in unrepl-ast.el) but I'm pretty sure some of the AST details leaked to some other files. That said, I didn't plan for nrepl per se, but for an encapsulation/modularization of the underlying protocol

cgrand 2017-12-16T10:35:53.000052Z

The only abstraction you need is the connection (how you get a pair of streams).

volrath 2017-12-16T10:51:05.000042Z

@cgrand, sorry, I actually misinterpreted your question. I thought you were asking about supporting nrepl from scratch. To answer your question, no, I haven't thought on porting nrepl-bridge

volrath 2017-12-16T10:51:31.000064Z

It shouldn't be too hard though

volrath 2017-12-16T10:52:26.000043Z

I remember I read the code a long time ago when you wrote it and I thought it was a viable option

cgrand 2017-12-16T12:46:45.000032Z

If someone is looking for a short task to help unrepl, porting nrepl-Bridge to cljs (maybe using https://github.com/rksm/node-nrepl-client) would be cool!

cgrand 2017-12-16T12:47:49.000016Z

@volrath to be clear: we are not talking about supporting nrepl as a whole but using it as a connection method, right?

volrath 2017-12-16T12:47:57.000022Z

yes

bozhidar 2017-12-16T14:29:27.000006Z

@cgrand What does the bridge provide exactly? A way to interact with an unrepl using the nREPL communication protocol?

bozhidar 2017-12-16T14:30:02.000024Z

If that’s the case I assume this should work out of the box with CIDER, right?

bozhidar 2017-12-16T14:48:38.000046Z

It’s very hard to figure out what this does from its readme 😄 https://github.com/Unrepl/nrepl-bridge

bozhidar 2017-12-16T14:48:47.000012Z

Not to mention how it is supposed to be used.

cgrand 2017-12-16T16:42:31.000027Z

@bozhidar sorry this project was quite niche :-)

cgrand 2017-12-16T16:46:40.000051Z

So unrepl requires a pair of streams connected to a repl. Usually they are provided by a socket to a socket server repl. The bridge (which is part of the client) allows to recreate this pair of streams over a nrepl connection.

cgrand 2017-12-16T16:47:07.000022Z

@Bozhidar is this description understandable.

bozhidar 2017-12-16T18:24:05.000070Z

> So unrepl requires a pair of streams connected to a repl. Usually they are provided by a socket to a socket server repl. The bridge (which is part of the client) allows to recreate this pair of streams over a nrepl connection.

bozhidar 2017-12-16T18:24:30.000066Z

@cgrand Yeah, I get this. I’m assuming those streams are the equivalent of nREPL sessions.

bozhidar 2017-12-16T18:25:25.000053Z

So, unrepl normally opens two client sockets to socket repl server, right? What are they for - evaluation and control/tooling perhaps?

cgrand 2017-12-16T19:57:48.000006Z

Actually 3: user input, aux (control/tooling), sideloader (classpath extension).

cgrand 2017-12-16T20:24:38.000056Z

Also these connections are not created in the same way. The first one (user) is upgraded by sending the blob the other ones are upgraded using expressions provided on the user connection. They are all part of a single user session.

cgrand 2017-12-16T20:57:29.000098Z

They could be multiplexed over a single link (like nrepl does) but unrepl doesn’t require it. Nothing stops a client from using a multiplexing transport. (See mux as an example.)