planck

Planck ClojureScript REPL
pyrmont 2019-04-20T07:13:34.041700Z

@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' 😄

mfikes 2019-04-20T11:07:50.042Z

@mike858 Awesome!

pyrmont 2019-04-20T11:08:45.043Z

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

mfikes 2019-04-20T11:10:22.046400Z

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.

mfikes 2019-04-20T11:10:50.047400Z

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

pyrmont 2019-04-20T11:11:15.048100Z

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

mfikes 2019-04-20T11:11:33.048800Z

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

pyrmont 2019-04-20T11:15:37.053100Z

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.

mfikes 2019-04-20T11:16:39.054400Z

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

pyrmont 2019-04-20T11:18:22.056600Z

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.

pyrmont 2019-04-20T11:19:25.058700Z

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.

mfikes 2019-04-20T11:19:56.059400Z

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.

pyrmont 2019-04-20T11:20:49.060500Z

Yeah, could be problems there too.

pyrmont 2019-04-20T11:21:58.062200Z

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.

mfikes 2019-04-20T11:22:20.063100Z

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

pyrmont 2019-04-20T11:22:46.063800Z

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

pyrmont 2019-04-20T11:26:17.066800Z

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.

mfikes 2019-04-20T11:26:39.067300Z

Nice!

pyrmont 2019-04-20T11:26:51.067500Z

Yeah! :)