nrepl

https://github.com/nrepl/nrepl || https://nrepl.org
cgrand 2018-12-10T11:12:56.077100Z

You can inject any transport as long as it’s based on a stream of characters

cgrand 2018-12-10T11:14:02.078200Z

so drawbridge is out (what’s the point of injecting a HTTP transport over an SSH tunneled socket repl)

cgrand 2018-12-10T11:15:20.079300Z

binary transports are out too (ok maybe with a good amount of reflection it may be worked out)

cgrand 2018-12-10T15:45:50.079800Z

Is *msg* dead code or something used for debug?

bozhidar 2018-12-10T16:40:20.081500Z

@cgrand I think without it being bound responses don’t have ids.

bozhidar 2018-12-10T16:41:06.082300Z

What lead you to believe it might be dead code?

cgrand 2018-12-10T16:42:41.083100Z

I didn’t look into session for it 😕 (I really thought I did search the whole codebase)

cgrand 2018-12-10T16:43:54.084100Z

now I feel less bad about creating a circular dep between session and interruptible-eval

cgrand 2018-12-10T16:48:17.085700Z

So thread management should move to session (where clone and close are handled)

bozhidar 2018-12-10T19:02:39.086500Z

As *msg* is just an implementation detail perhaps you can also find a different way to track the active message.

bozhidar 2018-12-10T19:02:57.087Z

I don’t think that any user code depends on this.

bozhidar 2018-12-10T19:04:19.087800Z

But moving thread management to sessions is also reasonable. The only tricky part will be retaining the thread-local bindings between threads.

cgrand 2018-12-10T20:33:51.090900Z

@bozhidar Bindings of dynvars or of ThreadLocals? I don’t know if you’ve read my latest proposal on #16: a thread per session with a caveat emptor about interrupting evaluation.

cgrand 2018-12-10T20:36:26.093600Z

Btw in addition to interrupt in unrepl we have the ability to background the current eval (it returns immediately as a future).

bozhidar 2018-12-10T21:12:11.093800Z

> a thread per session with a caveat emptor about interrupting evaluation.

bozhidar 2018-12-10T21:13:39.095100Z

Yeah, that makes a lot of sense. And solves the problem I was thinking about - namely preserving the dynvar bindings, as those are stored in the session anyways.

bozhidar 2018-12-10T21:14:28.095300Z

> Btw in addition to interrupt in unrepl we have the ability to background the current eval (it returns immediately as a future).

bozhidar 2018-12-10T21:15:20.096100Z

I guess that something like this might be useful to some people who want to enqueue a few long-running evaluations, but I’m not certain how common this scenario is.