News for hackers. Stuff that matters.
Re:Csexp: S-Expressions over the Network by qawwads on Sunday June 11, 2023 @02:26PM (#36284150)
>Still, being able to take some arbitrary closure and kick it over the network to another racket instance would be great. It's not immediately obvious that csexp can do that.

I'm stupid but once your list is reveived by the remote host, isn't executing it only an (eval) away?

Re:Csexp: S-Expressions over the Network by jdkardia on Sunday June 11, 2023 @02:47PM (#36284358)
I'm no lisper, but I'm pretty sure it'd take more than an eval because of the context a closure carries with it.

if you were sending a pure, anonymous function, that would work fine. But if you're making a closure that makes use of any surrounding variables, libraries, or state, that's a non trivial set of information to transmit across the wire.

Re:Csexp: S-Expressions over the Network by alexisread on Sunday June 11, 2023 @03:39PM (#36284843)
I think this is where Delimited Dynamic binding would come in to play: https://okmij.org/ftp/papers/DDBinding.pdf

I think that you would be able to freeze certain variables in the closure, and have others open eg. API_ENDPOINT variable might be configured to change between environments.

Something like https://github.com/GiacomoCau/wat-js implements delimited continuations, ddbinding and algebraic effects (registered handlers for I/O etc) - pushing continuations over the network should be easier with these facilities.

Re:Csexp: S-Expressions over the Network by EddieJLSH on Sunday June 11, 2023 @02:47PM (#36284359)
Yeah that was my understanding, I've considered using this before (sending objects over the wire and eval'ing them) but never implemented it. Lisp seems very good for this sort of stuff.