From: Lynn H. Quam
Subject: lisp shell ala scsh
Date: 
Message-ID: <59db34a7.0205271636.4f3284c0@posting.google.com>
Has anybody attempted to implement a "lisp shell" modeled
after scsh: the "scheme shell"?  I have made considerable use of
scsh to avoid the cruftyness and limitations of Unix shells,
and to gain the power of a lisp-like programming language for 
scripting.

The main features of scsh that I would like to see in Common Lisp are:
   1) A more complete interface to the Posix system calls.
   2) The simple but powerful process notation provided by scsh.

If nobody has made a serious attempt to implement these features,
perhaps I should persue it.

From: Coby Beck
Subject: Re: lisp shell ala scsh
Date: 
Message-ID: <VpAI8.150611$xS2.12071296@news1.calgary.shaw.ca>
Lynn H. Quam <····@ai.sri.com> wrote in message
·································@posting.google.com...
> Has anybody attempted to implement a "lisp shell" modeled
> after scsh: the "scheme shell"?  I have made considerable use of
> scsh to avoid the cruftyness and limitations of Unix shells,
> and to gain the power of a lisp-like programming language for
> scripting.
>
> The main features of scsh that I would like to see in Common Lisp are:
>    1) A more complete interface to the Posix system calls.
>    2) The simple but powerful process notation provided by scsh.
>
> If nobody has made a serious attempt to implement these features,
> perhaps I should persue it.

Never tried it, but Clisp offers something like that.

http://clisp.cons.org/clash.html

--
Coby Beck
(remove #\Space "coby 101 @ bigpond . com")
From: Scott Schwartz
Subject: Re: lisp shell ala scsh
Date: 
Message-ID: <8gwutn7ccb.fsf@galapagos.cse.psu.edu>
"Coby Beck" <·····@mercury.bc.ca> writes:
> Never tried it, but Clisp offers something like that.

Just playing around with clisp a bit, it doesn't seem to me to be
particuarly usable as a unix tool (compared to awk, perl, tcl,
python).  For example, it prints (all?) diagnostic messages to stdout,
instead of stderr, so you cannot use it in a pipeline:

$ clisp -q -x '(defun foo () (princ "hello")) (foo)' | tr a-zA-Z X
XXXXXXXX
"XXXXX"

Obviously, -x would be much more useful if it didn't print the value
of the expressions at all.

$ perl -e 'sub foo {print "foo\n"} foo;' | tr a-zA-Z X
XXX

Worse, sometimes clisp will decide to enter a repl, even when the
manpage says that it won't:

$ clisp -q a.l

*** - Program stack overflow. RESET
[1]> 

That would be a catastrophe in a pipeline.
From: Christopher Browne
Subject: Re: lisp shell ala scsh
Date: 
Message-ID: <acuk65$s1ovu$1@ID-125932.news.dfncis.de>
The world rejoiced as ····@ai.sri.com (Lynn H. Quam) wrote:
> Has anybody attempted to implement a "lisp shell" modeled
> after scsh: the "scheme shell"?  I have made considerable use of
> scsh to avoid the cruftyness and limitations of Unix shells,
> and to gain the power of a lisp-like programming language for 
> scripting.
>
> The main features of scsh that I would like to see in Common Lisp are:
>    1) A more complete interface to the Posix system calls.
>    2) The simple but powerful process notation provided by scsh.
>
> If nobody has made a serious attempt to implement these features,
> perhaps I should persue it.

Both CLISP and CMU/CL have fair interfaces to POSIX system calls,
which ought to make 1) a matter of a bit of macrology, at worst.

If you were to build up some set of functions/macros to make it
convenient to use one or the other as a command shell, I'm sure people
would look at it with interest.

Make sure that you have item 3)...

3) readline-like interface so that it doesn't have to run inside Emacs
to allow the user to interactively select old commands to modify and
re-run them.  [CLISP often has readline linked in, so this may come
"for free;" there's a package that does much the same for CMU/CL, so
this isn't nasty details at all...]
-- 
(reverse (concatenate 'string ········@" "enworbbc"))
http://www.ntlug.org/~cbbrowne/lisp.html
We  all live in  a yellow  subroutine, a  yellow subroutine,  a yellow
subroutine...
From: Kragen Sitaker
Subject: Re: lisp shell ala scsh
Date: 
Message-ID: <83vg8xy2m8.fsf@panacea.canonical.org>
Christopher Browne <········@acm.org> writes:
> 3) readline-like interface so that it doesn't have to run inside Emacs
> to allow the user to interactively select old commands to modify and
> re-run them.

Wouldn't it be easier to raise an error on startup if environment
variable EMACS is not set to 't'?