Fork me on GitHub
#planck
<
2019-04-20
>
pyrmont07:04:34

@mfikes The pREPL proof of concept is now more fully featured. It works more like how the JVM Clojure reference implementation operates (given the limitations imposed by the fact that Planck's (p)REPL is necessarily a mixture of C and ClojureScript). I think it's getting closer to moving out of being a 'proof of concept' 😄

pyrmont11:04:45

Yeah! It's fun to play with it. Sending tap output to it from the main REPL was neat :)

mfikes11:04:22

I haven't looked at the implementation yet. One thing to perhaps look for is whether each pREPL session is independent. (I don't know if this is the case in the Clojure pREPL implementation.) By independent, this means that certain things like *1* would be unique for each session.

mfikes11:04:50

(This works for regular socket REPL sessions in to Planck and also for JVM Clojure.)

pyrmont11:04:15

Yeah, the pREPLs are really an implementation of the socket REPL sessions.

mfikes11:04:33

Ahh, cool. Then they would effectively inherit that capability. 🙂

pyrmont11:04:37

One thing I still want to try thinking about is whether there's some way to make the implementation more closely mirror JVM Clojure's such that there's a generic pREPL implementation that's then utilised through a more specific implementation (eg. a socket connection). I've been able to decouple things a little but the basic loop still assumes a socket-based connection. I don't think JVM Clojure requires that.

mfikes11:04:39

Ahh. Yeah. I don't know too much about JVM Clojure's pREPL and whether it only works via a TCP socket.

pyrmont11:04:22

The thing is that if I did that, I think I'd need to write the socket logic all in Clojure and while we've got planck.socket.alpha, I'm not sure how I could incorporate them. Maybe write some generic C callbacks that execute a Planck function.

pyrmont11:04:25

The thing is that I wonder if that's kind of past the point at which it really matters. pREPL's still a moving target so maybe having something that works basically the same as the example socket-based IO pREPL is better.

mfikes11:04:56

Yeah, that would be a bit more challenging. I don't recall, but I think having the socket REPL loop being native was a thing I did owing to startup considerations.

pyrmont11:04:49

Yeah, could be problems there too.

pyrmont11:04:58

Anyway, I'll probably give it a little thought and then maybe give up on doing anything more in that direction :P I think a better use of time would be making the error output as consistent as possible with JVM Clojure.

mfikes11:04:20

Yeah, a socket-based approach, with the native socket impl is probably fine

pyrmont11:04:46

(I'm more focused on JVM Clojure rather than JVM ClojureScript because in my basic experimentation with the latter it looked a bit broken.)

pyrmont11:04:17

I've also been corresponding a little with Oliver Caldwell (he's the guy working on Conjure, the nvim plug-in that's a bit like a more lightweight vim-fireplace) and he said once the functionality was there, he'd maybe have a look at getting Planck support into it.