chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] basic Scheme question


From: Drake Wilson
Subject: Re: [Chicken-users] basic Scheme question
Date: Fri, 24 Oct 2008 12:48:57 -0500
User-agent: Mutt/1.5.18 (2008-05-17)

Quoth Shawn Rutledge <address@hidden>, 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]