Re: [racket-users] Using serial-lambda to send lambdas to places

2018-04-16 Thread Zelphir Kaltstahl
Thanks for the example code. I will look at it soon, when I can code on that code again and see where I can get. Seems I misunderstood and thought you were suggesting to use the non-ergonomic way of identifying procedures for serial-lambda. That's probably, because I do not understand the source c

Re: [racket-users] Using serial-lambda to send lambdas to places

2018-04-15 Thread Philip McGrath
If an example would be helpful, here's a toy implementation of `parallel-set-map` that uses `serial-lambda` to send the user-supplied function across the place-channels: #lang racket (require web-server/lang/serial-lambda racket/serialize ) (define (place-printf pch fmt . args)

Re: [racket-users] Using serial-lambda to send lambdas to places

2018-04-15 Thread Philip McGrath
On Sun, Apr 15, 2018 at 2:51 PM, Zelphir Kaltstahl < zelphirkaltst...@gmail.com> wrote: > Having to write all things in terms of where things come from like in: > > > '([racket/base +] . [1 2]) > > is not ergonomic at all. > Absolutely! To be clear, I was not suggesting that you use that format i

Re: [racket-users] Using serial-lambda to send lambdas to places

2018-04-15 Thread Zelphir Kaltstahl
I am aware, that each place has its own stuff even if I put it at top level of the module, since it is its own Racket instance. I think sending things as immutable data is what I want to do. "Just send everything as immutable things to that place, so that it has everything it needs to complete some

Re: [racket-users] Using serial-lambda to send lambdas to places

2018-04-15 Thread Matthias Felleisen
You mays wish to look at Haller, Miller, and Müller https://www.cambridge.org/core/journals/journal-of-functional-programming/article/programming-model-and-foundation-for-lineagebased-distributed-computation/B410CE79B21E33462843B408B716E1E5

Re: [racket-users] Using serial-lambda to send lambdas to places

2018-04-15 Thread Philip McGrath
I think it would help to take a step back and think about what you're doing when you communicate with a place. As you know, places are effectively separate instances of the Racket VM: other than the explicit, low-level mechanisms like `make-shared-bytes`, they share no state at all, not even the sa

[racket-users] Using serial-lambda to send lambdas to places

2018-04-15 Thread Zelphir Kaltstahl
Today I wrote some example code for trying out `serial-lambda` from `(require web-server/lang/serial-lambda)`. Here is what I currently have: #lang racket (require web-server/lang/serial-lambda) (require racket/serialize) (define to-send (serial-lambda (x) (* x x))) (define to-send-2   (ser