Subject: shells [was: Re: compiling clocc ]
From: rpw3@rigden.engr.sgi.com (Rob Warnock)
Date: 2000/04/06
Newsgroups: comp.lang.lisp
Message-ID: <8cgpke$ejlm$1@fido.engr.sgi.com>
Thom Goodsell  <tgg@cra.com> wrote:
+---------------
| > Rolf Rander, still hoping for lisp as login-shell...
| 
| http://esh.netpedia.net/
| Not feature complete, but . . . .
+---------------

Neat! But... Two things:

1. Are you familiar with the "Esh Scheme shell" (not in the sense you
   mean it, but as an embedding/extension tool) done at Sun some time ago?
   Reference (should be accessible at DejaNews):

	Message-ID: <87d8r7ujad.fsf@serpentine.com>
	Date: 04 May 1997 12:30:34 -0700
	Newsgroups: comp.lang.scheme
	From: Bryan O'Sullivan <bos@serpentine.com>
	Subject: Re: A few points regarding Guile

	...
	Several years ago, a few people in Sun were charged with the task
	of building a Scheme implementation.  What they came up with was
	a system called esh.  Esh included a native code batch compiler
	and an interpreter.
	...
	For the past while, esh has been distributed for free with the TNF
	tools package.  It runs on SPARC-based systems running Solaris 2. For
	information, see <URL:http://sunsite.unc.edu/pub/sun-info/tnftools>.
	Note that the distribution does not include sources.

   [That URL no longer is valid, though it *once* was, since I still have
   some of the "Esh" papers/articles/doc-files from that distribution.]

2. More to the point, you might also be interested in "es", an extensible
   shell (in the sense you mean) by Paul Haahr & Byron Rakitzis:

	Es is a command interpreter and programming language which combines
	the features of other Unix shells and the features of a functional
	programming language such as Scheme. The syntax is derived from
	rc(1). Es is intended for use both as an interactive shell and a
	programming language for scripts.

	Es is an extremely customizable language. The semantics can be
	altered radically by redefining functions that are called to
	implement internal operations.

   The syntax:

	...was derived from the Plan 9 shell, rc, and was influenced
	by functional programming languages, such as Scheme, and the Tcl
	embeddable programming language.  This implementation is derived
	from Byron Rakitzis's public domain implementation of rc.

   The distribution (still actively being used, according to the archives of
   the mailing list) is available at <URL:ftp://ftp.sys.toronto.edu/pub/es/>, 
   and the Usenix paper there, "Es: a shell with higher-order functions",
   is recommended reading (by me, at least) for anyone considering writing
   a Unix command-line shell based on Scheme or Lisp principles. Even though
   "es" itself is written purely in C, internally it contains bindings,
   closures, lambdas, thunks, garbage collection -- all the usual suspects.

   [In fact, so much so that one wonders why they didn't just write it *in*
   Scheme or Lisp?!?!? I suspect that it has something to do with being
   "derived from Byron Rakitzis's public domain implementation of rc".
   Sometimes it's awfully hard for people to let go of a mess of working
   code, even if it's a godawful mess (not that I'm saying "rc" is/was,
   just "even if"), and start over "clean".]


-Rob

-----
Rob Warnock, 41L-955		rpw3@sgi.com
Applied Networking		http://reality.sgi.com/rpw3/
Silicon Graphics, Inc.		Phone: 650-933-1673
1600 Amphitheatre Pkwy.		PP-ASEL-IA
Mountain View, CA  94043