Newsgroups: comp.lang.scheme
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel!news.mathworks.com!newshost.marcam.com!charnel.ecst.csuchico.edu!csusac!csus.edu!netcom.com!bakul
From: bakul@netcom.com (Bakul Shah)
Subject: communicating with scheme (was Re: Removing READ)
Message-ID: <bakulD4Gyox.AtE@netcom.com>
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
References: <bakulD4FAss.C7H@netcom.com> <omHy1c1w165w@sytex.com>
Date: Thu, 23 Feb 1995 20:10:07 GMT
Lines: 42
Sender: bakul@netcom20.netcom.com

> Bakul Shah <bakul@netcom.com> writes:
>> What would be more interesting is the use of Scheme as a
>> *communication* language; where programs throw back and forth
>> s-exprs (instead of sending just data in some arcane &/or
>> proprietary formats) to communicate with each other.  Perhaps
>> s-exprs encoded in some sort of a compact/efficient binary
>> format.

smcl@sytex.com (Scott McLoughlin) writes:
>How important is a "compact/efficient binary format" and
>important for what in particular? SQL comes to mind as a
>popular "remote evaluation" language that operates on the
>text or "print representation" level.  Where passing a
>large print representation of a computation becomes 
>problematic, one can simply make a "stored procedure" on
>the server side.

SQL only goes from a client to a server.  On the reverse path
(server->client) only data is sent.  Now imagine if the result
was sent back to the client using SQL:
	create table temp ...;
	insert a,b,c into temp values (a1, b1, c1);
	insert a,b,c into temp values (a2, b2, c2);
	...
Now you probably wouldn't want to embed an SQL interpreter in
every client just for the pleasure of talking back SQL but
embedding a Scheme interpreter in every client is not so far
fetched an idea.

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.

Any way, sending, for example, a vector of numbers using Scheme
notation can be bulky and requires parsing/unparsing.  Binary
encoding can save transmission/parsing/unparsing time for any
large structured data.  For an analogous encoding scheme see the
section on `Binary Encoding Details' (page 105) in PostScript
Language Reference Manual, Second Edition.

Bakul Shah <bakul@netcom.com>
