Fork me on GitHub
#unrepl
<
2017-12-16
>
cgrand09:12:15

@volrath did you consider porting nrepl bridge to el?

volrath09:12:05

@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

cgrand10:12:53

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

volrath10:12:05

@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

volrath10:12:31

It shouldn't be too hard though

volrath10:12:26

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

cgrand12:12:45

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!

cgrand12:12:49

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

bozhidar14:12:27

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

bozhidar14:12:02

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

bozhidar14:12:38

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

bozhidar14:12:47

Not to mention how it is supposed to be used.

cgrand16:12:31

@bozhidar sorry this project was quite niche :-)

cgrand16:12:40

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.

cgrand16:12:07

@Bozhidar is this description understandable.

bozhidar18:12:05

> 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.

bozhidar18:12:30

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

bozhidar18:12:25

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

cgrand19:12:48

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

cgrand20:12:38

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.

cgrand20:12:29

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.)