Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!news.cs.indiana.edu!purdue!bouma From: bouma@cs.purdue.EDU (William J. Bouma) Newsgroups: comp.lang.forth Subject: Re: fsh Message-ID: <14294@medusa.cs.purdue.edu> Date: 12 Apr 91 19:54:50 GMT References: <9104121340.AA17242@ucbvax.Berkeley.EDU> Sender: news@cs.purdue.EDU Organization: Department of Computer Science, Purdue University Lines: 64 In article <9104121340.AA17242@ucbvax.Berkeley.EDU> wmb%ENG.SUN.COM@SCFVM.GSFC.NASA.GOV writes: > > 3) The value of many shell scripts is strongly related to the number > of people who can or will use it. "fsh" scripts would have a > pretty limited audience, since the job of propagating a new > language to a wide audience is very very difficult (Proof: > ... and the number of languages that are truly widespread is small > indeed). > > 4) It would take many many hours of work to bring the functionality > of an "fsh" up to the level of ksh or the latest version of csh. > What would be the payoff? 'sh' was "adequate" but someone bothered to write 'csh'. 'csh' was adequate, but someone wrote 'ksh'. 'ksh' is good, but someone writes 'bash' anyway. I think there will always be a great need for a "better" shell. And just think what it would do for the "acceptance of Forth" that several in this group crave so badly. My payoff is to have a shell that makes complete sense. (and get fame maybe 8^) All shells I have seen are messy in some sense. There is weird non-intuitive syntax, and the commands you put into files aren't identical to the stuff you type in directly. I thought that a Forth based shell might be able to overcome these problems. But after thinking about it a great deal and even writing some code, I am no longer sure. Below are some excerpts from my ".fshrc" file just to give you a sense of simple fsh code looks like. I can mail anyone who is interested the brief (~800 lines) documentation for fsh as it now stands. It may be possible to talk me into sending the code if you seriously want to work on the program. As Mitch implies, writing a decent shell is nontrivial. On the other hand, it's fun! -- Bill silent unix { "/bin" "." "/usr/local/bin" "/usr/ucb" "/usr/new/bin" "/usr/bin" "/usr/bouma/bin/sun" "/usr/local/gnu" "/usr/unsup/bin" "/usr/sbin" "/usr/local/X11R4" "/usr/bouma/bin/csh" "/usr/etc" } string vector PATH ! : #:o ibase @ 8 ibase ! text number swap ibase ! ; #o77 umask ! : hdcpy enscript -2Gr ; ' prompt:print forget ( to eliminate redefinition warning ) : prompt:print cwd . ; "/usr/local/tex/man:/usr/local/X11R4/man:/usr/local/X11R4/man/InterViews:/usr/local/pbm/man:/usr/local/gnu/man:/usr/man" setenv MANPATH forth : ls unix:ls -CF ; : la ls -a ; : ll ls -ls ; : words-in variable csave context @ csave ! read context ! words csave @ context ! ;