Re:Static torrent website with peer-to-peer queries over Bit...
by pharmakom on Thursday March 10, 2022 @02:54AM
(#30624309)
I was talking in the context of pure functional programming. You can send the AST of a lambda.
Re:Static torrent website with peer-to-peer queries over Bit...
by octoberfranklin on Friday March 11, 2022 @07:05AM
(#30638850)
THERE IS NO LAMBDA.
It's a free variable, not a variable bound by a lambda.
Re:Static torrent website with peer-to-peer queries over Bit...
by beecafe on Friday March 11, 2022 @07:16AM
(#30638911)
Use typed holes
Re:Static torrent website with peer-to-peer queries over Bit...
by octoberfranklin on Saturday March 12, 2022 @10:05AM
(#30651848)
You can't serialize holes. You can't even compare them for equality (partly because it is far from clear what that should even mean).
Here's a trivial example:
The expression passed to runRemotely has a free variable "y". How are you going to serialize (\x -> f y x) in order to send it across the network? When you hit the "y", what are you going to do?For this trivial minimalist example you might cook up a one-off hack like lambda-abstracting the free variables in the runRemotely expression and then reapplying to the returned value, but there are much more complicated and insidious examples where these workarounds don't work.