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: Unix Weenies (formerly: Removing READ)
Message-ID: <bakulD4L23y.I25@netcom.com>
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
References: <bakulD4H8yp.EL8@netcom.com> <25Feb1995.021048.Alan@LCS.MIT.EDU>
Date: Sun, 26 Feb 1995 01:14:21 GMT
Lines: 134
Sender: bakul@netcom17.netcom.com

Alan@lcs.mit.EDU (Alan Bawden) writes:

>Yes, Lisp/Scheme weenies invent new little languages all the time.  But
>they don't all have slightly different notations for strings!

Even Lisp and Scheme do not agree on some notations (e.g. complex
numbers, T vs #t, &rest versus . rest).  Some dialects  use  [ ]
as a sort of a super ( ) and some use [ ] as synonyms of ( ).
There are plenty of such inconsistencies in the Lisp/Scheme
world.  Even strings are not quite identical between various
Scheme implementations.  These differences do get carried over in
little languages built atop Scheme/Lisp.

>   While use of a single language for rc, initialization or configuration
>   files may simplify things (and I doubt it), it is just not going to
>   happen.

>I agree that it won't happen.  It's far to sensible to actually happen.
>The number of arrogant little shits who would actually have to cooperate
>with each other is too large.  But note that (as somebody else has already
>pointed out) it has happened in the Windows world.

It won't happen because it does not seem sensible to everyone.  A
single language for rc scripts won't simplify things or make life
any easier unless a) *all* the tools have a surface syntax like
S-expressions and b) everyone learns to use and love
S-expressions.  Neither of these is likely to happen.  Nothing to
do with uncooperative arrogant little shits (who by the way get
put in their place rather quickly out in the real world).

>   Why would one want rc like files for sh, TeX, Ghostscript, X window
>   programs, vi, ftp, kermit, MH, Mail, nn, etc. etc. written in Scheme?
>   It makes much more sense for these files to be in the `native' language
>   the corresponding program is designed to interpret.  And one can think
>   of almost every program as an interpeter of some language (however
>   incomplete or incoherent).

>But why should the ordinary users of all of those programs have to -learn-
>all those little languages?  Someone who just wants to set some boolean
>switch to control the behavior of ftp should have to learn a new language?

Because one does a lot more than set some boolean switches in rc
scripts.  For example in my .zshrc/.zlogin files I define a bunch
of functions, set variables, run some commands depending on from
where I am logged in, time of day etc.  If I use zsh I have to
learn zsh's syntax anyway so why should I not use the same syntax
in its .rc files?  For kermit why shouldn't I use `set line
/dev/tty01' in .kermrc when that is exactly what I use
interactively?  .netrc has the same commands that one can use
interactively.  Ditto for .newsrc (as far as I have used them).

>                                                 Telling ordinary users
>that "one can think of almost every program as an interpreter" so "it makes
>much more sense" to have to learn a new language just to set a switch is
>what makes users invent phrases like "Unix weenie"!

You are assuming that only switches are set in rc files; I make
no such assumption.  Besides, if only switches were to be set
Scheme would be an overkill!

By using a phrase like `Unix weenie' you are in effect labelling
people like me who do not agree with you (`unix' just happened to
be a convenient handle).  This sort of labelling absolves you of
the need a) to argue civilly, b) to respect opinions of others,
and, c) to make logical arguments.  After all, one can't really
reason with uncivilized barbarians, can one?  Anyhoo, that is how
*I* read use of such phrases.

>   I bet even people who are primarily into a Scheme/Lisp monoculture use a
>   number of different languages.  PostScript, TeX, regular expression
>   language ala ed, filename wild cards, shell languages, emacs or vi, etc.

>And I'd like each and every one of those languages to be written as
>S-expressions.  I'd add the mailer's alias file, sendmail .cf files,
>/etc/passwd, /etc/group, and all those /etc/xxxtab files.  Also makefiles,
>and the files read by `xmodmap' and `xrdb'.  The command line language
>understood by the `find' program.  The termcap database.  .newsrc and
>.rhosts files.  I could go on and on.

I doubt an S-expr can be designed to be as compact as a reg-expr
to do the same job.  For the rest even if you did design S-expr.
capable versions of TeX, make, find, etc. some will take hold and
some won't.  Why would one want to rewrite all of the exisiting
.tex, .nr, .man, .mk, .cf etc. files into s-expr format?  It is
like saying rewrite all fortran/cobol/Pascal/C/C++ etc. programs
in Scheme or Lisp.  It is not going to happen however much you
want it.  It is not just inertia or ignorance; it is also because
people have genuine disagreements about such things.

>Of course S-expressions are just my personal choice for the universal
>structured file notation (as well as Henry Baker's apparently) -- I'd be
>almost as happy if some other consistent notation were chosen.  

It *is* appealing and I too would like to see use of consistent
notation wherever possible.

>At least I'd always know what the comment character was.

Okay, print this out and tape it next to your desk:

('comment-style
; language 	start	end-if-any
    ("C"	"/*"	"*/")
    ("PL/1"	"/*"	"*/")
    ("C++"	"/*"	"*/")
    ("C++"	"//")
    ("Pascal"	"{"	"}")
    ("Pascal"	"(*"	"*)")
    ("Ada"	"--")
    ("Eiffel"	"--")
    ("Beta"	"(*"	"*)")	; also { }
    ("Scheme"	";")
    ("scm"	"#|"	"|#")	; nestable too!
    ("scm"	";")
    ("sh"	"#")
    ("algol-68"	"COMMENT" "COMMENT") ; should've been COMMENT ... TNEMMOC
    ("algol-68"	"CO"	"CO")
    ("j"	"NB.")
    ("nroff"	".\\\"")	; A line starting with .\"
    ("python"	"#")
    ("perl"	"#")
    ("rc"	"#")
    ("awk"	"#")
    ("turing"	"%")
    ("clu"	"%")
    ("Postscript" "%")
    ("Concurrent Pascal" "\""  "\"")	; comments start and end with "
    ("ML"	"(*"	"*)")
    ("Modula-2"	"(*"	"*)")
    ...)

(:)	<--that is a Lisper's smiley

Bakul Shah
