Fork me on GitHub
#nrepl
<
2018-12-10
>
cgrand11:12:56

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

cgrand11:12:02

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

cgrand11:12:20

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

cgrand15:12:50

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

bozhidar16:12:20

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

bozhidar16:12:06

What lead you to believe it might be dead code?

cgrand16:12:41

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

cgrand16:12:54

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

cgrand16:12:17

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

bozhidar19:12:39

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

bozhidar19:12:57

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

bozhidar19:12:19

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

cgrand20:12:51

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

cgrand20:12:26

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

bozhidar21:12:11

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

bozhidar21:12:39

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.

bozhidar21:12:28

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

bozhidar21:12:20

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.