From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Wed, 19 Apr 2006 21:02:16 -0700 From: Roman Shaposhnick To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Subject: Re: [9fans] Install from CD fails Message-ID: <20060420040215.GA21288@submarine> References: <20060419193403.GA7976@submarine> <57b9d806f3ec06df038f56c360f60867@quanstro.net> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <57b9d806f3ec06df038f56c360f60867@quanstro.net> User-Agent: Mutt/1.4.1i Topicbox-Message-UUID: 411e4dce-ead1-11e9-9d60-3106f5b1d025 On Wed, Apr 19, 2006 at 04:46:47PM -0500, quanstro@quanstro.net wrote: > yes. there are a couple (okay, three) problems to address here. byron and paul haahr > addressed some of the problems with a shell called "es" years ago, even though they > didn't have dynamic modules. > > 1. what interface do external modules get to see? perhaps masquerading as > a shell function would be good enough. I think Tcl has struck a nice balance here -- everything is a command taking a number of arguments. Or are you talking about a different sort of interface ? > 2. what hooks are provided by the shell. the "es" shell provided a hook > for darn near every language construct there was. for example, it was possible > to redefine globbing, piping, the if statement, etc. That is a bit too much, in my oppinion. I think what the 'core' shell is supposed to do is provide a nice glue for the rest of the dynamic functionality. Sort of like file system is a universal glue for every other application running on the system. I would say that this is the most challenging aspect of designing my dream 'shell' -- the glue is supposed to be easy enough for me to understand, yet powerful enough to express simple things in simple terms. Tcl comes pretty close to being that glue. Any other suggestions ? > 3. shell syntax vs. command syntax. the shell's syntax often gets in the way > of command syntax. I think this is unavoidable. But somehow, I don't really perceive it to be that big of a deal, anyway. Quoting is quite useful and not really painful. At least as long as you understand the rules involved. That's why I like Tcl so much -- even though you have to use extra quote or eval from time to time, you know exactly how everything gets parsed because there's only 11 rules to describe the entire language machinery. > mike hartel wrote up some stuff about this years ago. > basically, it's a pain that the shell and, say, grep, want to use the same characters. > i can't just type > ; grep ^fn *.[ch] > i must type > ; grep '^fn' *.[ch] > instead. this would get very difficult if one added awk-like functions to the shell. > es did this: anything passed to a function inside curly braces was passed verbatim. > thus "if" in es looks like a normal es function call: > ; if {condition1} {body1} {condition2} {body2} That sounds exactly like Tcl. Thanks, Roman.