Newsgroups: comp.lang.scheme
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!ix.netcom.com!netcom.com!bakul
From: bakul@netcom.com (Bakul Shah)
Subject: Re: communicating with scheme (was Re: Removing READ)
Message-ID: <bakulD4I0J2.GpI@netcom.com>
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
References: <bakulD4Gyox.AtE@netcom.com> <V33Z1c2w165w@sytex.com>
Date: Fri, 24 Feb 1995 09:47:26 GMT
Lines: 52
Sender: bakul@netcom23.netcom.com

>bakul@netcom.com (Bakul Shah) writes:
>> In case it is not clear, I am talking about a scheme where both
>> _request_ and _response_ are done using Scheme objects.  You'd
>> need one bidirectional path for each requestor/responder pair and
>> on each such path you'd only see Scheme objects whizzing past.

smcl@sytex.com (Scott McLoughlin) writes:
>        OK. I'm convinced. Questions(suggestions?):
>a] Linking symbols
>b] Preserving object identity or maybe a broader
>"similarity of constants" idea (from CL) for other
>objects
>c] Cyclic graphs (see [b])

a] I don't know what you mean here but perhaps some elaboration
might help.  First, both peer processess, call them A and B,
would have to agree on some common initial vocabulary (e.g.  R4RS
Scheme!).  From then on it is upto each of the peers on how their
individual Scheme worlds evolve via their interaction with the
other.  If A sends `(define x 12)' to B on bidirectional path AB,
and B sends `(define x 0)' to A on another bidir. path BA, then
in A's world x is 0 and B's world x is 12.

A's world and B's world are distinct from each other's.  Of
course, for a meaningful conversation they may well have to
represent in their _own_ world what they know about and told
their peer [and that is where such communication becomes
interesting!].

b] I misspoke when I said `Scheme objects'.  I should've said
Scheme expressions. If A passes some expression with value foo to
B and B later passes the same value back to A, the new foo is not
necessarily identical to the old foo (and eq? may well fail).  Of
course, if A wants to refer to the same object of B a number of
times in its requests to B, it can reference this object by its
name or an access procedure. 

If A wants to send something to B and later wants B to return the
same thing back to it, A & B will have to agree on some
convention.

c] is easy.  e.g. A can send (define a '(1)) (set-cdr! a a) to B
to create a cyclic structure in B's world.  But if you are
thinking of cyclic graphs linking some objects in A as well as in
B, that is not possible at this level.  If A and B wish to
represent such cycles, they'll have to agree on some convention.

It is nothing very complicated at this level.  Discovering the
identity of the peer and what they know about us, recovering from
a broken connection etc. are where things can get complex.

Bakul Shah <bakul@netcom.com>
