Fork me on GitHub
#planck
<
2016-11-16
>
slipset06:11:21

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

slipset13:11:52

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

mfikes13:11:30

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

slipset13:11:40

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.

slipset13:11:42

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

slipset13:11:56

which would be the return of make_repl

slipset13:11:42

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

slipset13:11:16

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

mfikes13:11:17

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

slipset13:11:25

modulo malloc/free

slipset13:11:12

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

slipset13:11:40

but then again, my C-code is Rusty 🙂