planck

Planck ClojureScript REPL
slipset 2016-11-16T06:38:21.000451Z

Good to hear, but maybe the docs could be improved? Write a ticket with a suggestion for better docs?

slipset 2016-11-16T13:46:52.000452Z

@mfikes I’ve still got https://github.com/mfikes/planck/pull/297, but I’ve left it on the floor for some time because of the move to a clean C implementation in planck 2.0. So I guess my question is would something like this be needed in planck 2.0, and/or could it piggie back on the socket-repl implementation which I guess will be in 2.0?

mfikes 2016-11-16T13:48:30.000454Z

@slipset I think it would be cool as a 2.0-only thing. FWIW, the socket REPL implementation in C in 2.0 turned out to be much simpler than it was in 1.x, owing to UNIX socket code just being more straightforward to write.

mfikes 2016-11-16T13:49:10.000455Z

@slipset Here is the 2.0 socket REPL implementation: https://github.com/mfikes/planck/commit/e023b2780070f64928d731ff2870dd44342d17f6

slipset 2016-11-16T13:53:40.000457Z

I haven’t looked at this very closely, but I do remember from trying to do this in obj-c, that the socket-repl and a socket server is basically the same setup, but a different function handling the processing of data.

mfikes 2016-11-16T13:54:24.000458Z

Yeah

slipset 2016-11-16T13:54:42.000459Z

So in some way, if run_repl was renamed to run_server and accepted an extra parameter

slipset 2016-11-16T13:54:56.000460Z

which would be the return of make_repl

slipset 2016-11-16T13:55:42.000461Z

something like int run_server(JSContextRef ctx, handler_t * handler)

slipset 2016-11-16T13:56:16.000462Z

with this, socket-repl woudl be run_server(ctx, make_repl())

mfikes 2016-11-16T13:56:17.000463Z

Yeah, that might work out. Hard to tell without trying it to see if things become tangled.

slipset 2016-11-16T13:56:25.000464Z

modulo malloc/free

slipset 2016-11-16T13:57:12.000465Z

and I guess, the socket thing I was trying to make was to a socket server, not a client.

slipset 2016-11-16T13:58:40.000466Z

but then again, my C-code is Rusty 🙂