Path: utzoo!utgpu!watserv1!ria!ria.ccs.uwo.ca!yukngo From: yukngo@obelix.gaul.csd.uwo.ca (Cheung Yukngo) Newsgroups: comp.lang.lisp Subject: Re: Lisp shells for Unix (was: Extensible languages....) Message-ID: Date: 30 Aug 90 15:58:43 GMT References: <13198@hydra.gatech.EDU> Sender: news@ria.ccs.uwo.ca Organization: Dept. of C.S., University of Western Ontario Lines: 53 In-reply-to: ken@dali.gatech.edu's message of 30 Aug 90 22:10:32 GMT Last year, I implemented a Lisp-based shell using the ELI lisp that comes with the Andrew toolkit from CMU. I got to the stage that pipes, redirections, job control, etc can be done. I did the implementation to learn how shells do the things they do. I did not debug it to the stage that it could replace /bin/csh or /bin/sh, not to mention bash or tcsh. I did not read the papers discussing Lisp shells (I did not know of their existance). I'd appreciate it if somebosy could give the references. I did encounter quite a few interesting problems with my implementation. I don't think I should bore you with all the problems I encountered. Here is a few more interesting ones (in my opinion): 1. How should pipes be specified? (pipe (cat prog.c) (egrep "here") (> "matches")) ? Think how the lisp interpreter should execute this thing. After you evaluate the arguments, then you do the pipe? Don't evaluate the arguments, and let each builtin function worries about the evaluation of the arguments (like is done in ELI)? How to mix outputs from, say 'car' and output from 'cat'? 2. What exactly are the programs in your search PATH? Are they in the same class as 'car' and 'cdr'? Should we have: (cat "a.c") or (! 'cat "a.c") ? Should the PATH variable be continued? 3. What status should be given to the output of a program? Is it a return value? Part of a return value? Side effects and nothing else? 4. With the use of lisp, the traditional one line command buffer for executing commands can be discarded (since most lisp program is not going to be one line or should be typed on the same line). What should replace it? A screen for issuing commands and one screen for executing them? One window for the commands and one window for the output, in a window system? Think about doing terminal handling and command editing as in tcsh or bash. Seems like we need a full editor. There are a lot of good things to say about a shell based in Lisp. I like the idea. The problems are interesting and challenging. Unfortunately, I have not met a single graduate student here that was interested enough to actually tried the shell. Pretty tough to tell them that parentheses are good for them :-) Khun Yee