Quoth Shawn Rutledge <[EMAIL PROTECTED]>, on 2008-10-24 10:20:12 -0700:
> Right that's the usual pattern. But I'm trying to call it remotely.
>
> A client REPL opens an SSH connection to a server and starts a server
> REPL. Each of them evaluates what the other sends. So if the server
> sends
> (let ([v (make-thing)])
> ...)
> and the client evaluates it, then later the server wants to ask the
> client to do any operation on the previously-created v, how can the
> client now access the variable v, which exists only in that
> environment created by "let"?
If you mean "later" as in "after the let", the v doesn't exist anymore.
If you mean "later" as in "within the let", the overall expression hasn't
been evaluated yet and so there's no disparity.
I suspect what you're looking for is something to the effect of thunking
references between the sides, now; something that would let you do
(let ((v (client-do (make-thing))))
;; Now v contains a token to an object on the other side.
(client-resolve (client-apply 'some-function v)))
;; ... where client-resolve requests the representation of an object
;; given a token.
You're also going to have to deal with lifetime-tracking issues in that
case. In general this doesn't sound like a situation for syntactic let;
you sound like you want something semantically similar but nonidentical.
---> Drake Wilson
_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users