Newsgroups: comp.lang.scheme
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel!news.mathworks.com!uunet!in1.uu.net!olivea!charnel.ecst.csuchico.edu!csusac!csus.edu!netcom.com!bakul
From: bakul@netcom.com (Bakul Shah)
Subject: Re: Removing READ
Message-ID: <bakulD4FMon.44G@netcom.com>
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
References: <dig-Scheme-7.45@mc.lcs.mit.edu> <9502160422.AA05023@clark.lcs.mit.edu> <hbaker-2202951004460001@192.0.2.1> <bakulD4FAss.C7H@netcom.com> <hbaker-2202951621300001@192.0.2.1>
Date: Thu, 23 Feb 1995 02:53:11 GMT
Lines: 73
Sender: bakul@netcom2.netcom.com



>> hbaker@netcom.com (Henry Baker) writes:
>> >One look at all of the bletcherous '.xxxrc' files proves this statement
>> >dreadfully wrong.  The world would be dramatically improved if nearly
>> >_all_ programs parsed s-expressions for '.xxxrc' programs instead of
>> >re-inventing the parsing/language wheel for every single init file.

>bakul@netcom.com (Bakul Shah) wrote:
>> This is an appealing idea but usually .<program>rc style files
>> use a little language that is better suited *for describing
>> simple things*.  Scheme/Lisp usurp a number of characters and
>> that forces one to use a much more verbose syntax.  I find syntax
>> style such as
>> <keyword>: <value>
>> much more pleasing and easier to read/modify.

hbaker@netcom.com (Henry Baker) writes:
>This isn't very general.  For example, it doesn't provide any
>mechanism for nested expressions (e.g., for specifying nested
>menus, which some programs provide in completely 'soft' form).

Two comments:
  1) for simple things, which is what most rc files contain most
     of the time, the <keyword>:<value> syntax is concise and
     readable.

  2) for more complicated expressions you can nest tuples of the
     form <keyword>:<value> using some grouping symbols such as { }
     or ( ) and use *that* as the <value>.  For example,

	name: Bakul Shah
	address: {
	  street: 15629 179th Ave. SE
	  city: ...
	}

    Alternatively, just use a Scheme expression as <value>.

	name: Bakul Shah
	address: (('street "15629 179th Ave. SE")
		  ('city ...))

    [that is why I said the idea of two languages does not
    bother me]

I think the issue boils down to whether an rc file contains
primarily data or instructions.  If latter, a programming
language is certainly more appropriate.  At any rate I doubt
people will stop inventing new rc languages!

bakul:
>> 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.

hbaker:
>I believe that a number of 'parallel' Lisps do exactly that -- pass
>S-expressions back and forth.  The 'Linda' language can be seen as
>a kind of broken version of this, except with a pattern-matching scheme
>to retrieve S-expressions from a shared pool.

Can you provide some references about `parallel' Lisps? (I know
about Linda).  Actually I had something less ambitious in mind
but something that can be easily embedded in a simple program.
As an example, I'd like to be able to send an s-expr to a robot
specifying some behavior.  The robot in turn sends back my
program its response in a similar fashion.  Another example would
be for interacting with typical daemons running on a Unix system
(e.g. lpd, inetd, faxd etc.).
