From es-owner Mon Apr 3 14:58:32 1995 Received: from hp08.nas.nasa.gov ([129.99.50.32]) by hawkwind.utcs.utoronto.ca with SMTP id <24081>; Mon, 3 Apr 1995 14:52:05 -0400 Received: from hp08.nas.nasa.gov (localhost [127.0.0.1]) by hp08.nas.nasa.gov (8.6.8.2/NAS.6.1) with ESMTP id LAA23987 for ; Mon, 3 Apr 1995 11:50:10 -0700 Message-Id: <199504031850.LAA23987@hp08.nas.nasa.gov> X-Mailer: exmh version 1.5.3 12/28/94 To: es@hawkwind.utcs.toronto.edu Subject: Cray C-90 (UNICOS 8.0.3) support? Reply-To: gray@nas.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Mon, 3 Apr 1995 14:50:10 -0400 From: "Scott C. Gray" Sorry if this has already been covered, but I couldn't find any mention of it in the es list archives. I have been trying to get es-0.84 to compile on our Cray C-90, running Unicos 8.0.3 and I keep getting the following message: (vn.~/usr/build/es-0.84) make cc -hstdc -O -I/u/vb/gray/usr/include/readline -c closure.c -o closure.o cc-408 cc: ERROR File = closure.c, Line = 126 The macro "setjmp" appears in an invalid context. The problem is in the pushhandler macro from es.h. Has anyone else had difficulty with this? On an unrelated note: I have read mention of people wishing to replace a couple of the globbing functions available (from the es archives). Has anyone ever thought of having a well-known list of globbing functions that are called in order and replacable. For example: glob-list=( expand-tilde my-personal-regexp file-name-glob ) So, during future parsings, the builtin function expand-tilde will be called on the un-parsed command line first, followed by my-personal-regexp, followed by the builtin file-name-glob functions? Just an idea. -scott -- _/ _/ _/_/_/ _/_/_/_/ _/_/_/ Scott C. Gray (gray@nas.nasa.gov) _/_/ _/ _/ _/ _/_/ _/ _/ NASA Ames Research M/S 258-6 _/ _/_/ _/_/_/_/ _/_/ _/_/_/_/ For PGP public key, send me mail _/ _/ _/ _/ _/_/_/_/ _/ _/ with subject line of "PGP request". From es-owner Tue Apr 4 03:04:30 1995 Received: from cegelecproj.co.uk ([159.245.72.6]) by hawkwind.utcs.utoronto.ca with SMTP id <24077>; Tue, 4 Apr 1995 03:03:43 -0400 Received: from vampire.cegelecproj.co.uk (cerberus.cegelecproj.co.uk) by cegelecproj.co.uk (4.1/SMI-4.1) id AA22140; Tue, 4 Apr 95 08:03:34 BST Received: from spirit.cegelecproj.co.uk (spirit.limbo.cegelecproj.co.uk) by vampire.cegelecproj.co.uk (5.0/SMI-SVR4) id AA16035; Tue, 4 Apr 1995 08:10:18 +0000 Received: by spirit.cegelecproj.co.uk (5.0/SMI-SVR4) id AA10287; Tue, 4 Apr 1995 07:48:49 +0000 Date: Tue, 4 Apr 1995 03:48:49 -0400 From: Steve_Kilbane@cegelecproj.co.uk (Steve_Kilbane) Message-Id: <9504040648.AA10287@spirit.cegelecproj.co.uk> X-Planation: X-Faces images can be viewed with the XFaces program To: gray@nas.nasa.gov Subject: Re: es globbing Cc: es@hawkwind.utcs.toronto.edu Content-Length: 1171 X-Face: Iqsa(US9p?)Y^W+6Ff[Z]rM"uFE) lFDjag1e]\/#2 > I have been trying to get es-0.84 to compile on our Cray C-90 can't help you with that, sorry. > On an unrelated note: I have read mention of people wishing to replace a couple of the globbing functions available (from the es > archives). Has anyone ever thought of having a well-known list of globbing functions that are called in order and replacable. > For example: > > glob-list=( expand-tilde my-personal-regexp file-name-glob ) > > So, during future parsings, the builtin function expand-tilde will be called > on the un-parsed command line first, followed by my-personal-regexp, followed by the builtin file-name-glob functions? > > Just an idea. And a good one at that. Of course, if es had a %glob, then you could spoof it to do this yourself, but I agree that it would be nice to have the innards of the globber exposed through more than one function. The problem is that revealing the globber is a lot of work, because of the way es has been implemented. globbing is done in order to derive the list of arguments for function evaluation, rather than the other way around. I don't see this change happening without a major es revision. steve From es-owner Tue Apr 4 05:42:12 1995 Received: from holly.cam.harlequin.co.uk ([193.128.4.58]) by hawkwind.utcs.utoronto.ca with SMTP id <24077>; Tue, 4 Apr 1995 05:41:50 -0400 Received: from rocannon.cam.harlequin.co.uk by holly.cam.harlequin.co.uk; Tue, 4 Apr 1995 10:40:43 +0100 Received: from bessie.harlequin.co.uk (bessie.cam.harlequin.co.uk) by rocannon.cam.harlequin.co.uk; Tue, 4 Apr 1995 10:40:40 +0100 Date: Tue, 4 Apr 1995 05:41:02 -0400 Message-Id: <4292.9504040941@bessie.harlequin.co.uk> To: gray@nas.nasa.gov From: Paul Haahr Reply-To: Paul Haahr Cc: es@hawkwind.utcs.toronto.edu Subject: Re: Cray C-90 (UNICOS 8.0.3) support? In-Reply-To: <199504031850.LAA23987@hp08.nas.nasa.gov> References: <199504031850.LAA23987@hp08.nas.nasa.gov> > I have been trying to get es-0.84 to compile on our Cray C-90, running > Unicos 8.0.3 and I keep getting the following message: > > (vn.~/usr/build/es-0.84) make > cc -hstdc -O -I/u/vb/gray/usr/include/readline -c closure.c -o closure.o > cc-408 cc: ERROR File = closure.c, Line = 126 > The macro "setjmp" appears in an invalid context. > > The problem is in the pushhandler macro from es.h. Has anyone else had > difficulty with this? I believe that there's no simple workaround. I got this note from the last person who I knew of who tried to bring es up on a Cray. (I don't see how Cray can say they ship ANSI C while imposing these restrictions, but I'm not in the supercomputer business.) | From: djc@niwot.scd.ucar.EDU (Dennis Colarelli) | To: haahr (Paul Haahr) | Subject: Re: for better or for worse, | Date: Fri, 30 Apr 93 15:36:26 MDT | | > can you tell me what the restrictions on setjmp are? i'll try to make | > pushhandler() more portable if you can tell me what has to be done. | | Attached are the restrictions from the UNICOS setjmp man page. Note | that if you want to run es on the Cray 3, CSOS has, I believe, even further | restrictions. I'll know more when it gets here. | | An invocation of the setjmp macro can appear only in one of the following | contexts: | | o The entire controlling expression of a selection or iteration | statement (if, for, while, do, switch) | | o One operand of a relational or equality operator with the other | operand an integral constant expression, and with the resulting | expression being the entire controlling expression of a selection | or iteration statement | | o The operand of a unary ! operator with the resulting expression | being the entire controlling expression of a selection or | | o The entire expression of an expression statement (possibly cast | to void) The definition of pushhandler is: #define pushhandler(hp) ( \ ((hp)->rootlist = rootlist), \ ((hp)->pushlist = pushlist), \ ((hp)->evaldepth = evaldepth), \ ((hp)->up = tophandler), \ (tophandler = (hp)), \ (setjmp((hp)->label) ? raised(exception) : NULL) \ ) which clearly violates those assumptions. On the other hand, all but one of its uses are of the form List *e; Handler h; ... if ((e = pushhandler(&h)) != NULL) { ... catching code using e ... } ... main body ... pophandler(&h); and the other use has a while instead of an if and could be rewritten to be an if inside a loop with an extra test, so macrology of the form #define exception_handler \ { \ Handler _localhandler; _localhandler.rootlist = rootlist; \ _localhandler.pushlist = pushlist; \ _localhandler.evaldepth = evaldepth; \ _localhandler.up = tophandler; \ tophandler = &_localhandler; \ if (!setjmp(_localhandler.label)) { #define catch_exception(e) \ pophandler(&_localhandler); \ } else { \ List *e = raised(exception); \ #define end_exception_handler \ } \ } combined with rewriting all the uses as ... exception_handler ... main body ... catch_exception (e) ... catching code using e ... end_exception_handler would probably be acceptable to Cray. Pardon me if my C code is somewhat rusty. The ever-forthcoming next release of es may include something like this. For now, you'll have to roll it yourself. Paul From es-owner Tue Apr 4 07:12:53 1995 Received: from emory.mathcs.emory.edu ([128.140.2.1]) by hawkwind.utcs.utoronto.ca with SMTP id <24077>; Tue, 4 Apr 1995 07:12:18 -0400 Received: from skeeve.UUCP by emory.mathcs.emory.edu (5.65/Emory_mathcs.4.0.12) via UUCP id AA10546 ; Tue, 4 Apr 95 07:12:06 -0400 Return-Path: arnold@skeeve.atl.ga.us Received: by skeeve.atl.ga.us (/\==/\ Smail3.1.22.1 #22.1) id ; Tue, 4 Apr 95 06:45 EDT Message-Id: From: arnold@skeeve.atl.ga.us Date: Tue, 4 Apr 1995 06:45:30 -0400 In-Reply-To: Paul Haahr's 128-line message on Apr 4, 5:41am X-Ultrix: Just Say NO! X-Important-Saying: Premature Optimization Is The Root Of All Evil. X-Mailer: Mail User's Shell (7.2.5 10/14/92) To: Paul Haahr , gray@nas.nasa.gov Subject: Re: Cray C-90 (UNICOS 8.0.3) support? Cc: es@hawkwind.utcs.toronto.edu > I believe that there's no simple workaround. I got this note from the > last person who I knew of who tried to bring es up on a Cray. (I don't > see how Cray can say they ship ANSI C while imposing these restrictions, > but I'm not in the supercomputer business.) > > | From: djc@niwot.scd.ucar.EDU (Dennis Colarelli) > | To: haahr (Paul Haahr) > | Subject: Re: for better or for worse, > | Date: Fri, 30 Apr 93 15:36:26 MDT > | > | > can you tell me what the restrictions on setjmp are? i'll try to make > | > pushhandler() more portable if you can tell me what has to be done. > | > | Attached are the restrictions from the UNICOS setjmp man page. Note > | that if you want to run es on the Cray 3, CSOS has, I believe, even further > | restrictions. I'll know more when it gets here. > | > | An invocation of the setjmp macro can appear only in one of the following > | contexts: > | > | o The entire controlling expression of a selection or iteration > | statement (if, for, while, do, switch) > | > | o One operand of a relational or equality operator with the other > | operand an integral constant expression, and with the resulting > | expression being the entire controlling expression of a selection > | or iteration statement > | > | o The operand of a unary ! operator with the resulting expression > | being the entire controlling expression of a selection or > | > | o The entire expression of an expression statement (possibly cast > | to void) These restrictions are straight out of the ANSI C standard. I'd have to check the rationale for why they were put in. It made sense at the time though. Arnold From es-owner Tue Apr 4 07:53:53 1995 Received: from netcom4.netcom.com ([192.100.81.107]) by hawkwind.utcs.utoronto.ca with SMTP id <24077>; Tue, 4 Apr 1995 07:53:40 -0400 Received: by netcom4.netcom.com (8.6.11/Netcom) id MAA22720; Tue, 4 Apr 1995 12:49:58 +0100 Date: Tue, 4 Apr 1995 07:49:58 -0400 From: haahr@netcom.com (Paul Haahr) Message-Id: <199504041149.MAA22720@netcom4.netcom.com> To: arnold@skeeve.atl.ga.us Cc: es@hawkwind.utcs.toronto.edu Subject: Re: Cray C-90 (UNICOS 8.0.3) support? In-Reply-To: References: > > (I don't see how Cray can say they ship ANSI C while imposing > > these restrictions, but I'm not in the supercomputer business.) > These restrictions are straight out of the ANSI C standard. I'd have to check > the rationale for why they were put in. It made sense at the time though. I'm amazed. I hadn't realized that it was quite so restricted, but I just checked and you're right. The reason, of course, is that it makes it easier to implement. Same with the ``non-volatile variables may be clobbered'' brain damage. Who would want to specify a programming language containing features that are harder to implement than the things everyone learned in their sophomore compiler class. (cf Dick Gabriel's _Worse is Better_.) To be fair, I've taken that dodge on things like exposing globbing in es or opening up the parser, but restricting how you can call setjmp seems a little extreme. Paul From es-owner Tue Apr 4 12:25:55 1995 Received: from postman.osf.org ([130.105.1.152]) by hawkwind.utcs.utoronto.ca with SMTP id <24077>; Tue, 4 Apr 1995 12:22:39 -0400 Received: from sulphur.osf.org (sulphur.osf.org [130.105.1.123]) by postman.osf.org (8.6.9/8.6.x) with SMTP id MAA19715; Tue, 4 Apr 1995 12:22:10 -0400 From: Rich Salz Received: by sulphur.osf.org (1.37.109.4/4.7) id AA02786; Tue, 4 Apr 95 12:17:48 -0400 Date: Tue, 4 Apr 1995 12:17:48 -0400 Message-Id: <9504041617.AA02786@sulphur.osf.org> To: haahr@netcom.com, arnold@skeeve.atl.ga.us Subject: Re: Cray C-90 (UNICOS 8.0.3) support? Cc: es@hawkwind.utcs.toronto.edu > The reason, of course, is that it makes it easier to implement. My recollection: particularly on machines with other then a classic stack architecture. > but restricting how you can call setjmp seems a little extreme. Perhaps. But since it only costs you a handful of lines of code, maybe it is not unreasonable as you first thought. /r$ From es-owner Tue Apr 11 15:26:36 1995 Received: from hp08.nas.nasa.gov ([129.99.50.32]) by hawkwind.utcs.utoronto.ca with SMTP id <24087>; Tue, 11 Apr 1995 15:21:42 -0400 Received: from hp08.nas.nasa.gov (localhost [127.0.0.1]) by hp08.nas.nasa.gov (8.6.8.2/NAS.6.1) with ESMTP id MAA06054 for ; Tue, 11 Apr 1995 12:21:21 -0700 Message-Id: <199504111921.MAA06054@hp08.nas.nasa.gov> X-Mailer: exmh version 1.5.3 12/28/94 To: es@hawkwind.utcs.toronto.edu Subject: Nifty hack Reply-To: gray@nas.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Tue, 11 Apr 1995 15:21:21 -0400 From: "Scott C. Gray" I am working on an extension/replacement for cd which supports the 'cd -' option, which takes you back to the previous directory in which you were working. Then I started thinking, why not do 'cd -N' where it will take you back to the Nth previous directory. Right now I am still fumbling a little bit with es's syntax (it is a bit awkward). So, my question is, is there a way to pull 'N', off of the '-N' without execing a sub-process? I was thinking it could be done by setting the ifs to '-', but I can't quite seem to get it to do what I want. Thanks -scott -- _/ _/ _/_/_/ _/_/_/_/ _/_/_/ Scott C. Gray (gray@nas.nasa.gov) _/_/ _/ _/ _/ _/_/ _/ _/ NASA Ames Research M/S 258-6 _/ _/_/ _/_/_/_/ _/_/ _/_/_/_/ For PGP public key, send me mail _/ _/ _/ _/ _/_/_/_/ _/ _/ with subject line of "PGP request". From es-owner Tue Apr 11 15:33:46 1995 Received: from hp08.nas.nasa.gov ([129.99.50.32]) by hawkwind.utcs.utoronto.ca with SMTP id <24086>; Tue, 11 Apr 1995 15:33:06 -0400 Received: from hp08.nas.nasa.gov (localhost [127.0.0.1]) by hp08.nas.nasa.gov (8.6.8.2/NAS.6.1) with ESMTP id MAA06100 for ; Tue, 11 Apr 1995 12:32:35 -0700 Message-Id: <199504111932.MAA06100@hp08.nas.nasa.gov> X-Mailer: exmh version 1.5.3 12/28/94 cc: es@hawkwind.utcs.toronto.edu To: Subject: Re: Nifty hack In-reply-to: Your message of "Tue, 11 Apr 1995 15:21:21 PDT." <199504111921.MAA06054@hp08.nas.nasa.gov> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Tue, 11 Apr 1995 15:32:34 -0400 From: "Scott C. Gray" > Right now I am still fumbling a little bit with es's syntax (it is a bit > awkward). So, my question is, is there a way to pull 'N', off of the '-N' > without execing a sub-process? I was thinking it could be done by setting the > ifs to '-', but I can't quite seem to get it to do what I want. Sorry to reply to my own mail message, but I figure it out: dir = -3 index = <={%split - $dir} This comes pretty close to what I want to do. Thanks, -scott -- _/ _/ _/_/_/ _/_/_/_/ _/_/_/ Scott C. Gray (gray@nas.nasa.gov) _/_/ _/ _/ _/ _/_/ _/ _/ NASA Ames Research M/S 258-6 _/ _/_/ _/_/_/_/ _/_/ _/_/_/_/ For PGP public key, send me mail _/ _/ _/ _/ _/_/_/_/ _/ _/ with subject line of "PGP request". From es-owner Tue Apr 11 17:47:44 1995 Received: from hp08.nas.nasa.gov ([129.99.50.32]) by hawkwind.utcs.utoronto.ca with SMTP id <24091>; Tue, 11 Apr 1995 17:47:11 -0400 Received: from hp08.nas.nasa.gov (localhost [127.0.0.1]) by hp08.nas.nasa.gov (8.6.8.2/NAS.6.1) with ESMTP id OAA06611 for ; Tue, 11 Apr 1995 14:46:48 -0700 Message-Id: <199504112146.OAA06611@hp08.nas.nasa.gov> X-Mailer: exmh version 1.5.3 12/28/94 To: es@hawkwind.utcs.toronto.edu Subject: Fruits of my labor Reply-To: gray@nas.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Tue, 11 Apr 1995 17:46:48 -0400 From: "Scott C. Gray" For those of you that really care, here is my little cd replacement. It is rather large because it replaces all of the functionality of the builtin cd, yet still manages to call only one external program during creation. # cd [ -[N] | dir ] # # This replaces the builtin version of cd, absorbing all of its features # and adding the ability to jump back to the Nth previous directory. The # number of previous directories that cd remembers may be adjusted by # incrementing cd-stack-depth. The size of the stack is actually # cd-stack-depth + 1 (if cd-stack-depth is not set, then the stack becomes # unabounded). cd-stack-depth = 3 let ( cd-stack = .; cwd = `pwd ) { fn cd dir { if {~ $#dir 0} { if {! ~ $#home 1} { throw error cd <={ if {~ $#home 0} { result 'cd: $home not set' } { result 'cd: $home contains more than one word' } } } dir = $home } {~ $#dir 1} { if { ~ $dir -* } { let (index = <={%split - $dir}) { if {~ $#index 0} { index = 1 } { ! ~ $index [0-9]* } { throw error cd 'cd: invalid argument' } dir = $cd-stack($index) echo $dir >[1=2] } if { ~ $#dir 0 } { throw error cd 'cd: stack not that deep' } } {! %is-absolute $dir} { let (old = $dir) { dir = <={%cdpathsearch $dir} if {! ~ $dir $old} { echo $dir >[1=2] } } } } { throw error cd 'usage: cd [-[N]|[directory]]' } if {$&cd $dir} { cd-stack = ($cwd $cd-stack( 1 ... $cd-stack-depth )) cwd = $dir } } } -scott -- _/ _/ _/_/_/ _/_/_/_/ _/_/_/ Scott C. Gray (gray@nas.nasa.gov) _/_/ _/ _/ _/ _/_/ _/ _/ NASA Ames Research M/S 258-6 _/ _/_/ _/_/_/_/ _/_/ _/_/_/_/ For PGP public key, send me mail _/ _/ _/ _/ _/_/_/_/ _/ _/ with subject line of "PGP request". From es-owner Wed Apr 19 14:18:41 1995 Received: from hp08.nas.nasa.gov ([129.99.50.32]) by hawkwind.utcs.utoronto.ca with SMTP id <24104>; Wed, 19 Apr 1995 14:13:52 -0400 Received: from hp08.nas.nasa.gov (localhost [127.0.0.1]) by hp08.nas.nasa.gov (8.6.8.2/NAS.6.1) with ESMTP id LAA18096 for ; Wed, 19 Apr 1995 11:12:53 -0700 Message-Id: <199504191812.LAA18096@hp08.nas.nasa.gov> X-Mailer: exmh version 1.5.3 12/28/94 To: es@hawkwind.utcs.toronto.edu Subject: SIGINT handling Reply-To: gray@nas.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Wed, 19 Apr 1995 14:12:53 -0400 From: "Scott C. Gray" Is it normal behaviour for an interactive es shell to exit after receiving two interrupt signals? They don't even have to be consecutive, I can do the following: ; ^C ; ls ... ; ^C (shell exits) I am using es-0.84, on HP-UX 9.0.5, compiled with '-Ae +ESlit +O3 -DHPUX'. Thanks, -scott -- _/ _/ _/_/_/ _/_/_/_/ _/_/_/ Scott C. Gray (gray@nas.nasa.gov) _/_/ _/ _/ _/ _/_/ _/ _/ NASA Ames Research M/S 258-6 _/ _/_/ _/_/_/_/ _/_/ _/_/_/_/ For PGP public key, send me mail _/ _/ _/ _/ _/_/_/_/ _/ _/ with subject line of "PGP request". From es-owner Wed Apr 19 14:30:52 1995 Received: from khym.imf.unit.no ([129.241.15.200]) by hawkwind.utcs.utoronto.ca with SMTP id <24105>; Wed, 19 Apr 1995 14:30:26 -0400 Received: from chanur.imf.unit.no by khym.imf.unit.no with SMTP id AA15839 (5.65c8/IDA-1.4.4 for ); Wed, 19 Apr 1995 20:28:22 +0200 Received: by chanur.imf.unit.no id AA01943 (5.0/idt-C-2.0 for unit.no); Wed, 19 Apr 1995 20:28:22 +0200 From: "Harald Hanche-Olsen" Message-Id: <9504192028.ZM1941@chanur.imf.unit.no> Date: Wed, 19 Apr 1995 14:28:20 -0400 In-Reply-To: "Scott C. Gray" "SIGINT handling" (Apr 19, 14:12) References: <199504191812.LAA18096@hp08.nas.nasa.gov> X-Mailer: Z-Mail (3.2.0 08aug94) To: gray@nas.nasa.gov, es@hawkwind.utcs.toronto.edu Subject: Re: SIGINT handling Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Length: 808 On Apr 19, 14:12, Scott C. Gray wrote: > Subject: SIGINT handling | | Is it normal behaviour for an interactive es shell to exit after receiving two | interrupt signals? They don't even have to be consecutive, I can do the | following: | | ; ^C | ; ls | ... | ; ^C | (shell exits) | | I am using es-0.84, on HP-UX 9.0.5, compiled with '-Ae +ESlit +O3 -DHPUX'. In signal.c we find the lines /* catcher -- catch (and defer) a signal from the kernel */ static void catcher(int sig) { #if SYSV_SIGNALS /* only do this for unreliable signals */ signal(sig, catcher); #endif maybe SYSV_SIGNALS ought to be true for HPUX systems? Try adding the lines #ifndef SYSV_SIGNALS #define SYSV_SIGNALS 1 #endif after the line saying #if HPUX and tell ut how it worked out. - Harald From es-owner Wed Apr 19 17:08:08 1995 Received: from hp08.nas.nasa.gov ([129.99.50.32]) by hawkwind.utcs.utoronto.ca with SMTP id <24104>; Wed, 19 Apr 1995 17:06:55 -0400 Received: from hp08.nas.nasa.gov (localhost [127.0.0.1]) by hp08.nas.nasa.gov (8.6.8.2/NAS.6.1) with ESMTP id OAA19298 for ; Wed, 19 Apr 1995 14:05:07 -0700 Message-Id: <199504192105.OAA19298@hp08.nas.nasa.gov> X-Mailer: exmh version 1.5.3 12/28/94 To: es@hawkwind.utcs.toronto.edu Subject: Re: SIGINT handling In-reply-to: Your message of "Wed, 19 Apr 1995 20:28:20 PDT." <9504192028.ZM1941@chanur.imf.unit.no> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Wed, 19 Apr 1995 17:05:07 -0400 From: "Scott C. Gray" > On Apr 19, 14:12, Scott C. Gray wrote: > > Subject: SIGINT handling > | > | Is it normal behaviour for an interactive es shell to exit after receiving two > | interrupt signals? They don't even have to be consecutive, I can do the > | following: [...snip...] > #ifndef SYSV_SIGNALS > #define SYSV_SIGNALS 1 > #endif [...snip...] Well, it certainly makes sense to me that this would be the problem, but it didn't help. All that happens now is: ; ^C ; ^C (shell exits) Any other suggestions? If I get the time, I'll try stepping through the interrupt in the debugger. Thanks, -scott -- _/ _/ _/_/_/ _/_/_/_/ _/_/_/ Scott C. Gray (gray@nas.nasa.gov) _/_/ _/ _/ _/ _/_/ _/ _/ NASA Ames Research M/S 258-6 _/ _/_/ _/_/_/_/ _/_/ _/_/_/_/ For PGP public key, send me mail _/ _/ _/ _/ _/_/_/_/ _/ _/ with subject line of "PGP request". From es-owner Wed Apr 19 17:58:39 1995 Received: from hp08.nas.nasa.gov ([129.99.50.32]) by hawkwind.utcs.utoronto.ca with SMTP id <24105>; Wed, 19 Apr 1995 17:57:51 -0400 Received: from hp08.nas.nasa.gov (localhost [127.0.0.1]) by hp08.nas.nasa.gov (8.6.8.2/NAS.6.1) with ESMTP id OAA20712; Wed, 19 Apr 1995 14:56:58 -0700 Message-Id: <199504192156.OAA20712@hp08.nas.nasa.gov> X-Mailer: exmh version 1.5.3 12/28/94 To: "Harald Hanche-Olsen" cc: es@hawkwind.utcs.toronto.edu Subject: Re: SIGINT handling In-reply-to: Your message of "Wed, 19 Apr 1995 20:28:20 PDT." <9504192028.ZM1941@chanur.imf.unit.no> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Wed, 19 Apr 1995 17:56:58 -0400 From: "Scott C. Gray" > > maybe SYSV_SIGNALS ought to be true for HPUX systems? Try adding the lines > > #ifndef SYSV_SIGNALS > #define SYSV_SIGNALS 1 > #endif > > after the line saying > > #if HPUX > > and tell ut how it worked out. > > - Harald I hate it when I reply to my own e-mail, but I seem to be doing that quite a bit lately. It seems that you were correct, for the most part. The problem was that I was testing the changes by running the new copy of es while sitting in my old es shell, so the old shell was catching the signal and exiting. However, I can't say I really like the behavior of es when SYSV_SIGNALS is defined. When I define it, I get the following behaviour: ; ^C ; However, I found that if I left SYSV_SIGNALS undefined in config.h and changed catcher() in signal.c to: /* catcher -- catch (and defer) a signal from the kernel */ static void catcher(int sig) { #if defined(SYSV_SIGNALS) || defined(HPUX) signal(sig, catcher); #endif Which now gives me the expected behaviour of: ; ^C ; ^C ; May I make the suggestion that config.h be changed to contain? #ifdef HPUX #ifndef SYSV_SIGNALS #define SYSV_SIGNALS 1 #endif ... #endif or that signal.c be changed as described above? Thanks, -scott -- _/ _/ _/_/_/ _/_/_/_/ _/_/_/ Scott C. Gray (gray@nas.nasa.gov) _/_/ _/ _/ _/ _/_/ _/ _/ NASA Ames Research M/S 258-6 _/ _/_/ _/_/_/_/ _/_/ _/_/_/_/ For PGP public key, send me mail _/ _/ _/ _/ _/_/_/_/ _/ _/ with subject line of "PGP request". From es-owner Wed Apr 19 19:33:43 1995 Received: from sungear.mame.mu.OZ.AU ([128.250.209.2]) by hawkwind.utcs.utoronto.ca with SMTP id <24107>; Wed, 19 Apr 1995 19:33:10 -0400 Received: from splode.mame.mu.OZ.AU (splode.mame.mu.OZ.AU [128.250.209.121]) by sungear.mame.mu.OZ.AU (8.6.12/8.6.4) with ESMTP id JAA19912; Thu, 20 Apr 1995 09:32:10 +1000 Received: from localhost (localhost [127.0.0.1]) by splode.mame.mu.OZ.AU (8.6.11/8.6.10) with SMTP id JAA05652; Thu, 20 Apr 1995 09:32:00 +1000 Message-Id: <199504192332.JAA05652@splode.mame.mu.OZ.AU> X-Authentication-Warning: splode.mame.mu.OZ.AU: Host localhost didn't use HELO protocol To: "Harald Hanche-Olsen" cc: gray@nas.nasa.gov, es@hawkwind.utcs.toronto.edu From: matthew green Subject: Re: SIGINT handling In-reply-to: Your message of "Wed, 19 Apr 1995 14:28:20 -0400." <9504192028.ZM1941@chanur.imf.unit.no> Date: Wed, 19 Apr 1995 19:31:46 -0400 Sender: mrg@splode.mame.mu.OZ.AU why not use sigaction() if available, or, then use sigset(), and then default to signal() ? this is what i use, and i've yet to find a system that doesn't at least have a bsd signal() or sigset() (and most these days have sigaction()). .mrg. From es-owner Thu Apr 20 00:57:13 1995 Received: from postman.osf.org ([130.105.1.152]) by hawkwind.utcs.utoronto.ca with SMTP id <24106>; Thu, 20 Apr 1995 00:56:13 -0400 Received: from sulphur.osf.org (sulphur.osf.org [130.105.1.123]) by postman.osf.org (8.6.9/8.6.x) with SMTP id AAA18939; Thu, 20 Apr 1995 00:55:20 -0400 From: Rich Salz Received: by sulphur.osf.org (1.37.109.4/4.7) id AA12443; Thu, 20 Apr 95 00:50:42 -0400 Date: Thu, 20 Apr 1995 00:50:42 -0400 Message-Id: <9504200450.AA12443@sulphur.osf.org> To: es-owner@hawkwind.utcs.toronto.edu, hanche@imf.unit.no Subject: Re: SIGINT handling Cc: es@hawkwind.utcs.toronto.edu I'm sort-of confused that es doesn't do this, but isn't it always safe to re-arm the signal handler? That's what I do in my code... From es-owner Thu Apr 20 07:22:38 1995 Received: from sungear.mame.mu.OZ.AU ([128.250.209.2]) by hawkwind.utcs.utoronto.ca with SMTP id <24104>; Thu, 20 Apr 1995 07:21:49 -0400 Received: from splode.mame.mu.OZ.AU (splode.mame.mu.OZ.AU [128.250.209.121]) by sungear.mame.mu.OZ.AU (8.6.12/8.6.4) with ESMTP id VAA03867; Thu, 20 Apr 1995 21:21:02 +1000 Received: from localhost (localhost [127.0.0.1]) by splode.mame.mu.OZ.AU (8.6.11/8.6.10) with SMTP id VAA06617; Thu, 20 Apr 1995 21:20:56 +1000 Message-Id: <199504201120.VAA06617@splode.mame.mu.OZ.AU> X-Authentication-Warning: splode.mame.mu.OZ.AU: Host localhost didn't use HELO protocol To: Rich Salz cc: es@hawkwind.utcs.toronto.edu, es-owner@hawkwind.utcs.toronto.edu, hanche@imf.unit.no From: matthew green Subject: Re: SIGINT handling In-reply-to: Your message of "Thu, 20 Apr 1995 00:50:42 -0400." <9504200450.AA12443@sulphur.osf.org> Date: Thu, 20 Apr 1995 07:20:46 -0400 Sender: mrg@splode.mame.mu.OZ.AU I'm sort-of confused that es doesn't do this, but isn't it always safe to re-arm the signal handler? That's what I do in my code... no. if you get two signals before you get a chance to reinstate the handler, you're stuffed. here's some things i use: #ifdef USE_SIGACTION typedef RETSIGTYPE sigfunc _((int)); sigfunc *my_signal _((int, sigfunc *, int)); # define MY_SIGNAL(s_n, s_h, m_f) my_signal(s_n, s_h, m_f) #else # if USE_SIGSET # define MY_SIGNAL(s_n, s_h, m_f) sigset(s_n, s_h) # else # define MY_SIGNAL(s_n, s_h, m_f) signal(s_n, s_h) # endif /* USE_SIGSET */ #endif /* USE_SIGACTION */ where you've previously defined the USE_* and RETSIGTYPE's. and the my_signal() looks like this: /* * ircsig.c: has a `my_signal()' that uses sigaction(). * * written by matthew green, 1993. * * i stole bits of this from w. richard stevens' `advanced programming * in the unix environment' -mrg */ #ifndef lint static char rcsid[] = "@(#)$Id: ircsig.c,v 1.3 1994/07/02 02:32:13 mrg Stab $"; #endif #include "irc.h" #include "irc_std.h" #ifdef USE_SIGACTION sigfunc * my_signal(sig_no, sig_handler, misc_flags) int sig_no; sigfunc *sig_handler; int misc_flags; { /* * misc_flags is unused currently. it's planned to be used * to use some of the doovier bits of sigaction(), if at * some point we need them, -mrg */ struct sigaction sa, osa; sa.sa_handler = sig_handler; sigemptyset(&sa.sa_mask); sigaddset(&sa.sa_mask, sig_no); /* this is ugly, but the `correct' way. i hate c. -mrg */ sa.sa_flags = 0; #if defined(SA_RESTART) || defined(SA_INTERRUPT) if (SIGALRM == sig_no) { # if defined(SA_INTERRUPT) sa.sa_flags |= SA_INTERRUPT; # endif /* SA_INTERRUPT */ } else { # if defined(SA_RESTART) sa.sa_flags |= SA_RESTART; # endif /* SA_RESTART */ } #endif /* SA_RESTART || SA_INTERRUPT */ if (0 > sigaction(sig_no, &sa, &osa)) return (SIG_ERR); return (osa.sa_handler); } #endif /* USE_SIGACTION */ --- and then you use it like this: (void) MY_SIGNAL(SIGINT, cntl_c, 0); i've also got the SYSVSIGNALS stuff in the signal handlers themselves -if- we don't have any real signals. .mrg. From es-owner Thu Apr 20 07:32:18 1995 Received: from cegelecproj.co.uk ([159.245.72.6]) by hawkwind.utcs.utoronto.ca with SMTP id <24104>; Thu, 20 Apr 1995 07:32:01 -0400 Received: from vampire.cegelecproj.co.uk (cerberus.cegelecproj.co.uk) by cegelecproj.co.uk (4.1/SMI-4.1) id AA29088; Thu, 20 Apr 95 12:31:38 BST Received: from spirit.cegelecproj.co.uk (spirit.limbo.cegelecproj.co.uk) by vampire.cegelecproj.co.uk (5.0/SMI-SVR4) id AA28870; Thu, 20 Apr 1995 12:31:28 +0000 Received: by spirit.cegelecproj.co.uk (5.0/SMI-SVR4) id AA02129; Thu, 20 Apr 1995 12:31:23 +0000 Date: Thu, 20 Apr 1995 08:31:23 -0400 From: Steve_Kilbane@cegelecproj.co.uk (Steve_Kilbane) Message-Id: <9504201131.AA02129@spirit.cegelecproj.co.uk> X-Planation: X-Faces images can be viewed with the XFaces program To: mrg@mame.mu.OZ.AU Subject: Re: SIGINT handling Cc: es@hawkwind.utcs.toronto.edu Content-Length: 425 X-Face: Iqsa(US9p?)Y^W+6Ff[Z]rM"uFE) lFDjag1e]\/#2 > I'm sort-of confused that es doesn't do this, but isn't it always > safe to re-arm the signal handler? That's what I do in my code... > > no. if you get two signals before you get a chance to reinstate > the handler, you're stuffed. here's some things i use: I interpreted Rich's comments to mean, "use sigaction, etc where possible, but re-instate the sig handler anyway, even if you shouldn't have to." steve From es-owner Thu Apr 20 07:33:13 1995 Received: from sartre.minerva.bah.com ([156.80.175.13]) by hawkwind.utcs.utoronto.ca with SMTP id <24105>; Thu, 20 Apr 1995 07:32:59 -0400 Received: from pigsnose by sartre.minerva.bah.com (NX5.67d/NX3.0M) id AA08420; Thu, 20 Apr 95 07:34:09 -0400 Date: Thu, 20 Apr 1995 07:34:09 -0400 From: Erik Quanstrom Message-Id: <9504201134.AA08420@sartre.minerva.bah.com> To: Subject: the cure is worse than the desease! Apparently-To: >no. if you get two signals before you get a chance to reinstate >the handler, you're stuffed. here's some things i use: if you except toy, rehosted "operating systems", this has never happened to me. and i've been using rc which does this for years. the solution you propose is a pain to port, and i don't see that it solves a real problem. if you just stick to v7 semantics, you can port it to anything and you won't have a problem. that's much more important From es-owner Fri Apr 21 15:26:30 1995 Received: from motgate.mot.com ([129.188.136.100]) by hawkwind.utcs.utoronto.ca with SMTP id <24107>; Fri, 21 Apr 1995 15:21:53 -0400 Received: from pobox.mot.com (pobox.mot.com [129.188.137.100]) by motgate.mot.com (8.6.11/8.6.10/MOT-3.6) with ESMTP id OAA11647 for ; Fri, 21 Apr 1995 14:21:38 -0500 Received: from comm.mot.com (il02dns1.comm.mot.com [145.1.3.2]) by pobox.mot.com (8.6.11/8.6.10/MOT-3.6) with SMTP id OAA11462 for ; Fri, 21 Apr 1995 14:21:37 -0500 Received: from supra.comm.mot.com by comm.mot.com (4.1/SMI-4.0) id AA07218; Fri, 21 Apr 95 14:21:39 CDT Received: by supra.comm.mot.com (4.1/SMI-4.1) id AA02790; Fri, 21 Apr 95 14:19:45 CDT Date: Fri, 21 Apr 1995 15:19:45 -0400 From: rittle@comm.mot.com (Loren James Rittle) Message-Id: <9504211919.AA02790@supra.comm.mot.com> To: gray@nas.nasa.gov Cc: es@hawkwind.utcs.toronto.edu In-Reply-To: <199504191812.LAA18096@hp08.nas.nasa.gov> (gray@nas.nasa.gov) Subject: Re: SIGINT handling Reply-To: rittle@comm.mot.com Comments: Hyperbole mail buttons accepted, v3.16. >Date: Wed, 19 Apr 1995 14:12:53 -0400 >From: "Scott C. Gray" > >Is it normal behaviour for an interactive es shell to exit after receiving >two interrupt signals? They don't even have to be consecutive, I can do the >following: ... >I am using es-0.84, on HP-UX 9.0.5, compiled with '-Ae +ESlit +O3 -DHPUX'. This is not normal from my experience on a Sparcstation10 running sunos4.1.3. Loren From es-owner Mon Apr 24 11:36:24 1995 Received: from postman.osf.org ([130.105.1.152]) by hawkwind.utcs.utoronto.ca with SMTP id <24104>; Mon, 24 Apr 1995 11:31:32 -0400 Received: from sulphur.osf.org (sulphur.osf.org [130.105.1.123]) by postman.osf.org (8.6.9/8.6.x) with SMTP id LAA07403; Mon, 24 Apr 1995 11:31:04 -0400 From: Rich Salz Received: by sulphur.osf.org (1.37.109.4/4.7) id AA17212; Mon, 24 Apr 95 11:26:25 -0400 Date: Mon, 24 Apr 1995 11:26:25 -0400 Message-Id: <9504241526.AA17212@sulphur.osf.org> To: Steve_Kilbane@cegelecproj.co.uk, mrg@mame.mu.OZ.AU Subject: Re: SIGINT handling Cc: es@hawkwind.utcs.toronto.edu > I interpreted Rich's comments to mean, "use sigaction, etc where > possible, but re-instate the sig handler anyway, even if you > shouldn't have to." EXACTLY! From es-owner Mon Apr 24 11:42:46 1995 Received: from sungear.mame.mu.OZ.AU ([128.250.209.2]) by hawkwind.utcs.utoronto.ca with SMTP id <24106>; Mon, 24 Apr 1995 11:40:19 -0400 Received: from dynamo.mame.mu.OZ.AU (root@dynamo.mame.mu.OZ.AU [128.250.209.44]) by sungear.mame.mu.OZ.AU (8.6.12/8.6.4) with ESMTP id BAA09103 for ; Tue, 25 Apr 1995 01:40:01 +1000 Received: from dynamo.mame.mu.OZ.AU (mrg@localhost [127.0.0.1]) by dynamo.mame.mu.OZ.AU (8.6.12/8.6.4) with ESMTP id BAA26185 for ; Tue, 25 Apr 1995 01:40:00 +1000 Message-Id: <199504241540.BAA26185@dynamo.mame.mu.OZ.AU> To: es@hawkwind.utcs.toronto.edu Subject: Re: SIGINT handling In-reply-to: Your message of "Mon, 24 Apr 1995 11:26:25 -0400." <9504241526.AA17212@sulphur.osf.org> Date: Mon, 24 Apr 1995 11:39:57 -0400 From: matthew green > I interpreted Rich's comments to mean, "use sigaction, etc where > possible, but re-instate the sig handler anyway, even if you > shouldn't have to." EXACTLY! this is good to do, but i'd also prefer to take the reliable signals as well. if you're on any system v-like box and you use `signal()' you get unreliable signals. i'd rather use sigset() or sigaction() here. that way you have less possible lossage... From es-owner Tue Apr 25 14:48:22 1995 Received: from khym.imf.unit.no ([129.241.15.200]) by hawkwind.utcs.utoronto.ca with SMTP id <24105>; Tue, 25 Apr 1995 14:44:42 -0400 Received: from chanur.imf.unit.no by khym.imf.unit.no with SMTP id AA21565 (5.65c8/IDA-1.4.4 for ); Tue, 25 Apr 1995 20:43:38 +0200 Received: by chanur.imf.unit.no id AA03775 (5.0/idt-C-2.0 for unit.no); Tue, 25 Apr 1995 20:43:36 +0200 From: "Harald Hanche-Olsen" Message-Id: <9504252043.ZM3773@chanur.imf.unit.no> Date: Tue, 25 Apr 1995 14:43:35 -0400 X-Mailer: Z-Mail (3.2.0 08aug94) To: es@hawkwind.utcs.toronto.edu Subject: Strange behaviour of access Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Length: 727 Here is one that has me puzzled. I like to have the same .esrc and supporting files everywhere, and since the mail directory is in different locations on different machines I use the lines MAIL=<={access -rd1 /var/mail /var/spool/mail /usr/spool/mail}^/^$USER if {~ $MAIL ()} {echo 'WARNING: No mail directory!' >[1=2]} to locate the appropriate directory. The surprising thing is that this almost always triggers the warning when I log in on a Solaris 2.3 host. Manually sourcing the file containing these lines later always cures the problem. At first I thought it was due to automounter magic, but the mail directory is never automounted, it is typically explicitly NFS mounted. Any ideas what is going on? - Harald From es-owner Wed Apr 26 11:30:00 1995 Received: from khym.imf.unit.no ([129.241.15.200]) by hawkwind.utcs.utoronto.ca with SMTP id <24105>; Wed, 26 Apr 1995 11:28:00 -0400 Received: from chanur.imf.unit.no by khym.imf.unit.no with SMTP id AA05303 (5.65c8/IDA-1.4.4 for ); Wed, 26 Apr 1995 17:27:08 +0200 Received: by chanur.imf.unit.no id AA04052 (5.0/idt-C-2.0 for unit.no); Wed, 26 Apr 1995 17:27:07 +0200 From: "Harald Hanche-Olsen" Message-Id: <9504261727.ZM4050@chanur.imf.unit.no> Date: Wed, 26 Apr 1995 11:27:04 -0400 In-Reply-To: "Harald Hanche-Olsen" "Strange behaviour of access" (Apr 25, 14:43) References: <9504252043.ZM3773@chanur.imf.unit.no> X-Mailer: Z-Mail (3.2.0 08aug94) To: es@hawkwind.utcs.toronto.edu Subject: Re: Strange behaviour of access Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Length: 666 I wrote | MAIL=<={access -rd1 /var/mail /var/spool/mail /usr/spool/mail}^/^$USER | if {~ $MAIL ()} {echo 'WARNING: No mail directory!' >[1=2]} Aaargh. Stupid me. Stooooooopid me. Solaris doesn't set USER, it sets LOGNAME instead. After discovering that ages ago I started setting USER myself, but had forgotten about it. At the above point, of course, USER is not set, so MAIL gets unset even though the access function does find the mail directory. How silly. And I had to set up truss to trace my shell during the login process to find this simple fact. Maybe I should take up basket weaving instead and quit fooling around with computers. - Harald 8-/ From es-owner Fri Apr 28 04:33:29 1995 Received: from cegelecproj.co.uk ([159.245.72.6]) by hawkwind.utcs.utoronto.ca with SMTP id <24107>; Fri, 28 Apr 1995 04:32:19 -0400 Received: from vampire.cegelecproj.co.uk (cerberus.cegelecproj.co.uk) by cegelecproj.co.uk (4.1/SMI-4.1) id AA13251; Fri, 28 Apr 95 09:31:53 BST Received: from spirit.cegelecproj.co.uk (spirit.limbo.cegelecproj.co.uk) by vampire.cegelecproj.co.uk (5.0/SMI-SVR4) id AA24102; Fri, 28 Apr 1995 09:31:43 +0000 Received: by spirit.cegelecproj.co.uk (5.0/SMI-SVR4) id AA01513; Fri, 28 Apr 1995 09:31:39 +0000 Date: Fri, 28 Apr 1995 05:31:39 -0400 From: Steve_Kilbane@cegelecproj.co.uk (Steve_Kilbane) Message-Id: <9504280831.AA01513@spirit.cegelecproj.co.uk> X-Planation: X-Faces images can be viewed with the XFaces program To: hanche@imf.unit.no Subject: Re: Strange behaviour of access Cc: es@hawkwind.utcs.toronto.edu Content-Length: 289 X-Face: Iqsa(US9p?)Y^W+6Ff[Z]rM"uFE) lFDjag1e]\/#2 there are known bugs in solaris 2.3 where a stat() of an existing file fails with ENOENT (i think) first time around, and then works on future occasions. plays havoc with make. mainly, these are to do with the automounter, but there may also be similar bugs in the normal NFS code. steve From es-owner Thu May 11 16:09:21 1995 Received: from khym.imf.unit.no ([129.241.15.200]) by hawkwind.utcs.utoronto.ca with SMTP id <24120>; Thu, 11 May 1995 16:07:25 -0400 Received: from chanur.imf.unit.no by khym.imf.unit.no with SMTP id AA15119 (5.65c8/IDA-1.4.4 for ); Thu, 11 May 1995 22:07:09 +0200 Received: by chanur.imf.unit.no id AA12052 (5.0/idt-C-2.0 for unit.no); Thu, 11 May 1995 22:07:08 +0200 From: "Harald Hanche-Olsen" Message-Id: <9505112207.ZM12050@chanur.imf.unit.no> Date: Thu, 11 May 1995 16:07:06 -0400 X-Mailer: Z-Mail (3.2.0 08aug94) To: es@hawkwind.utcs.toronto.edu Subject: Settor functions and initialization Sender: Harald Hanche-Olsen Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Length: 804 Ouch. After redesigning part of my es init files, I find that I often cannot run es in subprocesses anymore. What happens is this: I have a settor function that calls another function I have defined. The principle is this: set-FOO = @ *{%fun foo $*} fn %fun ... {...} Now, when a new es starts up, things break if variables are initialized from the environment in this order: set-FOO FOO fn-%fun for when FOO is set, set-FOO is called and it tries to run %fun which is not defined. This kills the shell. I believe that during initialization, all variables should be initialized from the environment without trying to call settor functions. Only afterwards should settors be looked for and called, for each variable that was initialized from the environment in the first place. - Harald From es-owner Thu May 11 17:45:02 1995 Received: from cli.com ([192.31.85.1]) by hawkwind.utcs.utoronto.ca with SMTP id <24121>; Thu, 11 May 1995 17:44:42 -0400 Received: from tepui.cli.com by cli.com (4.1/SMI-4.1) id AA15542; Thu, 11 May 95 16:44:36 CDT Received: by tepui.cli.com (4.1) id AA18552; Thu, 11 May 95 16:44:32 CDT Date: Thu, 11 May 1995 17:44:32 -0400 Message-Id: <9505112144.AA18552@tepui.cli.com> From: friedman@gnu.ai.mit.edu (Noah Friedman) To: hanche@imf.unit.no Cc: es@hawkwind.utcs.toronto.edu Subject: Settor functions and initialization Reply-To: friedman@gnu.ai.mit.edu In-Reply-To: Thu, 11 May 1995 16:07:06 -0400 References: <9505112207.ZM12050@chanur.imf.unit.no> >I believe that during initialization, all variables should be initialized >from the environment without trying to call settor functions. Only >afterwards should settors be looked for and called, for each variable that >was initialized from the environment in the first place. Calling settors at startup time shouldn't be necessary at all, since all the variables should be inherited from the environment unchanged (modulo present bugs in closure preservation). From es-owner Thu May 11 18:18:44 1995 Received: from khym.imf.unit.no ([129.241.15.200]) by hawkwind.utcs.utoronto.ca with SMTP id <24122>; Thu, 11 May 1995 18:18:27 -0400 Received: from chanur.imf.unit.no by khym.imf.unit.no with SMTP id AA18564 (5.65c8/IDA-1.4.4 for ); Fri, 12 May 1995 00:18:05 +0200 Received: by chanur.imf.unit.no id AA12065 (5.0/idt-C-2.0 for unit.no); Fri, 12 May 1995 00:18:04 +0200 From: "Harald Hanche-Olsen" Message-Id: <9505120018.ZM12063@chanur.imf.unit.no> Date: Thu, 11 May 1995 18:18:02 -0400 In-Reply-To: friedman@gnu.ai.mit.edu (Noah Friedman) "Settor functions and initialization" (May 11, 17:44) References: <9505112207.ZM12050@chanur.imf.unit.no> <9505112144.AA18552@tepui.cli.com> X-Mailer: Z-Mail (3.2.0 08aug94) To: friedman@gnu.ai.mit.edu Subject: Re: Settor functions and initialization Cc: es@hawkwind.utcs.toronto.edu Sender: Harald Hanche-Olsen Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Length: 682 | Calling settors at startup time shouldn't be necessary at all, since all | the variables should be inherited from the environment unchanged (modulo | present bugs in closure preservation). Not true. Consider the sequence ; su Password: # es ; Doing su root changes $PATH. Entering es should then set $path accordingly. (As I have previously pointed out, exporting both PATH and path is wrong since in this case the result depends on which of set-path and set-PATH gets called first.) I am sure you can think of other cases where an intermediate process changes the environment so that an inferior es will have to change it back in order to keep things consistent. - Harald From es-owner Thu May 11 18:36:16 1995 Received: from cli.com ([192.31.85.1]) by hawkwind.utcs.utoronto.ca with SMTP id <24158>; Thu, 11 May 1995 18:35:55 -0400 Received: from tepui.cli.com by cli.com (4.1/SMI-4.1) id AA15714; Thu, 11 May 95 17:35:46 CDT Received: by tepui.cli.com (4.1) id AA19087; Thu, 11 May 95 17:35:46 CDT Message-Id: <9505112235.AA19087@tepui.cli.com> From: friedman@cli.com (Noah Friedman) To: hanche@imf.unit.no Cc: es@hawkwind.utcs.toronto.edu Subject: Re: Settor functions and initialization Reply-To: friedman@cli.com In-Reply-To: Thu, 11 May 1995 18:18:02 -0400 References: <9505112207.ZM12050@chanur.imf.unit.no> <9505112144.AA18552@tepui.cli.com> <9505120018.ZM12063@chanur.imf.unit.no> Date: Thu, 11 May 1995 19:35:45 -0400 >| Calling settors at startup time shouldn't be necessary at all, since all >| the variables should be inherited from the environment unchanged (modulo >| present bugs in closure preservation). > >Not true. Consider the sequence > >; su >Password: ># es >; > >Doing su root changes $PATH. Entering es should then set $path >accordingly. (As I have previously pointed out, exporting both PATH and >path is wrong since in this case the result depends on which of set-path >and set-PATH gets called first.) path and PATH are just a particular case. It's more complicated than that. You cannot guess in general which variable a program might change, that you opted to keep in sync with something else. Consider that on some systems, LOGNAME is the canonical user name variable. On others, it's USER. I keep them in sync so I don't have to guess which one to use, but if they are made out of sync by su, how do you possibly determine which settor is the correct one to call after a new shell invocation? My solution to this (working on the assumption that settors weren't called at startup time, which now explains some myserious directory-tracking bugs I've not not bothered to fix) was to have a hook run by my repl each time it's started, and add various synchronization functions there which depend on information I've gleaned from the OS beforehand. It's insanely complicated. But I think in the average case, the environment is not changed from one invocation of the shell to the next, and you can't generally expect to know the right order in which to call settors anyway. So calling them at shell startup is not particularly helpful. From es-owner Mon May 15 05:41:23 1995 Received: from holly.cam.harlequin.co.uk ([193.128.4.58]) by hawkwind.utcs.utoronto.ca with SMTP id <24120>; Mon, 15 May 1995 05:39:47 -0400 Received: from rocannon.cam.harlequin.co.uk by holly.cam.harlequin.co.uk; Mon, 15 May 1995 10:38:34 +0100 Received: from bessie.harlequin.co.uk (bessie.cam.harlequin.co.uk) by rocannon.cam.harlequin.co.uk; Mon, 15 May 1995 10:38:24 +0100 Date: Mon, 15 May 1995 05:37:00 -0400 Message-Id: <1660.9505150937@bessie.harlequin.co.uk> To: "Harald Hanche-Olsen" From: Paul Haahr Reply-To: Paul Haahr Cc: es@hawkwind.utcs.toronto.edu, Noah Friedman Subject: Re: Settor functions and initialization In-Reply-To: <9505112207.ZM12050@chanur.imf.unit.no> References: <9505112207.ZM12050@chanur.imf.unit.no> Harald wrote: > I believe that during initialization, all variables should be initialized > from the environment without trying to call settor functions. Only > afterwards should settors be looked for and called, for each variable that > was initialized from the environment in the first place. I think this is right. Noah wrote: > But I think in the average case, the environment is not changed from one > invocation of the shell to the next, and you can't generally expect to know > the right order in which to call settors anyway. So calling them at shell > startup is not particularly helpful. I think I disagree. Sometime you need to have them called, to ensure the proper state in a subshell, especially, as Harald has noted, if there are intervening non-es processes, such as su or emacs, that might change the environment. The ordering Harald suggested appears to me sufficiently deterministic to be useful and predictable. One thing that might help is to have a shell variable set dynamically to some special value to indicate that the setters are being run from startup rather than normal operation. Paul From es-owner Tue May 16 20:54:27 1995 Received: from hp08.nas.nasa.gov ([129.99.50.32]) by hawkwind.utcs.utoronto.ca with SMTP id <24162>; Tue, 16 May 1995 20:53:13 -0400 Received: from localhost (gray@localhost) by hp08.nas.nasa.gov (8.6.12/NAS.6.1) with SMTP id RAA06009 for ; Tue, 16 May 1995 17:52:39 -0700 Message-Id: <199505170052.RAA06009@hp08.nas.nasa.gov> X-Authentication-Warning: hp08.nas.nasa.gov: Host localhost didn't use HELO protocol X-Mailer: exmh version 1.6 4/21/95 To: es@hawkwind.utcs.toronto.edu Subject: Nifty hack Reply-To: gray@nas.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 16 May 1995 20:52:38 -0400 From: "Scott C. Gray" I don't know if anyone will be very interested in this, but here is another little hack that I dreamed up this weekend in an effort to create a single .esrc for every architecture that I commonly use. It isn't exactly blazingly fast (it adds about 1 second onto my login time), but it is pretty useful. The following function, build-fn, is used to dynamically build a function, or alias, based off of a selection of similarly functional programs. The best way to describe this is using a couple of examples: build-fn play player splayer play \ default {for (file = $*) {cat $file > /dev/audio}} This will cause a new function 'play' to be created (actually, $fn-play); say player exists in your $path (in /usr/audio/bin, like it does on my system), then: ; echo $fn-play @ * {/usr/audio/bin/player $*} If player doesn't exist in your path, but splayer does exist in /usr/local/bin, then: ; echo $fn-play @ * {/usr/local/bin/splayer $*} If there are no matches, then you get the following: ; echo $fn-play @ * {for(file=$*){%create 1 <={%one /dev/audio} {cat $file}}} build-fn also allows you to override the default function created for programs that it manages to find. For example: build-fn ll ll { @prog@ -F $* } \ ls { @prog@ -lF $* } So, if you actually have a program called ll on your system (I do, in /bin), then: ; echo $fn-ll @ * {/bin/ll -F $*} If ll doesn't exist in your path, then: ; echo $fn-ll @ * {/bin/ls -lF $*} Note, that any instances of @prog@ in your supplied code fragment are replaced with the full path name of the program that matched within your list. Caveats: o You can't search for a program called 'default'. o It doesn't make sense supply @prog@ within a default selection. o You can't stop @prog@ from being expanded within a code fragment. Have fun! -scott -- _/ _/ _/_/_/ _/_/_/_/ _/_/_/ Scott C. Gray (gray@nas.nasa.gov) _/_/ _/ _/ _/ _/_/ _/ _/ NASA Ames Research M/S 258-6 _/ _/_/ _/_/_/_/ _/_/ _/_/_/_/ For PGP public key, send me mail _/ _/ _/ _/ _/_/_/_/ _/ _/ with subject line of "PGP request". ----------------------------[ CUT HERE ]----------------------------------- fn choose-bin bin-list { for ( bin = $bin-list ) { for ( dir = $path ) { if { access -rx $dir/$bin } { return $dir/$bin } } } return } # build-fn function-name { prog-name | default } [script] ... # # This function is used to dynamically build a function, or alias, # using the first occurance of prog-name that actually exists. fn build-fn function-name args { let ( default-fn = # script specified by the default key word prog-name = # current program we are searching for prog-name-full = # fully specified program path prog-script = # script to be used if prog-name is found dir = # variable used in a loop success = false ) { while { ! ~ $#args 0 } { prog-name = $args(1) if { ~ $args(2) '{'*'}' } { prog-script = $args(2) args = $args(3 ...) } { prog-script = args = $args(2 ...) } if { ~ $prog-name default } { if { ~ $#prog-script 0 } { throw error build-fn 'build-fn: No code with default' } default-fn = $prog-script } { prog-name-full = <={ choose-bin $prog-name } if { ! ~ $#prog-name-full 0 } { if { ~ $#prog-script 0 } { prog-script = '@ * {'^$prog-name-full^' $*}' } { prog-script = '@ *' `{echo $prog-script | \ sed -e 's,@prog@,'^$prog-name-full^',g'} } fn-$function-name = $^prog-script success = true break } } } if { ! ~ $success true } { if { ! ~ $#default-fn 0 } { default-fn = '@ * ' ^ $^default-fn fn-$function-name = $^default-fn } { throw error build-fn 'build-fn: No match for '^$function-name } } } return 0 } -- _/ _/ _/_/_/ _/_/_/_/ _/_/_/ Scott C. Gray (gray@nas.nasa.gov) _/_/ _/ _/ _/ _/_/ _/ _/ NASA Ames Research M/S 258-6 _/ _/_/ _/_/_/_/ _/_/ _/_/_/_/ For PGP public key, send me mail _/ _/ _/ _/ _/_/_/_/ _/ _/ with subject line of "PGP request". From es-owner Thu May 18 13:08:14 1995 Received: from hp08.nas.nasa.gov ([129.99.50.32]) by hawkwind.utcs.utoronto.ca with SMTP id <24162>; Thu, 18 May 1995 13:04:07 -0400 Received: from localhost (gray@localhost) by hp08.nas.nasa.gov (8.6.12/NAS.6.1) with SMTP id KAA19959 for ; Thu, 18 May 1995 10:03:23 -0700 Message-Id: <199505181703.KAA19959@hp08.nas.nasa.gov> X-Authentication-Warning: hp08.nas.nasa.gov: Host localhost didn't use HELO protocol X-Mailer: exmh version 1.6 4/21/95 To: es@hawkwind.utcs.toronto.edu Subject: Bug? Reply-To: gray@nas.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 18 May 1995 13:03:23 -0400 From: "Scott C. Gray" According to the man page, return should have the following behaviour: return value Causes the current function to exit, with value as the return value (exit status). However, given the following script: #!/bin/es fn test_fn { for ( number = $x ) { echo Number $number while { ! ~ $#y 0 } { echo Letter $y(1) return 0 } } return 0 } x = ( 1 2 3 ) y = ( a b c ) echo 'Results of function test_fn:' <={test_fn} You would expect the output to be: ; test_fn Number 1 Letter a Results of function test_fn: 0 However, I get: ; test_fn Number 1 Letter a Number 2 Letter a Number 3 Letter a Results of function test_fn: 0 Has anyone run into this before? This only seems to be an artifact of using a while; it doesn't happen if I replace the while statement with a for. Any ideas? Oh, I am using es-0.84 on a HP-755 running HP-UX 9.0.5. -scott -- _/ _/ _/_/_/ _/_/_/_/ _/_/_/ Scott C. Gray (gray@nas.nasa.gov) _/_/ _/ _/ _/ _/_/ _/ _/ NASA Ames Research M/S 258-6 _/ _/_/ _/_/_/_/ _/_/ _/_/_/_/ For PGP public key, send me mail _/ _/ _/ _/ _/_/_/_/ _/ _/ with subject line of "PGP request". From es-owner Fri May 19 03:16:08 1995 Received: from cegelecproj.co.uk ([159.245.72.6]) by hawkwind.utcs.utoronto.ca with SMTP id <24162>; Fri, 19 May 1995 03:15:07 -0400 Received: from vampire.cegelecproj.co.uk (cerberus.cegelecproj.co.uk) by cegelecproj.co.uk (4.1/SMI-4.1) id AA25986; Fri, 19 May 95 08:14:56 BST Received: from spirit.cegelecproj.co.uk (spirit.limbo.cegelecproj.co.uk) by vampire.cegelecproj.co.uk (5.0/SMI-SVR4) id AA11219; Fri, 19 May 1995 08:14:48 +0100 Received: by spirit.cegelecproj.co.uk (5.0/SMI-SVR4) id AA07605; Fri, 19 May 1995 08:14:44 +0100 Date: Fri, 19 May 1995 03:14:44 -0400 From: Steve_Kilbane@cegelecproj.co.uk (Steve_Kilbane) Message-Id: <9505190714.AA07605@spirit.cegelecproj.co.uk> X-Planation: X-Faces images can be viewed with the XFaces program To: gray@nas.nasa.gov Subject: Re: Bug? Cc: es@hawkwind.utcs.toronto.edu Content-Length: 291 X-Face: Iqsa(US9p?)Y^W+6Ff[Z]rM"uFE) lFDjag1e]\/#2 Hmm. I get exactly the results expected, on SunOS 5.3. However, I can't remember what version of es I'm using, and it's not the most recent. :-( Any way of getting es to announce its version? I did used to have a hacked version that stored this in $version, but that was way back... steve From es-owner Fri May 19 09:35:36 1995 Received: from khym.imf.unit.no ([129.241.15.200]) by hawkwind.utcs.utoronto.ca with SMTP id <24162>; Fri, 19 May 1995 09:35:03 -0400 Received: from chanur.imf.unit.no by khym.imf.unit.no with SMTP id AA01405 (5.65c8/IDA-1.4.4 for ); Fri, 19 May 1995 15:34:25 +0200 Received: by chanur.imf.unit.no id AA15687 (5.0/idt-C-2.0 for unit.no); Fri, 19 May 1995 15:34:24 +0200 From: "Harald Hanche-Olsen" Message-Id: <9505191534.ZM15685@chanur.imf.unit.no> Date: Fri, 19 May 1995 09:34:22 -0400 In-Reply-To: "Scott C. Gray" "Bug?" (May 18, 13:03) References: <199505181703.KAA19959@hp08.nas.nasa.gov> X-Mailer: Z-Mail (3.2.0 08aug94) To: gray@nas.nasa.gov, es@hawkwind.utcs.toronto.edu Subject: Re: Bug? Sender: Harald Hanche-Olsen Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Length: 1220 The problem lies in this definition of while, from initial.es: fn-while = $&noreturn @ cond body { catch @ e value { if {!~ $e break} { throw $e $value } result $value } { let (result = <=true) forever { if {!$cond} { throw break $result } { result = <=$body } } } } If $body executes {return something}, that is {throw return something}, then that is caught in the catcher procedure which then, seeing that return is not break, executes {throw return something}. However the catcher procedure is *not* protected by $&noreturn, and so something is returned as the value of the catcher -- and hence of the while construct. Maybe the protection of $&noreturn should be extended to all lexically enclosed procedures. Or, maybe that doesn't make any sense. Apparently, the following slightly more obfuscated version of while fixes the problem. fn-while = $&noreturn @ cond body { <={ catch @ e value { if {~ $e return} {return {return $value}} if {!~ $e break} { throw $e $value } result {result $value} } { let (result = <=true) forever { if {!$cond} { throw break $result } { result = <=$body } } } } } - Harald From es-owner Fri May 19 12:17:45 1995 Received: from holly.cam.harlequin.co.uk ([193.128.4.58]) by hawkwind.utcs.utoronto.ca with SMTP id <24162>; Fri, 19 May 1995 12:17:12 -0400 Received: from rocannon.cam.harlequin.co.uk by holly.cam.harlequin.co.uk; Fri, 19 May 1995 17:15:39 +0100 Received: from bessie.harlequin.co.uk (bessie.cam.harlequin.co.uk) by rocannon.cam.harlequin.co.uk; Fri, 19 May 1995 17:15:30 +0100 Date: Fri, 19 May 1995 12:14:01 -0400 Message-Id: <1076.9505191614@bessie.harlequin.co.uk> To: "Harald Hanche-Olsen" From: Paul Haahr Reply-To: Paul Haahr Cc: "Scott C. Gray" , es@hawkwind.utcs.toronto.edu Subject: Re: Bug? In-Reply-To: <9505191534.ZM15685@chanur.imf.unit.no> References: <199505181703.KAA19959@hp08.nas.nasa.gov> <9505191534.ZM15685@chanur.imf.unit.no> > However the catcher procedure is *not* protected by $&noreturn, and > so something is returned as the value of the catcher -- and hence of > the while construct. Yep. That's the problem. Thanks for the diagnosis -- I spent about twenty minutes looking at it last night without realizing what the problem is. > Maybe the protection of $&noreturn should be extended to all lexically > enclosed procedures. Or, maybe that doesn't make any sense. That would be difficult to do. I would argue that catch should call the catching function with $&noreturn. Line 62 of prim-ctl.c list = eval(mklist(lp->term, e), NULL, evalflags); could probably be changed to list = eval(mklist(mkterm("$&noreturn", NULL), mklist(lp->term, e)), NULL, evalflags); This does fix the problem, but I don't know whether it introduces any bugs. > Apparently, the following slightly more obfuscated version of while fixes > the problem. Clever. Looks good to me, pending a fix in $&catch, as above. From es-owner Tue May 30 19:06:03 1995 Received: from holly.cam.harlequin.co.uk ([193.128.4.58]) by hawkwind.utcs.utoronto.ca with SMTP id <24172>; Tue, 30 May 1995 19:04:41 -0400 Received: from rocannon.cam.harlequin.co.uk by holly.cam.harlequin.co.uk; Wed, 31 May 1995 00:04:21 +0100 Received: from bessie.harlequin.co.uk (bessie.cam.harlequin.co.uk) by rocannon.cam.harlequin.co.uk; Wed, 31 May 1995 00:04:19 +0100 Date: Tue, 30 May 1995 19:02:47 -0400 Message-Id: <1204.9505302302@bessie.harlequin.co.uk> To: es@hawkwind.utcs.toronto.edu From: Paul Haahr Reply-To: Paul Haahr Subject: the ever-forthcoming next release of es... ... is actually very close to being done, only a little more than two years after I first promised it. What's most embarrassing is that very little of this wasn't done two years ago. (Not bad: es slipped even more than Windows 95.) A feature-complete, but under-documented and probably buggy, alpha release is now available as ftp.sys.utoronto.ca:/pub/es/es-0.9-alpha1.tar.gz Thanks to Chris Siebenmann for making this available. A caution: The interaction with readline has been cleaned up (I have no idea how it actually worked before) but there are still bugs. Notably, when running on SunOS 4, and perhaps other systems, it is *strongly* advised that if you use readline, you disable HANDLE_SIGNALS. I haven't been able to find the problem, but it appears that a readline which catches signals plus a SIGINT leads to an infinite loop in the readline code. Other than that, Mrs. Lincoln, it feels quote robust. On the other hand, 0.84 has been more robust than I ever expected it to be, so I'll probably be disappointed with this one. Further, that I put bug fixes in after two years away from thinking about es, should be a concern. I would like to do an alpha2 soon to fix bugs that I've introduced, so please let me know what doesn't work. As to new features or changes, see the CHANGES file, but here are some of the highlights: I did add the %read builtin that has been long asked for by some people, but with the absolutely simplest semantics I could think of. Let's see how well this works before trying to add any fancy features. A ~~ operator has been added for pattern extraction. ~~ is like ~, except that instead of returning true or false, it returns the parts of the strings that matched the wildcards in the pattern. Examples: ; echo <={ ~~ (foo.c foo.x bar.h) *.[ch] } foo c bar h ; ls flow.dylan flow.idyl library.dylan mop.dylan mop.idyl ; for (i = <={ ~~ * *.idyl }) mv $i.dylan $i.pdyl && mv $i.idyl $i.dylan ; ls flow.dylan flow.pdyl library.dylan mop.dylan mop.pdyl ; Let and local do parallel binding; that is, all right-hand sides are evaluated before any variables are bound. Let, local, for, assignment, and variable reference all now permit the use of multiple variables. Some may complain that ~~ and %read are creatures that should have fept in. For %read, I probably agree, but a lot of people have said it will enable to do things in es that they want to, but can't right now for reasons of efficiency. ~~ was added in lieu of the suggestions for adding a built-in expr, regular expressions, or ksh/mk/make-style variable munging. My observation is that it's actually just a generalization of the pattern matching that the shell already does, and a useful one. There's some feeling of more consistency between ~ and ~~ than ~ and some regular expression manipulation, because the pattern language is the same. Enjoy. Paul From es-owner Mon Jun 19 15:00:25 1995 Received: from hilly.harlequin.com ([198.3.232.58]) by hawkwind.utcs.utoronto.ca with SMTP id <24179>; Mon, 19 Jun 1995 14:57:58 -0400 Received: from ensoniq.seattle.harlequin.com by hilly.harlequin.com; Mon, 19 Jun 1995 14:57:05 -0400 Message-Id: <2013.199506191857@ensoniq.seattle.harlequin.com> To: es@hawkwind.utcs.toronto.edu Subject: Reading through files Reply-To: gregoir@harlequin.com Date: Mon, 19 Jun 1995 14:57:01 -0400 From: "Gregory L. Snead" Hello, I'm missing something conceptually. I have a file that I want to read through one line at a time and perform some type of operation in es using the data read in. I've read through the man page a couple of times and I don't see how I can do this. What am I missing? How do I do this? Thanks! -- gregoir --- "If at first you don't succeed, then skydiving is not for you!" -- "Sideshow." Pike Place Market. From es-owner Mon Jun 19 15:57:29 1995 Received: from motgate.mot.com ([129.188.136.100]) by hawkwind.utcs.utoronto.ca with SMTP id <24179>; Mon, 19 Jun 1995 15:56:54 -0400 Received: from pobox.mot.com (pobox.mot.com [129.188.137.100]) by motgate.mot.com (8.6.11/8.6.10/MOT-3.7) with ESMTP id OAA14100 for ; Mon, 19 Jun 1995 14:56:43 -0500 Received: from comm.mot.com (il02dns1.comm.mot.com [145.1.3.2]) by pobox.mot.com (8.6.11/8.6.10/MOT-3.7) with SMTP id OAA25397 for ; Mon, 19 Jun 1995 14:56:42 -0500 Received: from supra.comm.mot.com by comm.mot.com (4.1/SMI-4.0) id AA15588; Mon, 19 Jun 95 14:56:44 CDT Received: by supra.comm.mot.com (4.1/SMI-4.1) id AA04150; Mon, 19 Jun 95 14:54:31 CDT Date: Mon, 19 Jun 1995 15:54:31 -0400 From: rittle@comm.mot.com (Loren James Rittle) Message-Id: <9506191954.AA04150@supra.comm.mot.com> To: gregoir@harlequin.com Cc: es@hawkwind.utcs.toronto.edu In-Reply-To: <2013.199506191857@ensoniq.seattle.harlequin.com> (gsnead@harlequin.com) Subject: Re: Reading through files Reply-To: rittle@comm.mot.com Comments: Hyperbole mail buttons accepted, v3.16. >Date: Mon, 19 Jun 1995 14:57:01 -0400 >From: "Gregory L. Snead" > I'm missing something conceptually. I have a file that I want >to read through one line at a time and perform some type of >operation in es using the data read in. I've read through >the man page a couple of times and I don't see how I can do this. >What am I missing? How do I do this? Although the on-line manual gives you everything you need, some synthesis must be done to put the pieces together. Here is a quick example: for (i= `` \n {cat /etc/passwd}) # in turn, i is assigned each line from file {j= <={%fsplit : $i}; # i is broken down into fields in temp j echo $j(1)} # the symbolic user id is printed for line i See on-line es manual for details on %fsplit, `` ifs-list { command }, and for (var = list) command -- Loren J. Rittle (rittle@comm.mot.com) Ripem-1.2 MD5OfPublicKey: Systems Technology Research (IL02/2240) D2CE4A0F2BABF33AEF10C8C669DD782D Motorola, Inc. PGP-2.6 Key fingerprint: (708) 576-7794 6810D8AB3029874DD7065BC52067EAFD From es-owner Tue Jun 20 03:29:32 1995 Received: from cegelecproj.co.uk ([159.245.72.6]) by hawkwind.utcs.utoronto.ca with SMTP id <24182>; Tue, 20 Jun 1995 03:28:33 -0400 Received: from vampire.cegelecproj.co.uk (cerberus.cegelecproj.co.uk) by cegelecproj.co.uk (4.1/SMI-4.1) id AA10348; Tue, 20 Jun 95 08:28:18 BST Received: from spirit.cegelecproj.co.uk (spirit.limbo.cegelecproj.co.uk) by vampire.cegelecproj.co.uk (5.0/SMI-SVR4) id AA19241; Tue, 20 Jun 1995 08:28:16 +0100 Received: by spirit.cegelecproj.co.uk (5.0/SMI-SVR4) id AA01500; Tue, 20 Jun 1995 08:28:12 +0100 Date: Tue, 20 Jun 1995 03:28:12 -0400 From: Steve_Kilbane@cegelecproj.co.uk (Steve_Kilbane) Message-Id: <9506200728.AA01500@spirit.cegelecproj.co.uk> X-Planation: X-Faces images can be viewed with the XFaces program To: es@hawkwind.utcs.toronto.edu Subject: Re: Reading through files Content-Length: 1188 X-Face: Iqsa(US9p?)Y^W+6Ff[Z]rM"uFE) lFDjag1e]\/#2 "Gregory L. Snead" writes: > I have a file that I want >to read through one line at a time and perform some type of >operation in es using the data read in. rittle@comm.mot.com (Loren James Rittle) replies: > Here is a > quick example: > > for (i= `` \n {cat /etc/passwd}) Ugh. Well, it works, and it's what I use, but it's lousy for use in scripts; es already takes up enough memory without snarfing a whole file (including putting it into the environment), when you only want to look at it one line at a time. This is something that used to come up on the list a lot when es first escaped (:-)), and I'm not tremendously happy with the final results - which, as it happens, I can't remember anyway. One method was to use line. Problem is, you can't tell if you've read a blank line or reached the end. This is my main bug-bear with rc/es. When I used rc, I used to hack each release so that I could do: while (x = `line) { something_with $x } as you can do with the Bourne shell. I haven't bothered with es - I've just used Perl when I know I'm going to be processing arbitrarily large files. Sigh. I'd still like access to the status of `prog... steve From es-owner Tue Jun 20 04:01:51 1995 Received: from netcom8.netcom.com ([192.100.81.117]) by hawkwind.utcs.utoronto.ca with SMTP id <24183>; Tue, 20 Jun 1995 04:01:27 -0400 Received: by netcom8.netcom.com (8.6.12/Netcom) id IAA04418; Tue, 20 Jun 1995 08:56:31 +0100 Date: Tue, 20 Jun 1995 03:56:31 -0400 From: haahr@netcom.com (Paul Haahr) Message-Id: <199506200756.IAA04418@netcom8.netcom.com> To: gregoir@harlequin.com Cc: es@hawkwind.utcs.toronto.edu Subject: Re: Reading through files In-Reply-To: <2013.199506191857@ensoniq.seattle.harlequin.com> References: <2013.199506191857@ensoniq.seattle.harlequin.com> Gregory L. Snead wrote: > I'm missing something conceptually. I have a file that I want > to read through one line at a time and perform some type of > operation in es using the data read in. I've read through > the man page a couple of times and I don't see how I can do this. > What am I missing? How do I do this? Loren James Rittle's answer (read the whole file with backquote, iterate through the lines) should work just fine. However, with es-0.9-alpha1, there is a new answer, the %read primitive, which was urged on me by the readers of this list. It should do want you want. Paul From es-owner Tue Jun 20 04:11:51 1995 Received: from netcom8.netcom.com ([192.100.81.117]) by hawkwind.utcs.utoronto.ca with SMTP id <24184>; Tue, 20 Jun 1995 04:11:29 -0400 Received: by netcom8.netcom.com (8.6.12/Netcom) id JAA05020; Tue, 20 Jun 1995 09:06:39 +0100 Date: Tue, 20 Jun 1995 04:06:39 -0400 From: haahr@netcom.com (Paul Haahr) Message-Id: <199506200806.JAA05020@netcom8.netcom.com> To: Steve_Kilbane@cegelecproj.co.uk (Steve_Kilbane) Cc: es@hawkwind.utcs.toronto.edu Subject: Re: Reading through files In-Reply-To: <9506200728.AA01500@spirit.cegelecproj.co.uk> References: <9506200728.AA01500@spirit.cegelecproj.co.uk> Steve Kilbane wrote > rittle@comm.mot.com (Loren James Rittle) replies: > > for (i= `` \n {cat /etc/passwd}) > > Ugh. Well, it works, and it's what I use, but > it's lousy for use in scripts; es already takes up > enough memory without snarfing a whole file (including > putting it into the environment), when you only want > to look at it one line at a time. You don't have to put it in a variable. the example above doesn't. If you put it into a variable, that doesn't have to be exportd: let-bound (lexically scoped) variables, function arguments, and variables listed in $noexport aren't exported. > One method was to use line. Problem is, you can't tell > if you've read a blank line or reached the end. This is > my main bug-bear with rc/es. When I used rc, I used to > hack each release so that I could do: > > while (x = `line) { > something_with $x > } > > as you can do with the Bourne shell. I haven't bothered > with es - I've just used Perl when I know I'm going to > be processing arbitrarily large files. > > Sigh. I'd still like access to the status of `prog... Es and rc now return the status of the most recent backquoted command in $bqstatus. (Es actually returns it in the first result of $&backquote, but %backquote stores it in that variable.) Paul From es-owner Tue Jun 20 04:18:51 1995 Received: from motgate.mot.com ([129.188.136.100]) by hawkwind.utcs.utoronto.ca with SMTP id <24185>; Tue, 20 Jun 1995 04:18:13 -0400 Received: from pobox.mot.com (pobox.mot.com [129.188.137.100]) by motgate.mot.com (8.6.11/8.6.10/MOT-3.7) with ESMTP id DAA28540 for ; Tue, 20 Jun 1995 03:18:00 -0500 Received: from comm.mot.com (il02dns1.comm.mot.com [145.1.3.2]) by pobox.mot.com (8.6.11/8.6.10/MOT-3.7) with SMTP id DAA03042 for ; Tue, 20 Jun 1995 03:18:00 -0500 Received: from supra.comm.mot.com by comm.mot.com (4.1/SMI-4.0) id AA09459; Tue, 20 Jun 95 03:17:59 CDT Received: by supra.comm.mot.com (4.1/SMI-4.1) id AA02477; Tue, 20 Jun 95 03:15:48 CDT Date: Tue, 20 Jun 1995 04:15:48 -0400 From: rittle@comm.mot.com (Loren James Rittle) Message-Id: <9506200815.AA02477@supra.comm.mot.com> To: haahr@netcom.com Cc: gregoir@harlequin.com, es@hawkwind.utcs.toronto.edu In-Reply-To: <199506200756.IAA04418@netcom8.netcom.com> (haahr@netcom.com) Subject: Re: Reading through files Reply-To: rittle@comm.mot.com Comments: Hyperbole mail buttons accepted, v3.16. >Date: Tue, 20 Jun 1995 03:56:31 -0400 >From: haahr@netcom.com (Paul Haahr) >Loren James Rittle's answer (read the whole file with backquote, iterate >through the lines) should work just fine. However, with es-0.9-alpha1, >there is a new answer, the %read primitive, which was urged on me by the >readers of this list. It should do want you want. Of course! I have lived without %read for so long that I forgot it had been added recently. Yes, I agree that for some problem sizes, %read should be considered before the approach that dumps the entire file into the environment. Also, %read allows interactive uses that were really hard to do under es before %read was added. Regards, Loren From es-owner Tue Jun 20 10:08:53 1995 Received: from salmon.maths.tcd.ie ([134.226.81.11]) by hawkwind.utcs.utoronto.ca with SMTP id <24179>; Tue, 20 Jun 1995 10:07:46 -0400 Received: from bell.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id aa15479; 20 Jun 95 15:07 BST Date: Tue, 20 Jun 1995 10:07:06 -0400 From: jcasey@maths.tcd.ie To: es@hawkwind.utcs.toronto.edu Message-ID: <9506201507.aa28562@bell.maths.tcd.ie> unsubscribe jcasey@maths.tcd.ie From es-owner Tue Jun 20 13:55:14 1995 Received: from en.ecn.purdue.edu ([128.46.128.59]) by hawkwind.utcs.utoronto.ca with SMTP id <24182>; Tue, 20 Jun 1995 13:54:35 -0400 Received: from en.ecn.purdue.edu (lchen@localhost) by en.ecn.purdue.edu (8.6.12/3.6davy) id MAA05733; Tue, 20 Jun 1995 12:54:21 -0500 Message-Id: <199506201754.MAA05733@en.ecn.purdue.edu> From: Lin D Chen Subject: unsubscribe To: es@hawkwind.utcs.toronto.edu Date: Tue, 20 Jun 1995 13:54:20 -0400 X-Mailer: ELM [version 2.4 PL21] Content-Type: text Content-Length: 33 unsubscribe lchen@ecn.purdue.edu From es-owner Wed Jun 21 09:26:22 1995 Received: from salmon.maths.tcd.ie ([134.226.81.11]) by hawkwind.utcs.utoronto.ca with SMTP id <24182>; Wed, 21 Jun 1995 09:24:58 -0400 Received: from gosset.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id aa07238; 21 Jun 95 13:43 BST To: es@hawkwind.utcs.toronto.edu From: Eoin Cronan MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3268.803738607.1@maths.tcd.ie> Date: Wed, 21 Jun 1995 08:43:28 -0400 Sender: ecronan@maths.tcd.ie Message-ID: <9506211343.aa07238@salmon.maths.tcd.ie> unsubscribe ecronan@maths.tcd.ie From es-owner Mon Jul 17 06:01:28 1995 Received: from holly.cam.harlequin.co.uk ([193.128.4.58]) by hawkwind.utcs.utoronto.ca with SMTP id <24086>; Mon, 17 Jul 1995 05:58:37 -0400 Received: from rocannon.cam.harlequin.co.uk by holly.cam.harlequin.co.uk; Mon, 17 Jul 1995 10:58:20 +0100 Received: from bessie.harlequin.co.uk (bessie.cam.harlequin.co.uk) by rocannon.cam.harlequin.co.uk; Mon, 17 Jul 1995 10:58:18 +0100 Date: Mon, 17 Jul 1995 05:56:22 -0400 Message-Id: <4568.9507170956@bessie.harlequin.co.uk> To: es@hawkwind.utcs.toronto.edu From: Paul Haahr Reply-To: Paul Haahr Subject: cd tracking symbolic links (I hesitate to raise this issue, because two years ago we had a long debate over what the shell should do, but it came up in a private discussion I was in and, since I wrote the code, I thought someone might be interested in it. I don't think it's the right thing for the shell to do, but other people do. Es is about being able to customize the shell in interesting ways. Vive la difference.) Enclosed is a spoofing of cd and pwd to give es the same behavior as (ba k tc z)^sh when cd'ing across symbolic links: with this change, cd .. always takes one back one directory in the path, not to the parent directory in on-disk structure. I believe that this has to be installed before $cdpath searching, if you use both of them in combination. Paul ---- # es hack to make cd "follow" symbolic links, so that cd symlink/.. # returns one to the intial directory, not the parent of the directory # pointed to by the symlink. fn pwd { if {~ $#cwd 0} { noexport = $noexport cwd cwd = `` \n /bin/pwd } echo $cwd } let (cd = $fn-cd) fn cd dir { if {~ $#cwd 0} { noexport = $noexport cwd } if {~ $#dir 0} { $cd cwd = ~ } { let (current = <={ if {~ $dir /*} { result } { if {~ $#cwd 0} { cwd = `` \n /bin/pwd } %split / $cwd } }) { for (name = <={%split / $dir}) { if {~ $name ..} { if {!~ $#current 0} { let (x = 1 $current) current = $x(2 ... $#current) } } {!~ $name . ''} { current = $current $name } } let (path = / ^ <={ %flatten / $current }) { $cd $path cwd = $path } } } } From es-owner Mon Jul 17 11:37:05 1995 Received: from hilly.harlequin.com ([198.3.232.58]) by hawkwind.utcs.utoronto.ca with SMTP id <24086>; Mon, 17 Jul 1995 11:36:05 -0400 Received: from ensoniq.seattle.harlequin.com by hilly.harlequin.com; Mon, 17 Jul 1995 11:35:45 -0400 Message-Id: <27381.199507171535@ensoniq.seattle.harlequin.com> To: Paul Haahr Cc: es@hawkwind.utcs.toronto.edu Subject: Re: cd tracking symbolic links In-Reply-To: Your message of "Mon, 17 Jul 1995 05:56:22 EDT." <4568.9507170956@bessie.harlequin.co.uk> Rely-To: gregoir@harlequin.com Date: Mon, 17 Jul 1995 11:35:40 -0400 From: "Gregory L. Snead" Paul> (I hesitate to raise this issue, because two years ago we Paul> had a long debate over what the shell should do, but it Paul> came up in a private discussion I was in and, since I Paul> wrote the code, I thought someone might be interested in Paul> it. I don't think it's the right thing for the shell to Paul> do, but other people do. Es is about being able to Paul> customize the shell in interesting ways. Vive la Paul> difference.) Paul, I'm curious of your reasons why this isn't the right thing to do. NOTE: I don't have a strong opinion about this (to be honest, I haven't thought about this particular topic), so this message is not a red herring. I'm not interested in a religious war over this, so I ask all those thus inclined to show some restraint. Paul> I believe that this has to be installed before $cdpath Paul> searching, if you use both of them in combination. I'm not sure how to do this. When is $cdpath searching installed? I use es-0.84 on SunOS 4.1.3. -- gregoir From es-owner Mon Jul 17 12:00:54 1995 Received: from netcom8.netcom.com ([192.100.81.117]) by hawkwind.utcs.utoronto.ca with SMTP id <24086>; Mon, 17 Jul 1995 12:00:32 -0400 Received: by netcom8.netcom.com (8.6.12/Netcom) id QAA06725; Mon, 17 Jul 1995 16:58:20 +0100 Date: Mon, 17 Jul 1995 11:58:20 -0400 From: haahr@netcom.com (Paul Haahr) Message-Id: <199507171558.QAA06725@netcom8.netcom.com> To: "Gregory L. Snead" Cc: es@hawkwind.utcs.toronto.edu Subject: Re: cd tracking symbolic links In-Reply-To: <27381.199507171535@ensoniq.seattle.harlequin.com> References: <4568.9507170956@bessie.harlequin.co.uk> <27381.199507171535@ensoniq.seattle.harlequin.com> Gregory L. Snead wrote > I'm curious of your reasons why this isn't the right thing to do. Because then ``ls ..'' disagrees with ``cd ..; ls'' and I get confused by that. Other people don't; this hack's for them. > Paul> I believe that this has to be installed before $cdpath > Paul> searching, if you use both of them in combination. > > I'm not sure how to do this. When is $cdpath searching > installed? Oops. I forgot. $cdpath searching is done in initial.es in 0.84 and earlier releases; in 0.9alpha1, it's not a builtin part of the shell, but something that can be added after the fact. I guess you could take cdpath out of the 0.84 initial.es or put this hack in there, but I'd recommend upgrading to the new version. Paul From es-owner Mon Jul 17 13:33:34 1995 Received: from galapagos.cse.psu.edu ([130.203.2.12]) by hawkwind.utcs.utoronto.ca with SMTP id <24086>; Mon, 17 Jul 1995 13:33:06 -0400 Received: from localhost by galapagos.cse.psu.edu with SMTP id <12689>; Mon, 17 Jul 1995 13:32:36 -0400 To: haahr@netcom.com (Paul Haahr) cc: "Gregory L. Snead" , es@hawkwind.utcs.toronto.edu Subject: Re: cd tracking symbolic links In-reply-to: Your message of "Mon, 17 Jul 1995 11:58:20 EDT." <199507171558.QAA06725@netcom8.netcom.com> Date: Mon, 17 Jul 1995 13:32:30 -0400 From: Scott Schwartz Message-Id: <95Jul17.133236edt.12689@galapagos.cse.psu.edu> | Gregory L. Snead wrote | > I'm curious of your reasons why this isn't the right thing to do. | | Because then ``ls ..'' disagrees with ``cd ..; ls'' and I get confused | by that. Other people don't; this hack's for them. Paul is right that asymmetry between shell and kernel is irritating. I tend to blame ".." itself, which is a questionable feature when your filesystem isn't really a tree. If you have symbolic links (or worse, union mounts or mounted streams) then ".." yields surprises all too often. If chdir's semantics were to set a default prefix this wouldn't happen. Enlightened systems like Sprite and QNX use prefix tables internally instead of mount points anyway, so there is precident for this, aside from VMS. :-) From es-owner Mon Jul 17 17:24:19 1995 Received: from hilly.harlequin.com ([198.3.232.58]) by hawkwind.utcs.utoronto.ca with SMTP id <24086>; Mon, 17 Jul 1995 17:23:48 -0400 Received: from ensoniq.seattle.harlequin.com by hilly.harlequin.com; Mon, 17 Jul 1995 17:23:41 -0400 Message-Id: <29284.199507172123@ensoniq.seattle.harlequin.com> To: Scott Schwartz Cc: haahr@netcom.com (Paul Haahr), es@hawkwind.utcs.toronto.edu Subject: Re: cd tracking symbolic links In-Reply-To: Your message of "Mon, 17 Jul 1995 13:32:30 EDT." <95Jul17.133236edt.12689@galapagos.cse.psu.edu> Date: Mon, 17 Jul 1995 17:23:36 -0400 From: "Gregory L. Snead" | Gregory L. Snead wrote | > I'm curious of your reasons why this isn't the right thing to do. | | Because then ``ls ..'' disagrees with ``cd ..; ls'' and I get confused | by that. Other people don't; this hack's for them. Scott> Paul is right that asymmetry between shell and kernel is Scott> irritating. I tend to blame ".." itself, which is a Scott> questionable feature when your filesystem isn't really a Scott> tree. If you have symbolic links (or worse, union mounts Scott> or mounted streams) then ".." yields surprises all too Scott> often. If chdir's semantics were to set a default prefix Scott> this wouldn't happen. Enlightened systems like Sprite Scott> and QNX use prefix tables internally instead of mount Scott> points anyway, so there is precident for this, aside from Scott> VMS. :-) Scott, If I understand you correctly, then I tend to use es this way. For example, if I'm going to use a couple of directories on a regular basis, I will assign them to a variable. I will prepend this variable to file I access. A sample session to first define a few things ; a=~something/dir1 ; b=/disk2/product/sources ; c=/usr/local/lib/lisp ; fn d x y { diff $x $y | more } ; fn m x y { more $x $y } Then use them ; d $a/file1 $b/file2 Using command line editing to change the "d" to an "m" ; ^p^a^dm ; m $a/file1 $b/file2 I only do this when I need to perform the same operation repeatedly during the life of a project. In the Unix paradigm, I guess this is what you're talking about. I haven't use VMS in a while (and I'm not familiar with QNX or Sprite) would you provide an example of using prefix tables? (I know, this is off the original subject). -- gregoir From es-owner Mon Jul 17 20:24:38 1995 Received: from galapagos.cse.psu.edu ([130.203.2.12]) by hawkwind.utcs.utoronto.ca with SMTP id <24086>; Mon, 17 Jul 1995 20:23:59 -0400 Received: from localhost by galapagos.cse.psu.edu with SMTP id <12689>; Mon, 17 Jul 1995 20:23:34 -0400 To: "Gregory L. Snead" cc: haahr@netcom.com (Paul Haahr), es@hawkwind.utcs.toronto.edu Subject: Re: cd tracking symbolic links In-reply-to: Your message of "Mon, 17 Jul 1995 17:23:36 EDT." <29284.199507172123@ensoniq.seattle.harlequin.com> Date: Mon, 17 Jul 1995 20:23:26 -0400 From: Scott Schwartz Message-Id: <95Jul17.202334edt.12689@galapagos.cse.psu.edu> | In the Unix paradigm, I guess this is what you're talking | about. I haven't use VMS in a while (and I'm not familiar with | QNX or Sprite) would you provide an example of using prefix | tables? (I know, this is off the original subject). This is pretty vague, because I haven't slept much today, but the idea I was proposing is that if mutiple paths can lead to a directory, then a processes idea of the path it took to get to the current directory is more important than "." or "..". So the kernel should store cwd as the path build up by chdir(), not the [ivrg]node of the directory. Then, in the kernel, chdir("..") would be defined to be the same as clipping off the tail of the current path, not following hard links in the filesystem. The mount point thing is suggestive because in unix, filesystems are mounted on inodes, but another way to do it is to store a table of mappings from pathnames to filesystems, and look for prefixes in that table to decide which filesystem some path operation is aimed at. So who needs inodes or "." and ".." as actual directory entries. From es-owner Tue Jul 18 08:33:27 1995 Received: from MIT.EDU ([18.72.0.21]) by hawkwind.utcs.utoronto.ca with SMTP id <24086>; Tue, 18 Jul 1995 08:31:39 -0400 Received: from DRAGONS-LAIR.MIT.EDU by MIT.EDU with SMTP id AA28756; Tue, 18 Jul 95 08:31:24 EDT From: gsstark@MIT.EDU Received: by dragons-lair.MIT.EDU (8.6.11/4.7) id IAA03125; Tue, 18 Jul 1995 08:31:20 -0400 Date: Tue, 18 Jul 1995 08:31:20 -0400 Message-Id: <199507181231.IAA03125@dragons-lair.MIT.EDU> To: haahr@netcom.com Cc: es@hawkwind.utcs.toronto.edu In-Reply-To: <4568.9507170956@bessie.harlequin.co.uk> (message from Paul Haahr on Mon, 17 Jul 1995 05:56:22 -0400) Subject: Re: cd tracking symbolic links I'm surprised users of es, of all shells, would get confused about this. If the meaning of .. depends on how you reached the directory then what you have is dynamic scoping and nothing works right. Without closures, scripts or programs would break; symlinks to files would work differently than the original files; basically all hell breaks loose and your system is much less powerful. Talk to the people dealing with URL semantics which are broken in pretty much the way you describe. greg From es-owner Tue Jul 18 08:49:43 1995 Received: from holly.cam.harlequin.co.uk ([193.128.4.58]) by hawkwind.utcs.utoronto.ca with SMTP id <24086>; Tue, 18 Jul 1995 08:49:24 -0400 Received: from rocannon.cam.harlequin.co.uk by holly.cam.harlequin.co.uk; Tue, 18 Jul 1995 13:49:12 +0100 Received: from bessie.harlequin.co.uk (bessie.cam.harlequin.co.uk) by rocannon.cam.harlequin.co.uk; Tue, 18 Jul 1995 13:49:10 +0100 Date: Tue, 18 Jul 1995 08:47:11 -0400 Message-Id: <13243.9507181247@bessie.harlequin.co.uk> To: es@hawkwind.utcs.toronto.edu From: Paul Haahr Reply-To: Paul Haahr Subject: Re: cd tracking symbolic links In-Reply-To: <199507181231.IAA03125@dragons-lair.MIT.EDU> References: <4568.9507170956@bessie.harlequin.co.uk> <199507181231.IAA03125@dragons-lair.MIT.EDU> > I'm surprised users of es, of all shells, would get confused about this. Please, let's not restart this flamefest. I'm regretting I posted the cd hack I sent out. Some people prefer one behavior, others prefer another. Both sides have opinions that reflect what works for them, neither are stupid or nazi-like based on their opinion. Es is meant to be customizable; my customization may be your bug, but it doesn't affect you, so who cares? If anyone wants to continue this debate, I'll happily set up a mailing list to continue it on and forward the 50 or so notes on the subject from the es list two years ago. Paul From es-owner Tue Jul 18 16:13:01 1995 Received: from hilly.harlequin.com ([198.3.232.58]) by hawkwind.utcs.utoronto.ca with SMTP id <24086>; Tue, 18 Jul 1995 16:12:09 -0400 Received: from ensoniq.seattle.harlequin.com by hilly.harlequin.com; Tue, 18 Jul 1995 16:11:50 -0400 Message-Id: <4746.199507182011@ensoniq.seattle.harlequin.com> To: es@hawkwind.utcs.toronto.edu Subject: testing, counting, & arithmetic in general Date: Tue, 18 Jul 1995 16:11:46 -0400 From: "Gregory L. Snead" Is this how I'm expected to do this type of operation in es? i=1 while {test $i -le 10} { echo $i i=`{expr $i + 1} } I.e. use "/bin/test" for conditionals (where ~ and ~~ aren't appropriate) and "/bin/expr" for arithmetic operations? -- gregoir From es-owner Tue Jul 18 17:24:49 1995 Received: from motgate.mot.com ([129.188.136.100]) by hawkwind.utcs.utoronto.ca with SMTP id <24086>; Tue, 18 Jul 1995 17:23:32 -0400 Received: from pobox.mot.com (pobox.mot.com [129.188.137.100]) by motgate.mot.com (8.6.11/8.6.10/MOT-3.7) with ESMTP id QAA09648 for ; Tue, 18 Jul 1995 16:23:25 -0500 Received: from comm.mot.com (il02dns1.comm.mot.com [145.1.3.2]) by pobox.mot.com (8.6.11/8.6.10/MOT-3.7) with SMTP id QAA06725 for ; Tue, 18 Jul 1995 16:23:23 -0500 Received: from supra.comm.mot.com by comm.mot.com (4.1/SMI-4.0) id AA27565; Tue, 18 Jul 95 16:23:25 CDT Received: by supra.comm.mot.com (4.1/SMI-4.1) id AA11113; Tue, 18 Jul 95 16:21:01 CDT Date: Tue, 18 Jul 1995 17:21:01 -0400 Message-Id: <9507182121.AA11113@supra.comm.mot.com> From: Loren James Rittle To: gsnead@harlequin.com Cc: es@hawkwind.utcs.toronto.edu In-Reply-To: <4746.199507182011@ensoniq.seattle.harlequin.com> (gsnead@harlequin.com) Subject: Re: testing, counting, & arithmetic in general Reply-To: rittle@comm.mot.com Comments: Hyperbole mail buttons accepted, v3.16. >Date: Tue, 18 Jul 1995 16:11:46 -0400 >From: "Gregory L. Snead" > Is this how I'm expected to do this type of operation in es? > > i=1 > while {test $i -le 10} { > echo $i > i=`{expr $i + 1} > } > > > I.e. use "/bin/test" for conditionals (where ~ and ~~ aren't >appropriate) and "/bin/expr" for arithmetic operations? You might try something ~2 orders of magnitude faster for large loop counts: for (i = `{bc <<< 'for (i = 1; i <= 1000; i++) i'\n}) \ {echo $i} u=rittle@supra; time { i=1 while {test $i -le 1000}{ echo $i i=`{expr $i + 1} } } >/dev/null 92r 18.7u 58.4s {...} u=rittle@supra; time {for (i=`{bc <<<'for(i=1;i<=1000;i++)i'\n}){echo $i}} >/dev/null 1r 0.6u 0.7s {...} -- Loren J. Rittle (rittle@comm.mot.com) Ripem-1.2 MD5OfPublicKey: Systems Technology Research (IL02/2240) D2CE4A0F2BABF33AEF10C8C669DD782D Motorola, Inc. PGP-2.6 Key fingerprint: (708) 576-7794 6810D8AB3029874DD7065BC52067EAFD From es-owner Tue Jul 18 18:36:06 1995 Received: from za.cfa.org ([192.217.242.52]) by hawkwind.utcs.utoronto.ca with SMTP id <24087>; Tue, 18 Jul 1995 18:35:26 -0400 Received: by za.cfa.org (NX5.67e/NX3.0M) id AA02746; Tue, 18 Jul 95 17:35:13 -0700 Date: Tue, 18 Jul 1995 20:35:13 -0400 From: Tony Kimball Message-Id: <9507190035.AA02746@za.cfa.org> To: rittle@comm.mot.com Cc: gsnead@harlequin.com, es@hawkwind.utcs.toronto.edu In-Reply-To: Loren James Rittle's message of Tue, 18 Jul 1995 17:21:01 -0400 <9507182121.AA11113@supra.comm.mot.com> Subject: testing, counting, & arithmetic in general They are of course *all* grotesque, which is the reason why the first thing I did when I got the es sources so many years ago was to add intrinsic arithmetic, logical, and range operators. From es-owner Tue Jul 18 19:31:53 1995 Received: from galapagos.cse.psu.edu ([130.203.2.12]) by hawkwind.utcs.utoronto.ca with SMTP id <24087>; Tue, 18 Jul 1995 19:31:25 -0400 Received: by galapagos.cse.psu.edu id <12689>; Tue, 18 Jul 1995 19:31:09 -0400 From: Scott Schwartz To: es@hawkwind.utcs.toronto.edu Subject: testing, counting, & arithmetic in general Message-Id: <95Jul18.193109edt.12689@galapagos.cse.psu.edu> Date: Tue, 18 Jul 1995 19:31:00 -0400 You've got first class functions---that's all you need to implement church numerals, so you're all set. :-) From es-owner Tue Jul 18 23:04:31 1995 Received: from holly.cam.harlequin.co.uk ([193.128.4.58]) by hawkwind.utcs.utoronto.ca with SMTP id <24088>; Tue, 18 Jul 1995 23:03:34 -0400 Received: from rocannon.cam.harlequin.co.uk by holly.cam.harlequin.co.uk; Wed, 19 Jul 1995 04:02:50 +0100 Received: from bessie.harlequin.co.uk (bessie.cam.harlequin.co.uk) by rocannon.cam.harlequin.co.uk; Wed, 19 Jul 1995 04:02:47 +0100 Date: Tue, 18 Jul 1995 23:00:45 -0400 Message-Id: <14316.9507190300@bessie.harlequin.co.uk> To: "Gregory L. Snead" From: Paul Haahr Reply-To: Paul Haahr Cc: es@hawkwind.utcs.toronto.edu Subject: Re: testing, counting, & arithmetic in general In-Reply-To: <4746.199507182011@ensoniq.seattle.harlequin.com> References: <4746.199507182011@ensoniq.seattle.harlequin.com> > Is this how I'm expected to do this type of operation in es? > i=1 > while {test $i -le 10} { > echo $i > i=`{expr $i + 1} > } > I.e. use "/bin/test" for conditionals (where ~ and ~~ aren't > appropriate) and "/bin/expr" for arithmetic operations? Since there's no builtin shell arithmetic, the usual answer is yes. I usually do the operations you're doing there with lists, but I'm the first to admit that's a hack. For example, x = 1 while {~ $x(10) ()} { echo $#x x = 1 $x } Subtraction is done with things like ``x = $x(2 ...)''. It's awkward, but it works well for small integers. Another approach, which is used for creating a sequence of numbers that might be large is using awk or (if you have it, seq) for (i = `{seq 212 451}) { echo $i } Paul From es-owner Fri Jul 21 01:05:33 1995 Received: from hilly.harlequin.com ([198.3.232.58]) by hawkwind.utcs.utoronto.ca with SMTP id <24099>; Fri, 21 Jul 1995 00:59:42 -0400 Received: from ensoniq.seattle.harlequin.com by hilly.harlequin.com; Thu, 20 Jul 1995 19:29:46 -0400 Message-Id: <23205.199507202329@ensoniq.seattle.harlequin.com> To: haahr@netcom.com Cc: es@hawkwind.utcs.toronto.edu Subject: help using ~~ Date: Thu, 20 Jul 1995 19:29:43 -0400 From: "Gregory L. Snead" Paul, I'm trying out pattern extraction, but I'm not getting what I want. What am I doing something wrong? Here is what I want to do: Given the file name b0302001.lisp I want to convert it to d0302001.lisp p0302001.lisp I need to do this for a large number of files. Here's what I tried ; echo <={~~ (b0302001.lisp) b???????.lisp} 0 3 0 2 0 0 1 ; echo <= {~~ (b0302001.lisp) b*.lisp} ; The first try extracted what I wanted but in the wrong form. I expected the results to be 0302001 not 0 3 0 2 0 0 1 The second try didn't extract anything. Why not? -- gregoir From es-owner Fri Jul 21 15:49:29 1995 Received: from holly.cam.harlequin.co.uk ([193.128.4.58]) by hawkwind.utcs.utoronto.ca with SMTP id <24120>; Fri, 21 Jul 1995 15:47:33 -0400 Received: from rocannon.cam.harlequin.co.uk by holly.cam.harlequin.co.uk; Fri, 21 Jul 1995 12:05:50 +0100 Received: from bessie.harlequin.co.uk (bessie.cam.harlequin.co.uk) by rocannon.cam.harlequin.co.uk; Fri, 21 Jul 1995 12:05:48 +0100 Date: Fri, 21 Jul 1995 07:03:47 -0400 Message-Id: <27083.9507211103@bessie.harlequin.co.uk> To: "Gregory L. Snead" From: Paul Haahr Reply-To: Paul Haahr Cc: es@hawkwind.utcs.toronto.edu Subject: Re: help using ~~ In-Reply-To: <23205.199507202329@ensoniq.seattle.harlequin.com> References: <23205.199507202329@ensoniq.seattle.harlequin.com> Gregory L. Snead wrote > I'm trying out pattern extraction, but I'm not getting what I > want. What am I doing something wrong? Here is what I want to > do: > > Given the file name > b0302001.lisp > I want to convert it to > d0302001.lisp > p0302001.lisp > > Here's what I tried > ; echo <={~~ (b0302001.lisp) b???????.lisp} > 0 3 0 2 0 0 1 > ; echo <= {~~ (b0302001.lisp) b*.lisp} > > ; > > The first try extracted what I wanted but in the wrong form. I > expected the results to be > 0302001 > not > 0 3 0 2 0 0 1 Each ? is a separate wildcard. The manual says: Each subject is checked in order against each pattern; if it matches the pattern, the parts of the subject which matched each *, ?, or [] character range are extracted, [...] So it's doing what I intended. Coalescing patterns seemed like the wrong thing to do. > The second try didn't extract anything. Why not? It's a bug. Hunting this down proved next to impossible, because I rebuilt a version for the machine you said you use (SunOS 4.1) and it worked just fine, and I couldn't reproduce it on any other machine. But, and this is what drove me crazy, I was able to reproduce the bug in the copy of es in ~/bin/sunos-4 on my machine at work. Looking back at the RCS history, it's a bug from the first version of pattern extraction I had written, which was the last thing I fixed before the release. I didn't notice it was still there because I rarely use suns. So how did Greg trip over it? Well, it just happens that we work at the same company (though 8000 miles apart; we've never met and he was using es before I came here) and I had sent him private mail saying ``You don't have to rebuild; just snarf the copy from my directory.'' [Sound of heading smacking against wall.] Ok, so it was bad advice. Ftp the public release of the shell and build it from scratch; that version works correctly. Paul From es-owner Wed Aug 2 22:46:56 1995 Received: from netcom20.netcom.com ([192.100.81.133]) by hawkwind.utcs.utoronto.ca with SMTP id <24106>; Wed, 2 Aug 1995 22:46:41 -0400 Received: by netcom20.netcom.com (8.6.12/Netcom) id TAA25681; Wed, 2 Aug 1995 19:43:01 -0700 Date: Wed, 2 Aug 1995 22:43:01 -0400 From: debaser@netcom.com (He's the Invisible Man) Message-Id: <199508030243.TAA25681@netcom20.netcom.com> To: es@hawkwind.utcs.toronto.edu Subject: Emacs mode for editing es code? I know this has been asked before (Cf., the 1994 archive of the list), but an answer wasn't forthcoming. Not interested in starting a religious war, but for those of you who _do_ live and code in emacs, what mode do you prefer for writing es scripts? If no one feels like spamming the list with survey data, feel free to mail me personally. Thanks for the time... --- D. Weiskopf From es-owner Tue Aug 22 19:03:31 1995 Received: from midway.uchicago.edu ([128.135.12.73]) by hawkwind.utcs.utoronto.ca with SMTP id <24119>; Tue, 22 Aug 1995 19:00:16 -0400 Received: from woodlawn.uchicago.edu (woodlawn.uchicago.edu [128.135.12.9]) by midway.uchicago.edu (8.6.10/8.6.4) with ESMTP id SAA27040 for ; Tue, 22 Aug 1995 18:00:10 -0500 Received: from woodlawn.uchicago.edu (localhost.uchicago.edu [127.0.0.1]) by woodlawn.uchicago.edu (8.6.10/8.6.4) with ESMTP id RAA14147 for ; Tue, 22 Aug 1995 17:59:34 -0500 Message-Id: <199508222259.RAA14147@woodlawn.uchicago.edu> To: es@hawkwind.utcs.toronto.edu Subject: es-0.90-alpha dumping core on a ~~ Date: Tue, 22 Aug 1995 18:59:33 -0400 From: Soren Dayton woodlawn:~: ; echo <={ variable = <={ %split / $wd } } nfs woodlawn w4 csdayton woodlawn:~: ; echo <={ variable = $variable( 3 ... ) } w4 csdayton woodlawn:~: ; echo <={ ~~ $variable(1) [qwek][0-9] } match.c:206: assertion failed (j != RANGE_FAIL) Process shell abort (core dumped) After a quick glance at the code, I do not see what the problem is... Is there a list of known bugs and patches somewhere? I would really like to use the alpha for reasons like ~~. Thanks Soren From es-owner Tue Aug 22 19:05:25 1995 Received: from midway.uchicago.edu ([128.135.12.73]) by hawkwind.utcs.utoronto.ca with SMTP id <24122>; Tue, 22 Aug 1995 19:03:44 -0400 Received: from woodlawn.uchicago.edu (woodlawn.uchicago.edu [128.135.12.9]) by midway.uchicago.edu (8.6.10/8.6.4) with ESMTP id SAA27364 for ; Tue, 22 Aug 1995 18:02:21 -0500 Received: from woodlawn.uchicago.edu (localhost.uchicago.edu [127.0.0.1]) by woodlawn.uchicago.edu (8.6.10/8.6.4) with ESMTP id SAA14283 for ; Tue, 22 Aug 1995 18:01:43 -0500 Message-Id: <199508222301.SAA14283@woodlawn.uchicago.edu> To: es@hawkwind.utcs.toronto.edu Subject: Oh yeah Date: Tue, 22 Aug 1995 19:01:43 -0400 From: Soren Dayton This is on SunOS 4.1.3_U1 Soren From es-owner Thu Aug 24 07:24:01 1995 Received: from holly.cam.harlequin.co.uk ([193.128.4.58]) by hawkwind.utcs.utoronto.ca with SMTP id <24121>; Thu, 24 Aug 1995 07:21:32 -0400 Received: from rocannon.cam.harlequin.co.uk by holly.cam.harlequin.co.uk; Thu, 24 Aug 1995 12:21:15 +0100 Received: from bessie.harlequin.co.uk (bessie.cam.harlequin.co.uk) by rocannon.cam.harlequin.co.uk; Thu, 24 Aug 1995 12:21:11 +0100 Date: Thu, 24 Aug 1995 07:18:54 -0400 Message-Id: <3843.9508241118@bessie.harlequin.co.uk> To: Soren Dayton From: Paul Haahr Reply-To: Paul Haahr Cc: es@hawkwind.utcs.toronto.edu Subject: Re: es-0.90-alpha dumping core on a ~~ In-Reply-To: <199508222259.RAA14147@woodlawn.uchicago.edu> References: <199508222259.RAA14147@woodlawn.uchicago.edu> Soren Dayton wrote [trimmed slightly] > ; echo <={ variable = <={ %split / $wd } } > nfs woodlawn w4 csdayton > ; echo <={ variable = $variable( 3 ... ) } > w4 csdayton > ; echo <={ ~~ $variable(1) [qwek][0-9] } > match.c:206: assertion failed (j != RANGE_FAIL) > Process shell abort (core dumped) > > After a quick glance at the code, I do not see what the problem is... The problem was that, after extracting a character class match, I forgot to skip forward over the rest of the character class. The bug only shows up if some other pattern follows the character class. This code should be better commented. A patch follows. > Is there a list of known bugs and patches somewhere? I would really > like to use the alpha for reasons like ~~. There haven't been enough patches yet. This is, in fact, the first serious bug fix, I think. The rest have been some portability nits. I'll release an alpha-2 after the stuff in alpha-1 has gotten more testing. Paul =================================================================== RCS file: RCS/match.c,v retrieving revision 1.5 diff -c -r1.5 match.c *** 1.5 1995/05/30 11:13:31 --- match.c 1995/08/24 11:09:30 *************** *** 208,213 **** --- 208,214 ---- assert(*s == '['); break; } + i += j; } /* FALLTHROUGH */ case '?': From es-owner Sat Aug 26 12:29:25 1995 Received: from holly.cam.harlequin.co.uk ([193.128.4.58]) by hawkwind.utcs.utoronto.ca with SMTP id <24125>; Sat, 26 Aug 1995 12:28:14 -0400 Received: from rocannon.cam.harlequin.co.uk by holly.cam.harlequin.co.uk; Sat, 26 Aug 1995 17:28:02 +0100 Received: from bessie.harlequin.co.uk (bessie.cam.harlequin.co.uk) by rocannon.cam.harlequin.co.uk; Sat, 26 Aug 1995 17:28:00 +0100 Date: Sat, 26 Aug 1995 12:25:42 -0400 Message-Id: <10741.9508261625@bessie.harlequin.co.uk> To: es@hawkwind.utcs.toronto.edu From: Paul Haahr Reply-To: Paul Haahr Subject: es & readline (1) I had warned about using es-0.9alpha1 on SunOS with readline. The problem appears to be Sun's non-ansi header files (notably, for those of you who've dealt with this before, the ioctl definitions) combined with an ANSI preprocessor. Sigh. I first hit that in 1987 or so, and thought it would be long dead by now. Workarounds include using a more recent version of readline (I was using something horrifically old, I think), fixing your include files, or using a non-ansi preprocessor (2) Soren Dayton pointed out that his es was crashing with multi-line commands. It turns out that, with readline 2.0, a NULL prompt crashes. He had a $prompt which was 1 element long, and es was passing NULL to readline. A patch to prevent es from doing that follows. Later versions of readline (e.g., the one out of the current bash distribution) do not have this problem. Earlier ones must not have, either, because otherwise it would have tripped people up before. Paul =================================================================== RCS file: RCS/input.c,v retrieving revision 1.22 retrieving revision 1.23 diff -r1.22 -r1.23 1c1 < /* input.c -- read input from files or strings ($Revision: 1.22 $) */ --- > /* input.c -- read input from files or strings ($Revision: 1.23 $) */ 191a192,193 > if (prompt == NULL) > prompt = ""; /* bug fix for readline 2.0 */ From es-owner Mon Sep 18 19:52:46 1995 Received: from midway.uchicago.edu ([128.135.12.73]) by hawkwind.utcs.utoronto.ca with SMTP id <24150>; Mon, 18 Sep 1995 19:48:28 -0400 Received: from woodlawn.uchicago.edu (woodlawn.uchicago.edu [128.135.12.9]) by midway.uchicago.edu (8.6.10/8.6.4) with ESMTP id SAA10692 for ; Mon, 18 Sep 1995 18:48:14 -0500 Received: from woodlawn.uchicago.edu (localhost.uchicago.edu [127.0.0.1]) by woodlawn.uchicago.edu (8.6.10/8.6.4) with ESMTP id SAA18330 for ; Mon, 18 Sep 1995 18:46:55 -0500 Message-Id: <199509182346.SAA18330@woodlawn.uchicago.edu> To: es@hawkwind.utcs.toronto.edu Subject: es sucking up processor time... Reply-To: csdayton@midway.uchicago.edu Date: Mon, 18 Sep 1995 19:46:55 -0400 From: Soren Dayton Hi I am finding that an idle es process is taking up quite a bit of processor time to do nothing. About 80% of one of two processors on this Sparc 20 actually. Any idea what is going on? If this continues, I might not be able to use es on any of these machines :( Soren From es-owner Mon Sep 18 20:52:54 1995 Received: from midway.uchicago.edu ([128.135.12.73]) by hawkwind.utcs.utoronto.ca with SMTP id <24151>; Mon, 18 Sep 1995 20:52:14 -0400 Received: from woodlawn.uchicago.edu (woodlawn.uchicago.edu [128.135.12.9]) by midway.uchicago.edu (8.6.10/8.6.4) with ESMTP id TAA20111 for ; Mon, 18 Sep 1995 19:52:01 -0500 Received: from woodlawn.uchicago.edu (localhost.uchicago.edu [127.0.0.1]) by woodlawn.uchicago.edu (8.6.10/8.6.4) with ESMTP id TAA19830 for ; Mon, 18 Sep 1995 19:50:43 -0500 Message-Id: <199509190050.TAA19830@woodlawn.uchicago.edu> To: es@hawkwind.utcs.toronto.edu Subject: Re: es sucking up processor time... In-reply-to: Your message of "Mon, 18 Sep 1995 19:46:55 EDT." <199509182346.SAA18330@woodlawn.uchicago.edu> Reply-To: csdayton@midway.uchicago.edu Date: Mon, 18 Sep 1995 20:50:43 -0400 From: Soren Dayton Soren Dayton said: > >Hi > >I am finding that an idle es process is taking up quite a bit of >processor time to do nothing. About 80% of one of two processors on >this Sparc 20 actually. > >Any idea what is going on? If this continues, I might not be able to >use es on any of these machines :( Jim Davis recommended that I provide a trace of this. woodlawn% ls -al trace-es -rw-r--r-- 1 csdayton 4702295 Sep 18 19:45 trace-es woodlawn% uniq trace-es ioctl (0, 0x40125401, 0xefffe158) = -1 ENXIO (No such device or address) I let it sit for a couple of minutes thanks Soren From es-owner Tue Sep 19 05:03:17 1995 Received: from holly.cam.harlequin.co.uk ([193.128.4.58]) by hawkwind.utcs.utoronto.ca with SMTP id <24152>; Tue, 19 Sep 1995 05:02:05 -0400 Received: from rocannon.cam.harlequin.co.uk by holly.cam.harlequin.co.uk; Tue, 19 Sep 1995 10:01:29 +0100 Received: from bessie.harlequin.co.uk (bessie.cam.harlequin.co.uk) by rocannon.cam.harlequin.co.uk; Tue, 19 Sep 1995 10:01:20 +0100 Date: Tue, 19 Sep 1995 05:00:38 -0400 Message-Id: <9761.9509190900@bessie.harlequin.co.uk> To: Soren Dayton From: Paul Haahr Reply-To: Paul Haahr Cc: es@hawkwind.utcs.toronto.edu Subject: Re: es sucking up processor time... In-Reply-To: <199509190050.TAA19830@woodlawn.uchicago.edu> References: <199509182346.SAA18330@woodlawn.uchicago.edu> <199509190050.TAA19830@woodlawn.uchicago.edu> Soren Dayton wrote > I am finding that an idle es process is taking up quite a bit of > processor time to do nothing. About 80% of one of two processors on > this Sparc 20 actually. And then... > Jim Davis recommended that I provide a trace of this. > > woodlawn% ls -al trace-es > -rw-r--r-- 1 csdayton 4702295 Sep 18 19:45 trace-es > > woodlawn% uniq trace-es > ioctl (0, 0x40125401, 0xefffe158) = -1 ENXIO (No such device or address) > > I let it sit for a couple of minutes I haven't seen this happen. Does it happen when running under a debugger? Can you attach to it and find the troublesome call? The ioctl request number seems surprising (bogus) for a Sun. It also doesn't look like a reasonable permutation of the one ioctl which es issues directly. I think it's probably buried in the readline code. What OS and compiler are you running? Are you sure your header files match your compiler? Similar problems have happened if readline is compiled with an ANSI C preprocessor, but you're using an old set of header files -- notably, the SunOS 4 headers. Paul From es-owner Mon Sep 25 06:37:53 1995 Received: from oryx.llnl.gov ([128.115.53.18]) by hawkwind.utcs.utoronto.ca with SMTP id <24164>; Mon, 25 Sep 1995 06:35:37 -0400 Received: by oryx.llnl.gov (1.38.193.4/16.2) id AA16825; Mon, 25 Sep 1995 03:39:28 -0700 From: Sam Trenholme Subject: COmpiling es under Linux 1.2.12 To: es@hawkwind.utcs.toronto.edu Date: Mon, 25 Sep 1995 06:39:27 -0400 X-Pgp: ID: 02991DCD PRINT: F4 9C 21 83 78 7C BC 49 71 75 24 ED 25 CC 90 C9 X-Comment: Read alt.security.pgp for information on PGP X-Url: http://ocf.berkeley.edu/~set Mailer: Elm [revision: 70.85] Message-Id: <95Sep25.063537edt.24164@hawkwind.utcs.utoronto.ca> -----BEGIN PGP SIGNED MESSAGE----- I had a couple of minor problems I had to fix to compile es 0.84 on my Linux beast. The one that worries me the most is that I had to change prim-sys.c so that the calls to setpgrp look like "setpgrp()" instead of "setpgrp(foo,bar)". Will this affect the functionality of the program? [I also had to remove a line in another program that said "extern int getopt(foo,bar,baz), but that *shouldn't* affect anything] Please email me personally any answers-- I currently don't get the list. Thank you for your help, Sam Trenholme -----BEGIN PGP SIGNATURE----- Version: 2.6.2 iQBVAwUBMGaG3QUv8wmFUeQBAQFiBAH/d+evP8uzYQ5ARwtajxvmqdYjJGD5fnU3 5q51FCiZtiJz95yIpLHBVxkYOM2l4onklu+PniE12mfItTyDu6x3uw== =lACs -----END PGP SIGNATURE----- -- Copyright 1995 Sam Trenholme. Microsoft Network is prohibited from redistributing this work in any form, in whole or in part. License to distribute this post is available to Microsoft for $1000. Posting without permission constitutes an agreement to these terms. Any network provider not owned or funded in whole or in part by Microsoft may use this message freely. From es-owner Mon Sep 25 06:56:21 1995 Received: from holly.cam.harlequin.co.uk ([193.128.4.58]) by hawkwind.utcs.utoronto.ca with SMTP id <24164>; Mon, 25 Sep 1995 06:55:49 -0400 Received: from rocannon.cam.harlequin.co.uk by holly.cam.harlequin.co.uk; Mon, 25 Sep 1995 11:55:13 +0100 Received: from bessie.harlequin.co.uk (bessie.cam.harlequin.co.uk) by rocannon.cam.harlequin.co.uk; Mon, 25 Sep 1995 11:55:11 +0100 Date: Mon, 25 Sep 1995 06:55:09 -0400 Message-Id: <5985.9509251055@bessie.harlequin.co.uk> To: Sam Trenholme From: Paul Haahr Reply-To: Paul Haahr Cc: es@hawkwind.utcs.toronto.edu Subject: Re: COmpiling es under Linux 1.2.12 In-Reply-To: <95Sep25.063537edt.24164@hawkwind.utcs.utoronto.ca> References: <95Sep25.063537edt.24164@hawkwind.utcs.utoronto.ca> > I had a couple of minor problems I had to fix to compile es 0.84 on > my Linux beast. The one that worries me the most is that I had to > change prim-sys.c so that the calls to setpgrp look like "setpgrp()" > instead of "setpgrp(foo,bar)". Will this affect the functionality of > the program? Actually, for linux, that's supposed to be handled by this code in stdenv.h: #ifdef linux #include "unistd.h" #define setpgrp(a, b) setpgid(a, b) #endif That's in the 0.9-alpha1 release, but wasn't in 0.84. I'd probably upgrade to the alpha release if I were you, but there are a couple of needed patches which I've sent out to the list. I want to put out an alpha2 release soon, indended to deal with configuration issues. The stdenv.h/config.h is just the wrong thing. I'd love to use GNU autoconf, but want to keep es in the public domain and not covered by the GPL. Not that it really matters. > [I also had to remove a line in another program that said "extern > int getopt(foo,bar,baz), but that *shouldn't* affect anything] Should be fine. Putting all those prototypes into the source was a mistake. This is part of that same configuration nightmare. Paul From es-owner Tue Sep 26 15:43:26 1995 Received: from cli.com ([192.31.85.1]) by hawkwind.utcs.utoronto.ca with SMTP id <24165>; Tue, 26 Sep 1995 15:41:32 -0400 Received: from tepui.cli.com by cli.com (4.1/SMI-4.1) id AA15456; Tue, 26 Sep 95 14:41:07 CDT Received: by tepui.cli.com (4.1) id AA10054; Tue, 26 Sep 95 14:41:03 CDT Date: Tue, 26 Sep 1995 15:41:03 -0400 Message-Id: <9509261941.AA10054@tepui.cli.com> From: friedman@gnu.ai.mit.edu (Noah Friedman) To: haahr@netcom.com Cc: set@oryx.llnl.gov, es@hawkwind.utcs.toronto.edu Subject: Re: COmpiling es under Linux 1.2.12 Reply-To: friedman@gnu.ai.mit.edu In-Reply-To: Mon, 25 Sep 1995 06:55:09 -0400 References: <95Sep25.063537edt.24164@hawkwind.utcs.utoronto.ca> <5985.9509251055@bessie.harlequin.co.uk> >I want to put out an alpha2 release soon, indended to deal with >configuration issues. The stdenv.h/config.h is just the wrong thing. >I'd love to use GNU autoconf, but want to keep es in the public domain >and not covered by the GPL. Not that it really matters. As of version 2, there are no restrictions on distribution or use of configure scripts, so you can still keep the whole thing public domain. I started to write a configure script and makefile for es 0.84. It's mostly done---what I didn't finish is going through and "cleaning up" all the existing #ifdefs in the rest of the source. But I'll be happy to mail you what I have so far. From es-owner Tue Sep 26 18:33:36 1995 Received: from holly.cam.harlequin.co.uk ([193.128.4.58]) by hawkwind.utcs.utoronto.ca with SMTP id <24165>; Tue, 26 Sep 1995 18:33:05 -0400 Received: from rocannon.cam.harlequin.co.uk by holly.cam.harlequin.co.uk; Tue, 26 Sep 1995 23:32:05 +0100 Received: from bessie.harlequin.co.uk (bessie.cam.harlequin.co.uk) by rocannon.cam.harlequin.co.uk; Tue, 26 Sep 1995 23:32:03 +0100 Date: Tue, 26 Sep 1995 18:32:02 -0400 Message-Id: <16501.9509262232@bessie.harlequin.co.uk> To: Noah Friedman From: Paul Haahr Reply-To: Paul Haahr Cc: Sam Trenholme , es@hawkwind.utcs.toronto.edu Subject: Re: COmpiling es under Linux 1.2.12 In-Reply-To: <9509261941.AA10054@tepui.cli.com> References: <95Sep25.063537edt.24164@hawkwind.utcs.utoronto.ca> <5985.9509251055@bessie.harlequin.co.uk> <9509261941.AA10054@tepui.cli.com> Noah Friedman wrote > >I want to put out an alpha2 release soon, indended to deal with > >configuration issues. The stdenv.h/config.h is just the wrong thing. > >I'd love to use GNU autoconf, but want to keep es in the public domain > >and not covered by the GPL. Not that it really matters. > > As of version 2, there are no restrictions on distribution or use of > configure scripts, so you can still keep the whole thing public domain. That's nice to hear; it makes the decision much easier. > I started to write a configure script and makefile for es 0.84. > It's mostly done---what I didn't finish is going through and "cleaning up" > all the existing #ifdefs in the rest of the source. But I'll be happy to > mail you what I have so far. Thanks. I'd appreciate that. I'll finish up the cleanup process and move things forward to the 0.9 codebase. Of course, I won't promise anything soon, but I'd like to send a new release out by the end of October. Paul From es-owner Tue Sep 26 21:04:39 1995 Received: from sungear.mame.mu.OZ.AU ([128.250.209.2]) by hawkwind.utcs.utoronto.ca with SMTP id <24165>; Tue, 26 Sep 1995 21:04:03 -0400 Received: from dynamo.mame.mu.OZ.AU (dynamo.mame.mu.OZ.AU [128.250.209.44]) by sungear.mame.mu.OZ.AU (8.6.12/8.6.4) with ESMTP id LAA09906; Wed, 27 Sep 1995 11:03:06 +1000 Received: from dynamo.mame.mu.OZ.AU (mrg@localhost [127.0.0.1]) by dynamo.mame.mu.OZ.AU (8.6.12/8.6.4) with ESMTP id LAA02510; Wed, 27 Sep 1995 11:04:56 +1000 Message-Id: <199509270104.LAA02510@dynamo.mame.mu.OZ.AU> To: friedman@gnu.ai.mit.edu cc: set@oryx.llnl.gov, es@hawkwind.utcs.toronto.edu, haahr@netcom.com Subject: Re: COmpiling es under Linux 1.2.12 In-reply-to: Your message of "Tue, 26 Sep 1995 15:41:03 -0400." <9509261941.AA10054@tepui.cli.com> Date: Tue, 26 Sep 1995 21:04:51 -0400 From: matthew green >I want to put out an alpha2 release soon, indended to deal with >configuration issues. The stdenv.h/config.h is just the wrong thing. >I'd love to use GNU autoconf, but want to keep es in the public domain >and not covered by the GPL. Not that it really matters. As of version 2, there are no restrictions on distribution or use of configure scripts, so you can still keep the whole thing public domain. I started to write a configure script and makefile for es 0.84. It's mostly done---what I didn't finish is going through and "cleaning up" all the existing #ifdefs in the rest of the source. But I'll be happy to mail you what I have so far. i might be able to finish it if you want, too. i'm a sucker for writing configure.in's for other people (at least, for worthy software :-) .mrg. From es-owner Sun Oct 1 11:51:50 1995 Received: from uu2.psi.com ([128.145.228.2]) by hawkwind.utcs.utoronto.ca with SMTP id <24165>; Sun, 1 Oct 1995 11:50:19 -0400 Received: from infographix.UUCP by uu2.psi.com (5.65b/4.0.940727-PSI/PSINet) via UUCP; id AA12761 for ; Sun, 1 Oct 95 11:43:43 -0400 Received: by infographix.com (5.x/SMI-SVR4) id AA01764; Sun, 1 Oct 1995 11:35:45 -0400 Date: Sun, 1 Oct 1995 11:35:45 -0400 From: arnold@infographix.infographix.com (Arnold Robbins) Message-Id: <9510011535.AA01764@infographix.com> To: es@hawkwind.utcs.utoronto.ca Subject: cd path searching This perhaps should go in private mail to Paul. On the other hand, maybe everyone else agrees with me ... (if not, I'm sure I'll find out in a hurry!) Anyway, I noticed that in es-0.90 alpha, the cdpath searching code was removed from init.es. This is one thing that I use day in, day out, and rely on extremely heavily. It is, in fact, what has kept me from switching to the new version from 0.84. Much as I hate to have to admit this, I really am too busy (or lazy :-) to bother ripping the code out of the old version and putting it in my .esrc. So, can we please put it back into init.es? Maybe inside an if for a variable or something so that people can turn it off if they don't want it, or even turn it on if they do. Thanks, Arnold Robbins From es-owner Sun Oct 1 13:16:02 1995 Received: from cli.com ([192.31.85.1]) by hawkwind.utcs.utoronto.ca with SMTP id <24166>; Sun, 1 Oct 1995 13:15:29 -0400 Received: from tepui.cli.com by cli.com (4.1/SMI-4.1) id AA22917; Sun, 1 Oct 95 12:15:13 CDT Received: by tepui.cli.com (4.1) id AA15163; Sun, 1 Oct 95 12:15:12 CDT Date: Sun, 1 Oct 1995 13:15:12 -0400 Message-Id: <9510011715.AA15163@tepui.cli.com> From: friedman@gnu.ai.mit.edu (Noah Friedman) To: arnold@infographix.infographix.com Cc: es@hawkwind.utcs.toronto.edu Subject: cd path searching Reply-To: friedman@gnu.ai.mit.edu In-Reply-To: Sun, 01 Oct 1995 11:35:45 -0400 References: <9510011535.AA01764@infographix.com> I think I was one of the people who promoted removing it from initial.es (even though I think it would be a safe bet to say I have the largest shell inits anyone has ever written; so it wasn't for the sake of asceticism). What if I just mail you the relevant code, which you can stick in your .esrc or in a separate file and `.' it? Re: >Anyway, I noticed that in es-0.90 alpha, the cdpath searching code was >removed from init.es. >... >So, can we please put it back into init.es? Maybe inside an if for a >variable or something so that people can turn it off if they don't want it, >or even turn it on if they do. That would be even more feeping creaturism than we sought to remove in the first place. From es-owner Mon Oct 2 06:02:19 1995 Received: from holly.cam.harlequin.co.uk ([193.128.4.58]) by hawkwind.utcs.utoronto.ca with SMTP id <24168>; Mon, 2 Oct 1995 06:01:29 -0400 Received: from rocannon.cam.harlequin.co.uk by holly.cam.harlequin.co.uk; Mon, 2 Oct 1995 10:59:34 +0100 Received: from bessie.harlequin.co.uk (bessie.cam.harlequin.co.uk) by rocannon.cam.harlequin.co.uk; Mon, 2 Oct 1995 10:59:22 +0100 Date: Mon, 2 Oct 1995 05:59:21 -0400 Message-Id: <28416.9510020959@bessie.harlequin.co.uk> To: arnold@infographix.infographix.com (Arnold Robbins) From: Paul Haahr Reply-To: Paul Haahr Cc: es@hawkwind.utcs.toronto.edu Subject: Re: cd path searching In-Reply-To: <9510011535.AA01764@infographix.com> References: <9510011535.AA01764@infographix.com> > Anyway, I noticed that in es-0.90 alpha, the cdpath searching code > was removed from init.es. It was removed based on comments made on the list. I initially opposed removing it, but was convinced that was the right thing. > This is one thing that I use day in, day out, and rely on extremely > heavily. You're not alone. > It is, in fact, what has kept me from switching to the new version > from 0.84. Sorry to hear that. > Much as I hate to have to admit this, I really am too busy (or lazy > :-) to bother ripping the code out of the old version and putting it > in my .esrc. Here it is, pre-ripped. No warranty. let (cd = $fn-cd) fn cd dir { if {~ $#dir 1} { if {!%is-absolute $dir} { let (old = $dir) { dir = <={%cdpathsearch $dir} if {!~ $dir $old} { echo >[1=2] $dir } } } $cd $dir } { $cd $dir } } fn %cdpathsearch name { access -n $name -1e -d $cdpath } fn %is-absolute path { ~ $path /* ./* ../* } set-cdpath = @{local (set-CDPATH=) CDPATH=<={%flatten : $*}; result $*} set-CDPATH = @{local (set-cdpath=) cdpath=<={%fsplit : $*}; result $*} noexport = $noexport cdpath cdpath = '' > So, can we please put it back into init.es? Maybe inside an if for > a variable or something so that people can turn it off if they don't > want it, or even turn it on if they do. Certainly not under a switch. Es's customizability is what distinguishes it from other shells. It would seem a shame to me to have this features handles specially. From es-owner Mon Oct 2 18:06:36 1995 Received: from uu2.psi.com ([128.145.228.2]) by hawkwind.utcs.utoronto.ca with SMTP id <24165>; Mon, 2 Oct 1995 18:05:08 -0400 Received: from infographix.UUCP by uu2.psi.com (5.65b/4.0.940727-PSI/PSINet) via UUCP; id AA10794 for ; Mon, 2 Oct 95 17:44:04 -0400 Received: by infographix.com (5.x/SMI-SVR4) id AA09823; Mon, 2 Oct 1995 17:31:53 -0400 Date: Mon, 2 Oct 1995 17:31:53 -0400 From: arnold@infographix.infographix.com (Arnold Robbins) Message-Id: <9510022131.AA09823@infographix.com> To: haahr@netcom.com Subject: Re: cd path searching In-Reply-To: <28416.9510020959@bessie.harlequin.co.uk> Cc: es@hawkwind.utcs.toronto.edu X-Mailer: [XMailTool v3.1.2] Broken and bleeding, I concede. :-) cd path searching belongs in the .esrc. I've installed es-0.9-alpha1 here and will fix my .esrc, and do the same thing at home. Noah, in all seriousness, how's the job control coming? If es had job control, I could use it over a dial-in, and I'd leave ksh behind. Thanks, Arnold From es-owner Mon Oct 2 18:16:58 1995 Received: from galapagos.cse.psu.edu ([130.203.2.12]) by hawkwind.utcs.utoronto.ca with SMTP id <24165>; Mon, 2 Oct 1995 18:16:30 -0400 Received: from localhost by galapagos.cse.psu.edu with SMTP id <12782>; Mon, 2 Oct 1995 18:15:45 -0400 To: arnold@infographix.infographix.com (Arnold Robbins) cc: haahr@netcom.com, es@hawkwind.utcs.toronto.edu Subject: Re: cd path searching In-reply-to: Your message of "Mon, 02 Oct 1995 17:31:53 EDT." <9510022131.AA09823@infographix.com> Date: Mon, 2 Oct 1995 18:15:41 -0400 From: Scott Schwartz Message-Id: <95Oct2.181545edt.12782@galapagos.cse.psu.edu> arnold@infographix.infographix.com (Arnold Robbins) writes: | Noah, in all seriousness, how's the job control coming? If es had job | control, I could use it over a dial-in, and I'd leave ksh behind. When I dial in, I use "screen" to fill that need. As an added bonus, it allows reconnect after the !@$!@$ annex hangs up on me. From es-owner Mon Oct 2 20:58:24 1995 Received: from sungear.mame.mu.OZ.AU ([128.250.209.2]) by hawkwind.utcs.utoronto.ca with SMTP id <24165>; Mon, 2 Oct 1995 20:57:34 -0400 Received: from dynamo.mame.mu.OZ.AU (root@dynamo.mame.mu.OZ.AU [128.250.209.44]) by sungear.mame.mu.OZ.AU (8.6.12/8.6.4) with ESMTP id KAA23872; Tue, 3 Oct 1995 10:57:06 +1000 Received: from dynamo.mame.mu.OZ.AU (mrg@localhost [127.0.0.1]) by dynamo.mame.mu.OZ.AU (8.6.12/8.6.4) with ESMTP id KAA14289; Tue, 3 Oct 1995 10:59:00 +1000 Message-Id: <199510030059.KAA14289@dynamo.mame.mu.OZ.AU> To: Scott Schwartz cc: haahr@netcom.com, es@hawkwind.utcs.toronto.edu, arnold@infographix.infographix.com (Arnold Robbins) Subject: Re: cd path searching In-reply-to: Your message of "Mon, 02 Oct 1995 18:15:41 -0400." <95Oct2.181545edt.12782@galapagos.cse.psu.edu> Date: Mon, 2 Oct 1995 20:58:55 -0400 From: matthew green arnold@infographix.infographix.com (Arnold Robbins) writes: | Noah, in all seriousness, how's the job control coming? If es had job | control, I could use it over a dial-in, and I'd leave ksh behind. When I dial in, I use "screen" to fill that need. As an added bonus, it allows reconnect after the !@$!@$ annex hangs up on me. the es i still use, 0.84jobs, has job control that works under sunos and solaris. i didn't do the job control myself, bob manson did. i can provide the source to anyone who wants it. From es-owner Sat Nov 18 13:41:59 1995 Received: from khym.imf.unit.no ([129.241.15.200]) by hawkwind.utcs.utoronto.ca with SMTP id <24068>; Sat, 18 Nov 1995 13:36:54 -0500 Received: from romberg.imf.unit.no (13799@romberg.imf.unit.no [129.241.15.150]) by khym.imf.unit.no with ESMTP id TAA12659 (8.6.12/IDA-1.6 for ); Sat, 18 Nov 1995 19:36:35 +0100 Received: (hanche@localhost) by romberg.imf.unit.no (8.6.12/8.6.12) id TAA28080 for es@hawkwind.utcs.toronto.edu; Sat, 18 Nov 1995 19:36:40 +0100 From: "Harald Hanche-Olsen" Message-Id: <9511181936.ZM28078@romberg.imf.unit.no> Date: Sat, 18 Nov 1995 13:36:39 -0500 X-Mailer: Z-Mail (3.2.1 10apr95) To: es@hawkwind.utcs.toronto.edu Subject: Bug fix for es 0.9alpha1, for SunOS 4 users. Sender: Harald Hanche-Olsen Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii I already reported this to Paul, but the list should also hear about it: If you use es 0.9 on SunOS 4, go edit config.h. In the section below the lines /* SunOS 4.x defaults */ #if sun && !SOLARIS change the line #define GETGROUPS_USES_GID_T 1 into #define GETGROUPS_USES_GID_T 0 The crash caused by having getgroups() overwrite the end of its array was a bit of work to diagnose... - Harald From es-owner Mon Nov 20 14:22:38 1995 Received: from goalkeeper.d2.com ([198.211.88.10]) by hawkwind.utcs.utoronto.ca with SMTP id <24069>; Mon, 20 Nov 1995 14:18:38 -0500 Received: from d2.com by goalkeeper.d2.com via UUCP (950215.SGI.8.6.10/(930416.SGI)1.0-D2.COM-OUTERELAY) for es@hawkwind.utcs.toronto.edu id LAA27243; Mon, 20 Nov 1995 11:16:55 -0800 Received: from java.d2.com by omaha.d2.com via ESMTP (950221.405.SGI.8.6.10/(921111.SGI)1.1-D2.COM-RELAY) for <@omaha.d2.com:es@hawkwind.utcs.toronto.edu> id LAA05815; Mon, 20 Nov 1995 11:10:18 -0800 Received: by java.d2.com (940816.SGI.8.6.9/(921111.SGI)1.1-D2.COM) for es@hawkwind.utcs.toronto.edu id LAA15454; Mon, 20 Nov 1995 11:10:17 -0800 From: jake@d2.com (jakester) Message-Id: <199511201910.LAA15454@java.d2.com> Subject: unsubscribe To: es@hawkwind.utcs.toronto.edu Date: Mon, 20 Nov 1995 14:10:17 -0500 X-Mailer: ELM [version 2.4 PL23beta2] Content-Type: text Content-Length: 15 UNSUBSCRIBE ES From es-owner Fri Nov 24 13:33:36 1995 Received: from khym.imf.unit.no ([129.241.15.200]) by hawkwind.utcs.utoronto.ca with SMTP id <24226>; Fri, 24 Nov 1995 13:31:36 -0500 Received: from romberg.imf.unit.no (13799@romberg.imf.unit.no [129.241.15.150]) by khym.imf.unit.no with ESMTP id TAA03118 (8.6.12/IDA-1.6 for ); Fri, 24 Nov 1995 19:31:11 +0100 Received: (hanche@localhost) by romberg.imf.unit.no (8.6.12/8.6.12) id TAA17613 for es@hawkwind.utcs.toronto.edu; Fri, 24 Nov 1995 19:31:16 +0100 From: "Harald Hanche-Olsen" Message-Id: <9511241931.ZM17611@romberg.imf.unit.no> Date: Fri, 24 Nov 1995 13:31:15 -0500 X-Mailer: Z-Mail (3.2.1 10apr95) To: es@hawkwind.utcs.toronto.edu Subject: Signals under Solaris (es 0.9alpha1) Sender: Harald Hanche-Olsen Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii I just discovered that es 0.9alpha1, on Solaris, blocks SIGINT. That is, not right away, but all it takes is to start a virgin es (not a login shell, and only a minimal environment) and execute signals=$signals and then signal 2 (SIGINT) is blocked (in the sense of being marked in the process' signal mask). Some further experimentation indicates that the problem occurs whenever $signals already contains .sigint and I set signals to some list containing .sigint again. As an experiment, I tried setting set-signals=@ {$&setsignals; $&setsignals $*} and this cured the bug partly; but the problem just moved elsewhere. If es sees a SIGINT, it blocks SIGINT in the future. Here's a quick demo. The program sigprocmask just does the system call of the same name and prints what it finds. I run sleep 60, and interrupts it. No problem, but SIGINT is now blocked. If I run sleep 60 again and hit ^C, nothing happens, and I must type ^\ or wait until the minute has passed. $ /bin/es ; ~/test/sigprocmask sigprocmask={00000000,00000000,00000000,00000000} ; sleep 60 ^C ; ~/test/sigprocmask sigprocmask={00000002,00000000,00000000,00000000} ; sleep 60 ^C^\quit--core dumped ; ~/test/sigprocmask sigprocmask={00000002,00000000,00000000,00000000} I tried turning on USE_SIGACTION in config.h, and that cured the first version of the problem, but made the second version even a little worse: After the experiment above, SIGQUIT is also blocked. So what do we try next? I don't really understand signals all that well, and have already wasted too much time messing around with this problem. From earlier discussions it has been my impression that sigaction is what we want to use when it exists, but this blocking of signals is another ball game alltogether. - Harald PS. Source code for the sigprocmask test program: #include #include #include void main() { sigset_t oset; if (sigprocmask(SIG_UNBLOCK, NULL, &oset)) perror("sigprocmask"); else printf("sigprocmask={%08x,%08x,%08x,%08x}\n", oset.__sigbits[0], oset.__sigbits[1], oset.__sigbits[2], oset.__sigbits[3]); } From es-owner Thu Jan 4 13:37:23 1996 Received: from localhost by hawkwind.utcs.utoronto.ca with SMTP id <24271>; Thu, 4 Jan 1996 13:35:21 -0500 Return-Path: es-owner Received: from haven.uchicago.edu ([128.135.12.3]) by hawkwind.utcs.utoronto.ca with SMTP id <24271>; Thu, 4 Jan 1996 11:55:32 -0500 Received: from woodlawn.uchicago.edu (root@woodlawn.uchicago.edu [128.135.12.9]) by haven.uchicago.edu (8.6.12/8.6.4) with ESMTP id KAA28695 for ; Thu, 4 Jan 1996 10:50:07 -0600 Received: from woodlawn.uchicago.edu (csdayton@localhost.uchicago.edu [127.0.0.1]) by woodlawn.uchicago.edu (8.7.1/8.7.2) with ESMTP id KAA25047 for ; Thu, 4 Jan 1996 10:55:03 -0600 (CST) Message-Id: <199601041655.KAA25047@woodlawn.uchicago.edu> To: es Subject: New alpha? Reply-To: csdayton@midway.uchicago.edu Date: Thu, 4 Jan 1996 11:55:02 -0500 From: Soren Dayton Resent-To: es Resent-Date: Thu, 4 Jan 1996 13:35:15 -0500 Resent-From: Chris Siebenmann Resent-Message-Id: <96Jan4.133521est.24271@hawkwind.utcs.utoronto.ca> what are the plans on a new release of es any time soon? Soren From es-owner Thu Jan 4 13:48:29 1996 Received: from netcom9.netcom.com ([192.100.81.119]) by hawkwind.utcs.utoronto.ca with SMTP id <24271>; Thu, 4 Jan 1996 13:48:06 -0500 Received: by netcom9.netcom.com (8.6.12/Netcom) id SAA07889; Thu, 4 Jan 1996 18:43:54 GMT Date: Thu, 4 Jan 1996 13:43:54 -0500 From: haahr@netcom.com (Paul Haahr) Message-Id: <199601041843.SAA07889@netcom9.netcom.com> To: Soren Dayton Cc: es@hawkwind.utcs.toronto.edu Subject: Re: New alpha? In-Reply-To: <199601041655.KAA25047@woodlawn.uchicago.edu> References: <199601041655.KAA25047@woodlawn.uchicago.edu> Soren Dayton wrote > what are the plans on a new release of es any time soon? I've been meaning to get to it, but haven't found the time. There are only a small number of bug fixes (most having appeared on this list), but the big thing is I really want to be based around autoconf by the next alpha, and I just haven't had the time to do that. Sorry. --p From es-owner Thu Jan 4 18:13:18 1996 Received: from motgate.mot.com ([129.188.136.100]) by hawkwind.utcs.utoronto.ca with SMTP id <24271>; Thu, 4 Jan 1996 18:12:30 -0500 Received: from pobox.mot.com (pobox.mot.com [129.188.137.100]) by motgate.mot.com (8.7.3/8.6.10/MOT-3.8) with ESMTP id RAA24948 for ; Thu, 4 Jan 1996 17:12:29 -0600 (CST) Received: from il02dns1.comm.mot.com (il02dns1.comm.mot.com [145.1.3.2]) by pobox.mot.com (8.7.3/8.6.10/MOT-3.8) with ESMTP id RAA07257 for ; Thu, 4 Jan 1996 17:12:28 -0600 (CST) Received: from supra.comm.mot.com (supra.comm.mot.com [145.1.80.40]) by il02dns1.comm.mot.com (8.7.2/8.7.2) with SMTP id RAA29474 for ; Thu, 4 Jan 1996 17:12:29 -0600 (CST) Received: by supra.comm.mot.com (4.1/SMI-4.1) id AA16523; Thu, 4 Jan 96 17:11:32 CST Date: Thu, 4 Jan 1996 18:11:32 -0500 From: rittle@comm.mot.com (Loren James Rittle) Message-Id: <9601042311.AA16523@supra.comm.mot.com> To: es@hawkwind.utcs.toronto.edu Subject: change between es-0.84 and es-0.9-alpha1 Cc: rittle@il02dns1.comm.mot.com ; p = a || echo y only prints 'y' under es-0.9-alpha1. ; {p = a; true} || echo y is the workaround that works the same under both versions of es. CHANGES from es-0.9-alpha1 said that 'pp = <={p = a}' now assigns a to pp rather than 0. I suspect that this change is what is affecting my usage. Of course, I didn't use something as simple as 'p = a || echo y' in es programs. I did use: {~ $a test1 && p = big_nasty_expression} || {~ $a test2 && p = another_big_nasty_expression} || {~ $a test3 && p = another_big_nasty_expression} || {default_big_nasty_expression} as an idiom for a C-style switch statement. Yes, I now know this thinking was stylistically bad, thus I converted to a lisp-style 'if' form: if {~ $a test1} \ {p = big_nasty_expression} \ {~ $a test2} \ {p = another_big_nasty_expression} \ {~ $a test3} \ {p = another_big_nasty_expression} \ {default_big_nasty_expression} Loren From es-owner Fri Jan 5 06:33:31 1996 Received: from holly.cam.harlequin.co.uk ([193.128.4.58]) by hawkwind.utcs.utoronto.ca with SMTP id <24271>; Fri, 5 Jan 1996 06:32:26 -0500 Received: from propos.long.harlequin.co.uk by holly.cam.harlequin.co.uk; Fri, 5 Jan 1996 11:30:52 GMT Received: from zaphod (zaphod [193.128.93.30]) by propos.long.harlequin.co.uk (8.6.12/8.6.12) with SMTP id LAA22795; Fri, 5 Jan 1996 11:30:44 GMT Received: by zaphod (4.1) id AA23039; Fri, 5 Jan 96 11:30:39 GMT Message-Id: Date: Fri, 5 Jan 1996 06:30:39 -0500 To: rittle@comm.mot.com (Loren James Rittle) From: Paul Haahr Reply-To: Paul Haahr Cc: es@hawkwind.utcs.toronto.edu, rittle@il02dns1.comm.mot.com Subject: Re: change between es-0.84 and es-0.9-alpha1 In-Reply-To: <9601042311.AA16523@supra.comm.mot.com> References: <9601042311.AA16523@supra.comm.mot.com> Loren James Rittle wrote > ; p = a || echo y > only prints 'y' under es-0.9-alpha1. > > ; {p = a; true} || echo y > is the workaround that works the same under both versions of es. Yes. > CHANGES from es-0.9-alpha1 said that 'pp = <={p = a}' now assigns a to > pp rather than 0. I suspect that this change is what is affecting my > usage. Yes. It's that old ``0 is true, anything else is false'' rule of Unix shells. It's (imho) the wrong thing, but it's a fact of life. > Of course, I didn't use something as simple as 'p = a || echo y' in es > programs. I did use: > {~ $a test1 && > p = big_nasty_expression} || > {~ $a test2 && > p = another_big_nasty_expression} || > {~ $a test3 && > p = another_big_nasty_expression} || > {default_big_nasty_expression} > > as an idiom for a C-style switch statement. Yes, I now know this thinking > was stylistically bad, thus I converted to a lisp-style 'if' form: > if {~ $a test1} \ > {p = big_nasty_expression} \ > {~ $a test2} \ > {p = another_big_nasty_expression} \ > {~ $a test3} \ > {p = another_big_nasty_expression} \ > {default_big_nasty_expression} Seems much cleaner to me. From es-owner Fri Jan 26 07:07:12 1996 Received: from khym.imf.unit.no ([129.241.15.200]) by hawkwind.utcs.utoronto.ca with SMTP id <23979>; Fri, 26 Jan 1996 07:04:32 -0500 Received: from chanur.imf.unit.no (13799@chanur.imf.unit.no [129.241.15.100]) by khym.imf.unit.no with ESMTP id NAA00472 (8.6.12/IDA-1.6 for ); Fri, 26 Jan 1996 13:04:02 +0100 Received: (hanche@localhost) by chanur.imf.unit.no (8.6.12/8.6.12) id NAA18299 for es@hawkwind.utcs.toronto.edu; Fri, 26 Jan 1996 13:04:00 +0100 From: "Harald Hanche-Olsen" Message-Id: <9601261303.ZM18297@chanur.imf.unit.no> Date: Fri, 26 Jan 1996 07:03:58 -0500 X-Face: ,};iH+.X."ygdh+d]dhDa&*SY2HIr/pV,Sz%PSzi!bjr"jOC{%6*g@aB("DWtv6?EKg2_pjvl.q^RA`hM(a'X$&NeX?6W)yb>5o0\n\G_g+G(E_qQnAlI.BJOG9mw%i.wyiT(7i&CElcgIE_s^^Bz UJokoXH7L)L*jn X-Mailer: Z-Mail (3.2.1 10apr95) To: es@hawkwind.utcs.toronto.edu Subject: Parser bug? Sender: Harald Hanche-Olsen Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit ; echo {a b <{c} d} {%readfrom _devfd5 {c} {a b $_devfd5 d}} ; echo {a (b <{c} d)} syntax error Is there any good reason I cannot use parentheses here? (I stumbled over this in a longer script in which I did something of the form some-command (-options -more options -yet more options <{some-other-command ...} ) Not a big deal - easy to work around - but can the grammar be tweaked to accomodate this? - Harald (Weird - I keyed in the above, then forgot to send it before I went to lunch - just to come back and find four other messages from the es list! Telepathy? No - I don't believe it.) From es-owner Fri Jan 26 07:15:02 1996 Received: from netcom9.netcom.com ([192.100.81.119]) by hawkwind.utcs.utoronto.ca with SMTP id <23980>; Fri, 26 Jan 1996 07:14:39 -0500 Received: by netcom9.netcom.com (8.6.12/Netcom) id MAA23364; Fri, 26 Jan 1996 12:12:42 GMT Date: Fri, 26 Jan 1996 07:12:42 -0500 From: haahr@netcom.com (Paul Haahr) Message-Id: <199601261212.MAA23364@netcom9.netcom.com> To: "Harald Hanche-Olsen" Cc: es@hawkwind.utcs.toronto.edu Subject: Re: Parser bug? In-Reply-To: <9601261303.ZM18297@chanur.imf.unit.no> References: <9601261303.ZM18297@chanur.imf.unit.no> > ; echo {a b <{c} d} > {%readfrom _devfd5 {c} {a b $_devfd5 d}} > ; echo {a (b <{c} d)} > syntax error > > Is there any good reason I cannot use parentheses here? Yes. Parentheses only include words; there's some ambiguity in the grammar if this restriction is removed, but I forget where. Perhaps <{} should be just a word; I'll look into it sometime in the future. > (Weird - I keyed in the above, then forgot to send it before I went to > lunch - just to come back and find four other messages from the es list! > Telepathy? No - I don't believe it.) I don't either, since this is the only es mail I've seen in a while. From es-owner Fri Jan 26 07:20:23 1996 Received: from khym.imf.unit.no ([129.241.15.200]) by hawkwind.utcs.utoronto.ca with SMTP id <23981>; Fri, 26 Jan 1996 07:19:54 -0500 Received: from chanur.imf.unit.no (13799@chanur.imf.unit.no [129.241.15.100]) by khym.imf.unit.no with ESMTP id NAA00656 (8.6.12/IDA-1.6); Fri, 26 Jan 1996 13:19:36 +0100 Received: (hanche@localhost) by chanur.imf.unit.no (8.6.12/8.6.12) id NAA18307; Fri, 26 Jan 1996 13:19:34 +0100 From: "Harald Hanche-Olsen" Message-Id: <9601261319.ZM18305@chanur.imf.unit.no> Date: Fri, 26 Jan 1996 07:19:32 -0500 In-Reply-To: <199601261212.MAA23364@netcom9.netcom.com> References: <9601261303.ZM18297@chanur.imf.unit.no> <199601261212.MAA23364@netcom9.netcom.com> X-Face: ,};iH+.X."ygdh+d]dhDa&*SY2HIr/pV,Sz%PSzi!bjr"jOC{%6*g@aB("DWtv6?EKg2_pjvl.q^RA`hM(a'X$&NeX?6W)yb>5o0\n\G_g+G(E_qQnAlI.BJOG9mw%i.wyiT(7i&CElcgIE_s^^Bz UJokoXH7L)L*jn X-Mailer: Z-Mail (3.2.1 10apr95) To: haahr@netcom.com (Paul Haahr), "Harald Hanche-Olsen" Subject: Re: Parser bug? Cc: es@hawkwind.utcs.toronto.edu Sender: Harald Hanche-Olsen Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit [ Paul Haahr 1996-1 -26 12:12 GMT ] |--- | Perhaps <{} should be just a word; I'll look into it sometime in the | future. Seems reasonable to me, but as far as I am concerned you could push it down the to do list a bit. | > [...]just to come back and find four other messages | > Telepathy? No - I don't believe it.) | | I don't either, since this is the only es mail I've seen in a while. Urps. Silly me. This is the problem with being interrupted all the time: you forget what you were doing. As it turns out, I was looking at the wrong folder - instead of my mailbox, it was the 1996 es list archive I was looking at. Argh. Egg on my face and all that. - Harald 8^/ From es-owner Mon Jun 24 14:58:21 1996 Received: from mail.think.com ([131.239.33.245]) by hawkwind.utcs.utoronto.ca with SMTP id <35214>; Mon, 24 Jun 1996 14:55:33 -0400 Received: from Early-Bird-1.Think.COM by mail.think.com; Wed, 3 Apr 96 04:20:43 -0500 Received: from compound (fergus-26.dialup.cfa.org) by Early-Bird.Think.COM; Wed, 3 Apr 96 04:20:40 EST Received: (from alk@localhost) by compound (8.6.12/8.6.112) id DAA21141; Wed, 3 Apr 1996 03:22:52 -0600 Date: Wed, 3 Apr 1996 04:22:52 -0500 Message-Id: <199604030922.DAA21141@compound> From: Tony Kimball To: es@hawkwind.utcs.toronto.edu Subject: ping Is this list still up? What is the ftp site for es these days? Is 0.9-alpha1 the last es from Paul? From es-owner Mon Jun 24 14:59:07 1996 Received: from haven.uchicago.edu ([128.135.12.3]) by hawkwind.utcs.utoronto.ca with SMTP id <35216>; Mon, 24 Jun 1996 14:58:54 -0400 Received: from midway.uchicago.edu (root@midway.uchicago.edu [128.135.12.12]) by haven.uchicago.edu (8.6.12/8.6.4) with ESMTP id LAA14418 for ; Wed, 24 Apr 1996 11:06:45 -0500 Received: from woodlawn.uchicago.edu (csdayton@woodlawn.uchicago.edu [128.135.12.9]) by midway.uchicago.edu (8.7.3/8.7.2) with ESMTP id LAA25941 for ; Wed, 24 Apr 1996 11:06:57 -0500 (CDT) Message-Id: <199604241606.LAA25941@midway.uchicago.edu> To: es@hawkwind.utcs.toronto.edu Subject: esdump dumps ...... core! Reply-To: csdayton@midway.uchicago.edu MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <11840.830362026.1@woodlawn.uchicago.edu> Date: Wed, 24 Apr 1996 12:07:07 -0400 From: Soren Dayton #0 0x32cb in get (dict=0x0, name=0x1020 "\023") at dict.c:106 106 unsigned long n = strhash(name), mask = dict->size - 1; (gdb) back #0 0x32cb in get (dict=0x0, name=0x1020 "\023") at dict.c:106 #1 0x1020 in ?? () (gdb) quit this is a backtrace from gdb. these are the relevant sections of the config.h #ifdef __FreeBSD__ #ifndef DEVFD #define DEVFD 1 #endif #ifndef USE_SIGACTION #define USE_SIGACTION 1 #endif #ifndef INITIAL_PATH #define INITIAL_PATH "/usr/local/bin", "/usr/bin","/bin","" #endif #ifndef GETGROUPS_USES_GID_T #define GETGROUPS_USES_GID_T 1 #endif #endif anyone have any suggestions? I have not really looked at it yt (btw, this is only with readline) Soren From es-owner Mon Jun 24 14:59:57 1996 Received: from cegelecproj.co.uk ([159.245.72.6]) by hawkwind.utcs.utoronto.ca with SMTP id <35218>; Mon, 24 Jun 1996 14:59:34 -0400 Received: from vampire.cegelecproj.co.uk (cerberus.cegelecproj.co.uk) by cegelecproj.co.uk (4.1/SMI-4.1) id AA11259; Thu, 30 May 96 14:14:25 BST Received: from phantom.cegelecproj.co.uk by vampire.cegelecproj.co.uk (SMI-8.6/SMI-SVR4) id OAA07972; Thu, 30 May 1996 14:14:02 +0100 Received: by phantom.cegelecproj.co.uk (SMI-8.6/SMI-SVR4) id OAA04276; Thu, 30 May 1996 14:14:01 +0100 Date: Thu, 30 May 1996 09:14:01 -0400 From: Steve_Kilbane@cegelecproj.co.uk Message-Id: <199605301314.OAA04276@phantom.cegelecproj.co.uk> To: es@hawkwind.utcs.toronto.edu Subject: sources X-Mailer: Wilymail 0.4 What are the current official locations of es and rc? steve From es-owner Mon Jun 24 15:19:21 1996 Received: from localhost by hawkwind.utcs.utoronto.ca with SMTP id <24391>; Mon, 24 Jun 1996 15:07:05 -0400 To: es, rc, sam-fans Subject: Status of the es/rc/sam-fans mailing lists Date: Mon, 24 Jun 1996 15:06:21 -0400 From: Chris Siebenmann Message-Id: <96Jun24.150705edt.24391@hawkwind.utcs.utoronto.ca> They're back (as you can see). I've resurrected all the messages for them from the time they were down. Unfortunately, they are still not being run under a mailing list manager, so there's no restriction on who can send messages; fortunately spam sent to them appears to have died down (AOL apparently obtained a fairly strong injuction against the major spammer). They will be converted to subscribers-only posting at some point in the future; I just thought it would be better to have them existing in the mean time. - cks From es-owner Mon Jun 24 16:58:09 1996 Received: from dworshak.cs.uidaho.edu ([129.101.100.160]) by hawkwind.utcs.utoronto.ca with SMTP id <24390>; Mon, 24 Jun 1996 16:55:46 -0400 Received: from waldrog.cs.uidaho.edu (waldrog.cs.uidaho.edu [129.101.100.23]) by dworshak.cs.uidaho.edu (8.7.5/1.1) with ESMTP id MAA28965; Mon, 24 Jun 1996 12:50:54 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by waldrog.cs.uidaho.edu (8.7.5/1.0) with SMTP id MAA19784; Mon, 24 Jun 1996 12:49:25 -0700 (PDT) X-Authentication-Warning: waldrog.cs.uidaho.edu: Host localhost [127.0.0.1] didn't use HELO protocol To: csdayton@midway.uchicago.edu cc: es@hawkwind.utcs.toronto.edu Subject: Re: esdump dumps ...... core! In-reply-to: Your message of "Wed, 24 Apr 1996 12:07:07 PDT." <199604241606.LAA25941@midway.uchicago.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <19780.835645764.1@waldrog.cs.uidaho.edu> Date: Mon, 24 Jun 1996 15:49:25 -0400 Message-ID: <19782.835645765@waldrog.cs.uidaho.edu> From: faried nawaz Soren Dayton wrote... #0 0x32cb in get (dict=0x0, name=0x1020 "\023") at dict.c:106 106 unsigned long n = strhash(name), mask = dict->size - 1; (gdb) back #0 0x32cb in get (dict=0x0, name=0x1020 "\023") at dict.c:106 #1 0x1020 in ?? () (gdb) quit this is a backtrace from gdb. these are the relevant sections of the config.h #ifdef __FreeBSD__ I've not been able to get es working with either editline or readline on FreeBSD for a _very_ long time. I think it has to do with changes made to crt0 many many moons ago (I use -current), but I'm not sure. From es-owner Mon Jun 24 17:04:07 1996 Received: from netcom2.netcom.com ([192.100.81.108]) by hawkwind.utcs.utoronto.ca with SMTP id <24394>; Mon, 24 Jun 1996 17:03:48 -0400 Received: (from haahr@localhost) by netcom2.netcom.com (8.6.13/Netcom) id QAA14799; Mon, 24 Jun 1996 16:52:59 -0400 Date: Mon, 24 Jun 1996 16:52:59 -0400 From: haahr@netcom.com (Paul Haahr) Message-Id: <199606242052.QAA14799@netcom2.netcom.com> To: Tony Kimball Cc: es@hawkwind.utcs.toronto.edu Subject: Re: ping In-Reply-To: <199604030922.DAA21141@compound> References: <199604030922.DAA21141@compound> > Is this list still up? Thanks to Chris for answering that in his own note. > What is the ftp site for es these days? Same old, same old. ftp://ftp.sys.utoronto.ca/pub/es/ > Is 0.9-alpha1 the last es from Paul? Last as in most recent, yes. Last as in final, I hope not, but I don't know when I'll return to it. I'm between jobs, between homes, and mostly unix-less these days. When I come back out of retirement, I do want to do one more es release, mainly to make it easier to install, and after that, I don't expect much future evolution. From es-owner Tue Jun 25 03:39:40 1996 Received: from cegelecproj.co.uk ([159.245.72.6]) by hawkwind.utcs.utoronto.ca with SMTP id <24392>; Tue, 25 Jun 1996 03:38:49 -0400 Received: from vampire.cegelecproj.co.uk (cerberus.cegelecproj.co.uk) by cegelecproj.co.uk (4.1/SMI-4.1) id AA03978; Tue, 25 Jun 96 08:37:34 BST Received: from phantom.cegelecproj.co.uk by vampire.cegelecproj.co.uk (SMI-8.6/SMI-SVR4) id IAA02129; Tue, 25 Jun 1996 08:37:09 +0100 Received: by phantom.cegelecproj.co.uk (SMI-8.6/SMI-SVR4) id IAA05330; Tue, 25 Jun 1996 08:37:07 +0100 Date: Tue, 25 Jun 1996 03:37:07 -0400 From: Steve_Kilbane@cegelecproj.co.uk Message-Id: <199606250737.IAA05330@phantom.cegelecproj.co.uk> To: haahr@netcom.com (Paul Haahr) Cc: es@hawkwind.utcs.toronto.edu Subject: Re: ping X-Mailer: Wilymail 0.4 > > What is the ftp site for es these days? > > Same old, same old. ftp://ftp.sys.utoronto.ca/pub/es/ I'm having difficulty getting into this site. I get "connected to ...", but it never comes back with a username prompt. It was like this last month too, when I posted the location question, and at all times of the day, too. I'd try somewhere else, but everywhere else just has a pointer to here. :-( steve From es-owner Wed Jun 26 14:30:23 1996 Received: from netcom12.netcom.com ([192.100.81.124]) by hawkwind.utcs.utoronto.ca with SMTP id <24398>; Wed, 26 Jun 1996 14:29:57 -0400 Received: (from haahr@localhost) by netcom12.netcom.com (8.6.13/Netcom) id OAA09515; Wed, 26 Jun 1996 14:25:29 -0400 Date: Wed, 26 Jun 1996 14:25:29 -0400 From: haahr@netcom.com (Paul Haahr) Message-Id: <199606261825.OAA09515@netcom12.netcom.com> To: faried nawaz Cc: Soren Dayton , es@hawkwind.utcs.toronto.edu Subject: Re: esdump dumps ...... core! In-Reply-To: <19782.835645765@waldrog.cs.uidaho.edu> References: <199604241606.LAA25941@midway.uchicago.edu> <19782.835645765@waldrog.cs.uidaho.edu> Faried Nawaz wrote > Soren Dayton wrote... > > #0 0x32cb in get (dict=0x0, name=0x1020 "\023") at dict.c:106 > 106 unsigned long n = strhash(name), mask = dict->size - 1; > (gdb) back > #0 0x32cb in get (dict=0x0, name=0x1020 "\023") at dict.c:106 > #1 0x1020 in ?? () > (gdb) quit > > this is a backtrace from gdb. > > these are the relevant sections of the config.h > > #ifdef __FreeBSD__ > > I've not been able to get es working with either editline or readline on > FreeBSD for a _very_ long time. I think it has to do with changes made > to crt0 many many moons ago (I use -current), but I'm not sure. Um, because of changes to crt0? What? How? Huh? The only thing of that might affect this is that crt0 could be defining some symbol that es wants to be bss'ed. I won't be able to track this one down, I suspect. From es-owner Wed Jun 26 14:51:30 1996 Received: from dworshak.cs.uidaho.edu ([129.101.100.160]) by hawkwind.utcs.utoronto.ca with SMTP id <24399>; Wed, 26 Jun 1996 14:51:08 -0400 Received: from waldrog.cs.uidaho.edu (waldrog.cs.uidaho.edu [129.101.100.23]) by dworshak.cs.uidaho.edu (8.7.5/1.1) with ESMTP id LAA09478; Wed, 26 Jun 1996 11:52:18 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by waldrog.cs.uidaho.edu (8.7.5/1.0) with SMTP id LAA21412; Wed, 26 Jun 1996 11:50:41 -0700 (PDT) X-Authentication-Warning: waldrog.cs.uidaho.edu: Host localhost [127.0.0.1] didn't use HELO protocol To: haahr@netcom.com (Paul Haahr) cc: Soren Dayton , es@hawkwind.utcs.toronto.edu Subject: Re: esdump dumps ...... core! In-reply-to: Your message of "Wed, 26 Jun 1996 14:25:29 PDT." <199606261825.OAA09515@netcom12.netcom.com> Date: Wed, 26 Jun 1996 14:50:41 -0400 Message-ID: <21410.835815041@waldrog.cs.uidaho.edu> From: faried nawaz Paul Haahr wrote... Um, because of changes to crt0? What? How? Huh? The only thing of that might affect this is that crt0 could be defining some symbol that es wants to be bss'ed. I thought it was crt0 because I'd have problems with some function (I believe it was getenv()) where the argument to the function was "ENABLE_STARTUP_LOCALE", according to gdb. Looking through FreeBSD's CVS logs on crt0.c, I found ---------------------------- revision 1.21 date: 1995/11/02 12:42:42; author: ache; state: Exp; lines: +1 -12 Remove my locale hack. Sigh. ---------------------------- . . . ---------------------------- revision 1.14 date: 1994/09/24 16:01:30; author: ache; state: Exp; lines: +3 -2 Call reduced (8-bit only) startup_setlocale() ---------------------------- revision 1.13 date: 1994/09/19 02:00:21; author: ache; state: Exp; lines: +5 -6 Change level of setlocale hack enabling from compile option STARTUP_LOCALE to check (via getenv) environment variable "ENABLE_STARTUP_LOCALE" at runtime. Submitted by: me per Bruce suggestion ---------------------------- revision 1.12 date: 1994/09/18 22:21:04; author: ache; state: Exp; lines: +8 -2 Add (#ifdef'ed by STARTUP_LOCALE) following line to crt0.c (void) setlocale(LC_ALL, ""); It will be easiest way now to make national chars available for all ctype-oriented programs at once by simple: setenv LANG Your_National_Charset Default case (without "LANG" environment variable) will be fully ANSI compatible (got "C" locale). If "LANG" variable present, extention becomes active. Effect of this extention is great: in one time all ctype oriented programs can accept/print national characters without any touching source/binary code, it is big win, IMHO. This method is fully compatible with ISO8859-* and russian koi8-r too (in general -- with all 8-bit character sets). I think it is very useful. I got this idea from Xenix locale implementation. This extention is even never compiled in, unless you set setenv STARTUP_LOCALE before rebuilding crt0.c or corresponding variable in /etc/make.conf ---------------------------- etc. I won't be able to track this one down, I suspect. Would an account help? :) From es-owner Wed Jun 26 15:10:20 1996 Received: from piglet.splode.com ([192.31.85.85]) by hawkwind.utcs.utoronto.ca with SMTP id <24400>; Wed, 26 Jun 1996 15:09:42 -0400 Received: (from friedman@localhost) by piglet.splode.com (8.7.5/8.7.3) id OAA14273; Wed, 26 Jun 1996 14:06:56 -0500 Date: Wed, 26 Jun 1996 15:06:56 -0400 Message-Id: <199606261906.OAA14273@piglet.splode.com> From: friedman@splode.com (Noah Friedman) To: nawaz921@cs.uidaho.edu Cc: es@hawkwind.utcs.toronto.edu Subject: Re: esdump dumps ...... core! Reply-To: friedman@splode.com In-Reply-To: Wed, 26 Jun 1996 14:50:41 -0400 References: <199606261825.OAA09515@netcom12.netcom.com> <21410.835815041@waldrog.cs.uidaho.edu> I couldn't compile the latest es because of GNU getopt / es getenv interaction. es' redefinition of getenv seems to have to be initialized, but for some reason that can't be done before getopt is called the first time, so GNU getopt dumps core. That's the only version supplied with linux. I looked at this 3 or 4 months ago and didn't have time to fix it and I don't remember specific details anymore, but that's the basic problem. From es-owner Wed Jun 26 15:32:11 1996 Received: from haven.uchicago.edu ([128.135.12.3]) by hawkwind.utcs.utoronto.ca with SMTP id <24401>; Wed, 26 Jun 1996 15:30:49 -0400 Received: from woodlawn.uchicago.edu (root@woodlawn.uchicago.edu [128.135.12.9]) by haven.uchicago.edu (8.7.5/8.7.3) with ESMTP id OAA11694; Wed, 26 Jun 1996 14:29:45 -0500 (CDT) Received: from woodlawn.uchicago.edu (csdayton@localhost.uchicago.edu [127.0.0.1]) by woodlawn.uchicago.edu (8.7.1/8.7.2) with ESMTP id OAA09728; Wed, 26 Jun 1996 14:31:15 -0500 (CDT) Message-Id: <199606261931.OAA09728@woodlawn.uchicago.edu> In-reply-to: friedman@splode.com's message of Wed, 26 Jun 1996 15:06:56 -0400 To: friedman@splode.com cc: es@hawkwind.utcs.toronto.edu, nawaz921@cs.uidaho.edu Subject: Re: esdump dumps ...... core! Reply-To: csdayton@midway.uchicago.edu References: <199606261825.OAA09515@netcom12.netcom.com> <21410.835815041@waldrog.cs.uidaho.edu> <199606261906.OAA14273@piglet.splode.com> Date: Wed, 26 Jun 1996 15:31:14 -0400 From: Soren Dayton > > I couldn't compile the latest es because of GNU getopt / es getenv > interaction. > > es' redefinition of getenv seems to have to be initialized, but for some > reason that can't be done before getopt is called the first time, so GNU > getopt dumps core. That's the only version supplied with linux. which explains why it _is_ about crt0.o on FreeBSD because of this line in crt0.c: if (getenv("ENABLE_STARTUP_LOCALE") != NULL) ack....... silly, silly silly Soren From es-owner Wed Jun 26 17:03:13 1996 Received: from netcom13.netcom.com ([192.100.81.125]) by hawkwind.utcs.utoronto.ca with SMTP id <24402>; Wed, 26 Jun 1996 17:03:03 -0400 Received: (from haahr@localhost) by netcom13.netcom.com (8.6.13/Netcom) id RAA21487; Wed, 26 Jun 1996 17:01:33 -0400 Date: Wed, 26 Jun 1996 17:01:33 -0400 From: haahr@netcom.com (Paul Haahr) Message-Id: <199606262101.RAA21487@netcom13.netcom.com> To: es@hawkwind.utcs.toronto.edu Subject: Re: esdump dumps ...... core! In-Reply-To: <199606261931.OAA09728@woodlawn.uchicago.edu> References: <199606261825.OAA09515@netcom12.netcom.com> <21410.835815041@waldrog.cs.uidaho.edu> <199606261906.OAA14273@piglet.splode.com> <199606261931.OAA09728@woodlawn.uchicago.edu> Oh yeah, I forgot about the getenv() hack. I suspect the reason it can't be done until after getopt runs is that you don't know until that point as to whether the flag (-p?) which prevents importing functions has been used. Probably the right thing to do is have the replacement getopt just search environ until the variables have been initialized, and only then start looking at the variable table. I'll write the code to do that next time I get the chance to hack on es, if nobody beats me to it. From es-owner Mon Jul 1 19:36:30 1996 Received: from haven.uchicago.edu ([128.135.12.3]) by hawkwind.utcs.utoronto.ca with SMTP id <24394>; Mon, 1 Jul 1996 19:34:11 -0400 Received: from midway.uchicago.edu (root@midway.uchicago.edu [128.135.12.12]) by haven.uchicago.edu (8.7.5/8.7.3) with ESMTP id SAA24639 for ; Mon, 1 Jul 1996 18:33:18 -0500 (CDT) Received: from woodlawn.uchicago.edu (csdayton@woodlawn.uchicago.edu [128.135.12.9]) by midway.uchicago.edu (8.7.3/8.7.2) with ESMTP id SAA21933 for ; Mon, 1 Jul 1996 18:33:54 -0500 (CDT) Message-Id: <199607012333.SAA21933@midway.uchicago.edu> To: es@hawkwind.utcs.toronto.edu Subject: fixed the getenv problem Reply-To: csdayton@midway.uchicago.edu MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" Content-ID: <912.836264068.0@woodlawn.uchicago.edu> Date: Mon, 1 Jul 1996 19:34:56 -0400 From: Soren Dayton ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <912.836264068.1@woodlawn.uchicago.edu> Content-Description: what I did I just grabbed the freebsd getenv and called that stdgetenv. changes the es getenv to esgetenv and made getenv call something that is initialized to stdgetenv and is changed to esgetenv after the initialization of the variables. it seems to work fine on FreeBSD with readline now. Soren ------- =_aaaaaaaaaa0 Content-Type: application/x-patch Content-ID: <912.836264068.2@woodlawn.uchicago.edu> Content-Description: the patch Content-Transfer-Encoding: base64 KioqIDEuMQkxOTk2LzA3LzAxIDIzOjAzOjQwCi0tLSBpbnB1dC5jCTE5OTYvMDcvMDEgMjM6MzQ6 MDIKKioqKioqKioqKioqKioqCioqKiAxLDQgKioqKgohIC8qIGlucHV0LmMgLS0gcmVhZCBpbnB1 dCBmcm9tIGZpbGVzIG9yIHN0cmluZ3MgKCRSZXZpc2lvbjogMS4xICQpICovCiAgCiAgI2luY2x1 ZGUgImVzLmgiCiAgI2luY2x1ZGUgImlucHV0LmgiCi0tLSAxLDUgLS0tLQohIC8qIGlucHV0LmMg LS0gcmVhZCBpbnB1dCBmcm9tIGZpbGVzIG9yIHN0cmluZ3MgKCRSZXZpc2lvbjogMS4yICQpICov CiEgLyogc3RkZ2V0ZW52IGlzIGJhc2VkIG9uIHRoZSBGcmVlQlNEIGdldGVudiAqLwogIAogICNp bmNsdWRlICJlcy5oIgogICNpbmNsdWRlICJpbnB1dC5oIgoqKioqKioqKioqKioqKioKKioqIDM1 LDQwICoqKioKLS0tIDM2LDQ1IC0tLS0KICBleHRlcm4gY2hhciAqcmVhZGxpbmUoY2hhciAqKTsK ICBleHRlcm4gdm9pZCBhZGRfaGlzdG9yeShjaGFyICopOwogIGV4dGVybiB2b2lkIHJsX3Jlc2V0 X3Rlcm1pbmFsKGNoYXIgKik7CisgCisgc3RhdGljIGNoYXIgKnN0ZGdldGVudihjb25zdCBjaGFy ICopOworIHN0YXRpYyBjaGFyICplc2dldGVudihjb25zdCBjaGFyICopOworIHN0YXRpYyBjaGFy ICooKnJlYWxnZXRlbnYpKGNvbnN0IGNoYXIgKikgPSBzdGRnZXRlbnY7CiAgI2VuZGlmCiAgCiAg CioqKioqKioqKioqKioqKgoqKiogMjA3LDIxMyAqKioqCiAgfQogIAogIC8qIGdldGVudiAtLSBm YWtlIHZlcnNpb24gb2YgZ2V0ZW52IGZvciByZWFkbGluZSAob3Igb3RoZXIgbGlicmFyaWVzKSAq LwohIGV4dGVybiBjaGFyICpnZXRlbnYoY29uc3QgY2hhciAqbmFtZSkgewogIAlMaXN0ICp2YWx1 ZSA9IHZhcmxvb2t1cChuYW1lLCBOVUxMKTsKICAJaWYgKHZhbHVlID09IE5VTEwpCiAgCQlyZXR1 cm4gTlVMTDsKLS0tIDIxMiwyMTggLS0tLQogIH0KICAKICAvKiBnZXRlbnYgLS0gZmFrZSB2ZXJz aW9uIG9mIGdldGVudiBmb3IgcmVhZGxpbmUgKG9yIG90aGVyIGxpYnJhcmllcykgKi8KISBzdGF0 aWMgY2hhciAqZXNnZXRlbnYoY29uc3QgY2hhciAqbmFtZSkgewogIAlMaXN0ICp2YWx1ZSA9IHZh cmxvb2t1cChuYW1lLCBOVUxMKTsKICAJaWYgKHZhbHVlID09IE5VTEwpCiAgCQlyZXR1cm4gTlVM TDsKKioqKioqKioqKioqKioqCioqKiAyMzcsMjQyICoqKioKLS0tIDI0MiwyODIgLS0tLQogIAkJ UmVmUmV0dXJuKHN0cmluZyk7CiAgCX0KICB9CisgCisgCisgc3RhdGljIGNoYXIgKgorIHN0ZGdl dGVudihuYW1lKQorIAlyZWdpc3RlciBjb25zdCBjaGFyICpuYW1lOworIHsKKyAJZXh0ZXJuIGNo YXIgKiplbnZpcm9uOworIAlyZWdpc3RlciBpbnQgbGVuOworIAlyZWdpc3RlciBjb25zdCBjaGFy ICpucDsKKyAJcmVnaXN0ZXIgY2hhciAqKnAsICpjOworIAorIAlpZiAobmFtZSA9PSBOVUxMIHx8 IGVudmlyb24gPT0gTlVMTCkKKyAJCXJldHVybiAoTlVMTCk7CisgCWZvciAobnAgPSBuYW1lOyAq bnAgJiYgKm5wICE9ICc9JzsgKytucCkKKyAJCWNvbnRpbnVlOworIAlsZW4gPSBucCAtIG5hbWU7 CisgCWZvciAocCA9IGVudmlyb247IChjID0gKnApICE9IE5VTEw7ICsrcCkKKyAJCWlmIChzdHJu Y21wKGMsIG5hbWUsIGxlbikgPT0gMCAmJiBjW2xlbl0gPT0gJz0nKSB7CisgCQkJcmV0dXJuIChj ICsgbGVuICsgMSk7CisgCQl9CisgCXJldHVybiAoTlVMTCk7CisgfQorIAorIGNoYXIgKgorIGdl dGVudihjaGFyICpuYW1lKQorIHsKKyAJcmV0dXJuIHJlYWxnZXRlbnYobmFtZSk7CisgfQorIAor IGV4dGVybiB2b2lkCisgaW5pdGdldGVudih2b2lkKQorIHsKKyAJcmVhbGdldGVudiA9IGVzZ2V0 ZW52OworIH0KKyAKICAjZW5kaWYJLyogUkVBRExJTkUgKi8KICAKICAvKiBmZGZpbGwgLS0gZmls bCBpbnB1dCBidWZmZXIgYnkgcmVhZGluZyBmcm9tIGEgZmlsZSBkZXNjcmlwdG9yICovCioqKiAx LjEJMTk5Ni8wNy8wMSAyMzoxNDoxNgotLS0gdmFyLmMJMTk5Ni8wNy8wMSAyMzoxNDozMgoqKioq KioqKioqKioqKioKKioqIDEsNCAqKioqCiEgLyogdmFyLmMgLS0gZXMgdmFyaWFibGVzICgkUmV2 aXNpb246IDEuMSAkKSAqLwogIAogICNpbmNsdWRlICJlcy5oIgogICNpbmNsdWRlICJnYy5oIgot LS0gMSw0IC0tLS0KISAvKiB2YXIuYyAtLSBlcyB2YXJpYWJsZXMgKCRSZXZpc2lvbjogMS4yNCAk KSAqLwogIAogICNpbmNsdWRlICJlcy5oIgogICNpbmNsdWRlICJnYy5oIgoqKioqKioqKioqKioq KioKKioqIDM0OCwzNTMgKioqKgotLS0gMzQ4LDM1NyAtLS0tCiAgCXZhcnMgPSBta2RpY3QoKTsK ICAJbm9leHBvcnQgPSBOVUxMOwogIAllbnYgPSBta3ZlY3RvcigxMCk7CisgI2lmIFJFQURMSU5F CisgCWluaXRnZXRlbnYoKTsKKyAjZW5kaWYKKyAJCiAgfQogIAogIC8qIGltcG9ydHZhciAtLSBp bXBvcnQgYSBzaW5nbGUgZW52aXJvbm1lbnQgdmFyaWFibGUgKi8KKioqIDEuMQkxOTk2LzA3LzAx IDIzOjE2OjE0Ci0tLSBlcy5oCTE5OTYvMDcvMDEgMjM6MTg6MTkKKioqKioqKioqKioqKioqCioq KiAyODgsMjkzICoqKioKLS0tIDI4OCwyOTYgLS0tLQogIAogIGV4dGVybiBMaXN0ICpydW5mZChp bnQgZmQsIGNvbnN0IGNoYXIgKm5hbWUsIGludCBmbGFncyk7CiAgZXh0ZXJuIExpc3QgKnJ1bnN0 cmluZyhjb25zdCBjaGFyICpzdHIsIGNvbnN0IGNoYXIgKm5hbWUsIGludCBmbGFncyk7CisgI2lm IFJFQURMSU5FCisgZXh0ZXJuIHZvaWQgaW5pdGdldGVudih2b2lkKTsKKyAjZW5kaWYKICAKICAv KiBldmFsXyogZmxhZ3MgYXJlIGFsc28gdW5kZXJzdG9vZCBhcyBydW5mbGFncyAqLwogICNkZWZp bmUJcnVuX2ludGVyYWN0aXZlCQkgNAkvKiAtaSBvciAkMFswXSA9ICctJyAqLwo= ------- =_aaaaaaaaaa0-- From es-owner Mon Jul 1 20:32:13 1996 Received: from haven.uchicago.edu ([128.135.12.3]) by hawkwind.utcs.utoronto.ca with SMTP id <24392>; Mon, 1 Jul 1996 20:31:47 -0400 Received: from midway.uchicago.edu (root@midway.uchicago.edu [128.135.12.12]) by haven.uchicago.edu (8.7.5/8.7.3) with ESMTP id TAA26213 for ; Mon, 1 Jul 1996 19:31:02 -0500 (CDT) Received: from woodlawn.uchicago.edu (csdayton@woodlawn.uchicago.edu [128.135.12.9]) by midway.uchicago.edu (8.7.3/8.7.2) with ESMTP id TAA29208; Mon, 1 Jul 1996 19:31:37 -0500 (CDT) Message-Id: <199607020031.TAA29208@midway.uchicago.edu> In-reply-to: Soren Dayton's message of Mon, 1 Jul 1996 19:34:56 -0400 To: csdayton@midway.uchicago.edu cc: es@hawkwind.utcs.toronto.edu Subject: Re: fixed the getenv problem Reply-To: csdayton@midway.uchicago.edu References: <199607012333.SAA21933@midway.uchicago.edu> Date: Mon, 1 Jul 1996 20:32:39 -0400 From: Soren Dayton I am sorry. That was horrible. here is the patch *** 1.1 1996/07/01 23:03:40 --- input.c 1996/07/01 23:34:02 *************** *** 1,4 **** ! /* input.c -- read input from files or strings ($Revision: 1.22 $) */ #include "es.h" #include "input.h" --- 1,5 ---- ! /* input.c -- read input from files or strings ($Revision: 1.2 $) */ ! /* stdgetenv is based on the FreeBSD getenv */ #include "es.h" #include "input.h" *************** *** 35,40 **** --- 36,45 ---- extern char *readline(char *); extern void add_history(char *); extern void rl_reset_terminal(char *); + + static char *stdgetenv(const char *); + static char *esgetenv(const char *); + static char *(*realgetenv)(const char *) = stdgetenv; #endif *************** *** 207,213 **** } /* getenv -- fake version of getenv for readline (or other libraries) */ ! extern char *getenv(const char *name) { List *value = varlookup(name, NULL); if (value == NULL) return NULL; --- 212,218 ---- } /* getenv -- fake version of getenv for readline (or other libraries) */ ! static char *esgetenv(const char *name) { List *value = varlookup(name, NULL); if (value == NULL) return NULL; *************** *** 237,242 **** --- 242,282 ---- RefReturn(string); } } + + + static char * + stdgetenv(name) + register const char *name; + { + extern char **environ; + register int len; + register const char *np; + register char **p, *c; + + if (name == NULL || environ == NULL) + return (NULL); + for (np = name; *np && *np != '='; ++np) + continue; + len = np - name; + for (p = environ; (c = *p) != NULL; ++p) + if (strncmp(c, name, len) == 0 && c[len] == '=') { + return (c + len + 1); + } + return (NULL); + } + + char * + getenv(char *name) + { + return realgetenv(name); + } + + extern void + initgetenv(void) + { + realgetenv = esgetenv; + } + #endif /* READLINE */ /* fdfill -- fill input buffer by reading from a file descriptor */ *** es.h Mon Jul 1 19:17:57 1996 --- es.h.orig Mon Jul 1 19:16:25 1996 *************** *** 288,293 **** --- 288,296 ---- extern List *runfd(int fd, const char *name, int flags); extern List *runstring(const char *str, const char *name, int flags); + #if READLINE + extern void initgetenv(void); + #endif /* eval_* flags are also understood as runflags */ #define run_interactive 4 /* -i or $0[0] = '-' */ *** var.c.orig Tue May 30 06:13:52 1995 --- var.c Mon Jul 1 19:16:44 1996 *************** *** 348,353 **** --- 348,356 ---- vars = mkdict(); noexport = NULL; env = mkvector(10); + #if READLINE + initgetenv(); + #endif } /* importvar -- import a single environment variable */ From es-owner Wed Jul 10 18:33:43 1996 Received: from haven.uchicago.edu ([128.135.12.3]) by hawkwind.utcs.utoronto.ca with SMTP id <24401>; Wed, 10 Jul 1996 18:25:57 -0400 Received: from woodlawn.uchicago.edu (root@woodlawn.uchicago.edu [128.135.12.9]) by haven.uchicago.edu (8.7.5/8.7.3) with ESMTP id RAA10366 for ; Wed, 10 Jul 1996 17:25:01 -0500 (CDT) Received: from woodlawn.uchicago.edu (csdayton@localhost.uchicago.edu [127.0.0.1]) by woodlawn.uchicago.edu (8.7.1/8.7.2) with ESMTP id RAA17984 for ; Wed, 10 Jul 1996 17:26:48 -0500 (CDT) Message-Id: <199607102226.RAA17984@woodlawn.uchicago.edu> To: es@hawkwind.utcs.toronto.edu Subject: A thought about some things in es. Reply-To: csdayton@midway.uchicago.edu MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <17977.837037606.1@woodlawn.uchicago.edu> Date: Wed, 10 Jul 1996 18:26:47 -0400 From: Soren Dayton I was just reading `Design and Implementation of the BSD 4.4 Operating System' and I ran across the section on job control (which es made me stop wanting). And I thought that it would be pretty easy to implement it es. Has someone tried this? It seems that what one would have to do is create one new primitive (something to do a tcspgrp) and change $&fork and $&wait to do a little more. In the case of wait, this is no big deal because it does so little that making it do more would not be noticed (and its return value is not specified). The change to $&fork would actually make it fork and _not_ wait. Then you could implement fork as something like fn fork something { $&wait <={ %fork something } } Then, with these three changes, I think that you could implement a csh(1) job control (granted a dubious thing, but kinda neat). What do people think? Soren From es-owner Wed Jul 10 18:50:42 1996 Received: from galapagos.cse.psu.edu ([130.203.2.12]) by hawkwind.utcs.utoronto.ca with SMTP id <24402>; Wed, 10 Jul 1996 18:48:20 -0400 Received: from localhost by galapagos.cse.psu.edu with SMTP id <12685>; Wed, 10 Jul 1996 18:47:48 -0400 To: csdayton@midway.uchicago.edu cc: es@hawkwind.utcs.toronto.edu Subject: Re: A thought about some things in es. In-reply-to: Your message of "Wed, 10 Jul 1996 18:26:47 EDT." <199607102226.RAA17984@woodlawn.uchicago.edu> Date: Wed, 10 Jul 1996 18:47:39 -0400 From: Scott Schwartz Message-Id: <96Jul10.184748edt.12685@galapagos.cse.psu.edu> Not having job control at all in my Plan 9 kernel makes me more happy than I can say. Maybe it is time to port es finally? :-) From es-owner Wed Jul 10 20:27:26 1996 Received: from mary-ann.cs.wisc.edu ([128.105.11.56]) by hawkwind.utcs.utoronto.ca with SMTP id <24402>; Wed, 10 Jul 1996 20:26:31 -0400 Received: (from krisna@localhost) by mary-ann.cs.wisc.edu (8.6.12/8.6.12) id SAA26245 for es@hawkwind.utcs.toronto.edu; Wed, 10 Jul 1996 18:26:22 -0600 From: Krishna Kunchithapadam Message-Id: <199607110026.SAA26245@mary-ann.cs.wisc.edu> Subject: Re: A thought about some things in es. To: es@hawkwind.utcs.toronto.edu Date: Wed, 10 Jul 1996 20:26:21 -0400 In-Reply-To: <96Jul10.184748edt.12685@galapagos.cse.psu.edu> from "Scott Schwartz" at Jul 10, 96 06:47:39 pm X-Web: http://www.cs.wisc.edu/~krisna/krisna.html X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1804 Scott Schwartz writes: : : Not having job control at all in my Plan 9 kernel makes me more happy : than I can say. Maybe it is time to port es finally? :-) : Now _this_ is a sentiment that is hard to comprehend. I can understand someone not using (the available) job-control features in a system, because they find another route more convenient. I can also understand someone wanting an implementation of job-control that is different from the one they actually have. But why would anyone be _more_ happy that a kernel does not provide any support for job-control? Does not providing job- control make the kernel design any cleaner (in a manner visible to programmers and/or users)? Faster? Or is it something else altogether? I use job-control all the time, even though I am on a windowing system. Very often, it is much more convenient for me (in terms of keystrokes and response time) to suspend an editor, do a "make", and jump back to the editor, all in the same window. I know I can get along quite ably without job-control but is there some set of _objective_ reasons why job-control is a "Bad Thing"? Or have people been bitten by early bad implementations of job-control that they are never willing to trust that word again? I know that this issue almost never dies (the `es' and `rc' mail archives are a testimony to that). But as someone who has painfully gone through those archives many times looking for a proper answer to this question, I am sorry to say that I came across more heat than light. Please feel free to enlighten me via a non-group reply if you wish. I really am interested in knowing why kernels without job-control are better than kernels with. I am also willing to post a summary of replies I get to the list if enough people are interested. --Krishna From es-owner Thu Jul 11 00:21:29 1996 Received: from galapagos.cse.psu.edu ([130.203.2.12]) by hawkwind.utcs.utoronto.ca with SMTP id <24401>; Thu, 11 Jul 1996 00:20:08 -0400 Received: from localhost by galapagos.cse.psu.edu with SMTP id <12685>; Thu, 11 Jul 1996 00:19:44 -0400 To: Krishna Kunchithapadam cc: es@hawkwind.utcs.toronto.edu Subject: Re: A thought about some things in es. In-reply-to: Your message of "Wed, 10 Jul 1996 20:26:21 EDT." <199607110026.SAA26245@mary-ann.cs.wisc.edu> Date: Thu, 11 Jul 1996 00:19:32 -0400 From: Scott Schwartz Message-Id: <96Jul11.001944edt.12685@galapagos.cse.psu.edu> Krishna Kunchithapadam writes: | But why would anyone be _more_ happy that a kernel does not | provide any support for job-control? Does not providing job- | control make the kernel design any cleaner (in a manner visible | to programmers and/or users)? Faster? Or is it something else | altogether? Yes, much cleaner and simpler. Just look at posix: they couldn't agree on existing mechanisms, so they invented something new. Plan 9 takes a simple approach: No teletypes in the kernel, hence no teletype based job control. I'm not making an argument for asceticism. I feel that user mode interfaces can do a respectable job, although not identically the bsd ctrl-Z thing. I use "screen" all the time, just bind ctrl-z to the command character instead of ctrl-a. And if you are running a window system (almost always, these days) that's the appropriate place for such things. From es-owner Thu Jul 11 00:26:41 1996 Received: from eterna.com.au ([203.15.111.129]) by hawkwind.utcs.utoronto.ca with SMTP id <24401>; Thu, 11 Jul 1996 00:26:19 -0400 Received: from localhost (localhost [127.0.0.1]) by eterna.com.au (8.7.5/8.7.3) with SMTP id OAA02660; Thu, 11 Jul 1996 14:25:25 +1000 (EST) Message-Id: <199607110425.OAA02660@eterna.com.au> X-Authentication-Warning: splode.eterna.com.au: Host localhost [127.0.0.1] didn't use HELO protocol To: Scott Schwartz cc: es@hawkwind.utcs.toronto.edu, Krishna Kunchithapadam From: matthew green Subject: Re: A thought about some things in es. In-reply-to: Your message of "Thu, 11 Jul 1996 00:19:32 -0400." <96Jul11.001944edt.12685@galapagos.cse.psu.edu> Date: Thu, 11 Jul 1996 00:25:25 -0400 Sender: mrg@eterna.com.au I'm not making an argument for asceticism. I feel that user mode interfaces can do a respectable job, although not identically the bsd ctrl-Z thing. I use "screen" all the time, just bind ctrl-z to the command character instead of ctrl-a. And if you are running a window system (almost always, these days) that's the appropriate place for such things. i disagree completely. i use screen and X often. infact, i always use screen :) but without job control, i would be sorely lost. i use it probably every 10 minutes or so, when i am hacking. anyway, bob manson hacked es-0.84 to do job control for me some years ago. the only problem was a couple of core dumps that i was seeing. i don't have the source anymore :-( but i will ask bob if he still does. .mrg. From es-owner Thu Jul 11 00:48:36 1996 Received: from piglet.splode.com ([192.31.85.85]) by hawkwind.utcs.utoronto.ca with SMTP id <24401>; Thu, 11 Jul 1996 00:48:21 -0400 Received: (from friedman@localhost) by piglet.splode.com (8.7.5/8.7.3) id XAA17711; Wed, 10 Jul 1996 23:48:02 -0500 Date: Thu, 11 Jul 1996 00:48:02 -0400 Message-Id: <199607110448.XAA17711@piglet.splode.com> From: friedman@splode.com (Noah Friedman) To: es@hawkwind.utcs.toronto.edu Subject: Re: A thought about some things in es. Reply-To: friedman@splode.com Can we please, PLEASE not have another job control holy war on this list? No one is going to persuade anyone else that their way is the better way, so how about sparing the us all a lot of wasted bandwidth? If you have patches to post that implement job control, then post them. If you don't want to use them, then for god's sake just press the delete key already. From es-owner Thu Jul 11 01:42:10 1996 Received: from staff.cs.su.OZ.AU ([129.78.8.1]) by hawkwind.utcs.utoronto.ca with SMTP id <24401>; Thu, 11 Jul 1996 01:41:52 -0400 Received: from suede.sw.oz.au by swallow.sw.oz.au with ESMTP id FAA10104; Thu, 11 Jul 1996 05:41:30 GMT (8.6.10/Unixware) (from jeremy@suede.sw.oz.au for ) Received: by suede.sw.oz.au id FAA06691; Thu, 11 Jul 1996 05:41:28 GMT (SMI-8.6/1.34) (from jeremy for ) From: "Jeremy Fitzhardinge" Message-Id: <9607111541.ZM6689@suede.sw.oz.au> Date: Thu, 11 Jul 1996 16:41:28 -0400 In-Reply-To: Krishna Kunchithapadam "Re: A thought about some things in es." (Jul 10, 8:26pm) References: <199607110026.SAA26245@mary-ann.cs.wisc.edu> X-Face: '6U=%Tv\k1l-:?\$C[D@G 7(vl~w8&y}!f\bh#wL#n,TGKh>T.c7eT5-y)Hl'i;A1z$9?*lD.k}yqshddFb l[EC}c=;uc%x'}uh3E91p&oE, es@hawkwind.utcs.toronto.edu Subject: Rant about job control (Was: A thought about some things in es.) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jul 10, 8:26pm, Krishna Kunchithapadam wrote: > But why would anyone be _more_ happy that a kernel does not > provide any support for job-control? Does not providing job- > control make the kernel design any cleaner (in a manner visible > to programmers and/or users)? Faster? Or is it something else > altogether? Oh, YES, I'd love to completely lose job control. We do a product for checkpoint/restart of processes and process groups (Hibernator, now on SGI's Irix 6.2, whahoo). We can cope with lots of things: mmap, threads, pipes, files, restore pids, etc, but there's just no way of making a restored interactive program work sensibly with job control after restart. Well, there's lots of ways, but there's no way of working out which one to use automatically, since it depends on what your shell is, and what you're doing. We ended up having to add a -j option to restart to say "this is an interactive program and I'm using job control", and that's just a compromise between working well and forcing the user to know much more than they wanted to about sessions/process groups/tty drivers/etc, etc. Job control is a mess in both conception and implementation. Even worse is when you compare the subtly different mechanisms around: BSD, SYSV, POSIX, and random vendor extentions. And *then* you get the amalgam systems which want to please everyone, so you get things like "posix semantics until you use a BSD call, or use BSD libraries, unless you use...". And just look at the goo job control introduces: - new tty drivers - SIGTSTP, SIGTTIN, SIGTTOU - new process group semantics - sessions (or semantically overloaded process groups) - a mass of new session and process group system calls - rewrites of all shells and interactive programs wanting to use them The last one is the killer. The introduce a whole pile of stuff to get some facilities of marginal value. That would have been vaguely acceptible if it had been transparent to user apps, but no, you need to change all *those* too. And its almost impossible to do portably, because everyone does it differently, or has different bugs in their "standard" implementations. It's really hard to think of a worse way to multiplex terminals. The implication of all this is that job control is worse than Irix's horrific threads/memory sharing "model" (which we can mostly cope with), which is a truly astounding thought. At least you can mostly ignore sproc if you're not using it. > I use job-control all the time, even though I am on a windowing > system. Very often, it is much more convenient for me (in terms > of keystrokes and response time) to suspend an editor, do a > "make", and jump back to the editor, all in the same window. Plan 9 window systems typically pop up new windows instantly, so there's no speed advantage to not doing so. Something like "screen" is a reasonable alternative for Unix hosts which are too burdened with X to do real work. J From es-owner Thu Jul 11 02:57:58 1996 Received: from cegelecproj.co.uk ([159.245.72.6]) by hawkwind.utcs.utoronto.ca with SMTP id <24401>; Thu, 11 Jul 1996 02:57:45 -0400 Received: from vampire.cegelecproj.co.uk (cerberus.cegelecproj.co.uk) by cegelecproj.co.uk (4.1/SMI-4.1) id AA05073; Thu, 11 Jul 96 07:57:37 BST Received: from phantom.cegelecproj.co.uk by vampire.cegelecproj.co.uk (SMI-8.6/SMI-SVR4) id HAA13697; Thu, 11 Jul 1996 07:57:31 +0100 Received: by phantom.cegelecproj.co.uk (SMI-8.6/SMI-SVR4) id HAA05647; Thu, 11 Jul 1996 07:57:30 +0100 Date: Thu, 11 Jul 1996 02:57:30 -0400 From: Steve_Kilbane@cegelecproj.co.uk Message-Id: <199607110657.HAA05647@phantom.cegelecproj.co.uk> To: es@hawkwind.utcs.toronto.edu Subject: Re: A thought about some things in es. X-Mailer: Wilymail 0.4 > Can we please, PLEASE not have another job control holy war on this list? This is sensible. Damn. Anyone got any good suggestions for where to continue? :-) From es-owner Mon Jul 22 11:28:38 1996 Received: from haven.uchicago.edu ([128.135.12.3]) by hawkwind.utcs.utoronto.ca with SMTP id <24426>; Mon, 22 Jul 1996 11:25:39 -0400 Received: from woodlawn.uchicago.edu (root@woodlawn.uchicago.edu [128.135.12.9]) by haven.uchicago.edu (8.7.5/8.7.3) with ESMTP id KAA27969 for ; Mon, 22 Jul 1996 10:24:43 -0500 (CDT) Received: from woodlawn.uchicago.edu (csdayton@localhost.uchicago.edu [127.0.0.1]) by woodlawn.uchicago.edu (8.7.1/8.7.2) with ESMTP id KAA24992 for ; Mon, 22 Jul 1996 10:26:43 -0500 (CDT) Message-Id: <199607221526.KAA24992@woodlawn.uchicago.edu> To: es@hawkwind.utcs.toronto.edu Subject: all the patches Reply-To: csdayton@midway.uchicago.edu Date: Mon, 22 Jul 1996 11:26:42 -0400 From: Soren Dayton I know that there have been some patches to es 0.9-alpha and I do not think that I have them all. Would someone be willing to put all of them up for ftp or something like that so that I could get them? Thanks Soren From es-owner Mon Sep 30 13:32:07 1996 Received: from katnga.adn.edu.ph ([165.220.57.6]) by hawkwind.utcs.utoronto.ca with SMTP id <24497>; Mon, 30 Sep 1996 13:28:43 -0400 Received: (from k9410052@localhost) by katnga.adn.edu.ph (8.7.5/8.7.3) id BAA01276; Tue, 1 Oct 1996 01:36:11 +0800 (PST) Date: Mon, 30 Sep 1996 13:36:10 -0400 Illegal-Object: Syntax error in From: address found on hawkwind.utcs.utoronto.ca: From: "REALISAN . ANNELETH A. " ^-illegal CR in token From: To: es@hawkwind.utcs.toronto.edu Subject: request... Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII I am a Computer Science student of Ateneo de Naga, Philippines and our class is having a report on the different programming languages and the Es programming language got our attention. Can we have a free manual about the language, the histoy, source code, sample programs and the publications . Our report will on October 3, 1996. We are in need of your help. Thank you for consideration. Sincerely yours, _ __ _ _ _ _ _ (_)___ / _` | ' \| ' \| / -_) \__,_|_||_|_||_|_\___| k9410052@katnga.adn.edu.ph From es-owner Fri Oct 4 01:20:31 1996 Received: from katnga.adn.edu.ph ([165.220.57.6]) by hawkwind.utcs.utoronto.ca with SMTP id <24502>; Fri, 4 Oct 1996 01:16:25 -0400 Received: (from k9410052@localhost) by katnga.adn.edu.ph (8.7.5/8.7.3) id LAA01072; Fri, 4 Oct 1996 11:06:57 +0800 (PST) Date: Thu, 3 Oct 1996 23:06:56 -0400 From: "REALISAN . ANNELETH A." To: Paul Haahr cc: es@hawkwind.utcs.toronto.edu Subject: es-request In-Reply-To: <199610021539.IAA26205@netcom9.netcom.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Wed, 2 Oct 1996, Paul Haahr wrote: > Are you sure the es you want is the unix shell that this list discusses? YES... I want the UNIX shell.... > Anyway, a paper describing es is available at > http://www.webcom.com/haahr/es/es-usenix-winter93.html > The latest version of the source is available from > ftp://ftp.sys.utoronto.ca/pub/es/es-0.9-alpha1.tar.gz > (Though Soren Dayton has sent me an autoconfig version which I should > make available by the end of the week as alpha2.) > For history of how it developed, see the mail archives, which are in the > same directory as the source. The source includes a reasonably complete > unix manual page. > Paul I have already ... but there are some incomplete informatio... about the history... i don't know where look for it in the source... we need the history... Here are some of the topics we are going to report about the Es programming language... Background * who invented it and why? * can u categorize the language (object-oriented, functional, etc.) * what other language(s) is it descended from? * in a nutshell, what did it add to its predecessors? Waht did it take away? * how has the language evolved since its introduction? Basic Properties * general overview of the language * language evaluation criteria * implementation method * primitive data types * names * bindings * type checking * strong typing * scoping * referencing environments * type compatability * data models Special Properties * anything special you find interesting * what can this language do that others can't? * for what application would this language be suitable? * for what would it not be suitable? if u could give some of the ftp sites so we might be able to look for it... and if you could give us some file attachements that we need... thank you very much... Sincerely your, Anneleth A. Realisan Ateneo de Naga, Philippines k9410052@katnga.adn.edu.ph From es-owner Fri Oct 4 12:05:36 1996 Received: from netcom5.netcom.com ([192.100.81.113]) by hawkwind.utcs.utoronto.ca with SMTP id <24502>; Fri, 4 Oct 1996 12:04:24 -0400 Received: (from haahr@localhost) by netcom5.netcom.com (8.6.13/Netcom) id JAA06812; Fri, 4 Oct 1996 09:02:54 -0700 Date: Fri, 4 Oct 1996 12:02:54 -0400 From: haahr@netcom.com (Paul Haahr) Message-Id: <199610041602.JAA06812@netcom5.netcom.com> To: "Anneleth A. Realisan" Cc: es@hawkwind.utcs.toronto.edu Subject: Re: es-request In-Reply-To: References: <199610021539.IAA26205@netcom9.netcom.com> k9410052@katnga.adn.edu.ph wrote > > Anyway, a paper describing es is available at > > http://www.webcom.com/haahr/es/es-usenix-winter93.html > > The latest version of the source is available from > > ftp://ftp.sys.utoronto.ca/pub/es/es-0.9-alpha1.tar.gz > > (Though Soren Dayton has sent me an autoconfig version which I should > > make available by the end of the week as alpha2.) > > For history of how it developed, see the mail archives, which are in the > > same directory as the source. The source includes a reasonably complete > > unix manual page. > > Paul > > I have already ... but there are some incomplete informatio... about the > history... i don't know where look for it in the source... we need the > history... What history exists is in the sources, the paper, and the mail archives. (Did you find the mailing list archives at ftp.sys.utoronto.ca?) Nothing more has been written on it, as far as I know. > Here are some of the topics we are going to report about the Es > programming language... > > Background > * who invented it and why? > * can u categorize the language (object-oriented, functional, etc.) > * what other language(s) is it descended from? Read the paper. > * in a nutshell, what did it add to its predecessors? Waht did it take > away? Well, a main predecessor was the plan9/unix shell rc, and it should be pretty easy to find the rc manual page and compare the feature sets and where things work differently. > * how has the language evolved since its introduction? See the email archives. > Basic Properties > > * general overview of the language > * language evaluation criteria > * implementation method > * primitive data types > * names > * bindings > * type checking > * strong typing > * scoping > * referencing environments > * type compatability > * data models > > Special Properties > > * anything special you find interesting > * what can this language do that others can't? > * for what application would this language be suitable? > * for what would it not be suitable? I think you'll have to come to your own conclusions on these topics based on the usenix paper. > if u could give some of the ftp sites so we might be able to look for > it... and if you could give us some file attachements that we need... > thank you very much... You'll find all the information available, I think, at the sites listed above. Paul From es-owner Tue Oct 22 14:43:52 1996 Received: from chanur.imf.unit.no ([129.241.15.100]) by hawkwind.utcs.utoronto.ca with SMTP id <24511>; Tue, 22 Oct 1996 14:38:06 -0400 Received: (qmail 1798 invoked by uid 13799); 22 Oct 1996 18:37:40 -0000 From: "Harald Hanche-Olsen" Message-Id: <9610222037.ZM1795@imf.unit.no> Date: Tue, 22 Oct 1996 14:37:39 -0400 In-Reply-To: <199606262101.RAA21487@netcom13.netcom.com> References: <199606261825.OAA09515@netcom12.netcom.com> <21410.835815041@waldrog.cs.uidaho.edu> <199606261906.OAA14273@piglet.splode.com> <199606261931.OAA09728@woodlawn.uchicago.edu> <199606262101.RAA21487@netcom13.netcom.com> X-Face: ,};iH+.X."ygdh+d]dhDa&*SY2HIr/pV,Sz%PSzi!bjr"jOC{%6*g@aB("DWtv6?EKg2_pjvl.q^RA`hM(a'X$&NeX?6W)yb>5o0\n\G_g+G(E_qQnAlI.BJOG9mw%i.wyiT(7i&CElcgIE_s^^Bz UJokoXH7L)L*jn X-URL: http://www.imf.unit.no/~hanche/ X-Mailer: Z-Mail (3.2.1 10apr95) To: es@hawkwind.utcs.toronto.edu Subject: Re: esdump dumps ...... core! Sender: Harald Hanche-Olsen Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit Has anybody looked into the es build problem on linux, caused by the fake getenv getting called too early (i.e., directly from crt0.c)? - Harald (who wants to use es on linux too) From es-owner Tue Oct 22 16:15:07 1996 Received: from haven.uchicago.edu ([128.135.12.3]) by hawkwind.utcs.utoronto.ca with SMTP id <24511>; Tue, 22 Oct 1996 16:13:23 -0400 Received: from mach.uchicago.edu (mach.uchicago.edu [128.135.12.6]) by haven.uchicago.edu (8.7.5/8.7.3) with ESMTP id PAA18444; Tue, 22 Oct 1996 15:09:55 -0500 (CDT) Received: (from csdayton@localhost) by mach.uchicago.edu (8.7.5/8.7.3) id PAA26687; Tue, 22 Oct 1996 15:11:01 -0500 (CDT) To: "Harald Hanche-Olsen" Cc: es@hawkwind.utcs.toronto.edu Subject: Re: esdump dumps ...... core! References: <199606261825.OAA09515@netcom12.netcom.com> <21410.835815041@waldrog.cs.uidaho.edu> <199606261906.OAA14273@piglet.splode.com> <199606261931.OAA09728@woodlawn.uchicago.edu> <199606262101.RAA21487@netcom13.netcom.com> <9610222037.ZM1795@imf.unit.no> From: Soren Dayton Date: Tue, 22 Oct 1996 16:11:00 -0400 In-Reply-To: "Harald Hanche-Olsen"'s message of Tue, 22 Oct 1996 14:37:39 -0400 Message-ID: Lines: 10 X-Mailer: Gnus v5.2.25/XEmacs 19.14 "Harald Hanche-Olsen" writes: > Has anybody looked into the es build problem on linux, caused by the fake > getenv getting called too early (i.e., directly from crt0.c)? That particular patch seems to solve that problem too. and I sent it to Paul along with some autoconf stuff which figures out all of that correctly. Soren From es-owner Tue Oct 22 16:52:54 1996 Received: from netcom9.netcom.com ([192.100.81.119]) by hawkwind.utcs.utoronto.ca with SMTP id <24511>; Tue, 22 Oct 1996 16:51:44 -0400 Received: (from haahr@localhost) by netcom9.netcom.com (8.6.13/Netcom) id NAA11672; Tue, 22 Oct 1996 13:51:33 -0700 Date: Tue, 22 Oct 1996 16:51:33 -0400 From: haahr@netcom.com (Paul Haahr) Message-Id: <199610222051.NAA11672@netcom9.netcom.com> To: Soren Dayton Cc: "Harald Hanche-Olsen" , es@hawkwind.utcs.toronto.edu Subject: Re: esdump dumps ...... core! In-Reply-To: References: <199606261825.OAA09515@netcom12.netcom.com> <21410.835815041@waldrog.cs.uidaho.edu> <199606261906.OAA14273@piglet.splode.com> <199606261931.OAA09728@woodlawn.uchicago.edu> <199606262101.RAA21487@netcom13.netcom.com> <9610222037.ZM1795@imf.unit.no> Soren Dayton wrote > "Harald Hanche-Olsen" writes: > > Has anybody looked into the es build problem on linux, caused by the fake > > getenv getting called too early (i.e., directly from crt0.c)? > > That particular patch seems to solve that problem too. and I sent it to > Paul along with some autoconf stuff which figures out all of that > correctly. Which I really will deal with within the next few days... From es-owner Fri Nov 15 14:44:08 1996 Received: from rzaixsrv2.rrz.uni-hamburg.de ([134.100.33.12]) by hawkwind.utcs.utoronto.ca with SMTP id <24557>; Fri, 15 Nov 1996 14:37:11 -0500 Received: from rzaix01.rrz.uni-hamburg.de by rzaixsrv2.rrz.uni-hamburg.de (AIX 4.1/UCB 5.64/4.03) id AA21118; Fri, 15 Nov 1996 20:35:55 +0100 Received: by rzaix01.rrz.uni-hamburg.de (AIX 4.1/UCB 5.64/4.03) id AA15858; Fri, 15 Nov 1996 20:35:55 +0100 From: fj4a013@rrz.uni-hamburg.de (Benito Gattuso) Message-Id: <9611151935.AA15858@rzaix01.rrz.uni-hamburg.de> Subject: pwd on prompt To: es@hawkwind.utcs.toronto.edu Date: Fri, 15 Nov 1996 14:35:54 -0500 X-Mailer: ELM [version 2.4 PL23] Content-Type: text Content-Length: 282 How can I have the pwd on the prompt. I've installed es-0.84 on a RS6000 machine with AIX 3.2.5 with gcc 2.7.0. I find es is very nice but I' have the pwd on the prompt as it is the case with tcsh, ksh and bash. Many thanks in advance. Benito Gattuso Hamburg, germany From es-owner Fri Nov 15 15:18:51 1996 Received: from rulcmc.leidenuniv.nl ([132.229.1.33]) by hawkwind.utcs.utoronto.ca with SMTP id <24556>; Fri, 15 Nov 1996 15:15:26 -0500 Received: by rulcmc.leidenuniv.nl id (Debian /\oo/\ Smail3.1.29.1 #29.37); Fri, 15 Nov 96 21:15 MET Message-Id: From: joost@rulcmc.leidenuniv.nl (joost witteveen) Subject: Re: pwd on prompt To: fj4a013@rrz.uni-hamburg.de (Benito Gattuso) Date: Fri, 15 Nov 1996 15:15:09 -0500 Cc: es@hawkwind.utcs.toronto.edu In-Reply-To: <9611151935.AA15858@rzaix01.rrz.uni-hamburg.de> from "Benito Gattuso" at Nov 15, 96 02:35:54 pm X-Mailer: ELM [version 2.4 PL25 PGP2] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 694 > > How can I have the pwd on the prompt. > I've installed es-0.84 on a RS6000 machine with AIX 3.2.5 with > gcc 2.7.0. > I find es is very nice I never ever used es, and didn't even know I was on this list. However, your question prompt me to read the man page: > but I' have the pwd on the prompt as it is the case > with tcsh, ksh and bash. Yeah, I like that, too. I managed to do this with: prompt=`{pwd} However, this doesn't give me a space between the prompt and the command, I'll have to experiment a bit more. Anyway, I agree with you that es is quite nice! -- joost witteveen joost@rulcmc.leidenuniv.nl joostje@debian.org -- Use Debian/GNU Linux! From es-owner Fri Nov 15 15:44:53 1996 Received: from cs.uchicago.edu ([128.135.11.87]) by hawkwind.utcs.utoronto.ca with SMTP id <24555>; Fri, 15 Nov 1996 15:44:12 -0500 Received: from angst.cs.uchicago.edu (angst [128.135.164.35]) by cs.uchicago.edu (8.7.6/8.7.3) with ESMTP id OAA03714; Fri, 15 Nov 1996 14:43:27 -0600 (CST) Received: (from csdayton@localhost) by angst.cs.uchicago.edu (8.7.6/8.7.3) id OAA12048; Fri, 15 Nov 1996 14:43:25 -0600 (CST) To: joost@rulcmc.leidenuniv.nl (joost witteveen) Cc: fj4a013@rrz.uni-hamburg.de (Benito Gattuso), es@hawkwind.utcs.toronto.edu Subject: Re: pwd on prompt References: From: Soren Dayton Date: Fri, 15 Nov 1996 15:43:21 -0500 In-Reply-To: joost@rulcmc.leidenuniv.nl's message of Fri, 15 Nov 1996 15:15:09 -0500 Message-ID: Lines: 31 X-Mailer: Gnus v5.3/XEmacs 19.14 joost@rulcmc.leidenuniv.nl (joost witteveen) writes: > > How can I have the pwd on the prompt. > > I've installed es-0.84 on a RS6000 machine with AIX 3.2.5 with > > gcc 2.7.0. > > I find es is very nice > > I never ever used es, and didn't even know I was on this list. > However, your question prompt me to read the man page: :) > > but I' have the pwd on the prompt as it is the case > > with tcsh, ksh and bash. > > Yeah, I like that, too. I managed to do this with: > > prompt=`{pwd} > > However, this doesn't give me a space between the prompt and the > command, I'll have to experiment a bit more. I do this: fn %prompt { prompt = $cwd^'; ' } and then set cwd when I change directories. Soren From es-owner Fri Nov 15 15:48:13 1996 Received: from motgate2.mot.com ([129.188.136.20]) by hawkwind.utcs.utoronto.ca with SMTP id <24556>; Fri, 15 Nov 1996 15:48:03 -0500 Received: from pobox.mot.com (pobox.mot.com [129.188.137.100]) by motgate2.mot.com (8.7.6/8.6.10/MOT-3.8) with ESMTP id OAA00454; Fri, 15 Nov 1996 14:42:26 -0600 (CST) Received: from il02dns1.comm.mot.com (il02dns1.comm.mot.com [145.1.3.2]) by pobox.mot.com (8.7.6/8.6.10/MOT-3.8) with ESMTP id OAA16616; Fri, 15 Nov 1996 14:47:05 -0600 (CST) Received: from supra.comm.mot.com (supra.comm.mot.com [145.1.80.40]) by il02dns1.comm.mot.com (8.7.5/8.7.3) with SMTP id OAA10547; Fri, 15 Nov 1996 14:59:01 -0600 (CST) Received: by supra.comm.mot.com (4.1/SMI-4.1) id AA18221; Fri, 15 Nov 96 14:47:00 CST Date: Fri, 15 Nov 1996 15:47:00 -0500 Message-Id: <9611152047.AA18221@supra.comm.mot.com> From: Loren James Rittle To: joost@rulcmc.leidenuniv.nl Cc: fj4a013@rrz.uni-hamburg.de, es@hawkwind.utcs.toronto.edu In-Reply-To: (joost@rulcmc.leidenuniv.nl) Subject: Re: pwd on prompt Reply-To: rittle@comm.mot.com >From: joost@rulcmc.leidenuniv.nl (joost witteveen) >Date: Fri, 15 Nov 1996 15:15:09 -0500 >I never ever used es, and didn't even know I was on this list. I find it odd that you would be on a list for es, if you don't use it. Whatever... :-) >> but I' have the pwd on the prompt as it is the case >> with tcsh, ksh and bash. >Yeah, I like that, too. I managed to do this with: >prompt=`{pwd} >However, this doesn't give me a space between the prompt and the >command, I'll have to experiment a bit more. This solution is static. That is to say that the prompt will not change when the currect directory changes. I suggest something based on one of the following: let (o = $fn-%prompt) { fn %prompt {prompt = `{pwd}^' '; $o}} let (o = $fn-cd) { fn cd {$o $*; prompt = `{pwd}^' '}} The first solution will rerun the binding to prompt before each display at the expense of a minor amount of extra delay. The second solution will only rerun the binding after 'cd' changes it. The problem with the second approach is that it will not work in any case where es program fragments have a let binding to the original 'cd'. >Anyway, I agree with you that es is quite nice! I sometimes wonder why more people don't use it. Regards, Loren -- Loren J. Rittle (rittle@comm.mot.com) PGP KeyIDs: 1024/B98B3249 2048/ADCE34A5 Systems Technology Research (IL02/2240) FP1024:6810D8AB3029874DD7065BC52067EAFD Motorola, Inc. FP2048:FDC0292446937F2A240BC07D42763672 (847) 576-7794 Call for verification of fingerprints. From es-owner Sat Feb 15 18:59:42 1997 Received: from mail.cs.tu-berlin.de ([130.149.17.13]) by hawkwind.utcs.utoronto.ca with SMTP id <24622>; Sat, 15 Feb 1997 18:58:09 -0500 Received: from hammer.cs.tu-berlin.de (schoelle@hammer.cs.tu-berlin.de [130.149.31.186]) by mail.cs.tu-berlin.de (8.8.5/8.8.5) with ESMTP id AAA03620 for ; Sun, 16 Feb 1997 00:51:14 +0100 (MET) Received: (from schoelle@localhost) by hammer.cs.tu-berlin.de (8.8.5/8.8.5) id AAA26721; Sun, 16 Feb 1997 00:50:55 +0100 (MET) Date: Sat, 15 Feb 1997 18:50:55 -0500 Message-Id: <199702152350.AAA26721@hammer.cs.tu-berlin.de> From: Bernd Schoeller MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: es@hawkwind.utcs.toronto.edu Subject: Need help to compile es Hello! I would need some help compiling 'es' for 'Sun4'. When I compile it using 'readline' or 'editline' I always get 'Bus error's or 'realloc'-errors. Can anybody help me and/or provide me with a working Version? Ciao, Bernd -- | BERND SCHOELLER Emacs is, of course, the | | schoelle@cs.tu-berlin.de world's greatest operating system | | http://www.cs.tu-berlin.de/~schoelle posing as an editor | From es-owner Mon Feb 17 14:40:26 1997 Received: from motgate.mot.com ([129.188.136.100]) by hawkwind.utcs.utoronto.ca with SMTP id <24629>; Mon, 17 Feb 1997 14:35:08 -0500 Received: from pobox.mot.com (pobox.mot.com [129.188.137.100]) by motgate.mot.com (8.7.6/8.6.10/MOT-3.8) with ESMTP id NAA11398; Mon, 17 Feb 1997 13:34:25 -0600 (CST) Received: from il02dns1.comm.mot.com (il02dns1.comm.mot.com [145.1.3.2]) by pobox.mot.com (8.7.6/8.6.10/MOT-3.8) with ESMTP id NAA04741; Mon, 17 Feb 1997 13:34:13 -0600 (CST) Received: from supra.rsch.comm.mot.com (supra.comm.mot.com [145.1.80.40]) by il02dns1.comm.mot.com (8.7.5/8.7.3) with SMTP id NAA09827; Mon, 17 Feb 1997 13:34:10 -0600 (CST) Received: by supra.rsch.comm.mot.com (4.1/SMI-4.1) id AA01758; Mon, 17 Feb 97 13:34:07 CST Date: Mon, 17 Feb 1997 14:34:07 -0500 Message-Id: <9702171934.AA01758@supra.rsch.comm.mot.com> From: Loren James Rittle To: schoelle@cs.tu-berlin.de Cc: es@hawkwind.utcs.toronto.edu In-Reply-To: <199702152350.AAA26721@hammer.cs.tu-berlin.de> (message from Bernd Schoeller on Sat, 15 Feb 1997 18:50:55 -0500) Subject: Re: Need help to compile es Reply-To: rittle@comm.mot.com >Date: Sat, 15 Feb 1997 18:50:55 -0500 >From: Bernd Schoeller > I would need some help compiling 'es' for 'Sun4'. When I compile it >using 'readline' or 'editline' I always get 'Bus error's or >'realloc'-errors. Can anybody help me and/or provide me with a working >Version? Hello Bernd, For which OS version are you trying to compile? Which compiler and version number are you trying to use? Which version of readline? I can help with the following information: I have used gcc 2.6.X and 2.7.X to build es 0.84 and 0.9alpha with readline-2.0 on a SparcStation 10 running SunOS 4.1.4 and Solaris 2.5. I might be able to give you the binaries with the exact sources used to build them, but it would probably be better to help you build them yourself. Regards, Loren -- Loren J. Rittle (rittle@comm.mot.com) PGP KeyIDs: 1024/B98B3249 2048/ADCE34A5 Systems Technology Research (IL02/2240) FP1024:6810D8AB3029874DD7065BC52067EAFD Motorola, Inc. FP2048:FDC0292446937F2A240BC07D42763672 (847) 576-7794 Call for verification of fingerprints. From es-owner Wed Mar 19 16:39:02 1997 Received: from lilac.csi.cam.ac.uk ([131.111.8.44]) by hawkwind.utcs.utoronto.ca with SMTP id <24634>; Wed, 19 Mar 1997 16:36:16 -0500 Received: from g.pet.cam.ac.uk [131.111.209.233] by lilac.csi.cam.ac.uk with smtp (Exim 1.58 #1) id 0w7KkR-0004Gn-00; Wed, 19 Mar 1997 12:45:43 +0000 Received: from g.pet.cam.ac.uk [127.0.0.1] by g.pet.cam.ac.uk with esmtp (Exim 1.59 #1) id 0w7Kkk-0006mh-00; Wed, 19 Mar 1997 12:46:02 +0000 To: es@hawkwind.utcs.toronto.edu Subject: Plumbing Date: Wed, 19 Mar 1997 07:46:02 -0500 From: Gareth McCaughan Message-Id: [I have sent a please-subscribe-me message to es-request, but haven't yet had an acknowledgement. I'd therefore appreciate being sent copies of any replies to this. -- g] Suppose you're doing some operation that produces a lot of output, and possibly some error output too (a big "make", say). It would be useful to be able to distinguish between the two kinds of output; but you don't just want to send them to different places, because you want to keep the two synchronised. What would be good would be the ability to connect both fd 1 and fd 2 of one process to two different fd's of another process: some syntax like make universe |[1=0,2=3] process_output or maybe make universe |[1=0][2=3] process_output . It's not clear to me what the right way of modifying the pipe primitive for this would be; probably something like %pipe {make universe} '1 2' '0 3' {process_output} would be best. Does this make sense, or is the whole idea crazy? If it makes sense, is there any chance of its seeing the light of day in a future "es" release? Is there more chance if I implement it? (It might be possible to get a similar effect by redirecting stderr of the first process to a fifo file, but I can't get this to do what I want because it seems that the first process can't write to the fifo unless the second is actually waiting for input from it; |select()|ing on it isn't enough. This is a nuisance.) -- Gareth McCaughan Dept. of Pure Mathematics & Mathematical Statistics, gjm11@dpmms.cam.ac.uk Cambridge University, England. From es-owner Wed Mar 19 18:00:29 1997 Received: from netcom9.netcom.com ([192.100.81.119]) by hawkwind.utcs.utoronto.ca with SMTP id <24662>; Wed, 19 Mar 1997 17:57:06 -0500 Received: (from haahr@localhost) by netcom9.netcom.com (8.6.13/Netcom) id OAA10377; Wed, 19 Mar 1997 14:34:37 -0800 Date: Wed, 19 Mar 1997 17:34:37 -0500 From: haahr@netcom.com (Paul Haahr) Message-Id: <199703192234.OAA10377@netcom9.netcom.com> To: Gareth McCaughan Cc: es@hawkwind.utcs.toronto.edu Subject: Re: Plumbing In-Reply-To: References: > Suppose you're doing some operation that produces a lot of > output, and possibly some error output too (a big "make", > say). It would be useful to be able to distinguish between > the two kinds of output; but you don't just want to send them > to different places, because you want to keep the two > synchronised. > > What would be good would be the ability to connect both fd 1 > and fd 2 of one process to two different fd's of another > process: some syntax like > > make universe |[1=0,2=3] process_output > > or maybe > > make universe |[1=0][2=3] process_output > . Ah, the infamous multipipe primitives. > It's not clear to me what the right way of modifying the pipe > primitive for this would be; probably something like > > %pipe {make universe} '1 2' '0 3' {process_output} > > would be best. (Er, ugh.) If I were to do such a thing, I'd probably change the pipe primitive to take a list of output-on-left/input-on-right fd pairs, either counted or explicitly delimited, something like make universe |[1=0,2=3] process_output | grep errors turning into %pipe {make universe} 1 0 2 3 . {process_output} 1 0 . {grep errors} But if we did this, then people would start to want things like circular pipes, just for the sake of completeness, and the notations get really absurd. > Does this make sense, or is the whole idea crazy? Not crazy. It's just that the number of times it actually would be used is probably pretty rare. > If it makes sense, is there any chance of its seeing the light of day > in a future "es" release? Is there any chance of a future release of es seeing the light of day? I keep saying I'll do it, but I haven't yet, and my attention has wandered quite far from es. > Is there more chance if I implement it? If you implement it, release it as a patch and see if other es users find it useful. (And don't bother trying hacks with FIFOs. They always bite back.) Paul From es-owner Thu Mar 20 05:15:49 1997 Received: from cegelecproj.co.uk ([159.245.72.6]) by hawkwind.utcs.utoronto.ca with SMTP id <24632>; Thu, 20 Mar 1997 05:13:10 -0500 Received: from vampire.cegelecproj.co.uk (cerberus.cegelecproj.co.uk) by cegelecproj.co.uk (4.1/SMI-4.1) id AA20980; Thu, 20 Mar 97 08:13:45 GMT Received: from phantom.cegelecproj.co.uk by vampire.cegelecproj.co.uk (SMI-8.6/SMI-SVR4) id IAA24257; Thu, 20 Mar 1997 08:13:22 GMT Received: by phantom.cegelecproj.co.uk (SMI-8.6/SMI-SVR4) id IAA08447; Thu, 20 Mar 1997 08:13:22 GMT Date: Thu, 20 Mar 1997 03:13:22 -0500 From: Steve_Kilbane@cegelecproj.co.uk Message-Id: <199703200813.IAA08447@phantom.cegelecproj.co.uk> X-Planation: X-Faces images can be viewed with the XFaces program To: gjm11@dpmms.cam.ac.uk, haahr@netcom.com Subject: Re: Plumbing Cc: es@hawkwind.utcs.toronto.edu X-Face: Iqsa(US9p?)Y^W+6Ff[Z]rM"uFE) lFDjag1e]\/#2 Garath spake: > It would be useful to be able to distinguish between > the two kinds of output; but you don't just want to send them > to different places, because you want to keep the two > synchronised. Bzzt! You're onto something of a loser here already, because once the output from the fds enters the realm of pipes, you're into buffering issues, and you lose the synchronisation. Paul responded thus: > Not crazy. It's just that the number of times it actually would be used > is probably pretty rare. Indeed. I'd say that es just isn't really the tool for this job. It gives you enough control over fds to do most things you're likely to think of, but isn't willing to strangle itself in the process. So, no circular pipes, for example. If you really want to go with this, I'd suggest dropping elegance and going for practicality. Perl's IPC::Open3 module will give the functionality you require, and Perl is always great for those one-off jobs that aren't worth breaking out the C compiler for... steve From es-owner Thu Mar 20 17:13:14 1997 Received: from mauve.csi.cam.ac.uk ([131.111.8.38]) by hawkwind.utcs.utoronto.ca with SMTP id <24634>; Thu, 20 Mar 1997 17:11:24 -0500 Received: from g.pet.cam.ac.uk [131.111.209.233] by mauve.csi.cam.ac.uk with smtp (Exim 1.58 #1) id 0w7g3p-0002f0-00; Thu, 20 Mar 1997 11:31:10 +0000 Received: from g.pet.cam.ac.uk [127.0.0.1] by g.pet.cam.ac.uk with esmtp (Exim 1.59 #1) id 0w7g47-0000Ov-00; Thu, 20 Mar 1997 11:31:27 +0000 To: es@hawkwind.utcs.toronto.edu Subject: Re: Plumbing In-reply-to: Your message of "Thu, 20 Mar 1997 08:13:22 GMT." <199703200813.IAA08447@phantom.cegelecproj.co.uk> Date: Thu, 20 Mar 1997 06:31:22 -0500 From: Gareth McCaughan Message-Id: In response to my suggestion of a multipipe primitive for es, Steve Kilbane wrote: > > It would be useful to be able to distinguish between > > the two kinds of output; but you don't just want to send them > > to different places, because you want to keep the two > > synchronised. > > Bzzt! You're onto something of a loser here already, because > once the output from the fds enters the realm of pipes, you're > into buffering issues, and you lose the synchronisation. *click* You're absolutely right, of course. On the other hand, you keep *some* synchronisation (i.e., two bits of output emitted at the same time are likely to arrive at about the same time); it might or might not be enough for practical purposes. I'm not very clued up on the implementation details; would someone more expert than I am like to comment here? and also: > If you really want to go with this, I'd suggest dropping elegance and > going for practicality. Perl's IPC::Open3 module will give the > functionality you require, and Perl is always great for those one-off > jobs that aren't worth breaking out the C compiler for... That sounds like a good idea. I hadn't known about Open3, but it looks like it will do what I want without too much pain. Thanks! Paul Haahr, on the other hand, wrote in response to my suggestion for the syntax of the extended %pipe this would require: > > %pipe {make universe} '1 2' '0 3' {process_output} ... > (Er, ugh.) If I were to do such a thing, I'd probably change the pipe > primitive to take a list of output-on-left/input-on-right fd pairs, > either counted or explicitly delimited, something like > > make universe |[1=0,2=3] process_output | grep errors > > turning into > > %pipe {make universe} 1 0 2 3 . {process_output} 1 0 . {grep errors} The reason for my proposed syntax was that it would be backward-compatible with the existing %pipe syntax. Isn't this relevant? > But if we did this, then people would start to want things like circular > pipes, just for the sake of completeness, and the notations get really > absurd. Well, you don't have to follow every idea to its illogical conclusion :-) > Not crazy. It's just that the number of times it actually would be used > is probably pretty rare. I would use it every time I do a "make". (Following the suggestion of Perl5's Open3 module, I'll probably actually use that instead.) > Is there any chance of a future release of es seeing the light of day? ;-) > If you implement it, release it as a patch and see if other es users > find it useful. Given that Perl will do the plumbing I need, I'll probably just use that. But if anyone else on this list thinks the multipipe hack would be useful, I might do it after all. -- Gareth McCaughan Dept. of Pure Mathematics & Mathematical Statistics, gjm11@dpmms.cam.ac.uk Cambridge University, England. From es-owner Fri Mar 21 03:23:29 1997 Received: from cegelecproj.co.uk ([159.245.72.6]) by hawkwind.utcs.utoronto.ca with SMTP id <24644>; Fri, 21 Mar 1997 03:21:37 -0500 Received: from vampire.cegelecproj.co.uk (cerberus.cegelecproj.co.uk) by cegelecproj.co.uk (4.1/SMI-4.1) id AA29116; Fri, 21 Mar 97 08:07:24 GMT Received: from phantom.cegelecproj.co.uk by vampire.cegelecproj.co.uk (SMI-8.6/SMI-SVR4) id IAA25251; Fri, 21 Mar 1997 08:07:05 GMT Received: by phantom.cegelecproj.co.uk (SMI-8.6/SMI-SVR4) id IAA08660; Fri, 21 Mar 1997 08:07:03 GMT Date: Fri, 21 Mar 1997 03:07:03 -0500 From: Steve_Kilbane@cegelecproj.co.uk Message-Id: <199703210807.IAA08660@phantom.cegelecproj.co.uk> X-Planation: X-Faces images can be viewed with the XFaces program To: es@hawkwind.utcs.toronto.edu, gjm11@dpmms.cam.ac.uk Subject: Re: Plumbing X-Face: Iqsa(US9p?)Y^W+6Ff[Z]rM"uFE) lFDjag1e]\/#2 Gareth wrote: > That sounds like a good idea. I hadn't known about Open3, but it > looks like it will do what I want without too much pain. Thanks! "7 Thou shalt study thy libraries and strive not to reinvent them without cause, that thy code may be short and readable and thy days pleasant and productive." -- Henry Spencer, "The Ten Commandments for C Programmers" From es-owner Fri Mar 21 16:41:43 1997 Received: from mauve.csi.cam.ac.uk ([131.111.8.38]) by hawkwind.utcs.utoronto.ca with SMTP id <24634>; Fri, 21 Mar 1997 16:40:21 -0500 Received: from g.pet.cam.ac.uk [131.111.209.233] by mauve.csi.cam.ac.uk with smtp (Exim 1.58 #1) id 0w82L5-0000ap-00; Fri, 21 Mar 1997 11:18:27 +0000 Received: from g.pet.cam.ac.uk [127.0.0.1] by g.pet.cam.ac.uk with esmtp (Exim 1.59 #1) id 0w82L5-00034O-00; Fri, 21 Mar 1997 11:18:27 +0000 To: es@hawkwind.utcs.toronto.edu Subject: Re: Plumbing In-reply-to: Your message of "Fri, 21 Mar 1997 03:07:03 EST." <199703210807.IAA08660@phantom.cegelecproj.co.uk> Date: Fri, 21 Mar 1997 06:18:22 -0500 From: Gareth McCaughan Message-Id: > > That sounds like a good idea. I hadn't known about Open3, but it > > looks like it will do what I want without too much pain. Thanks! > > "7 Thou shalt study thy libraries and strive not to reinvent > them without cause, that thy code may be short and readable and > thy days pleasant and productive." > -- Henry Spencer, "The Ten Commandments for C Programmers" Yep. I do this, honest. I just haven't read everything yet. Anyway, I now have a short Perl script that does what I want. IPC::Open3 is indeed the Right Thing, and unless someone mails me saying that they want a multipipe facility in es I shall quietly forget the whole business. Maybe. -- Gareth McCaughan Dept. of Pure Mathematics & Mathematical Statistics, gjm11@dpmms.cam.ac.uk Cambridge University, England. From es-owner Wed Mar 26 19:27:26 1997 Received: from gatekeeper.ctron.com ([134.141.197.25]) by hawkwind.utcs.utoronto.ca with SMTP id <24652>; Wed, 26 Mar 1997 19:16:56 -0500 Received: (from news@localhost) by gatekeeper.ctron.com (8.6.12/8.6.9) id QAA03198; Wed, 26 Mar 1997 16:54:09 -0500 Received: from stealth.ctron.com(134.141.5.107) by gatekeeper.ctron.com via smap (V2.0beta) id xma003166; Wed, 26 Mar 97 16:53:43 -0500 Received: from dur-mail.ctron.com by stealth.ctron.com (4.1/SMI-4.1) id AA04247; Wed, 26 Mar 97 16:53:49 EST Received: from davros.ctron.com (davros.ctron.com [134.141.64.232]) by dur-mail.ctron.com (8.6.12/8.6.9) with ESMTP id QAA19977; Wed, 26 Mar 1997 16:57:44 -0500 Message-Id: <199703262157.QAA19977@dur-mail.ctron.com> To: haahr@netcom.com, byron@netapp.com Cc: es@hawkwind.utcs.toronto.edu Subject: es variables Date: Wed, 26 Mar 1997 16:55:55 -0500 From: Jeffrey Rogers I've been using es-0.9-alpha1 for a while now, with few problems (mostly dealing with working in an environment oriented toward sh/ksh/csh users). I recently noticed something odd with variables: For variables like LD_LIBRARY_PATH I sometimes have to append or prepend something to the existing path, which is a : seperated list (just like PATH). I normally do this using ; LD_LIBRARY_PATH=newpart:$LD_LIBRARY_PATH which works fine if LD_LIBRARY_PATH is already set. However, if it is not set, then newpart:$LD_LIBRARY_PATH evaluates to nothing, instead of "newpart:" as I expect. Adding carats doesn't help. It doesn't matter if the variable is before or after the plaintext. e.g. ; echo a$b $b^a a a ; b=foo ; echo a$b $b^a a afoo fooa a ; Is this correct behavior? Or is it a bug (perhaps only only local version)? If it is correct behavior, I guess I could copy a PATH-style settor for my original problem, but how would one normally go about adding text to a variable that is possibly null? I'm not on the list (yet; I just sent my subscription notice to -request) but I didn't see anything like this in the list archive. -J -- From es-owner Wed Mar 26 19:37:56 1997 Received: from netcom9.netcom.com ([192.100.81.119]) by hawkwind.utcs.utoronto.ca with SMTP id <24654>; Wed, 26 Mar 1997 19:27:21 -0500 Received: (from haahr@localhost) by netcom9.netcom.com (8.6.13/Netcom) id OAA12131; Wed, 26 Mar 1997 14:11:03 -0800 Date: Wed, 26 Mar 1997 17:11:03 -0500 From: haahr@netcom.com (Paul Haahr) Message-Id: <199703262211.OAA12131@netcom9.netcom.com> To: Jeffrey Rogers Cc: Byron Rakitzis , es@hawkwind.utcs.toronto.edu Subject: Re: es variables In-Reply-To: <199703262157.QAA19977@dur-mail.ctron.com> References: <199703262157.QAA19977@dur-mail.ctron.com> Jeffrey Rogers wrote > I've been using es-0.9-alpha1 for a while now, with few problems (mostly > dealing with working in an environment oriented toward sh/ksh/csh users). It is painful at times. Sorry about that. > I recently noticed something odd with variables: > > For variables like LD_LIBRARY_PATH I sometimes have to append or prepend > something to the existing path, which is a : seperated list (just like > PATH). I normally do this using > ; LD_LIBRARY_PATH=newpart:$LD_LIBRARY_PATH > which works fine if LD_LIBRARY_PATH is already set. However, if it is > not set, then newpart:$LD_LIBRARY_PATH evaluates to nothing, instead of > "newpart:" as I expect. Adding carats doesn't help. It doesn't matter > if the variable is before or after the plaintext. e.g. > ; echo a$b $b^a a > a > ; b=foo > ; echo a$b $b^a a > afoo fooa a > ; > > Is this correct behavior? Well, let's just say it's doing what it's specified to do. The problem is that there is no distinction between words and lists of words in concatenation. Whether it's what it should be doing is another story. This is one of those places es diverged from rc for some abstract notion of perfect internal consistency, at the expense of being painful to use in practice. (Translation of the previous comment: it's my fault, not Byron's.) > Or is it a bug (perhaps only only local version)? No such luck. > If it is correct behavior, I guess I could copy a PATH-style settor > for my original problem, but how would one normally go about adding > text to a variable that is possibly null? The workaround I've used is LD_LIBRARY_PATH=newpart:$^LD_LIBRARY_PATH where $^var creates a single word from the variable, which is '' if the variable is a 0-length list. The multiple components are concatenated with spaces, but that shouldn't hurt, since a multi-component LD_LIBRARY_PATH is probably a mistake. > I'm not on the list (yet; I just sent my subscription notice to > -request) but I didn't see anything like this in the list archive. (That may have prevented your note from going to the whole list, as part of cks's crackdown on spamming.) Paul From es-owner Wed Mar 26 21:16:12 1997 Received: from motgate.mot.com ([129.188.136.100]) by hawkwind.utcs.utoronto.ca with SMTP id <24640>; Wed, 26 Mar 1997 21:14:13 -0500 Received: from pobox.mot.com (pobox.mot.com [129.188.137.100]) by motgate.mot.com (8.7.6/8.6.10/MOT-3.8) with ESMTP id TAA27474 for ; Wed, 26 Mar 1997 19:06:23 -0600 (CST) Received: from il02dns1.comm.mot.com (il02dns1.comm.mot.com [145.1.3.2]) by pobox.mot.com (8.7.6/8.6.10/MOT-3.8) with ESMTP id TAA21575 for ; Wed, 26 Mar 1997 19:06:07 -0600 (CST) Received: from supra.rsch.comm.mot.com (supra.comm.mot.com [145.1.80.40]) by il02dns1.comm.mot.com (8.7.5/8.7.3) with SMTP id TAA00235 for ; Wed, 26 Mar 1997 19:06:09 -0600 (CST) Received: by supra.rsch.comm.mot.com (4.1/SMI-4.1) id AA27404; Wed, 26 Mar 97 19:06:02 CST Date: Wed, 26 Mar 1997 20:06:02 -0500 Message-Id: <9703270106.AA27404@supra.rsch.comm.mot.com> From: Loren James Rittle To: es@hawkwind.utcs.toronto.edu Subject: Incorrect signal handling under SYSV machines Reply-To: rittle@comm.mot.com I have used es-0.9-alpha1 for many moon under SunOS 4.1.[34] and DEC Alpha UNIX V4.0. [Note: I always have `interrupt' set to Control C under the terminal driver.] Whenever I hit Control C, most normal programs interactively activated under the shell are killed and I get a fresh command prompt. If I was in the middle of forming a command line, it is killed and I get a fresh prompt. Even if I had typed nothing, I get a fresh prompt. I recently recompiled it for SunOS 5.X and HP-UX 10.20 with gcc-2.7.2.1. For all architectures (even SunOS 4.1.4), I linked against the readline package. Under HP-UX 10.20, when I hit Control C twice at any points during a session under the es shell, the shell ``terminate[s] on signal 2.'' Under SunOS 5.5.1, the shell only responses to the first Control C, all later Control Cs appear to be eaten somewhere. Sorry to be so vague, I'm hoping someone out there knows my problem without me having to fully debug it. Thanks, Loren From es-owner Wed Mar 26 21:18:27 1997 Received: from motgate.mot.com ([129.188.136.100]) by hawkwind.utcs.utoronto.ca with SMTP id <24641>; Wed, 26 Mar 1997 21:16:02 -0500 Received: from mothost.mot.com (mothost.mot.com [129.188.137.101]) by motgate.mot.com (8.7.6/8.6.10/MOT-3.8) with ESMTP id TAA27937 for ; Wed, 26 Mar 1997 19:08:51 -0600 (CST) Received: from il02dns1.comm.mot.com (il02dns1.comm.mot.com [145.1.3.2]) by mothost.mot.com (8.7.6/8.6.10/MOT-3.8) with ESMTP id TAA27671 for ; Wed, 26 Mar 1997 19:08:43 -0600 (CST) Received: from supra.rsch.comm.mot.com (supra.comm.mot.com [145.1.80.40]) by il02dns1.comm.mot.com (8.7.5/8.7.3) with SMTP id TAA00295 for ; Wed, 26 Mar 1997 19:08:44 -0600 (CST) Received: by supra.rsch.comm.mot.com (4.1/SMI-4.1) id AA27440; Wed, 26 Mar 97 19:08:40 CST Date: Wed, 26 Mar 1997 20:08:40 -0500 Message-Id: <9703270108.AA27440@supra.rsch.comm.mot.com> From: Loren James Rittle To: es@hawkwind.utcs.toronto.edu Subject: Bug or feature? Reply-To: rittle@comm.mot.com It appears that the internal 'time' command doesn't like a 'for' loop yet other internal shell commands are acceptable. Bug or feature? [ rittle@supra ]; time echo hi hi 0r 0.0u 0.0s echo hi [ rittle@supra ]; time for (i=1 2 3) echo hi syntax error [ rittle@supra ]; for (i=1 2 3) echo hi hi hi hi [ rittle@supra ]; time if {~ $a b} {echo hi} 0r 0.0u 0.0s if {~ $a b} {echo hi} [ rittle@supra ]; Thanks, Loren From es-owner Thu Mar 27 04:20:24 1997 Received: from motgate.mot.com ([129.188.136.100]) by hawkwind.utcs.utoronto.ca with SMTP id <24643>; Thu, 27 Mar 1997 04:12:23 -0500 Received: from mothost.mot.com (mothost.mot.com [129.188.137.101]) by motgate.mot.com (8.7.6/8.6.10/MOT-3.8) with ESMTP id VAA15318 for ; Wed, 26 Mar 1997 21:15:19 -0600 (CST) Received: from il02dns1.comm.mot.com (il02dns1.comm.mot.com [145.1.3.2]) by mothost.mot.com (8.7.6/8.6.10/MOT-3.8) with ESMTP id VAA07622 for ; Wed, 26 Mar 1997 21:15:10 -0600 (CST) Received: from supra.rsch.comm.mot.com (supra.comm.mot.com [145.1.80.40]) by il02dns1.comm.mot.com (8.7.5/8.7.3) with SMTP id VAA02672 for ; Wed, 26 Mar 1997 21:15:11 -0600 (CST) Received: by supra.rsch.comm.mot.com (4.1/SMI-4.1) id AA29301; Wed, 26 Mar 97 21:15:06 CST Date: Wed, 26 Mar 1997 22:15:06 -0500 Message-Id: <9703270315.AA29301@supra.rsch.comm.mot.com> From: Loren James Rittle To: es@hawkwind.utcs.toronto.edu In-Reply-To: <9703270106.AA27404@supra.rsch.comm.mot.com> (message from Loren James Rittle on Wed, 26 Mar 1997 20:06:02 -0500) Subject: Re: Incorrect signal handling under SYSV machines Reply-To: rittle@comm.mot.com OK, sorry to be such an idiot, but it was a simple fix (the config.h entry for HP-UX is incorrect, I didn't know enough about SYSV to spot the problem myself). Here is a patch which will build an es that works under HP-UX 10.20 with the latest gcc when -DHPUX is applied: diff -c es-0.9-alpha1/config.h es-0.9-alpha1-fix/config.h *** es-0.9-alpha1/config.h Tue May 30 06:13:53 1995 --- es-0.9-alpha1-fix/config.h Wed Mar 26 21:03:05 1997 *************** *** 274,284 **** /* HP/UX 9.0.1 -- from rsalz@osf.org (Rich $alz) and haahr*/ #if HPUX - #define _INCLUDE_POSIX_SOURCE 1 - #define _INCLUDE_XOPEN_SOURCE 1 - #define _INCLUDE_HPUX_SOURCE 1 #ifndef BSD_LIMITS #define BSD_LIMITS 0 #endif #ifndef USE_WAIT3 #define USE_WAIT3 0 --- 274,284 ---- /* HP/UX 9.0.1 -- from rsalz@osf.org (Rich $alz) and haahr*/ #if HPUX #ifndef BSD_LIMITS #define BSD_LIMITS 0 + #endif + #ifndef SYSV_SIGNALS + #define SYSV_SIGNALS 1 #endif #ifndef USE_WAIT3 #define USE_WAIT3 0 Loren From es-owner Thu Mar 27 04:24:30 1997 Received: from cs.uchicago.edu ([128.135.11.87]) by hawkwind.utcs.utoronto.ca with SMTP id <24657>; Thu, 27 Mar 1997 04:20:33 -0500 Received: from jordan.cs.uchicago.edu (jordan [128.135.164.50]) by cs.uchicago.edu (8.8.5/8.7.3) with ESMTP id XAA23421 for ; Wed, 26 Mar 1997 23:46:16 -0600 (CST) Received: from jordan (localhost [127.0.0.1]) by jordan.cs.uchicago.edu (8.8.5/8.7.3) with ESMTP id XAA26455 for ; Wed, 26 Mar 1997 23:46:16 -0600 (CST) X-Face: `X="Sg7A[PL3/_8;>>ggjOy&\KtWiH7.wQ>Y"hQ2fxSG9RkPTCT}&^()5[Gp(-DaTf:t`MSBt@Li_C9U@y#i/c?i$uLQ8[';I$mMAm_rZta>l`STW_aA5`iD[!80p#_qmN4#tMu[Pu7wkIi)5*4YXAhg)9R2-BAWPbVOzgE$Ib4QuZn0YaE~'C/7h^CTuPybz$u Mail-Copies-To: never To: es@hawkwind.utcs.toronto.edu Subject: Re: Incorrect signal handling under SYSV machines References: <9703270106.AA27404@supra.rsch.comm.mot.com> Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=US-ASCII From: Soren Dayton Date: Thu, 27 Mar 1997 00:46:14 -0500 In-Reply-To: Loren James Rittle's message of Wed, 26 Mar 1997 20:06:02 -0500 Message-ID: Lines: 20 X-Mailer: Gnus v5.4.33/XEmacs 19.15(beta103) Sender: csdayton@cs.uchicago.edu Loren James Rittle writes: > I recently recompiled it for SunOS 5.X and HP-UX 10.20 with > gcc-2.7.2.1. For all architectures (even SunOS 4.1.4), I linked > against the readline package. > > Under HP-UX 10.20, when I hit Control C twice at any points during a > session under the es shell, the shell ``terminate[s] on signal 2.'' This is because es uses setjmp and longjmp rather than sigsetjmp and siglongj mp. I have this patch and a number of others that I am hoping to have out by the end of the week along with a gnu autoconf'ed es. I just need to get my hands on autoconf-2.11 and rebuild my configure files and test things. I also have patches that allows es to build on linux and mklinux (and other power with readline Soren pc machines) From es-owner Thu Mar 27 04:27:32 1997 Received: from motgate.mot.com ([129.188.136.100]) by hawkwind.utcs.utoronto.ca with SMTP id <24662>; Thu, 27 Mar 1997 04:23:59 -0500 Received: from pobox.mot.com (pobox.mot.com [129.188.137.100]) by motgate.mot.com (8.7.6/8.6.10/MOT-3.8) with ESMTP id AAA08898 for ; Thu, 27 Mar 1997 00:28:12 -0600 (CST) Received: from il02dns1.comm.mot.com (il02dns1.comm.mot.com [145.1.3.2]) by pobox.mot.com (8.7.6/8.6.10/MOT-3.8) with ESMTP id AAA02073 for ; Thu, 27 Mar 1997 00:28:10 -0600 (CST) Received: from supra.rsch.comm.mot.com (supra.comm.mot.com [145.1.80.40]) by il02dns1.comm.mot.com (8.7.5/8.7.3) with SMTP id AAA05567 for ; Thu, 27 Mar 1997 00:28:07 -0600 (CST) Received: by supra.rsch.comm.mot.com (4.1/SMI-4.1) id AA02883; Thu, 27 Mar 97 00:28:07 CST Date: Thu, 27 Mar 1997 01:28:07 -0500 Message-Id: <9703270628.AA02883@supra.rsch.comm.mot.com> From: Loren James Rittle To: es@hawkwind.utcs.toronto.edu In-Reply-To: <9703270106.AA27404@supra.rsch.comm.mot.com> (message from Loren James Rittle on Wed, 26 Mar 1997 20:06:02 -0500) Subject: Re: Incorrect signal handling under SYSV machines Reply-To: rittle@comm.mot.com > Under SunOS 5.5.1, the shell only responses to the first > Control C, all later Control Cs appear to be eaten somewhere. OK, I figured out that if I linked es against the version of readline that came with bash-2.0, everything is OK. Loren From es-owner Thu Mar 27 04:31:10 1997 Received: from motgate.mot.com ([129.188.136.100]) by hawkwind.utcs.utoronto.ca with SMTP id <24666>; Thu, 27 Mar 1997 04:27:22 -0500 Received: from pobox.mot.com (pobox.mot.com [129.188.137.100]) by motgate.mot.com (8.7.6/8.6.10/MOT-3.8) with ESMTP id BAA13326 for ; Thu, 27 Mar 1997 01:10:31 -0600 (CST) Received: from il02dns1.comm.mot.com (il02dns1.comm.mot.com [145.1.3.2]) by pobox.mot.com (8.7.6/8.6.10/MOT-3.8) with ESMTP id BAA10421 for ; Thu, 27 Mar 1997 01:10:29 -0600 (CST) Received: from supra.rsch.comm.mot.com (supra.comm.mot.com [145.1.80.40]) by il02dns1.comm.mot.com (8.7.5/8.7.3) with SMTP id BAA06151 for ; Thu, 27 Mar 1997 01:10:28 -0600 (CST) Received: by supra.rsch.comm.mot.com (4.1/SMI-4.1) id AA03449; Thu, 27 Mar 97 01:10:27 CST Date: Thu, 27 Mar 1997 02:10:27 -0500 Message-Id: <9703270710.AA03449@supra.rsch.comm.mot.com> From: Loren James Rittle To: es@hawkwind.utcs.toronto.edu Subject: Rare mishandling of interrupt signal Reply-To: rittle@comm.mot.com While testing es interrupt handling under SYS V machines, I found a reproducible method to crash es-0.9-alpha1 on all platforms I have access to when they are linked against either plain readline-2.0 or the readline from the latest bash. Has anyone else ever noticed this? ; while {sleep 1} {sleep 1} [enter tty interrupt char] ; [enter tty interrupt char at prompt] Or as run under the debugger: ; gdb es (gdb) handle SIGINT noprint pass nostop (gdb) run ; while {sleep 1} {sleep 1} [enter tty interrupt char] ; [enter tty interrupt char at prompt] Program exited normally. (gdb) After the while loop is broken with the tty interrupt char, the shell seems to act properly until a tty interrupt char is entered while at the shell prompt. E.g. as long as the tty interrupt char is entered while a program is running under the shell, the es shell properly kills interactive programs started under it and returns to the prompt. Here be dragons! I wish I knew UNIX signal handling well enough to even think about looking into this problem. :-) FYI, es-0.84 (sunos 4.1.4, gcc 2.x, readline-2.0) appears to have this problem as well. Regards, Loren From es-owner Thu Mar 27 04:34:21 1997 Received: from hplb.hpl.hp.com ([15.255.59.2]) by hawkwind.utcs.utoronto.ca with SMTP id <24670>; Thu, 27 Mar 1997 04:30:54 -0500 Received: from cdalton (cdalton.hpl.hp.com) by hplb.hpl.hp.com; Thu, 27 Mar 1997 08:25:45 GMT Received: by cdalton (1.37.109.16/15.6+ISC) id AA256701142; Thu, 27 Mar 1997 08:25:42 GMT From: Chris R Dalton Message-Id: <199703270825.AA256701142@cdalton> Subject: Re: Incorrect signal handling under SYSV machines To: rittle@comm.mot.com Date: Thu, 27 Mar 1997 03:25:41 -0500 Cc: es@hawkwind.utcs.toronto.edu In-Reply-To: <9703270106.AA27404@supra.rsch.comm.mot.com> from "Loren James Rittle" at Mar 26, 97 08:06:02 pm Organization: HP Labs Europe, Filton Rd, Stoke Gifford, Bristol, UK, BS12 6QZ X-Mailer: ELM [version 2.4 PL24] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 2472 Hi, > I have used es-0.9-alpha1 for many moon under SunOS 4.1.[34] and DEC > Alpha UNIX V4.0. [Note: I always have `interrupt' set to Control C > under the terminal driver.] Whenever I hit Control C, most normal > programs interactively activated under the shell are killed and I get > a fresh command prompt. If I was in the middle of forming a command > line, it is killed and I get a fresh prompt. Even if I had typed > nothing, I get a fresh prompt. [...] > > Under HP-UX 10.20, when I hit Control C twice at any points during a > session under the es shell, the shell ``terminate[s] on signal 2.'' Hmm, yes... I came across this a while ago, and I think the following fixed it for me, pending further investigation (which is still pending 8^/ ): *** signal.c.orig Tue May 30 12:13:51 1995 --- signal.c Fri Jul 7 10:36:44 1995 *************** *** 65,70 **** --- 65,71 ---- /* * the signal handler */ + static Sighandler setsignal(int sig, Sighandler handler); /* catcher -- catch (and defer) a signal from the kernel */ static void catcher(int sig) { *************** *** 79,86 **** ++sigcount; } interrupted = TRUE; ! if (slow) longjmp(slowlabel, 1); } --- 80,91 ---- ++sigcount; } interrupted = TRUE; ! if (slow) { ! #if USE_SIGACTION ! setsignal(sig, catcher); ! #endif longjmp(slowlabel, 1); + } } It looks like HP-UX is rather more strict, or something, about the circumstances under which it restores the original signal mask in a signal handler, using sigaction. The HP-UX sigaction(2) manual entry says: When a signal is caught by a signal-catching function installed by sigaction, a new mask is calculated and installed for the duration of the signal-catching function, or until a call is made to sigprocmask() or sigsuspend() (see sigprocmask(2) and sigsuspend(2)). [...] If and when the signal-catching function returns normally, the original signal mask is restored. The key is in that last sentence. When you press the INTR key during command entry, the `slow' flag is true, and the code takes the longjmp out of the signal handler. The longjmp doesn't count as `returning normally' from the signal handler, so the signal mask isn't restored. Hope this helps, Chris -- Chris R Dalton (crd@hplb.hpl.hp.com) Hewlett-Packard Laboratories, Stoke Gifford, Bristol, UK BS12 6QZ Phone: +44 117 922 8744 or +44 117 979 9910 x28744 FAX: +44 117 922 8924 From es-owner Thu Mar 27 17:10:12 1997 Received: from netcom12.netcom.com ([192.100.81.124]) by hawkwind.utcs.utoronto.ca with SMTP id <24678>; Thu, 27 Mar 1997 17:08:33 -0500 Received: (from haahr@localhost) by netcom12.netcom.com (8.6.13/Netcom) id KAA19001; Thu, 27 Mar 1997 10:17:18 -0800 Date: Thu, 27 Mar 1997 13:17:18 -0500 From: haahr@netcom.com (Paul Haahr) Message-Id: <199703271817.KAA19001@netcom12.netcom.com> To: Loren James Rittle Cc: es@hawkwind.utcs.toronto.edu Subject: Re: Bug or feature? In-Reply-To: <9703270108.AA27440@supra.rsch.comm.mot.com> References: <9703270108.AA27440@supra.rsch.comm.mot.com> > It appears that the internal 'time' command doesn't like a 'for' loop > yet other internal shell commands are acceptable. Bug or feature? > > [ rittle@supra ]; time for (i=1 2 3) echo hi > syntax error > [ rittle@supra ]; for (i=1 2 3) echo hi > hi > hi > hi Feature. ``for'' is special syntax, where ``if'' is just a shell function. As a workaround, use time { for (i=1 2 3) echo hi } --p From es-owner Thu Mar 27 17:11:47 1997 Received: from cs.uchicago.edu ([128.135.11.87]) by hawkwind.utcs.utoronto.ca with SMTP id <24679>; Thu, 27 Mar 1997 17:10:10 -0500 Received: from pippen.cs.uchicago.edu (pippen [128.135.164.51]) by cs.uchicago.edu (8.8.5/8.7.3) with ESMTP id MAA07612 for ; Thu, 27 Mar 1997 12:27:45 -0600 (CST) Received: from pippen (localhost [127.0.0.1]) by pippen.cs.uchicago.edu (8.8.5/8.7.3) with ESMTP id MAA06866 for ; Thu, 27 Mar 1997 12:27:44 -0600 (CST) X-Face: `X="Sg7A[PL3/_8;>>ggjOy&\KtWiH7.wQ>Y"hQ2fxSG9RkPTCT}&^()5[Gp(-DaTf:t`MSBt@Li_C9U@y#i/c?i$uLQ8[';I$mMAm_rZta>l`STW_aA5`iD[!80p#_qmN4#tMu[Pu7wkIi)5*4YXAhg)9R2-BAWPbVOzgE$Ib4QuZn0YaE~'C/7h^CTuPybz$u Mail-Copies-To: never To: es@hawkwind.utcs.toronto.edu Subject: Re: Bug or feature? References: <9703270108.AA27440@supra.rsch.comm.mot.com> Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=US-ASCII From: Soren Dayton Date: Thu, 27 Mar 1997 13:27:41 -0500 In-Reply-To: Loren James Rittle's message of Wed, 26 Mar 1997 20:08:40 -0500 Message-ID: Lines: 22 X-Mailer: Gnus v5.4.33/XEmacs 19.15(beta103) Sender: csdayton@cs.uchicago.edu Loren James Rittle writes: > It appears that the internal 'time' command doesn't like a 'for' loop > yet other internal shell commands are acceptable. Bug or feature? Well. `for' is a special form. I suspect that it would be fine if you wrapped it in a lambda. > [ rittle@supra ]; time for (i=1 2 3) echo hi > syntax error > [ rittle@supra ]; for (i=1 2 3) echo hi > hi > hi > hi ; time @ { for (i=1 2 3) echo hi } hi hi hi 0r 0.0u 0.0s @ * {for(i=1 2 3)echo hi} Soren From es-owner Thu Apr 3 05:59:00 1997 Received: from noc.msc.edu ([137.66.12.254]) by hawkwind.utcs.utoronto.ca with SMTP id <24640>; Thu, 3 Apr 1997 05:57:43 -0500 Received: from uc.msc.edu by noc.msc.edu (5.65/MSC/v3.0.1(920324)) id AA19630; Wed, 2 Apr 97 22:09:37 -0600 Received: from pobox.com (fergus-28.dialup.prtel.com [206.10.99.159]) by uc.msc.edu (8.7.5/8.6.6) with ESMTP id WAA00389 for ; Wed, 2 Apr 1997 22:09:31 -0600 (CST) Received: (from alk@localhost) by pobox.com (8.8.5/8.7.3) id WAA00249; Wed, 2 Apr 1997 22:09:26 -0600 (CST) Date: Wed, 2 Apr 1997 23:09:26 -0500 Reply-To: alk@pobox.com Message-Id: <199704030409.WAA00249@pobox.com> From: Tony Kimball Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: es@hawkwind.utcs.toronto.edu Subject: Re: Incorrect signal handling under SYSV machines References: <9703270106.AA27404@supra.rsch.comm.mot.com> <9703270315.AA29301@supra.rsch.comm.mot.com> X-Face: O9M"E%K;(f-Go/XDxL+pCxI5*gr[=FN@Y`cl1.Tn Very strange indeed: ; l='@(#)RELEASE VERSION HPC 2.0 TMrts 10.1-integration.2-FreeBSD/x86' ; echo $l @(#)RELEASE VERSION HPC 2.0 TMrts 10.1-integration.2-FreeBSD/x86 ; k=`{strings lib/libtmrts_g.a | grep RELEASE\ VERSION | head -1| sed s,'"',,g} ; echo $k > k.out ; echo $l > l.out ; diff *.out ; expr $l : $e expr $l : $e HPC 2.0 TMrts 10.1-integration.2-FreeBSD/x86 ; expr $k : $e expr $k : $e expr: syntax error Go figure. I might just crack the source out of curiousity on this one, unless some brilliant commentator can pre-emptively illuminate... //alk From es-owner Thu Apr 3 17:40:33 1997 Received: from g61-148.citenet.net ([207.183.45.148]) by hawkwind.utcs.utoronto.ca with SMTP id <24635>; Thu, 3 Apr 1997 17:38:36 -0500 Received: by g61-148.citenet.net id m0wCkKh-0008anC (Debian Smail-3.2 1996-Jul-4 #2); Thu, 3 Apr 1997 06:05:31 -0500 (EST) Message-Id: Date: Thu, 3 Apr 1997 06:05:31 -0500 From: Greg Stark To: es@hawkwind.utcs.toronto.edu Subject: Re: Incorrect signal handling under SYSV machines $k has a trailing newline in it and $l doesn't echo is adding a trailing newline to $l making the files equal. From es-owner Thu Apr 3 17:40:41 1997 Received: from chanur.math.ntnu.no ([129.241.15.100]) by hawkwind.utcs.utoronto.ca with SMTP id <24640>; Thu, 3 Apr 1997 17:40:19 -0500 Received: (qmail 8578 invoked by uid 13799); 3 Apr 1997 12:08:48 -0000 From: "Harald Hanche-Olsen" Message-Id: <970403140846.ZM8575@imf.unit.no> Date: Thu, 3 Apr 1997 07:08:46 -0500 In-Reply-To: <199704030409.WAA00249@pobox.com> References: <9703270106.AA27404@supra.rsch.comm.mot.com> <9703270315.AA29301@supra.rsch.comm.mot.com> <199704030409.WAA00249@pobox.com> X-Face: ,};iH+.X."ygdh+d]dhDa&*SY2HIr/pV,Sz%PSzi!bjr"jOC{%6*g@aB("DWtv6?EKg2_pjvl.q^RA`hM(a'X$&NeX?6W)yb>5o0\n\G_g+G(E_qQnAlI.BJOG9mw%i.wyiT(7i&CElcgIE_s^^Bz UJokoXH7L)L*jn X-URL: http://www.math.ntnu.no/~hanche/ X-Mailer: Z-Mail (4.0.1 13Jan97) To: alk@pobox.com, es@hawkwind.utcs.toronto.edu Subject: Re: Incorrect signal handling under SYSV machines Sender: Harald Hanche-Olsen MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit [ Tony Kimball 1997-4 -2 23:09 -0500 ] |--- | Very strange indeed: | | ; l='@(#)RELEASE VERSION HPC 2.0 TMrts 10.1-integration.2-FreeBSD/x86' | ; echo $l | @(#)RELEASE VERSION HPC 2.0 TMrts 10.1-integration.2-FreeBSD/x86 | ; k=`{strings lib/libtmrts_g.a | grep RELEASE\ VERSION | head -1| sed s,'"',,g} | ; echo $k > k.out | ; echo $l > l.out | ; diff *.out | ; expr $l : $e | expr $l : $e | HPC 2.0 TMrts 10.1-integration.2-FreeBSD/x86 | ; expr $k : $e | expr $k : $e | expr: syntax error | | Go figure. $l is one word. $k is 5 words. Try expr $^k : $e Or -- better -- do k=``\n{strings ...} - Harald From es-owner Thu Apr 3 17:43:18 1997 Received: from cs.uchicago.edu ([128.135.11.87]) by hawkwind.utcs.utoronto.ca with SMTP id <24666>; Thu, 3 Apr 1997 17:42:36 -0500 Received: from ra.cs.uchicago.edu (ra [128.135.20.101]) by cs.uchicago.edu (8.8.5/8.7.3) with ESMTP id LAA23109 for ; Thu, 3 Apr 1997 11:00:54 -0600 (CST) Received: from ra (localhost [127.0.0.1]) by ra.cs.uchicago.edu (8.8.5/8.8.5) with ESMTP id LAA09146 for ; Thu, 3 Apr 1997 11:00:53 -0600 (CST) X-Face: `X="Sg7A[PL3/_8;>>ggjOy&\KtWiH7.wQ>Y"hQ2fxSG9RkPTCT}&^()5[Gp(-DaTf:t`MSBt@Li_C9U@y#i/c?i$uLQ8[';I$mMAm_rZta>l`STW_aA5`iD[!80p#_qmN4#tMu[Pu7wkIi)5*4YXAhg)9R2-BAWPbVOzgE$Ib4QuZn0YaE~'C/7h^CTuPybz$u Mail-Copies-To: never To: es@hawkwind.utcs.toronto.edu Subject: Re: Incorrect signal handling under SYSV machines References: <9703270106.AA27404@supra.rsch.comm.mot.com> <9703270315.AA29301@supra.rsch.comm.mot.com> <199704030409.WAA00249@pobox.com> Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=US-ASCII From: Soren Dayton Date: Thu, 3 Apr 1997 12:00:52 -0500 In-Reply-To: Tony Kimball's message of Wed, 2 Apr 1997 23:09:26 -0500 Message-ID: Lines: 29 X-Mailer: Gnus v5.4.37/XEmacs 19.15 Sender: csdayton@cs.uchicago.edu Tony Kimball writes: > Very strange indeed: actually, no > ; l='@(#)RELEASE VERSION HPC 2.0 TMrts 10.1-integration.2-FreeBSD/x86' > ; echo $l > @(#)RELEASE VERSION HPC 2.0 TMrts 10.1-integration.2-FreeBSD/x86 > ; k=`{strings lib/libtmrts_g.a | grep RELEASE\ VERSION | head -1| sed s,'"',,g} > ; echo $k > k.out > ; echo $l > l.out > ; diff *.out > ; expr $l : $e > expr $l : $e > HPC 2.0 TMrts 10.1-integration.2-FreeBSD/x86 > ; expr $k : $e > expr $k : $e > expr: syntax error > > Go figure. I might just crack the source out of curiousity on this > one, unless some brilliant commentator can pre-emptively illuminate... note that $#k and $#l are different. One has spaces embedded in the string, the other does not and is an array. %read does not split strings on spaces. But %backquote does. Soren From es-owner Thu Apr 10 00:38:17 1997 Received: from cs.uchicago.edu ([128.135.11.87]) by hawkwind.utcs.utoronto.ca with SMTP id <24640>; Thu, 10 Apr 1997 00:33:46 -0400 Received: from ra.cs.uchicago.edu (ra [128.135.20.101]) by cs.uchicago.edu (8.8.5/8.7.3) with ESMTP id WAA28552 for ; Wed, 9 Apr 1997 22:41:15 -0500 (CDT) Received: from ra (localhost [127.0.0.1]) by ra.cs.uchicago.edu (8.8.5/8.8.5) with ESMTP id WAA14463 for ; Wed, 9 Apr 1997 22:41:15 -0500 (CDT) X-Face: `X="Sg7A[PL3/_8;>>ggjOy&\KtWiH7.wQ>Y"hQ2fxSG9RkPTCT}&^()5[Gp(-DaTf:t`MSBt@Li_C9U@y#i/c?i$uLQ8[';I$mMAm_rZta>l`STW_aA5`iD[!80p#_qmN4#tMu[Pu7wkIi)5*4YXAhg)9R2-BAWPbVOzgE$Ib4QuZn0YaE~'C/7h^CTuPybz$u Mail-Copies-To: never To: es@hawkwind.utcs.toronto.edu Subject: A `new' es available Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=US-ASCII From: Soren Dayton Date: Wed, 9 Apr 1997 23:41:13 -0400 Message-ID: Lines: 10 X-Mailer: Gnus v5.4.37/XEmacs 19.15 Sender: csdayton@cs.uchicago.edu I forgot that I promised that I would have an `autoconf'ed `patched' es available a couple of weeks ago. It is now. If anyone is interested in using it, feel free. It is available at: ftp://ftp.cs.uchicago.edu/pub/users/csdayton/ Soren From es-owner Thu Apr 10 15:27:55 1997 Received: from netcom9.netcom.com ([192.100.81.119]) by hawkwind.utcs.utoronto.ca with SMTP id <24650>; Thu, 10 Apr 1997 15:26:06 -0400 Received: (from haahr@localhost) by netcom9.netcom.com (8.6.13/Netcom) id JAA15858; Thu, 10 Apr 1997 09:17:26 -0700 Date: Thu, 10 Apr 1997 12:17:26 -0400 From: haahr@netcom.com (Paul Haahr) Message-Id: <199704101617.JAA15858@netcom9.netcom.com> To: Soren Dayton Cc: es@hawkwind.utcs.toronto.edu Subject: Re: A `new' es available In-Reply-To: References: Soren Dayton wrote > I forgot that I promised that I would have an `autoconf'ed `patched' es > available a couple of weeks ago. > > It is now. If anyone is interested in using it, feel free. It is > available at: > > ftp://ftp.cs.uchicago.edu/pub/users/csdayton/ Soren -- Thanks for doing this and making it available. I'm sorry I haven't been any help in development or maintenance of es lately. Paul From es-owner Thu Apr 10 15:30:46 1997 Received: from cs.uchicago.edu ([128.135.11.87]) by hawkwind.utcs.utoronto.ca with SMTP id <24672>; Thu, 10 Apr 1997 15:28:10 -0400 Received: from ra.cs.uchicago.edu (ra [128.135.20.101]) by cs.uchicago.edu (8.8.5/8.7.3) with ESMTP id LAA19247 for ; Thu, 10 Apr 1997 11:25:38 -0500 (CDT) Received: from ra (localhost [127.0.0.1]) by ra.cs.uchicago.edu (8.8.5/8.8.5) with ESMTP id LAA14551 for ; Thu, 10 Apr 1997 11:25:37 -0500 (CDT) X-Face: `X="Sg7A[PL3/_8;>>ggjOy&\KtWiH7.wQ>Y"hQ2fxSG9RkPTCT}&^()5[Gp(-DaTf:t`MSBt@Li_C9U@y#i/c?i$uLQ8[';I$mMAm_rZta>l`STW_aA5`iD[!80p#_qmN4#tMu[Pu7wkIi)5*4YXAhg)9R2-BAWPbVOzgE$Ib4QuZn0YaE~'C/7h^CTuPybz$u Mail-Copies-To: never To: es@hawkwind.utcs.toronto.edu Subject: Re: A `new' es available References: Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=US-ASCII From: Soren Dayton Date: Thu, 10 Apr 1997 12:25:36 -0400 In-Reply-To: Soren Dayton's message of Wed, 9 Apr 1997 23:41:13 -0400 Message-ID: Lines: 9 X-Mailer: Gnus v5.4.37/XEmacs 19.15 Sender: csdayton@cs.uchicago.edu Soren Dayton writes: > I forgot that I promised that I would have an `autoconf'ed `patched' es > available a couple of weeks ago. I forgot one thing in the CHANGES. on systems with siglongjmp/sigsetjmp, this is used instead. No more loosing signal handlers. Soren From es-owner Thu Apr 10 15:31:26 1997 Received: from cs.uchicago.edu ([128.135.11.87]) by hawkwind.utcs.utoronto.ca with SMTP id <24673>; Thu, 10 Apr 1997 15:28:28 -0400 Received: from ra.cs.uchicago.edu (ra [128.135.20.101]) by cs.uchicago.edu (8.8.5/8.7.3) with ESMTP id LAA19304 for ; Thu, 10 Apr 1997 11:32:26 -0500 (CDT) Received: from ra (localhost [127.0.0.1]) by ra.cs.uchicago.edu (8.8.5/8.8.5) with ESMTP id LAA14560 for ; Thu, 10 Apr 1997 11:32:25 -0500 (CDT) X-Face: `X="Sg7A[PL3/_8;>>ggjOy&\KtWiH7.wQ>Y"hQ2fxSG9RkPTCT}&^()5[Gp(-DaTf:t`MSBt@Li_C9U@y#i/c?i$uLQ8[';I$mMAm_rZta>l`STW_aA5`iD[!80p#_qmN4#tMu[Pu7wkIi)5*4YXAhg)9R2-BAWPbVOzgE$Ib4QuZn0YaE~'C/7h^CTuPybz$u To: es@hawkwind.utcs.toronto.edu Subject: Re: A `new' es available References: <199704101617.JAA15858@netcom9.netcom.com> Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=US-ASCII From: Soren Dayton Date: Thu, 10 Apr 1997 12:32:24 -0400 In-Reply-To: haahr@netcom.com's message of Thu, 10 Apr 1997 09:17:26 -0700 Message-ID: Lines: 17 X-Mailer: Gnus v5.4.37/XEmacs 19.15 Sender: csdayton@cs.uchicago.edu haahr@netcom.com (Paul Haahr) writes: > Soren Dayton wrote > > I forgot that I promised that I would have an `autoconf'ed `patched' es > > available a couple of weeks ago. > > > > It is now. If anyone is interested in using it, feel free. It is > > available at: > > > > ftp://ftp.cs.uchicago.edu/pub/users/csdayton/ > > Soren -- Thanks for doing this and making it available. I'm sorry I > haven't been any help in development or maintenance of es lately. Thank you for giving us es. Soren From es-owner Thu Apr 10 21:24:35 1997 Received: from chanur.math.ntnu.no ([129.241.15.100]) by hawkwind.utcs.utoronto.ca with SMTP id <24651>; Thu, 10 Apr 1997 21:21:39 -0400 Received: (qmail 8994 invoked by uid 13799); 10 Apr 1997 19:39:39 -0000 From: "Harald Hanche-Olsen" Message-Id: <970410213938.ZM8991@imf.unit.no> Date: Thu, 10 Apr 1997 15:39:38 -0400 In-Reply-To: References: X-Face: ,};iH+.X."ygdh+d]dhDa&*SY2HIr/pV,Sz%PSzi!bjr"jOC{%6*g@aB("DWtv6?EKg2_pjvl.q^RA`hM(a'X$&NeX?6W)yb>5o0\n\G_g+G(E_qQnAlI.BJOG9mw%i.wyiT(7i&CElcgIE_s^^Bz UJokoXH7L)L*jn X-URL: http://www.math.ntnu.no/~hanche/ X-Mailer: Z-Mail (4.0.1 13Jan97) To: es@hawkwind.utcs.toronto.edu Subject: Re: A `new' es available Sender: Harald Hanche-Olsen MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit Bravo! (Sounds of champagne corks popping in the background). A DEC alpha running OSF1 didn't like some protoypes. I ended up changing the source a bit. Find the patch below (the alpha wanted the second argument to getopt to be char *argv[], and getting const declarations to match seems to be a lost battle. Maybe -Dconst= would be appropriate?) - Harald diff -ru /stores/ernie/es/src-0.9alpha2-local/main.c src-0.9alpha2-alpha/main.c --- /stores/ernie/es/src-0.9alpha2-local/main.c Fri Mar 21 18:34:09 1997 +++ src-0.9alpha2-alpha/main.c Thu Apr 10 18:16:06 1997 @@ -9,7 +9,7 @@ Boolean gcinfo = FALSE; /* -I */ #endif -#if !HPUX && !defined(linux) && !defined(sgi) +#if !HPUX && !defined(linux) && !defined(sgi) && !defined(__osf__) extern int getopt (int argc, char **argv, const char *optstring); #endif extern int optind; diff -ru /stores/ernie/es/src-0.9alpha2-local/prim-sys.c src-0.9alpha2-alpha/prim-sys.c --- /stores/ernie/es/src-0.9alpha2-local/prim-sys.c Tue Oct 22 18:58:13 1996 +++ src-0.9alpha2-alpha/prim-sys.c Thu Apr 10 18:15:07 1997 @@ -139,7 +139,11 @@ #if BSD_LIMITS extern int getrlimit(int, struct rlimit *); +#if defined(__osf__) +extern int setrlimit(int,struct rlimit *); +#else extern int setrlimit(int, const struct rlimit *); +#endif typedef struct Suffix Suffix; struct Suffix { From es-owner Tue Jul 1 02:12:27 1997 Received: from motgate.mot.com ([129.188.136.100]) by hawkwind.utcs.utoronto.ca with SMTP id <24649>; Tue, 1 Jul 1997 02:09:52 -0400 Received: from pobox.mot.com (pobox.mot.com [129.188.137.100]) by motgate.mot.com (8.7.6/8.6.10/MOT-3.8) with ESMTP id AAA24984 for ; Tue, 1 Jul 1997 00:45:12 -0500 (CDT) Received: from il02dns1.comm.mot.com (il02dns1.comm.mot.com [145.1.3.2]) by pobox.mot.com (8.7.6/8.6.10/MOT-3.8) with ESMTP id AAA23542 for ; Tue, 1 Jul 1997 00:45:12 -0500 (CDT) Received: from supra.rsch.comm.mot.com (supra.comm.mot.com [145.1.80.40]) by il02dns1.comm.mot.com (8.7.5/8.7.3) with SMTP id AAA11326 for ; Tue, 1 Jul 1997 00:45:10 -0500 (CDT) Received: by supra.rsch.comm.mot.com (4.1/SMI-4.1) id AA10127; Tue, 1 Jul 97 00:45:10 CDT Date: Tue, 1 Jul 1997 01:45:10 -0400 Message-Id: <9707010545.AA10127@supra.rsch.comm.mot.com> From: Loren James Rittle To: es@hawkwind.utcs.toronto.edu Subject: signal handling, killing background processes started under sub-shells Return-Receipt-To: rittle@comm.mot.com Reply-To: rittle@comm.mot.com #!/usr/local/bin/es # # This buggy code (I think the code is buggy, I make no claims that es # is buggy) was abstracted out of fairly complex es code which manages # background processes. Normally, these background processes are # killed after a timeout. However, the user may send an interrupt # signal to the outermost es process. When the outermost es process # is signaled, it should ensure that all children and below are killed # before it exits completely. # # This code doesn't work as one might hope. Since the background # process_that_should_not_exit_until_killed is created by an es # sub-shell, the signal handler can't kill it using the obvious code # shown below. Is there any way to ensure that an interrupt signal # propagates to all background processes started in all sub-shells? # # I have found a number of workarounds which all involve forcing all # background jobs to be started by the outermost es process. # # Note: this code does not appear to be buggy, if # '|[2] process_output' is removed (thus making the 'sleep 10' # and the background job direct children of the outermost # es process). # # Note: even though I note the code is buggy, when run it still doesn't # react as I might expect. E.g. As shown, 'killed children' is # never printed when the outermost es process is sent the # interrupt signal. # # 0.9-alpha1, sunos-4.1.4 # # Any comments on this issue welcome, but I expect I have just hit a # murky area of es and will resign myself to staying away from complex # background job situations... :-) fn process_that_should_not_exit_until_killed {sleep 10000} fn process_output {cat >/dev/null} local (signals = $signals sighup sigint) \ { catch @ e {kill <=%apids >[2]/dev/null; echo killed children; throw $e} \ { { process_that_should_not_exit_until_killed & # After timeout, kill background job (ensuring kill/wait is autonomous) sleep 10 signals = $signals -sighup -sigint kill $apid wait signals = $signals sighup sigint } |[2] process_output } } From es-owner Tue Jul 1 20:26:16 1997 Received: from carina.rz.Uni-Osnabrueck.DE ([131.173.128.25]) by hawkwind.utcs.utoronto.ca with SMTP id <24717>; Tue, 1 Jul 1997 20:18:03 -0400 Received: from scarlett.mathematik.Uni-Osnabrueck.DE (scarlett.mathematik.Uni-Osnabrueck.DE [131.173.192.40]) by carina.rz.Uni-Osnabrueck.DE (8.8.2/8.8.4) with ESMTP id VAA43371 for ; Tue, 1 Jul 1997 21:07:20 +0200 Received: from ranec.mathematik.Uni-Osnabrueck.DE (ranec [131.173.192.203]) by scarlett.mathematik.Uni-Osnabrueck.DE (8.8.4/8.8.4) with ESMTP id VAA18060 for ; Tue, 1 Jul 1997 21:07:18 +0200 (MET DST) Received: (from breiter@localhost) by ranec.mathematik.Uni-Osnabrueck.DE (8.8.4/8.8.4) id VAA14246; Tue, 1 Jul 1997 21:07:17 +0200 (MET DST) Message-ID: <19970701210711.18881@ranec.mathematik.Uni-Osnabrueck.DE> Date: Tue, 1 Jul 1997 15:07:11 -0400 From: Bernhard Reiter To: es@hawkwind.utcs.utoronto.ca Subject: Small comment on es. Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-md5; boundary=C7zPtVaVf+AK4Oqc X-Mailer: Mutt 0.76 --C7zPtVaVf+AK4Oqc Content-Type: text/plain; charset=us-ascii Yes, i like the "es". Two things might keep me from using it as my interactive shell: No filename completion, (this is a very nice feature of bash) The history function couldn`t mapped to work like: !! style history in bash or csh. Maybe someone do has an nice function for that, i failed here. :-( Job control might be an issue for some people, too. But to the question: Why is the number of people using the "es" so small? (BTW: How big is the number of people using the es? Any estimates?) We need to give the es a high publicity and to address the problems. What about having an AQ: which answers the following questions: Why should i switch to es? (Perhaps: Easier to learn. More script power?) (Avoid the following bash, ksh, csh cave-ats) Do i really need job-control? Who is using "es" today? What are common hacks to get "es" closer to my favorite shell [tm]? (Maybe to get a nice prompt?) What other interesting shells to exists? (The SCM shell running with guile, perhaps?) And how to they compare to "es". An browsable hypermail archive for the mailing list could help in addition. A wish list might attract developers seeking fame. What do you think? Have a nice day! Bernhard Reiter ps.: answers as cc to my email address as i am not on the list yet. ;> --C7zPtVaVf+AK4Oqc Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: 2.6.2i iQCVAwUBM7lVIhFKNN1LD7H9AQFu1AP9HlIW64Broer0piBWHmRO1WfiErWFM57C rdo65Vc93ZSJdvKcLCs0A5vqTBFkPn3guMuXRR5QszK+765BuwDm4s/2ykpE2iPh JJJwhB82voF+3ZZc/plXubxojx23Ozp7wR8ueBauv19aJdbRqN6KccRbGSfULbnP lD8lo62NSHg= =zw/I -----END PGP SIGNATURE----- --C7zPtVaVf+AK4Oqc-- From es-owner Tue Jul 1 21:47:29 1997 Received: from netscape.com ([205.217.237.47]) by hawkwind.utcs.utoronto.ca with SMTP id <23980>; Tue, 1 Jul 1997 21:46:06 -0400 Received: from oink.mcom.com (oink.mcom.com [205.217.246.113]) by netscape.com (8.8.5/8.8.5) with ESMTP id RAA17083; Tue, 1 Jul 1997 17:41:57 -0700 (PDT) Received: (from friedman@localhost) by oink.mcom.com (8.8.5/8.8.5) id RAA21934; Tue, 1 Jul 1997 17:41:56 -0700 (PDT) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Noah Friedman To: breiter@mathematik.Uni-Osnabrueck.DE Cc: es@hawkwind.utcs.toronto.edu Subject: Small comment on es. Reply-To: friedman@splode.com In-Reply-To: Tue, 01 Jul 1997 15:07:11 -0400 References: <19970701210711.18881@ranec.mathematik.Uni-Osnabrueck.DE> Date: Tue, 1 Jul 1997 20:41:56 -0400 Message-Id: <19970701174156.295382.FMU1110@oink.mcom.com> > No filename completion, (this is a very nice feature of bash) You can get this from readline or other command-line editing libraries that link with es. >Job control might be an issue for some people, too. Yes, I agree. Purists say job control is a bad idea, and I have no comment on the purity of the concept. But as a practical matter, they are just wrong. Ideal or not in principle, clean to implement or not, availability of window system or not (!), job control is still an absolute requirement. The lack of job control is the main thing which has kept me from converting away from bash for normal shell use, and I've been too lame to sit down and implement it. I'm so lame I haven't even upgraded from es 0.84. >But to the question: Why is the number of people using the "es" so small? How many unix users care about, let alone understand the concepts of, first class procedures and lexical scope? Besides a few Scheme and ML malcontents? :-) > What are common hacks to get "es" closer to my favorite shell [tm]? > (Maybe to get a nice prompt?) I've got a couple of hacks, including a replacement repl. See the file es/lib/repl.es (and many accompanying library files) in ftp://ftp.splode.com/pub/friedman/inits/es-init-4.104.tar.gz This stuff may not work correctly in the 0.90 alpha versions of es. I'm still using 0.84. From es-owner Tue Jul 1 21:47:30 1997 Received: from assaris.sics.se ([193.10.66.108]) by hawkwind.utcs.utoronto.ca with SMTP id <24653>; Tue, 1 Jul 1997 21:47:07 -0400 Received: (from assar@localhost) by assaris.sics.se (8.8.5/8.7.3) id CAA26566; Wed, 2 Jul 1997 02:52:14 +0200 (MET DST) Sender: assar@sics.se To: Bernhard Reiter Cc: es@hawkwind.utcs.toronto.edu Subject: Re: Small comment on es. References: <19970701210711.18881@ranec.mathematik.Uni-Osnabrueck.DE> Mime-Version: 1.0 (generated by tm-edit 7.68) Content-Type: text/plain; charset=US-ASCII From: Assar Westerlund Date: Tue, 1 Jul 1997 20:52:09 -0400 In-Reply-To: Bernhard Reiter's message of Tue, 1 Jul 1997 15:07:11 -0400 Message-ID: <5lzps6nume.fsf@assaris.sics.se> Lines: 6 X-Mailer: Gnus v5.3/Emacs 19.34 Bernhard Reiter writes: > No filename completion, (this is a very nice feature of bash) If you compile with readline, you get filename completion. /assar From es-owner Tue Jul 1 21:48:12 1997 Received: from carina.rz.Uni-Osnabrueck.DE ([131.173.128.25]) by hawkwind.utcs.utoronto.ca with SMTP id <24656>; Tue, 1 Jul 1997 21:47:28 -0400 Received: from scarlett.mathematik.Uni-Osnabrueck.DE (scarlett.mathematik.Uni-Osnabrueck.DE [131.173.192.40]) by carina.rz.Uni-Osnabrueck.DE (8.8.2/8.8.4) with ESMTP id CAA19280 for ; Wed, 2 Jul 1997 02:53:24 +0200 Received: from ranec.mathematik.Uni-Osnabrueck.DE (ranec [131.173.192.203]) by scarlett.mathematik.Uni-Osnabrueck.DE (8.8.4/8.8.4) with ESMTP id CAA23872 for ; Wed, 2 Jul 1997 02:53:23 +0200 (MET DST) Received: (from breiter@localhost) by ranec.mathematik.Uni-Osnabrueck.DE (8.8.4/8.8.4) id CAA15003; Wed, 2 Jul 1997 02:53:22 +0200 (MET DST) Message-ID: <19970702025322.14352@ranec.mathematik.Uni-Osnabrueck.DE> Date: Tue, 1 Jul 1997 20:53:22 -0400 From: Bernhard Reiter To: es@hawkwind.utcs.toronto.edu Subject: Re: Small comment on es References: <19970701210711.18881@ranec.mathematik.Uni-Osnabrueck.DE> <19970701174156.295382.FMU1110@oink.mcom.com> Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-md5; boundary="0OAP2g/MAC+5xKAE" X-Mailer: Mutt 0.76 In-Reply-To: <19970701174156.295382.FMU1110@oink.mcom.com>; from Noah Friedman on Tue, Jul 01, 1997 at 05:41:56PM -0700 --0OAP2g/MAC+5xKAE Content-Type: text/plain; charset=us-ascii On Tue, Jul 01, 1997 at 05:41:56PM -0700, Noah Friedman wrote: > > No filename completion, (this is a very nice feature of bash) > > You can get this from readline or other command-line editing libraries that > link with es. Okay, it works with filenames in the directory, when using readline. But i want filename completion even with programs in the path or aliases. Thus commands that i can give, when i am in the first position after an es prompt. And the bash also qoutes apropriate filenames like "q ?". es with readline does not. > >Job control might be an issue for some people, too. > > Yes, I agree. Purists say job control is a bad idea, and I have no comment > on the purity of the concept. But as a practical matter, they are just > wrong. Ideal or not in principle, clean to implement or not, availability > of window system or not (!), job control is still an absolute requirement. > The lack of job control is the main thing which has kept me from converting > away from bash for normal shell use, and I've been too lame to sit down and > implement it. I'm so lame I haven't even upgraded from es 0.84. Is it hard to implement. > > What are common hacks to get "es" closer to my favorite shell [tm]? > > (Maybe to get a nice prompt?) > > I've got a couple of hacks, including a replacement repl. > See the file es/lib/repl.es (and many accompanying library files) in > ftp://ftp.splode.com/pub/friedman/inits/es-init-4.104.tar.gz I will have a look into that. Isn`t that a nice link for the es Webpages? Bernhard --0OAP2g/MAC+5xKAE Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: 2.6.2i iQCVAwUBM7mmfxFKNN1LD7H9AQHYIwP8CRcPY280DARPB2ajNdXeYLuH0DeIiSig LkS5wNmQwnaDWNctCqrof0M58CgNkSbvjImq3ZhANvkGH6O/jZH7RT2r7clWNfwU aaxpe06lrFTzs1onZuAtLrk740vKl2ensGGmFDVwoH1MX/S6xferbBhg6zt5kMmk hmmal53GVc0= =hsjL -----END PGP SIGNATURE----- --0OAP2g/MAC+5xKAE-- From es-owner Thu Jul 17 04:47:38 1997 Received: from sangam.ncst.ernet.in ([202.41.110.33]) by hawkwind.utcs.utoronto.ca with SMTP id <24646>; Thu, 17 Jul 1997 04:42:24 -0400 Received: from iucaa (iucaa.ernet.in [144.16.31.4]) by sangam.ncst.ernet.in (8.7.5) with SMTP id KAA16496 for ; Thu, 17 Jul 1997 10:23:16 +0530 (GMT+05:30) Received: from unipune.ernet.in by iucaa (5.65v3.2/SMI-4.1) id AA16603; Thu, 17 Jul 1997 10:11:48 +0500 Received: from cs.unipune.ernet.in by unipune.ernet.in (8.8.5/UNIPUNE-MAILHUB(02.04.97)) id KAA00249; Thu, 17 Jul 1997 10:10:41 -0500 (GMT) Received: from asterix.cs.unipune.ernet.in (asterix.cs.unipune.ernet.in [192.9.150.2]) by cs.unipune.ernet.in (8.6.12/8.6.12) with ESMTP id KAA00239 for ; Thu, 17 Jul 1997 10:41:27 +0530 Received: (from san@localhost) by asterix.cs.unipune.ernet.in (8.6.12/8.6.12) id KAA02567 for es@hawkwind.utcs.toronto.edu; Thu, 17 Jul 1997 10:06:34 +0530 Message-Id: <199707170436.KAA02567@asterix.cs.unipune.ernet.in> Subject: Problem with a small program To: es@hawkwind.utcs.toronto.edu ( mailing list of es) Date: Thu, 17 Jul 1997 00:36:33 -0400 From: "Sandeep Kumar" X-Mailer: ELM [version 2.4 PL23] Content-Type: text hello, I was trying a small program from the paper "Es: A shell with higher-order functions" - Haahr and Rakitzis on my system "dgux asterix 5.4R3.10 generic AViiON" (asterix is my system's pet name). The program is as follows .. ;fn hello-world { return 'hello, world' } ;echo <>{hello-world} ... At this point instead of getting the result as "hello, world", i get the following error "bad /dev/fd redirection" can anyone on suggest a solution for the above problem. another question i have, is -- how to execute es programs from a file?? i typed in above function and the following echo statement in a file, changed it's permissions to "a+x". But when i typed the name of this file on es prompt, it gave me "Bad Exec format error". Please send a carbon copy of the solution to "san@cs.unipune.ernet.in" also. thanks in advance for any help on above two problems. --- sandeep From es-owner Thu Jul 17 19:16:13 1997 Received: from iadd.jivetech.com ([205.134.235.82]) by hawkwind.utcs.utoronto.ca with SMTP id <24675>; Thu, 17 Jul 1997 18:36:05 -0400 Received: (from haahr@localhost) by iadd.jivetech.com (8.8.5/8.8.5) id JAA10745; Thu, 17 Jul 1997 09:35:03 -0700 From: Paul Haahr X-Attribution: haahr Message-Id: <8PPACT38h@localhost.localdomain.netcom.com> Date: Thu, 17 Jul 1997 12:35:03 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Sandeep Kumar Cc: es@hawkwind.utcs.toronto.edu Subject: Re: Problem with a small program In-Reply-To: <199707170436.KAA02567@asterix.cs.unipune.ernet.in> References: <199707170436.KAA02567@asterix.cs.unipune.ernet.in> X-Mailer: VM 6.30 under Emacs 19.34.1 > I was trying a small program from the paper > "Es: A shell with higher-order functions" - Haahr and Rakitzis > > on my system "dgux asterix 5.4R3.10 generic AViiON" (asterix is my system's > pet name). The program is as follows .. > > ;fn hello-world { > return 'hello, world' > } > ;echo <>{hello-world} > ... At this point instead of getting the result as "hello, world", i get the > following error > "bad /dev/fd redirection" That's something which changed after the paper was published. The <> syntax was replaced with <=. <> now means open for reading and writing. Using the new syntax, it works: ; fn hello-world { return 'hello, world' } ; echo <= { hello-world } hello, world ; echo <= hello-world hello, world ; See http://www.webcom.com/haahr/es/es-usenix-winter93.html#erratum2. > another question i have, is -- > > how to execute es programs from a file?? > i typed in above function and the following echo statement in a file, > changed it's permissions to "a+x". But when i typed the name of this > file on es prompt, it gave me "Bad Exec format error". Try putting #! /usr/local/bin/es (or whatever the right path is) as the first line of your file. --p From es-owner Sun Jul 20 00:42:03 1997 Received: from sangam.ncst.ernet.in ([202.41.110.33]) by hawkwind.utcs.utoronto.ca with SMTP id <24669>; Sun, 20 Jul 1997 00:37:58 -0400 Received: from iucaa (iucaa.ernet.in [144.16.31.4]) by sangam.ncst.ernet.in (8.7.5) with SMTP id KAA28244 for ; Fri, 18 Jul 1997 10:36:58 +0530 (GMT+05:30) Received: from unipune.ernet.in by iucaa (5.65v3.2/SMI-4.1) id AA05623; Fri, 18 Jul 1997 10:26:09 +0500 Received: from cs.unipune.ernet.in by unipune.ernet.in (8.8.5/UNIPUNE-MAILHUB(02.04.97)) id KAA02737; Fri, 18 Jul 1997 10:25:02 -0500 (GMT) Received: from asterix.cs.unipune.ernet.in (asterix.cs.unipune.ernet.in [192.9.150.2]) by cs.unipune.ernet.in (8.6.12/8.6.12) with ESMTP id LAA01590 for ; Fri, 18 Jul 1997 11:04:36 +0530 Received: (from san@localhost) by asterix.cs.unipune.ernet.in (8.6.12/8.6.12) id KAA03225 for es@hawkwind.utcs.toronto.edu; Fri, 18 Jul 1997 10:29:17 +0530 Message-Id: <199707180459.KAA03225@asterix.cs.unipune.ernet.in> Subject: DOCUMENTATION on ES To: es@hawkwind.utcs.toronto.edu ( mailing list of es) Date: Fri, 18 Jul 1997 00:59:17 -0400 From: "Sandeep Kumar" X-Mailer: ELM [version 2.4 PL23] Content-Type: text hello, i had posted a mail to this list with the subject -- "Problem with a small program" where i had requested for help for getting solution for two problems -- 1. accesing return value of a function. on my system "<>" doesn't work, but i continued efforts to figure it out and found that "<=" worked. so this problem is now solved. BUT has given rise to one more question ? DO WE HAVE A DOCUMENTATION FOR ES ANYWHERE? IF YES, PLEASE LET ME KNOW. I (and many friends of mine here) would like to have it to understand and learn es in better way. 2. other problem was, how to run es programs from within a file like normal shell scripts? i haven't managed to find a way yet :-(( I found that es is a functional shell with mixture of imperative constructs. what if someone here develops es into a language altogether instead of it being a shell, the language with combined features of functional and imperative programming. Please mail your responses to "san@cs.unipune.ernet.in" also. sandeep --- From es-owner Sun Jul 20 10:33:23 1997 Received: from rulcmc.leidenuniv.nl ([132.229.1.33]) by hawkwind.utcs.utoronto.ca with SMTP id <24656>; Sun, 20 Jul 1997 10:26:37 -0400 Received: by rulcmc.leidenuniv.nl id (Debian Smail-3.2 1996-Jul-4 #2); Sun, 20 Jul 1997 12:51:11 +0200 (CEST) Message-Id: From: joost@rulcmc.leidenuniv.nl (joost witteveen) Subject: Re: DOCUMENTATION on ES In-Reply-To: <199707180459.KAA03225@asterix.cs.unipune.ernet.in> from Sandeep Kumar at "Jul 18, 97 00:59:17 am" To: san@cs.unipune.ernet.in (Sandeep Kumar) Date: Sun, 20 Jul 1997 06:51:11 -0400 Cc: es@hawkwind.utcs.toronto.edu X-Mailer: ELM [version 2.4ME+ PL31 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 830 > DO WE HAVE A DOCUMENTATION FOR ES ANYWHERE? IF YES, PLEASE LET ME KNOW. One of the people who responded to your question replied that http://www.webcom.com/haahr/es/es-usenix-winter93.html (somewhere at the bottom, look for errata) has the answer to your question. You didn't get that email? > 2. other problem was, how to run es programs from within a file like normal > shell scripts? i haven't managed to find a way yet :-(( you mean like starting the file with #!/usr/bin/es ? > Please mail your responses to "san@cs.unipune.ernet.in" also. -- joost witteveen, joostje@debian.org #!/usr/bin/perl -sp0777i; Mon, 21 Jul 1997 17:16:12 -0400 Received: from snaxel.cs.tu-berlin.de (schoelle@snaxel.cs.tu-berlin.de [130.149.19.39]) by mail.cs.tu-berlin.de (8.8.6/8.8.6) with ESMTP id MAA20682; Mon, 21 Jul 1997 12:27:11 +0200 (MET DST) Received: (from schoelle@localhost) by snaxel.cs.tu-berlin.de (8.8.6/8.8.6) id MAA04954; Mon, 21 Jul 1997 12:27:09 +0200 (MET DST) Date: Mon, 21 Jul 1997 06:27:09 -0400 Message-Id: <199707211027.MAA04954@snaxel.cs.tu-berlin.de> From: Bernd Schoeller MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: joost@rulcmc.leidenuniv.nl (joost witteveen) Cc: san@cs.unipune.ernet.in (Sandeep Kumar), es@hawkwind.utcs.toronto.edu Subject: Re: DOCUMENTATION on ES In-Reply-To: References: <199707180459.KAA03225@asterix.cs.unipune.ernet.in> X-Mailer: VM 6.32 under Emacs 19.34.1 joost witteveen writes: > you mean like starting the file with > #!/usr/bin/es Or do you mean with the 'dot'-Command like: '. foo.es' that will load a file and execute the commands in it? Ciao, Bernd -- [ BERND SCHOELLER Oft ist das Denken schwer, indes ] [ EMail: schoelle@cs.tu-berlin.de das Schreiben geht auch ohne es. ] [ http://www.cs.tu-berlin.de/~schoelle - Wilhelm Busch ] From es-owner Fri Aug 15 21:30:15 1997 Received: from cs.uchicago.edu ([128.135.11.87]) by hawkwind.utcs.utoronto.ca with SMTP id <24649>; Fri, 15 Aug 1997 21:25:36 -0400 Received: from ra.cs.uchicago.edu (ra [128.135.20.101]) by cs.uchicago.edu (8.8.5/8.7.3) with ESMTP id RAA01944 for ; Fri, 15 Aug 1997 17:22:17 -0500 (CDT) Received: (from csdayton@localhost) by ra.cs.uchicago.edu (8.8.5/8.8.5) id RAA27575; Fri, 15 Aug 1997 17:22:16 -0500 (CDT) X-Face: `X="Sg7A[PL3/_8;>>ggjOy&\KtWiH7.wQ>Y"hQ2fxSG9RkPTCT}&^()5[Gp(-DaTf:t`MSBt@Li_C9U@y#i/c?i$uLQ8[';I$mMAm_rZta>l`STW_aA5`iD[!80p#_qmN4#tMu[Pu7wkIi)5*4YXAhg)9R2-BAWPbVOzgE$Ib4QuZn0YaE~'C/7h^CTuPybz$u Mail-Copies-To: never Reply-To: csdayton+es@cs.uchicago.edu To: es@hawkwind.utcs.toronto.edu Subject: es 0.9 beta1 available. Mime-Version: 1.0 (generated by tm-edit 7.108) Content-Type: text/plain; charset=US-ASCII From: Soren Dayton Date: Fri, 15 Aug 1997 18:22:16 -0400 Message-ID: Lines: 8 X-Mailer: Gnus v5.4.64/XEmacs 20.3(beta17) - "Bucharest" This is now available. Once again there are no significant changes, it is just a nicer build and it works on more platforms. feel free to get it at: ftp.cs.uchicago.edu:/pub/users/csdayton/ Soren From es-owner Sun Aug 17 23:58:05 1997 Received: from cs.uchicago.edu ([128.135.11.87]) by hawkwind.utcs.utoronto.ca with SMTP id <24653>; Sun, 17 Aug 1997 23:39:36 -0400 Received: from ra.cs.uchicago.edu (ra [128.135.20.101]) by cs.uchicago.edu (8.8.5/8.7.3) with ESMTP id VAA03982 for ; Sun, 17 Aug 1997 21:01:07 -0500 (CDT) Received: (from csdayton@localhost) by ra.cs.uchicago.edu (8.8.5/8.8.5) id VAA22487; Sun, 17 Aug 1997 21:01:07 -0500 (CDT) X-Face: `X="Sg7A[PL3/_8;>>ggjOy&\KtWiH7.wQ>Y"hQ2fxSG9RkPTCT}&^()5[Gp(-DaTf:t`MSBt@Li_C9U@y#i/c?i$uLQ8[';I$mMAm_rZta>l`STW_aA5`iD[!80p#_qmN4#tMu[Pu7wkIi)5*4YXAhg)9R2-BAWPbVOzgE$Ib4QuZn0YaE~'C/7h^CTuPybz$u Mail-Copies-To: never Reply-To: csdayton+es@cs.uchicago.edu To: es@hawkwind.utcs.toronto.edu Subject: Re: es 0.9 beta1 available. References: <970816134921.ZM16545@math.ntnu.no> Mime-Version: 1.0 (generated by tm-edit 7.108) Content-Type: text/plain; charset=US-ASCII From: Soren Dayton Date: Sun, 17 Aug 1997 22:01:06 -0400 In-Reply-To: "Harald Hanche-Olsen"'s message of "Sat, 16 Aug 1997 13:49:21 +0200" Message-ID: Lines: 16 X-Mailer: Gnus v5.4.64/XEmacs 20.3(beta17) - "Bucharest" "Harald Hanche-Olsen" writes: > Great! It compiled on all my platforms, now also on (386) netbsd. > > The only exception (apart from a couple machines where the readline > library has suddenly gone missing) is the one machine with the yacc > problem. > > Actually I am wondering about the comment in Makefile.in that bison is > generating incorrect parsers. That surprises me a bit. Surely, a bug has > been reported to the bison maintainers? Well. To be fair, I am not _absolutely_ certain that it is. I need to sit down and stare at it a bit more. Soren From es-owner Mon Sep 1 17:25:52 1997 Received: from chanur.math.ntnu.no ([129.241.15.100]) by hawkwind.utcs.utoronto.ca with SMTP id <24646>; Mon, 1 Sep 1997 17:14:21 -0400 Received: (qmail 15969 invoked by uid 13799); 1 Sep 1997 20:52:52 -0000 From: "Harald Hanche-Olsen" Message-Id: <970901225252.ZM15966@math.ntnu.no> Date: Mon, 1 Sep 1997 16:52:51 -0400 X-Face: ,};iH+.X."ygdh+d]dhDa&*SY2HIr/pV,Sz%PSzi!bjr"jOC{%6*g@aB("DWtv6?EKg2_pjvl.q^RA`hM(a'X$&NeX?6W)yb>5o0\n\G_g+G(E_qQnAlI.BJOG9mw%i.wyiT(7i&CElcgIE_s^^Bz UJokoXH7L)L*jn X-URL: http://www.math.ntnu.no/~hanche/ X-Mailer: Z-Mail (4.0.1 13Jan97) To: es@hawkwind.utcs.toronto.edu Subject: Flaw in %readfrom and %writeto Sender: Harald Hanche-Olsen MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit In initial.es we find these comments: # All that, for example, the /tmp version of %readfrom does is bind # the named variable (which is the first argument, var) to the name # of a (hopefully unique) file in /tmp. However, the uniqueness fails in some cases, as in the following example. ; for (x=1 2 3) { cat <{echo $x} & } 15946 15947 15948 ; mknod: /tmp/es._devfd0.15685: File exists mknod: /tmp/es._devfd0.15685: File exists 2 1 3 ; The crux of the matter is, of course, the fact that we run several commands in the background, all of which try to use the same temporary file. The relevant code in initial.es looks like this: fn %readfrom var input cmd { local ($var = /tmp/es.$var.$pid) { unwind-protect { $input > $$var # text of $cmd is command file $cmd } { rm -f $$var } } } I tried replacing the assignment to $var with local ($var = /tmp/es.^<={%bgcount 0}^.$var.$pid) where I also define let (n=0) fn %bgcount {n=<={$&math $n + $1}; $&result $n} fn %background {%bgcount 1; $&background $*} In other words, I count up the background jobs as they are spawned and use this to make the value of $var more unique. I have not investigated what happens if bacground jobs themselves start background jobs, but I would guess my scheme isn't quite robust enough for that case. Also, this will fail if the user uses $&background directly. I think this might be better solved by internals: A forked subshell will have a new pid although teh value of $pid is unchanged. Maybe the real pid of the subshell could be incorporated into the value of var? I actually never understood why $pid does not change in a forked subshell, but that's a different matter. Oh, and it should be noted that the above fix will fail for most of you because you don't have math built in. Also, of course %writeto needs fixing too. - Harald From es-owner Wed Sep 10 03:13:41 1997 Received: from gatekeeper.ctron.com ([134.141.197.25]) by hawkwind.utcs.utoronto.ca with SMTP id <24649>; Wed, 10 Sep 1997 02:56:47 -0400 Received: (from news@localhost) by gatekeeper.ctron.com (8.6.12/8.6.9) id UAA23817 for ; Tue, 9 Sep 1997 20:21:06 -0400 Received: from stealth.ctron.com(134.141.5.107) by gatekeeper.ctron.com via smap (12) id xma023743; Tue, 9 Sep 97 20:20:45 -0400 Received: from dur-mail.ctron.com by stealth.ctron.com (4.1/SMI-4.1) id AA26127; Tue, 9 Sep 97 20:20:17 EDT Received: from davros.ctron (davros.ctron.com [134.141.64.232]) by dur-mail.ctron.com (8.8.7/8.8.7) with SMTP id UAA24588 for ; Tue, 9 Sep 1997 20:26:32 -0400 (EDT) Received: from davros by davros.ctron (SMI-8.6/SMI-SVR4) id UAA28747; Tue, 9 Sep 1997 20:23:07 -0400 Message-Id: <199709100023.UAA28747@davros.ctron> X-Mailer: exmh version 1.6.7 5/3/96 To: es@hawkwind.utcs.toronto.edu Subject: 99 bottles of beer on the wall in es Mime-Version: 1.0 Content-Type: multipart/mixed ; boundary="===_0_Tue_Sep__9_20:20:15_EDT_1997" Date: Tue, 9 Sep 1997 20:23:06 -0400 From: Jeffrey Rogers This is a multipart MIME message. --===_0_Tue_Sep__9_20:20:15_EDT_1997 Content-Type: text/plain; charset=us-ascii While reading the 99 bottles of beer on the wall page (http://www.ionet.net/~timtroyr/funhouse/beer.html) I noted that there was no es version there. (no rc version either, but that would be rather close to bourne shell. Not that es couldn't be close, but that's no fun). So, I came up with the following. Can anyone suggest ways to make it better, or especially to show off more of es's features? (or tell me why this doesn't do a good job of that) -J -- --===_0_Tue_Sep__9_20:20:15_EDT_1997 Content-Type: text/plain; charset=us-ascii Content-Description: 99.es ow='on the wall' b=bottle n=' ' let( t=9 8 7 6 5 4 3 2 1 o=9 8 7 6 5 4 3 2 1 0 c= r=x ) { c=$t$o $o fn-ne=@ { if {~ $#c 0} {throw no} if {~ $#c 1} {c=no} return $c(1) } fn-bb=@ { return $b ^ <=@{ unwind-protect { if {! ~ $#c 2} {return s} {return ''} } { if {~ $#r 0} { r=x x x c=$c(2 ...) } r=$r(2 ...) } } of beer } } catch @ e { echo all done } { forever { echo '' <=ne <=bb $ow,$n <=ne <=bb $n if <=@{ if {~ <=ne no} { return that $b } { return one of those $b^s } } should happen to fall $n <=ne <=bb $ow $n } } --===_0_Tue_Sep__9_20:20:15_EDT_1997-- From es-owner Thu Sep 11 19:42:42 1997 Received: from shannon.tellabs.com ([138.111.193.100]) by hawkwind.utcs.utoronto.ca with SMTP id <24686>; Thu, 11 Sep 1997 19:02:35 -0400 Received: from cyclone.randd by shannon.tellabs.com with smtp (Smail3.1.29.1 #40) id m0x96UO-001lyqC; Thu, 11 Sep 97 11:28 BST Received: from shannon.tellabs.com by cyclone.randd (SMI-8.6/SMI-SVR4) id LAA00735; Thu, 11 Sep 1997 11:28:43 +0100 Sender: dbane@shannon.tellabs.com Message-ID: <3417C7D9.7C6B79FB@shannon.tellabs.com> Date: Thu, 11 Sep 1997 06:28:41 -0400 From: Darren Bane Organization: Tellabs Ltd X-Mailer: Mozilla 4.02 [en] (X11; I; SunOS 5.5.1 sun4u) MIME-Version: 1.0 Newsgroups: comp.unix.shell To: es@hawkwind.utcs.toronto.edu Subject: Adventure shell Content-Type: multipart/mixed; boundary="------------5F6EDF85C87C97D3FCAAFA81" This is a multi-part message in MIME format. --------------5F6EDF85C87C97D3FCAAFA81 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Here's the adventure shell ported to es (ftp://ftp.sys.utoronto.ca/pub/es/). -- #include --------------5F6EDF85C87C97D3FCAAFA81 Content-Type: text/plain; charset=us-ascii; name="adventure.es" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="adventure.es" #!/usr/local/bin/i586/es # vi:set shiftwidth=2 textwidth=75: # adventure.es # Adventure shell. # Copyright (c) Darren Bane 1997 # All rights reserved # # Last edit: 21/04/1986 D A Gwyn # SCCS ID: @(#)adventure.es 1.5 # $Id: adventure.es 05/09/1997 $ # # Change log: # # Initials Name email # -------------------------------------------------- # db Darren Bane # # Initials Date Description # ----------------------------------- # db 05/09/1997 Ported to es. # # usage: adventure.es # # CLI in the style of an early-80s text adventure game. OPATH = $PATH fn ask { echo -n $^*^'[y/n] ' ans = <={%read} if {~ $ans y* Y*} { return 0 } { return 1 } } if {~ $#PAGER 0} { CAT = more } { CAT = $PAGER } fn instructions { cat << EOF Instructions for the Adventure shell Welcome to the Adventure shell! In this exploration of the UNIX file system, I will act as your eyes and hands. As you move around, I will describe whatever is visible and will carry out your commands. The general form of a command is Verb Object Extra_stuff. Most commands pay no attention to the "Extra_stuff", and many do not need an "Object". A typical command is get all which picks up all files in the current "room" (directory). You can find out what you are carrying by typing the command inventory The command "help" results in a full description of all commands that I understand. To quit the Adventure shell, type quit There are UNIX monsters lurking in the background. These are also known as "commands with arguments". Good luck! EOF } fn help { echo I understand the following commands (synonyms in parentheses): echo echo change OBJECT to NEW_NAME changes the name of the object echo clone OBJECT as NEW_NAME duplicates the object echo drop OBJECTS leaves the objects in the room echo enter (go) PASSAGE takes the labeled passage echo examine OBJECTS describes the objects in detail echo feed OBJECT to MONSTER stuffs the object into a UNIX monster echo get (take) OBJECTS picks up the specified objects echo gripe (bug) report a problem with the Adventure shell echo help prints this summary echo inventory (i) tells what you are carrying echo kill (destroy) OBJECTS destroys the objects echo look (l) describes the room, including hidden objects echo open (read) OBJECT shows the contents of an object echo quit (exit) leaves the Adventure shell echo resurrect OBJECTS attempts to restore dead objects echo steal OBJECT from MONSTER obtains the object from a UNIX monster echo throw OBJECT at daemon feeds the object to the printer daemon echo up takes the overhead passage echo wake MONSTER awakens a UNIX monster echo where (w) tells you where you are echo xyzzy moves you to your home } MAINT = dbane@shannon.tellabs.com PATH = /usr/ucb:/bin:/usr/bin:/usr/local/bin:. noexport = $noexport OPATH ans MAINT LIM KNAP kn wiz cha prev room exs obs \ hexs hobs f i verb obj x fn-ask fn-instructions fn-help fn-print fn-delete local (signals = $signals sigint sigquit) { catch @ e { echo Ouch! throw $e } { fn print { echo $* | tr ' ' '\012' | pr -5 -t -w75 -l`{expr \( $#* + 4 \) / 5} } fn delete elem list { let (result = ) { for (i = $list) { if {! ~ $elem $i} { result = $result $i } } result $result } } cd LIM = .limbo # $HOME/$LIM contains "destroyed" objects mkdir $LIM >/dev/null >[2=1] KNAP = .knapsack # $HOME/$KNAP contains objects being "carried" if {! access -d $KNAP} { if {mkdir $KNAP >/dev/null >[2=1]} { echo 'You found a discarded empty knapsack.' } { echo 'You have no knapsack to carry things in.' exit 1 } } { echo 'One moment while I peek in your old knapsack...' } kn = `{ls -a $KNAP|sed -e '/^\.$/d' -e '/^\.\.$/d'} if {ask 'Welcome to the Adventure shell! Do you need instructions?'} { instructions echo -n 'Type a newline to continue: ' %read } wiz = false cha = false prev = $LIM forever { room=`{pwd} if {! ~ $room $prev} { if {~ $room $HOME} { echo 'You are in your own home.' } { echo You have entered $room. } exs = obs = hexs = hobs = f = false for (i = `{ls -a}) { if {~ $i . ..} { } {~ $i .*} { if {access -f $i} { hobs = $hobs $i } {access -d $i} { hexs = $hexs $i } { f=true } } { if {access -f $i} { obs = $obs $i } {access -d $i} { exs = $exs $i } { f=true } } } if {! ~ $#obs 0} { echo 'This room contains:' print $obs } { echo 'The room looks empty.' } if {! ~ $#exs 0} { echo 'There are exits labeled:' print $exs echo 'as well as a passage overhead.' } { echo 'There is a passage overhead.' } if {~ $f true} { echo 'There are shadowy figures in the corner.' } prev = $room } echo -n '-advsh> ' # prompt local (line = ) { line = <={%read} if {~ $#line 0} { verb = quit # EOF } { (verb obj x) = `{echo $line} } } if {~ $verb change} { if {! ~ $#obj 0} { if {~ $obj $obs $hobs} { if {~ $x(1) to} { local (* = $x) { if {! ~ $#2 0} { if {access -f $2} { echo You must destroy $2 first. } if {mv $obj $2 >/dev/null >[2=1]} { echo The $obj shimmers and turns into $2. obs = <={delete $obj $2 $obs} } { echo There is a cloud of smoke but the $obj is unchanged. } } { echo 'To what?' } } } { echo Change $obj to what? } } { if {~ $obj $kn} { echo 'You must drop it first.' } { echo I see no $obj here. } } } { echo 'Change what?' } } {~ $verb clone} { if {! ~ $#obj 0} { if {~ $obj $obs $hobs} { if {! access -r $obj} { echo The $obj does not wish to be cloned. } { if {~ $x(1) as} { local (* = $x) { if {! ~ $#2 0} { if {access -f $2} { echo You must destroy $2 first. } { if {cp $obj $2 >/dev/null >[2=1]} { echo Poof! When the smoke clears, you see the new $2. obs = $obs $2 } { echo 'You hear a dull thud but no clone appears.' } } } { echo 'As what?' } } } { echo Clone $obj as what? } } } { if {~ $obj $kn} { echo 'You must drop it first.' } { echo I see no $obj here. } } } { echo 'Clone what?' } } {~ $verb drop} { if {! ~ $#obj 0} { for (it = $obj $x) { if {~ $it $kn} { if {access -w $it} { echo You must destroy $it first. } { if {mv $HOME/$KNAP/$it $it >/dev/null >[2=1]} { echo $it: dropped. kn = <={delete $it $kn} obs = $it $obs } { echo The $it is caught in your knapsack. } } } { echo You\'re not carrying the $it! } } } { echo 'Drop what?' } } {~ $verb enter go} { if {! ~ $#obj 0} { if {! ~ $obj up} { if {~ $obj $exs $hexs} { if {access -x $obj} { if {cd $obj} { echo 'You squeeze through the passage.' } { echo You can\'t go that direction. } } { echo 'An invisible force blocks your way.' } } { echo 'I see no such passage.' } } { if {cd ..} { echo 'You struggle upwards.' } { echo You can\'t reach that high. } } } { echo 'Which passage?' } } {~ $verb examine} { if {! ~ $#obj 0} { if {~ $obj all} { $obj = $obs $exs x = } for (it = $obj $x) { if {~ $it $obs $hobs $exs $hexs} { echo Upon close inspection of the $it, you see: if {! ls -ld $it >[2]/dev/null} { echo -- when you look directly at the $it, it vanishes. } } { if {~ $it $kn} { echo 'You must drop it first.' } { echo I see no $it here. } } } } { echo 'Examine what?' } } {~ $verb feed} { if {! ~ $#obj 0} { if {~ $obj $obs $hobs} { if {~ $x(1) to} { local (* = $x) { if {! ~ $#2 0} { * = $*(2 ...) local (PATH = $OPATH) { if {$* <$obj >[2]/dev/null} { echo The $1 monster devours your $obj. if {/bin/rm -f $obj >/dev/null >[2=1]} { obs = <={delete $obj $obs} } { echo 'But he spits it back up.' } } { echo The $1 monster holds his nose in disdain. } } } { echo 'To what?' } } } { echo Feed $obj to what? } } { if {~ $obj $kn} { echo 'You must drop it first.' } { echo I see no $obj here. } } } { echo 'Feed what?' } } {~ $verb get take} { if {! ~ $#obj 0} { if {~ $obj all} { obj = $obs x = } for (it = $obj $x) { if {~ $it $obs $hobs} { if {~ $it $kn} { echo 'You already have one.' } { if {mv $it $HOME/$KNAP/$it >/dev/null >[2=1]} { echo $it: taken. kn = $it $kn obs = <={delete $it $obs} } { echo The $it is too heavy. } } } { echo I see no $it here. } } } { echo 'Get what?' } } {~ $verb gripe bug} { echo Please describe the problem and your situation at the time it failed.\nEnd the bug report with a line containing just a Ctrl-D. mailx -s 'adventure.es bug' $MAINT echo 'Thank you!' } {~ $verb help} { help } {~ $verb inventory i} { if {! ~ $#kn 0} { echo 'Your knapsack contains:' print $kn } { echo 'You are poverty-stricken.' } } {~ $verb kill destroy} { if {! ~ $#obj 0} { if {~ $obj all} { x= if {ask Do you really want to attempt to $verb them all?} { obj = $obs echo 'Chicken!' obj= } } for (it = $obj $x) { if {~ $it $obs $hobs} { if {mv $it $HOME/$LIM [1=0] >[2=0]} { if {~ $verb kill} { echo The $it cannot defend himself; he dies. } { echo You have destroyed the $it; it vanishes. } obs = <={delete $it $obs} } {~ $verb kill} { echo Your feeble blows are no match for the $it. } { echo The $it is indestructible. } } {~ $it $kn} { echo You must drop the $it first. found=false } { echo I see no $it here. } } { echo 'Kill what?' } } } {~ $verb look l} { obs = $obs $hobs hobs= if {! ~ $#obs 0} { echo 'The room contains:' print $obs } { echo 'The room is empty.' } exs = $exs $hexs hexs= if {! ~ $#exs 0} { echo 'There are exits plainly labeled:' print $exs echo 'and a passage directly overhead.' } { echo 'The only exit is directly overhead.' } } {~ $verb magic} { if {~ $obj mode} { if {~ $cha true} { echo 'You had your chance and you blew it.' } { if {ask 'Are you a wizard?'} { echo -n 'Prove it! Say the magic word: ' obj = <={%read} if {~ $obj armadillo} { echo 'Yes, master!!' wiz=true } { echo Homie says: I don\'t think so cha=true } } { echo I didn\'t think so. } } } { echo 'Nice try.' } } {~ $verb open read} { if {! ~ $#obj 0} { if {~ $obj $obs $hobs} { if {access -r $obj} { if {test -s $obj} { echo Opening the $obj reveals: if {! $CAT < $obj} { echo '-- oops, you lost the contents!' } } { echo There is nothing inside the $obj. } } { echo You do not have the proper tools to open the $obj. } } { if {~ $obj $kn} { echo 'You must drop it first.' found=false } { echo I see no $obj here. } } } { echo 'Open what?' } } {~ $verb quit exit} { if {ask 'Do you really want to quit now?'} { if {! ~ $#kn 0} { echo 'The contents of your knapsack will still be there next time.' } /bin/rm -rf $HOME/$LIM echo 'See you later!' exit 0 } } {~ $verb resurrect} { if {! ~ $#obj 0} { for (it = $obj $x) { if {~ $it $obs $hobs} { echo The $it is already alive and well. } { if {mv $HOME/$LIM/$it $it [1=0] >[2=0]} { echo The $it staggers to his feet. obs = $it $obs echo There are sparks but no $it appears. } } } } { echo 'Resurrect what?' } } {~ $verb steal} { if {! ~ $#obj 0} { if {~ $obj $obs $hobs} { echo 'There is already one here.' } { if {~ $x(1) from} { local (* = $x) { if {! ~ $#2 0} { * = $*(2 ...) local (PATH = $OPATH) { if {$* >$obj >[2]/dev/null} { echo The $1 monster drops the $obj. obs = $obj $obs } { echo The $1 monster runs away as you approach. /bin/rm -f $obj >/dev/null >[2=1] } } { echo 'From what?' } } { echo Steal $obj from what? } } } } } { echo 'Steal what?' } } {~ $verb throw} { if {! ~ $#obj 0} { if {~ $obj $obs $hobs} { if {~ $x(1) at} { if {~ $x(2) daemon} { if {lpr -r $obj} { echo The daemon catches the $obj, turns it into paper,\nand leaves it in the basket. obs = <={delete $obj $obs} } { echo The daemon is nowhere to be found. } } { echo 'At what?' } } { echo Throw $obj at what? } } { if {~ $obj $kn} { echo 'It is in your knapsack.' found=false } { echo I see no $obj here. } } } { echo 'Throw what?' } } {~ $verb u up} { if {cd ..} { echo 'You pull yourself up a level.' } { echo You can\'t reach that high. } } {~ $verb wake} { if {! ~ $#obj 0} { echo You awaken the $obj monster: local (PATH = $OPATH) { $obj $x } echo 'The monster slithers back into the darkness.' } { echo 'Wake what?' } } {~ $verb w where} { echo You are in $room. } {~ $verb xyzzy} { if {cd} { echo 'A strange feeling comes over you.' } { echo 'Your spell fizzles out.' } } { if {! ~ $#verb 0} { if {~ $wiz true} { local (PATH = $OPATH) { $verb $obj $x } } { echo I don\'t know how to "$verb". echo 'Type "help" for assistance.' } } { echo 'Say something!' } } } } } --------------5F6EDF85C87C97D3FCAAFA81-- From es-owner Fri Sep 12 15:10:17 1997 Received: from cis.nctu.edu.tw ([140.113.23.5]) by hawkwind.utcs.utoronto.ca with SMTP id <24664>; Fri, 12 Sep 1997 14:51:06 -0400 Received: from bbs by cis.nctu.edu.tw (SMI-8.6/SMI-SVR4) id RAA15224; Fri, 12 Sep 1997 17:29:17 +0800 From: sca.bbs@cis.nctu.edu.tw Received: by bbs.cis.nctu.edu.tw (Apollo BBS 1.0) id AA04197; Fri, 12 Sep 1997 17:28:40 +0800 Date: Fri, 12 Sep 1997 05:28:40 -0400 Message-Id: <19970912970928.AA04197@cis.nctu.edu.tw> Subject: Where to get patch for job control? To: es@hawkwind.utcs.toronto.edu X-Forwarded-By: sca (sca) X-Disclaimer: ¥æ³q¤j¾Ç¸ê°T¬ì¾Ç¨t BBS ¹ï¥»«H¤º®e®¤¤£­t³d¡C Hi, I've heard that there is patch to make _es_ have job control ability. Could anyone tell me where to get it? What is needed is for version 0.84; version 0.9* seems not successful to compile on my PC/Linux. thanks -mlt From es-owner Fri Sep 12 15:13:55 1997 Received: from iadd.jivetech.com ([205.134.227.21]) by hawkwind.utcs.utoronto.ca with SMTP id <24673>; Fri, 12 Sep 1997 14:52:00 -0400 Received: (from haahr@localhost) by iadd.jivetech.com (8.8.5/8.8.5) id HAA04970; Fri, 12 Sep 1997 07:46:51 -0700 From: Paul Haahr X-Attribution: haahr Message-Id: <8Q6lnr32k@localhost.localdomain.netcom.com> Date: Fri, 12 Sep 1997 10:46:51 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: "Harald Hanche-Olsen" Cc: es@hawkwind.utcs.toronto.edu Subject: Re: Flaw in %readfrom and %writeto In-Reply-To: <970901225252.ZM15966@math.ntnu.no> References: <970901225252.ZM15966@math.ntnu.no> X-Mailer: VM 6.30 under Emacs 19.34.1 Harald Hanche-Olsen wrote > # All that, for example, the /tmp version of %readfrom does is bind > # the named variable (which is the first argument, var) to the name > # of a (hopefully unique) file in /tmp. > > However, the uniqueness fails in some cases, as in the following example. Yep, that's right. Don't most systems support /dev/fd these days, making the temp file kludge less necessary? > I actually never understood why $pid does not change in a forked subshell, > but that's a different matter. So you can do things like { mumble > /tmp/poot.$pid } & rm /tmp/poot.$pid and have them work on the same file. Behavior inherited from /bin/sh. --p From es-owner Sat Sep 13 01:18:52 1997 Received: from kissimmee.infomkt.ibm.com ([204.146.129.20]) by hawkwind.utcs.utoronto.ca with SMTP id <24691>; Sat, 13 Sep 1997 01:11:24 -0400 Received: from dingler.dev.infomkt.ibm.com (dingler.dev.infomkt.ibm.com [204.146.132.31]) by kissimmee.infomkt.ibm.com (8.6.10/8.6.10) with ESMTP id UAA25379; Fri, 12 Sep 1997 20:50:44 -0400 Received: (from quanstro@localhost) by dingler.dev.infomkt.ibm.com (8.7.5/8.7.3) id UAA49594; Fri, 12 Sep 1997 20:52:45 -0400 Date: Fri, 12 Sep 1997 20:52:45 -0400 Message-Id: <199709130052.UAA49594@dingler.dev.infomkt.ibm.com> To: es@hawkwind.utcs.toronto.edu, haahr@netcom.com From: erik quanstrom Subject: re: Flaw in %readfrom and %writeto >Yep, that's right. Don't most systems support /dev/fd these days, >making the temp file kludge less necessary? no. aix, for example. >> I actually never understood why $pid does not change in a forked subshell, >> but that's a different matter. >So you can do things like > > { mumble > /tmp/poot.$pid } & > rm /tmp/poot.$pid > >and have them work on the same file. Behavior inherited from /bin/sh. why would you want that? if you really want that behavior, then you can implement it by doing the floowing if subshells change $pid parentPid = $pid { mumble > /tmp/poot.$parentPid } & rm /tmp/poot/$parentPid i wrote my shell this way. From es-owner Sat Sep 13 23:11:06 1997 Received: from cs.uchicago.edu ([128.135.11.87]) by hawkwind.utcs.utoronto.ca with SMTP id <24670>; Sat, 13 Sep 1997 23:06:22 -0400 Received: from ra.cs.uchicago.edu (ra [128.135.20.101]) by cs.uchicago.edu (8.8.5/8.7.3) with ESMTP id NAA19414 for ; Sat, 13 Sep 1997 13:20:17 -0500 (CDT) Received: (from csdayton@localhost) by ra.cs.uchicago.edu (8.8.5/8.8.5) id NAA20568; Sat, 13 Sep 1997 13:20:17 -0500 (CDT) Sender: csdayton@cs.uchicago.edu X-Face: `X="Sg7A[PL3/_8;>>ggjOy&\KtWiH7.wQ>Y"hQ2fxSG9RkPTCT}&^()5[Gp(-DaTf:t`MSBt@Li_C9U@y#i/c?i$uLQ8[';I$mMAm_rZta>l`STW_aA5`iD[!80p#_qmN4#tMu[Pu7wkIi)5*4YXAhg)9R2-BAWPbVOzgE$Ib4QuZn0YaE~'C/7h^CTuPybz$u Mail-Copies-To: never Reply-To: csdayton+es@cs.uchicago.edu To: es@hawkwind.utcs.toronto.edu Subject: Re: Flaw in %readfrom and %writeto References: <199709130052.UAA49594@dingler.dev.infomkt.ibm.com> Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=US-ASCII From: Soren Dayton Date: Sat, 13 Sep 1997 14:20:16 -0400 In-Reply-To: erik quanstrom's message of Fri, 12 Sep 1997 20:52:45 -0400 Message-ID: Lines: 33 X-Mailer: Gnus v5.4.37/XEmacs 19.15 erik quanstrom writes: > >Yep, that's right. Don't most systems support /dev/fd these days, > >making the temp file kludge less necessary? > > no. aix, for example. > > >> I actually never understood why $pid does not change in a forked subshell, > >> but that's a different matter. > > >So you can do things like > > > > { mumble > /tmp/poot.$pid } & > > rm /tmp/poot.$pid > > > >and have them work on the same file. Behavior inherited from /bin/sh. > > why would you want that? if you really want that behavior, > then you can implement it by doing the floowing if subshells > change $pid > > parentPid = $pid > > { mumble > /tmp/poot.$parentPid } & > rm /tmp/poot/$parentPid note the `behaviour inherited from /bin/sh'. This would be unfortunate to break. Perhaps another way to do this would be to provide a $&getpid primitive? While this is not ideal, it would work. What do people think? Soren From es-owner Mon Sep 15 17:13:52 1997 Received: from iadd.jivetech.com ([205.134.228.61]) by hawkwind.utcs.utoronto.ca with SMTP id <24706>; Mon, 15 Sep 1997 17:05:51 -0400 Received: (from haahr@localhost) by iadd.jivetech.com (8.8.5/8.8.5) id IAA10733; Mon, 15 Sep 1997 08:27:16 -0700 From: Paul Haahr X-Attribution: haahr Message-Id: <8Q7lfk338@localhost.localdomain.netcom.com> Date: Mon, 15 Sep 1997 11:27:16 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: csdayton+es@cs.uchicago.edu Cc: es@hawkwind.utcs.toronto.edu Subject: Re: Flaw in %readfrom and %writeto In-Reply-To: References: <199709130052.UAA49594@dingler.dev.infomkt.ibm.com> X-Mailer: VM 6.30 under Emacs 19.34.1 > note the `behaviour inherited from /bin/sh'. This would be unfortunate > to break. Perhaps another way to do this would be to provide a $&getpid > primitive? While this is not ideal, it would work. > > What do people think? It has the advantage that you could then get rid of special handling of $pid and just make it an assignment in the shell startup code, I think. Probably works out to be the same amount of code, with a little more flexibility added in. From es-owner Mon Sep 15 17:18:09 1997 Received: from kissimmee.infomkt.ibm.com ([204.146.129.20]) by hawkwind.utcs.utoronto.ca with SMTP id <24701>; Mon, 15 Sep 1997 17:05:10 -0400 Received: from dingler.dev.infomkt.ibm.com (dingler.dev.infomkt.ibm.com [204.146.132.31]) by kissimmee.infomkt.ibm.com (8.6.10/8.6.10) with ESMTP id LAA25537; Mon, 15 Sep 1997 11:36:54 -0400 Received: (from quanstro@localhost) by dingler.dev.infomkt.ibm.com (8.7.5/8.7.3) id LAA38676; Mon, 15 Sep 1997 11:37:40 -0400 Date: Mon, 15 Sep 1997 11:37:40 -0400 Message-Id: <199709151537.LAA38676@dingler.dev.infomkt.ibm.com> To: csdayton@cs.uchicago.edu, es@hawkwind.utcs.toronto.edu From: Subject: re $pid >note the `behaviour inherited from /bin/sh'. This would be unfortunate >to break. why? From es-owner Wed Sep 17 03:23:29 1997 Received: from cs.uchicago.edu ([128.135.11.87]) by hawkwind.utcs.utoronto.ca with SMTP id <24681>; Wed, 17 Sep 1997 03:13:50 -0400 Received: from ra.cs.uchicago.edu (ra [128.135.20.101]) by cs.uchicago.edu (8.8.5/8.7.3) with ESMTP id AAA08229 for ; Wed, 17 Sep 1997 00:00:45 -0500 (CDT) Received: (from csdayton@localhost) by ra.cs.uchicago.edu (8.8.5/8.8.5) id AAA27606; Wed, 17 Sep 1997 00:00:44 -0500 (CDT) Sender: csdayton@cs.uchicago.edu X-Face: `X="Sg7A[PL3/_8;>>ggjOy&\KtWiH7.wQ>Y"hQ2fxSG9RkPTCT}&^()5[Gp(-DaTf:t`MSBt@Li_C9U@y#i/c?i$uLQ8[';I$mMAm_rZta>l`STW_aA5`iD[!80p#_qmN4#tMu[Pu7wkIi)5*4YXAhg)9R2-BAWPbVOzgE$Ib4QuZn0YaE~'C/7h^CTuPybz$u Mail-Copies-To: never Reply-To: csdayton+es@cs.uchicago.edu To: es@hawkwind.utcs.toronto.edu Subject: Re: Where to get patch for job control? References: <19970912970928.AA04197@cis.nctu.edu.tw> Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=US-ASCII From: Soren Dayton Date: Wed, 17 Sep 1997 01:00:44 -0400 In-Reply-To: sca.bbs@cis.nctu.edu.tw's message of Fri, 12 Sep 1997 05:28:40 -0400 Message-ID: Lines: 22 X-Mailer: Gnus v5.4.37/XEmacs 19.15 sca.bbs@cis.nctu.edu.tw writes: > Hi, > > I've heard that there is patch to make _es_ > have job control ability. > Could anyone tell me where to get it? I have no idea. I would be interested in seeing it, but I do not think that this should be included in es. > What is needed is for version 0.84; > version 0.9* seems not successful to compile > on my PC/Linux. Have you tried the new `autoconf'ed version? ftp://ftp.cs.uchicago.edu/pub/users/csdayton/ ?? I believe that it should build on Linux. Soren From es-owner Wed Sep 17 17:27:30 1997 Received: from romberg.math.ntnu.no ([129.241.15.150]) by hawkwind.utcs.utoronto.ca with SMTP id <24649>; Wed, 17 Sep 1997 17:05:31 -0400 Received: (qmail 2786 invoked by uid 13799); 17 Sep 1997 08:19:15 -0000 From: "Harald Hanche-Olsen" Message-Id: <970917101915.ZM2779@math.ntnu.no> Date: Wed, 17 Sep 1997 04:19:14 -0400 In-Reply-To: References: <19970912970928.AA04197@cis.nctu.edu.tw> X-Face: ,};iH+.X."ygdh+d]dhDa&*SY2HIr/pV,Sz%PSzi!bjr"jOC{%6*g@aB("DWtv6?EKg2_pjvl.q^RA`hM(a'X$&NeX?6W)yb>5o0\n\G_g+G(E_qQnAlI.BJOG9mw%i.wyiT(7i&CElcgIE_s^^Bz UJokoXH7L)L*jn X-URL: http://www.math.ntnu.no/~hanche/ X-Mailer: Z-Mail (4.0.1 13Jan97) To: es@hawkwind.utcs.toronto.edu Subject: Re: Where to get patch for job control? Sender: Harald Hanche-Olsen MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit - Soren Dayton : |--- | Have you tried the new `autoconf'ed version? | | ftp://ftp.cs.uchicago.edu/pub/users/csdayton/ | | ?? I believe that it should build on Linux. |--- Indeed it does. In fact I have compiled it straight out of the box for all of the following architectures (shown by uname -a output, slightly edited to leave out irrelevant details like host names): SunOS 5.3 Generic sun4c sparc OSF1 V3.2 62 alpha hp700ux10 HP-UX B.10.10 A 9000/712 SunOS 5.5.1 Generic_103641-08 i86pc i386 SunOS 4.1.2 1 sun4c IRIX64 6.2 03131016 IP25 mips Linux 2.0.30 #4 Wed Jun 11 13:53:55 MET DST 1997 i686 AIX 2 4 000003531C00 NetBSD 1.2.1 NetBSD 1.2.1 i386 NetBSD 1.2 NetBSD 1.2 sparc NetBSD 1.2 NetBSD 1.2 pmax NetBSD 1.2 NetBSD 1.2 vax NetBSD 1.2.1 NetBSD 1.2.1 hp300 FreeBSD 2.2-STABLE FreeBSD 2.2-STABLE i386 (plus a DEC Ultrix machine, not currently available so I can't run uname -a on it). Not bad, eh? The only places I had any real trouble were on a couple of SGI IRIX machines -- on one, yacc does not like parse.y, and ld dumps core on the other. - Harald From es-owner Mon Feb 16 18:49:18 1998 Received: from pfirsich.compot.com ([194.122.13.137]) by hawkwind.utcs.utoronto.ca with SMTP id <24796>; Mon, 16 Feb 1998 18:10:01 -0500 Received: by pfirsich.compot.com id m0y46Py-000vYTC (Debian Smail-3.2 1996-Jul-4 #2); Sun, 15 Feb 1998 16:55:46 +0100 (CET) Message-Id: Date: Sun, 15 Feb 1998 10:55:46 -0500 From: "J. F. Wittenberger" To: es@hawkwind.utcs.toronto.edu Subject: Two bugs in es 0.9 alpha-2 X-Face: 6~U:%+h-L"l}G:WS~G)Sk7Oj,CT3HZPfNaysKd|c11Io~RfiD;dcL>V:&W'HR#(O*ZdVmrW SY0[WzUrN-fb('2J4DJ$tYckae87@?//@9JB3[%o:oz8rgctJ[oQV'KS|zV"%'pHl?jPkrb9[fZ?^> pGR%Wm!cvkd0`}A]R}C=L?C_'N5+PUOS$xF5t8KlI_;RAZ[jp X-Attribution: jfw Hi all, I ran into two bugs when installing the new version. a) This is a little arguable, but I consider it a bug, because the former version and all shells I know handle it different: I tried to get the name a script was called by hence I did: NAME=`{basename $0} giving me a value of `%backquote' for `$NAME´. puh. Workaround: NAME=$0; NAME=`{basename $NAME} # ugly hack b) After running quite a ugly script (I use es or prototyping an application) I do smth like fn quit { echo quit; exit 0; } ..... { ... quit } ... .... when the quit gets executed I get a segmentation violation. /Jerry From es-owner Wed Mar 11 01:18:31 1998 Received: from pfirsich.compot.com ([194.122.13.137]) by hawkwind.utcs.utoronto.ca with SMTP id <24880>; Wed, 11 Mar 1998 00:25:33 -0500 Received: by pfirsich.compot.com id m0yC4ZU-000vY0C (Debian Smail-3.2 1996-Jul-4 #2); Mon, 9 Mar 1998 16:34:32 +0100 (CET) Message-Id: Date: Mon, 9 Mar 1998 10:34:32 -0500 From: "J. F. Wittenberger" To: es@hawkwind.utcs.toronto.edu Subject: Bug in es %read X-Face: 6~U:%+h-L"l}G:WS~G)Sk7Oj,CT3HZPfNaysKd|c11Io~RfiD;dcL>V:&W'HR#(O*ZdVmrW SY0[WzUrN-fb('2J4DJ$tYckae87@?//@9JB3[%o:oz8rgctJ[oQV'KS|zV"%'pHl?jPkrb9[fZ?^> pGR%Wm!cvkd0`}A]R}C=L?C_'N5+PUOS$xF5t8KlI_;RAZ[jp X-Attribution: jfw -----BEGIN PGP SIGNED MESSAGE----- Hi, I just noticed a strange bug in es %read function. I tried to %read a very long line (1074 characters). This happend to break a script which worked before. Setting -x fixed the script again (but with terrible output :-(). I worked around with `{head -1} for now. But that's bad. /Jerry -----BEGIN PGP SIGNATURE----- Version: 2.6.3ia Charset: noconv Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface iQCVAwUBNQQMAX97iaGvWchtAQGzBgQAu0TLf49GEQqOl1EyG2nyjzYAR0gJd2Hv z8gQVffjh7G6ZJvxv8baq0jDfl+e7Z8wSo1OvThXup+nUZ0GbYBrp8EDRKXxxgGx yKI24yPNLWw/FjuNZ+fwKju1LX4wo/tyOxmr2CD6Nim8gZc0R7oYdnU1yACRjiuB CEnwxF3stTM= =B7ic -----END PGP SIGNATURE----- From es-owner Sun Apr 5 04:23:13 1998 Received: from post.mail.demon.net ([194.217.242.27]) by hawkwind.utcs.utoronto.ca with SMTP id <24811>; Sun, 5 Apr 1998 03:31:19 -0400 Received: from mensys.demon.co.uk ([194.222.219.61]) by post.mail.demon.net id aa2005721; 3 Apr 98 12:57 GMT Received: from tothenet.mentor.misys.co.uk [192.32.1.231] by mentor-systems.com [194.222.219.61] with SMTP (MDaemon.v2.7.SP0.R) for ; Fri, 03 Apr 98 13:35:30 +0100 Received: by tothenet.mentor.misys.co.uk (1.38.193.5/0.1) id AA09422; Fri, 3 Apr 1998 13:29:18 +0100 Received: from menpc5 by mentor.misys.co.uk with SMTP (1.38.193.5/16.2) id AA09385; Fri, 3 Apr 1998 13:29:13 +0100 From: Jonathan Storey To: es@hawkwind.utcs.toronto.edu MMDF-Warning: Parse error in original version of preceding line at post.mail.demon.net Subject: Ported es to GNU Win32 + HPUX10.01 Date: Fri, 3 Apr 1998 07:33:03 -0500 Message-Id: <001801bd5efc$a57241a0$050120c0@menpc5> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-Msmail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 Importance: Normal X-Mimeole: Produced By Microsoft MimeOLE V4.72.2106.4 X-Delivery-Agent: ToTheNet v1.3, (C) 1997, Mentor Systems plc X-MDaemon-Deliver-To: es@hawkwind.utcs.toronto.edu Hello ES people Just a little note to say HI and to say that I have sucessfully ported es 0.9 beta1 to the following environments: HPUX10.01 and GNU Win32 (Beta 19) The problems I had to resolve were: Under GNU Win32 Beta19 I had to 1.) #include "time.h" to get CLK_TCK definition required by prim-sys.c 2.) edit the Makefile and give SIGNALS a value of: /H-i386-cygwin32/i386-cygwin32/include/sys/signal.h 3.) bison insisted on looking for 'bison.simple' under /cygnus/b19/share even though I had installed GNUWin32 under /gnuwin32 so I created cygnus/b19 under my root of /gnuwin32/b19 and created a symbolic link to 'share' and everything was OK. Under HP-UX 10.01 it was a little trickier: (?!) I had to #include "resource.h" and define _KERNEL to get the RLIMIT_* values required by prim-sys.c Defining _KERNEL prevented _NSIG being defined by the system headers, so I just got it's value (31) and defined _NSIG to be 31 and then we were cookin' In short I modded the Makefile and added -D_KERNEL -D_NSIG=31 after the rest of the CCOPTS. The path to YACC on this box was /opt/langtools/bin/yacc, which I also added to the Makefike under YACC= I'm sure that there are ``proper'' ways of getting this to compile smoothly under these environments, but I haven't had time yet to consider how to implement the changes required. Hope this info proves useful to somebody. Regards JOZ. joz@thinktank.demon.co.uk (Home) joz@mentor-systems.com (Work) pS. Oh Yeah, I found what I believe to be a bug (although it may just be porting issue) try typing $&. (include the full-stop) and see what happens! try $&0. From es-owner Thu Apr 9 15:51:28 1998 Received: from iadd.jivetech.com ([206.24.112.215]) by hawkwind.utcs.utoronto.ca with SMTP id <24682>; Thu, 9 Apr 1998 15:25:41 -0400 Received: (from haahr@localhost) by iadd.jivetech.com (8.8.5/8.8.5) id WAA00354; Tue, 7 Apr 1998 22:11:30 -0700 From: Paul Haahr X-Attribution: haahr Message-Id: <8RaMs2305@iadd.jivetech.com> Date: Wed, 8 Apr 1998 01:11:30 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Jonathan Storey CC: es@hawkwind.utcs.toronto.edu Subject: Re: Ported es to GNU Win32 + HPUX10.01 In-Reply-To: <001801bd5efc$a57241a0$050120c0@menpc5> References: <001801bd5efc$a57241a0$050120c0@menpc5> X-Mailer: VM 6.30 under Emacs 19.34.1 Wow. I'm overwhelmed. A port to Win32 worked. I'm speechless. Nice going. > Oh Yeah, I found what I believe to be a bug (although it may just be > porting issue) try typing $&. (include the > full-stop) and see what happens! try $&0. I guess nobody would believe ``es panic: eval: bad closure node kind 3'' was the intended response. --p From es-owner Mon Apr 13 20:01:09 1998 Received: from fiinbeck.math.ntnu.no ([129.241.15.140]) by hawkwind.utcs.utoronto.ca with SMTP id <24703>; Mon, 13 Apr 1998 19:34:25 -0400 Received: (qmail 20588 invoked from network); 10 Apr 1998 16:43:50 -0000 Received: from localhost (127.0.0.1) by localhost with SMTP; 10 Apr 1998 16:43:50 -0000 To: es@hawkwind.utcs.toronto.edu Subject: Re: Two bugs in es 0.9 alpha-2 In-Reply-To: Your message of "Sun, 15 Feb 1998 10:55:46 -0500" References: X-Mailer: Mew version 1.91 on Emacs 19.34 X-URL: http://www.math.ntnu.no/~hanche/ Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <19980410184344Q.hanche@math.ntnu.no> Date: Fri, 10 Apr 1998 12:43:44 -0400 From: Harald Hanche-Olsen X-Dispatcher: imput version 971024 Lines: 79 (The message I am responding to is almost two months old. This is not too untypical of the level of activity on this list.) - "J. F. Wittenberger" : | a) This is a little arguable, but I consider it a bug, because the | former version and all shells I know handle it different: | | I tried to get the name a script was called by hence I did: | | NAME=`{basename $0} | | giving me a value of `%backquote' for `$NAME'. puh. Um, yes, this happens because %backquote changed from being just plain $&backquote to being a function, in which $0 is the name of that function. Since this is documented, sort of, I personally would hesitate to call it a bug. More precisely, the man page states If, as the most common case, a function variable is bound to a lambda, when the function is invoked, the variable $0 is bound (dynamically, see below) to the name of the func- tion. Note that the dynamical nature of this binding is what causes the problem. To see what your snippet of code is really doing, say ; echo {NAME=`{basename $0}} {NAME=<={%backquote <={%flatten '' $ifs} {basename $0}}} and initial.es says fn %backquote { let ((status output) = <={ $&backquote $* }) { bqstatus = $status result $output } } so by the time $&backquote gets to evaluate {basename $0}, $0 has already been dynamically bound to %backquote. | Workaround: | | NAME=$0; NAME=`{basename $NAME} # ugly hack No need to fork to get this. You can do it with es builtins: @{NAME=$*($#*)} <={%fsplit / $0} or the somewhat more conventional let(x=<={%fsplit / $0}) NAME=$x($#x) | b) After running quite a ugly script (I use es or prototyping an | application) I do smth like | | fn quit { echo quit; exit 0; } | | ..... { | ... | quit | } | ... | .... | | when the quit gets executed I get a segmentation violation. Uh. I too have es dying on me occasionally. But every time the problem goes away when I try to isolate it in order to provide a meaningful error report. I would conjecture that this problem falls into that same category. To fix it, I suspect nothing will less than a complete, careful review of the source code (preferably by someone other than its author) will work. Or maybe someone can run it under purify and see what happens? (Our purify license just ran out. If it gets renewed, and if I find the time, maybe I'll give it a try myself.) - Harald From es-owner Mon Apr 13 20:06:06 1998 Received: from fiinbeck.math.ntnu.no ([129.241.15.140]) by hawkwind.utcs.utoronto.ca with SMTP id <24704>; Mon, 13 Apr 1998 19:31:51 -0400 Received: (qmail 20616 invoked from network); 10 Apr 1998 16:45:24 -0000 Received: from localhost (127.0.0.1) by localhost with SMTP; 10 Apr 1998 16:45:24 -0000 To: es@hawkwind.utcs.toronto.edu Subject: Re: Bug in es %read In-Reply-To: Your message of "Mon, 9 Mar 1998 10:34:32 -0500" References: X-Mailer: Mew version 1.91 on Emacs 19.34 X-URL: http://www.math.ntnu.no/~hanche/ Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 8bit Message-Id: <19980410184523Q.hanche@math.ntnu.no> Date: Fri, 10 Apr 1998 12:45:23 -0400 From: Harald Hanche-Olsen X-Dispatcher: imput version 971024 Lines: 14 - "J. F. Wittenberger" : | I just noticed a strange bug in es %read function. | | I tried to %read a very long line (1074 characters). This happend to | break a script which worked before. Setting -x fixed the script | again (but with terrible output :-(). | | I worked around with `{head -1} for now. But that's bad. I cannot reproduce this. The nature of your fix seems to indicate that this is a Heisenbug. - Harald From es-owner Sat Oct 10 19:58:24 1998 Received: from fiinbeck.math.ntnu.no ([129.241.15.140]) by hawkwind.utcs.utoronto.ca with SMTP id <25026>; Sat, 10 Oct 1998 19:07:18 -0400 Received: (qmail 6189 invoked from network); 10 Oct 1998 19:35:30 -0000 Received: from localhost (127.0.0.1) by localhost with SMTP; 10 Oct 1998 19:35:30 -0000 To: es@hawkwind.utcs.toronto.edu Subject: Re: es dumps core, aargh... In-Reply-To: Your message of "Sat, 10 Oct 1998 21:17:44 +0200" <19981010211744M.hanche@math.ntnu.no> References: <19981010211744M.hanche@math.ntnu.no> X-Mailer: Mew version 1.91 on Emacs 19.34 X-URL: http://www.math.ntnu.no/~hanche/ Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <19981010213529U.hanche@math.ntnu.no> Date: Sat, 10 Oct 1998 15:35:29 -0400 From: Harald Hanche-Olsen X-Dispatcher: imput version 971024 Lines: 31 - Harald Hanche-Olsen : | All of a sudden, es has started dumping core on me when I run a | certain script on a DEC alpha (OSF 1 V3.2). Ah... Now I understand why that script dumped core. I also don't understand why it used to work before - because it should not have done so: Here is a minimal version of the same problem. This dumps core: ; echo <={@ x{x=@{$*}; $&result $x}} why? check this one first: ; echo <={@ x{$&result @{$*}} X} %closure(x=X)@ * {$*} Now, imagine replacing X by the entire closure, and you have a closure containing a reference to itself. That can never be printed, of course. It is interesting to note how the act of complaining to the list opened up my mind to the point where I could figure out the problem by myself. I hope I haven't disturbed the rest of you unduly with this. I'll go bang my head against the wall for a while now. I'm sure it will make me feel better. - Harald From es-owner Sat Oct 10 19:58:30 1998 Received: from fiinbeck.math.ntnu.no ([129.241.15.140]) by hawkwind.utcs.utoronto.ca with SMTP id <25025>; Sat, 10 Oct 1998 19:03:29 -0400 Received: (qmail 5790 invoked from network); 10 Oct 1998 19:17:45 -0000 Received: from localhost (127.0.0.1) by localhost with SMTP; 10 Oct 1998 19:17:45 -0000 To: es@hawkwind.utcs.toronto.edu Subject: es dumps core, aargh... X-Mailer: Mew version 1.91 on Emacs 19.34 X-URL: http://www.math.ntnu.no/~hanche/ Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-Id: <19981010211744M.hanche@math.ntnu.no> Date: Sat, 10 Oct 1998 15:17:44 -0400 From: Harald Hanche-Olsen X-Dispatcher: imput version 971024 Lines: 88 All of a sudden, es has started dumping core on me when I run a certain script on a DEC alpha (OSF 1 V3.2). A session with gdb reveals that this happens when es tries to run an external program: While building the environment for the program, it enters an infinite call loop Cconv -> enclose -> enclose -> fmtprint -> printfmt -> Lconv -> getstr -> str -> strv -> printfmt -> Cconv ... until it runs out of stack space. Below is a piece of the traceback, showing where the loop starts. I tried tracing the var variable in the str procedure, at frame 33567, in the hopes of finding a cycle in the data structure or something, but I could not go very far before gdb failed (apparently, gdb could not figure out what a struct Term was, so it would not print its fields for me...) Anyway, here is the offending script, after I peeled away all kinds of irrelevancies (I even removed the external program run, replacing it by a simple echo of the offending variable): #!/store/bin/es -p fn v {echo + $* >[1=2] ; $*} fn arch arch host wrap args { arches=$arches $arch if ({~ $wrap () || ~ $wrap -} {wrap=@{$*}}) do.$arch=$wrap $arch $host $args} arches= v arch foo bar - yow v @{echo $(do.$1)} foo echo We never get here. and here is the output: ; es -p ./test + arch foo bar - yow + @ * {echo $(do.^$1)} foo segmentation violation After I got this far in my debugging effort, I found that I could avoid the problem by declaring fn just-do-it {$*} and replacing the @{*} inside the arch function by just-do-it. Problem solved for now, but I wonder... Has anybody else seen this? - Harald PS. Excerpt from the stack trace: #22548 0x120010b88 in Cconv (f=0x11fff60f0) at conv.c:223 #22549 0x12002a284 in printfmt (format=0x11fff60f0, fmt=0x14000b0e0 "%C") at print.c:252 #22550 0x12002d890 in strv (fmt=0x14000b0e0 "%C", args={ __base = 0x11fff61c0 "à°", __offset = 8}) at str.c:35 #22551 0x12002d9c0 in str (fmt=0x14000b0e0 "%C") at str.c:47 #22552 0x12002f838 in getstr (term=0x14005c6d0) at term.c:67 #22553 0x12000fe4c in Lconv (f=0x11fff6480) at conv.c:17 #22554 0x12002a284 in printfmt (format=0x11fff6480, fmt=0x140007c60 "%S=%#L%s") at print.c:252 #22555 0x12002a400 in fmtprint (format=0x11fff6480, fmt=0x140007c60 "%S=%#L%s") at print.c:280 #22556 0x120010a38 in enclose (f=0x11fff6480, binding=0x14005eb88, sep=0x140007b00 ";") at conv.c:182 #22557 0x120010a08 in enclose (f=0x11fff6480, binding=0x14005e2f0, sep=0x140007a68 "") at conv.c:181 #22558 0x120010b88 in Cconv (f=0x11fff6480) at conv.c:223 #22559 0x12002a284 in printfmt (format=0x11fff6480, fmt=0x14000b0e0 "%C") at print.c:252 #22560 0x12002d890 in strv (fmt=0x14000b0e0 "%C", args={ __base = 0x11fff6550 "à°", __offset = 8}) at str.c:35 #22561 0x12002d9c0 in str (fmt=0x14000b0e0 "%C") at str.c:47 #22562 0x12002f838 in getstr (term=0x14005c6d0) at term.c:67 #22563 0x120011b50 in Wconv (f=0x11fff6670) at conv.c:364 #22564 0x12002a284 in printfmt (format=0x11fff6670, fmt=0x14000ba90 "%F=%W") at print.c:252 #22565 0x12002d890 in strv (fmt=0x14000ba90 "%F=%W", args={ __base = 0x11fff6740 "\220º", __offset = 8}) at str.c:35 #22566 0x12002d9c0 in str (fmt=0x14000ba90 "%F=%W") at str.c:47 #22567 0x120033b5c in mkenv0 (dummy=0x0, key=0x14005a648 "do.linuxelf", value=0x14005a660) at var.c:276 #22568 0x120012dc4 in dictforall (dp=0x140063ac8, proc=0x120033a18 , arg=0x0) at dict.c:199 #22569 0x120033d78 in mkenv () at var.c:293 #22570 0x1200131e8 in forkexec (file=0x14006ec30 "/store/gnu/bin/mkdir", list=0x14006e760, inchild=FALSE) at eval.c:30 #22571 0x120015c3c in eval (list0=0x14006e760, binding0=0x0, flags=0) at eval.c:452 From es-owner Thu Oct 15 01:38:09 1998 Received: from iadd.jivetech.com ([208.128.202.112]) by hawkwind.utcs.utoronto.ca with SMTP id <24751>; Thu, 15 Oct 1998 00:35:12 -0400 Received: (from haahr@localhost) by iadd.jivetech.com (8.8.5/8.8.5) id MAA16430; Sun, 11 Oct 1998 12:32:24 -0700 From: Paul Haahr X-Attribution: haahr Message-Id: <8S8gv737u@localhost.localdomain> Date: Sun, 11 Oct 1998 15:32:23 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Harald Hanche-Olsen Cc: es@hawkwind.utcs.toronto.edu Subject: Re: es dumps core, aargh... In-Reply-To: <19981010213529U.hanche@math.ntnu.no> References: <19981010211744M.hanche@math.ntnu.no> <19981010213529U.hanche@math.ntnu.no> X-Mailer: VM 6.30 under Emacs 19.34.1 > Here is a minimal version of the same problem. This dumps core: > > ; echo <={@ x{x=@{$*}; $&result $x}} > > why? check this one first: > > ; echo <={@ x{$&result @{$*}} X} > %closure(x=X)@ * {$*} > > Now, imagine replacing X by the entire closure, and you have a closure > containing a reference to itself. That can never be printed, of > course. I never got the story right on circular references in es. Considering that that was the reason I gave it a garbage collector as opposed to simpler memory management -- and spent a fairly long time getting the root set identification right -- I feel pretty silly. The right answer might be to do something like a Lisp printer does with #n= and #n# syntax. (See *PRINT-CIRCLE* in your favorite Common Lisp reference for details.) But that doesn't solve the other problem caused by pickling objects into parseable program text: shared state that becomes unshared upon reparsing. --p From es-owner Sat Dec 12 02:37:46 1998 Received: from motgate.mot.com ([129.188.136.100]) by hawkwind.utcs.utoronto.ca with SMTP id <25036>; Sat, 12 Dec 1998 01:40:43 -0500 Received: from mothost.mot.com (mothost.mot.com [129.188.137.101]) by motgate.mot.com (8.8.5/8.6.10/MOT-3.8) with ESMTP id QAA22505 for ; Fri, 11 Dec 1998 16:30:38 -0600 (CST) Comments: ( Received on motgate.mot.com from client mothost.mot.com, sender rittle@supra.rsch.comm.mot.com ) Received: from supra.rsch.comm.mot.com (supra.comm.mot.com [145.1.80.40]) by mothost.mot.com (8.8.5/8.6.10/MOT-3.8) with ESMTP id QAA20026 for ; Fri, 11 Dec 1998 16:30:37 -0600 (CST) Received: by supra.rsch.comm.mot.com (8.8.8+Sun/SMI-SVR4/LJR-2) id QAA16086; Fri, 11 Dec 1998 16:30:37 -0600 (CST) Date: Fri, 11 Dec 1998 17:30:37 -0500 Message-Id: <199812112230.QAA16086@supra.rsch.comm.mot.com> From: "Loren J. Rittle" To: es@hawkwind.utcs.toronto.edu Subject: tilde operator Reply-to: rittle@comm.mot.com I have no idea if any gurus still read this mailing list, but... Is the following correct behavior under es? S rittle@supra; echo <={~ x1 x*} 0 S rittle@supra; h=x*; echo <={~ x1 $h} 1 S rittle@supra; h=x1; echo <={~ x1 $h} 0 It looks like patterns may be stored in variables, but wildcard patterns are not allowed (or working) when stored in variables. Assuming 0.9-beta1 is still the latest publicly available es, I will attempt to provide a patch, once I know the correct behavior. FYI, I think all three examples should print 0. Regards, Loren From es-owner Mon Dec 14 21:03:16 1998 Received: from fiinbeck.math.ntnu.no ([129.241.15.140]) by hawkwind.utcs.utoronto.ca with SMTP id <24709>; Mon, 14 Dec 1998 20:34:57 -0500 Received: (qmail 21254 invoked from network); 12 Dec 1998 12:41:28 -0000 Received: from localhost (127.0.0.1) by localhost with SMTP; 12 Dec 1998 12:41:28 -0000 To: es@hawkwind.utcs.toronto.edu Subject: Re: tilde operator In-Reply-To: Your message of "Fri, 11 Dec 1998 17:30:37 -0500" <199812112230.QAA16086@supra.rsch.comm.mot.com> References: <199812112230.QAA16086@supra.rsch.comm.mot.com> X-Mailer: Mew version 1.91 on Emacs 19.34 X-URL: http://www.math.ntnu.no/~hanche/ Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 8bit Message-Id: <19981212134128O.hanche@math.ntnu.no> Date: Sat, 12 Dec 1998 07:41:28 -0500 From: Harald Hanche-Olsen X-Dispatcher: imput version 971024 Lines: 72 - "Loren J. Rittle" : | I have no idea if any gurus still read this mailing list, but... They do. i won't lay any claim to guruhood myself, but as a long-time es user I think I can give a qualified answer to this one. | Is the following correct behavior under es? The short answer is yes. | S rittle@supra; echo <={~ x1 x*} | 0 | S rittle@supra; h=x*; echo <={~ x1 $h} | 1 | S rittle@supra; h=x1; echo <={~ x1 $h} | 0 | | It looks like patterns may be stored in variables, but wildcard | patterns are not allowed (or working) when stored in variables. That's right. The assignment h=x* is a bit dangerous by the way: If any files in the current directory have names beginning with `x', h will contain the list of these file names. Otherwise, the assignment is equivalent to h='x*' and so {~ x1 $h} is the same as {~ x1 'x*'} which does not match. You're really asking for a match with a literal * here. How to do what you want depends a lot on your circumstances. A very simple solution is ; fn xmatcher {~ $* x*} ; echo <={xmatcher x1} 0 ; echo <={xmatcher y1} 1 But this does not help much if the pattern is coming from user input, or if you wish to use it in several different contexts without typing it several times. In this case there is no way around using eval. Beware: Here be dragons. Bourne shell programmers often need to use eval due to the limited capabilities of sh. This leads to obscure programs with equally obscure bugs. With es, you need to use eval much less often, but when you do, as you do in this case, the result can be equally hard to understand. I include some experimental code I made a long time ago. I haven't used it much, so I am not too sure how solid it is. But here it is, for you to study. Perhaps you can use these ideas to solve your own problem. ## wild-match # Example usage: # wild-match '*.c' foo == foo @{~~ $1 *.c} *.c fn wild-match w fun {$fun <={eval 'I @{~~ $1 ' ^ $w ^ '}' $w}} ## wild-foreach # Example: wild-foreach '*.C' @ f b{mv $f $b^.cc} # renames *.C to *.cc # Example: wild-foreach '*-*' @ f b c {mv $f $c^-^$b} # renames foo-bar to bar-foo etc. fn wild-foreach w fun { wild-match ( $w @ matcher files {for (f=$files) $fun $f <={$matcher $f}})} Hmm, looking at it now, I find this kind of hard to read myself. Well, haven't got the time to try to explain it right now. I hope you can make some sense out of it: Just take it slow and figure out how the examples are evaluated. Good luck. - Harald From es-owner Mon Dec 14 21:05:42 1998 Received: from jli.com ([199.2.111.1]) by hawkwind.utcs.utoronto.ca with SMTP id <24744>; Mon, 14 Dec 1998 20:35:48 -0500 Received: (qmail 8994 invoked by uid 4); 12 Dec 1998 18:54:40 -0000 Received: (qmail 24321 invoked from network); 12 Dec 1998 18:54:30 -0000 Received: from localhost.cloud.rain.com (HELO cloud.rain.com) (127.0.0.1) by localhost.cloud.rain.com with SMTP; 12 Dec 1998 18:54:30 -0000 To: rittle@comm.mot.com To: es@hawkwind.utcs.toronto.edu Subject: Re: tilde operator References: <199812112230.QAA16086@supra.rsch.comm.mot.com> In-reply-to: Your message of Fri, 11 Dec 1998 17:30:37 EST. <199812112230.QAA16086@supra.rsch.comm.mot.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <24317.913488869.1@cloud.rain.com> Date: Sat, 12 Dec 1998 13:54:29 -0500 Message-ID: <24318.913488869@cloud.rain.com> From: Bill Trost "Loren J. Rittle" writes: Is the following correct behavior under es? S rittle@supra; echo <={~ x1 x*} 0 S rittle@supra; h=x*; echo <={~ x1 $h} 1 S rittle@supra; h=x1; echo <={~ x1 $h} 0 That looks reasonable to me. In the second example, "x*" was evaluated once when you assigned to h, so it doesn't deserve to be evaluated again when you do the tilde evalutation. To get the "x*" evaluated again; use h = x*; echo <={eval '~' x1 $h} From es-owner Sat Dec 19 18:59:56 1998 Received: from ftpbox.mot.com ([129.188.136.101]) by hawkwind.utcs.utoronto.ca with SMTP id <24738>; Sat, 19 Dec 1998 18:31:20 -0500 Received: from mothost.mot.com (mothost.mot.com [129.188.137.101]) by ftpbox.mot.com (8.8.5/8.6.10/MOT-3.8) with ESMTP id VAA27185 for ; Mon, 14 Dec 1998 21:51:46 -0600 (CST) Comments: ( Received on ftpbox.mot.com from client mothost.mot.com, sender rittle@supra.rsch.comm.mot.com ) Received: from supra.rsch.comm.mot.com (supra.comm.mot.com [145.1.80.40]) by mothost.mot.com (8.8.5/8.6.10/MOT-3.8) with ESMTP id VAA19399 for ; Mon, 14 Dec 1998 21:51:45 -0600 (CST) Received: by supra.rsch.comm.mot.com (8.8.8+Sun/SMI-SVR4/LJR-2) id VAA28459; Mon, 14 Dec 1998 21:51:45 -0600 (CST) Date: Mon, 14 Dec 1998 22:51:45 -0500 Message-Id: <199812150351.VAA28459@supra.rsch.comm.mot.com> From: "Loren J. Rittle" To: es@hawkwind.utcs.toronto.edu In-reply-to: <19981212134128O.hanche@math.ntnu.no> (message from Harald Hanche-Olsen on Sat, 12 Dec 1998 07:41:28 -0500) Subject: Re: tilde operator Reply-to: rittle@comm.mot.com References: <199812112230.QAA16086@supra.rsch.comm.mot.com> <19981212134128O.hanche@math.ntnu.no> Harald and the list, You all have reminded me that many eyes make it easier to find bugs in one's thinking. I actually feel kind of dumb since I knew the details (one-scan rule, eval to re-scan, quoting pattern when assigning to a variable - this flaw was only in the posted example code), I just didn't put them together right. As I replied to Byron, based upon his advice, this was the "solution" to make the middle example print 0: S rittle@supra; h='x*'; echo <={eval '~' x1 $h} 0 Although I didn't mention it, before I mailed the list, I had tried: S rittle@supra; h='x*'; echo <={eval ~ x1 $h} /usr/users/rittle: Permission denied At the time, it just didn't seem right to have to quote '~' (I wont even claim to have thought about even trying that), but now it makes perfect sense. Harald, I think you said it best (paraphrased), ~``eval: Here be dragons''. Thanks to: Harald Hanche-Olsen Bill Trost Byron Rakitzis Regards, Loren From es-owner Mon Jan 24 00:10:39 2000 Received: from piglet.prv.splode.com ([207.44.243.49]) by hawkwind.utcs.utoronto.ca with SMTP id <25742>; Mon, 24 Jan 2000 00:06:22 -0500 Received: (from friedman@localhost) by piglet.prv.splode.com (8.9.3/8.9.3) id FAA01096; Fri, 21 Jan 2000 05:40:39 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Noah Friedman To: es@hawkwind.utcs.toronto.edu Subject: can only interrupt once Reply-To: Noah Friedman Message-Id: <20000121054038.937961.FMU887@piglet.prv.splode.com> Date: Fri, 21 Jan 2000 08:41:42 -0500 Has anyone else noticed this behavior? On linux (redhat 6.1), if I start es, I can hit C-c once to interrupt a process started by es. Afterward, sigint is forever ignored. From es-owner Mon Jan 24 17:15:29 2000 Received: from ftpbox.mot.com ([129.188.136.101]) by hawkwind.utcs.utoronto.ca with SMTP id <25866>; Mon, 24 Jan 2000 16:25:52 -0500 Received: [from mothost.mot.com (mothost.mot.com [129.188.137.101]) by ftpbox.mot.com (VWALL-IN-ftpbox 2.0) with ESMTP id OAA15610; Mon, 24 Jan 2000 14:09:28 -0700 (MST)] Received: [from latour.rsch.comm.mot.com (latour.rsch.comm.mot.com [145.1.80.116]) by mothost.mot.com (MOT-mothost 2.0) with ESMTP id OAA06939; Mon, 24 Jan 2000 14:09:27 -0700 (MST)] Received: (from rittle@localhost) by latour.rsch.comm.mot.com (8.9.3/8.9.3) id PAA83100; Mon, 24 Jan 2000 15:09:26 -0600 (CST) (envelope-from rittle) From: Loren James Rittle Message-Id: <200001242109.PAA83100@latour.rsch.comm.mot.com> To: friedman@splode.com CC: es@hawkwind.utcs.toronto.edu In-reply-to: <20000121054038.937961.FMU887@piglet.prv.splode.com> (message from Noah Friedman on Fri, 21 Jan 2000 08:41:42 -0500) Subject: Re: can only interrupt once Return-Receipt-To: rittle@rsch.comm.mot.com Reply-to: rittle@rsch.comm.mot.com References: <20000121054038.937961.FMU887@piglet.prv.splode.com> User-Agent: SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) Emacs/20.5 (i386-unknown-freebsdelf3.2) MULE/4.0 (HANANOEN) MIME-Version: 1.0 (generated by SEMI 1.13.7 - "Awazu") Content-Type: text/plain; charset=US-ASCII Date: Mon, 24 Jan 2000 16:11:08 -0500 In article <20000121054038.937961.FMU887@piglet.prv.splode.com>, Noah Friedman writes: > Has anyone else noticed this behavior? > On linux (redhat 6.1), if I start es, I can hit C-c once to interrupt a > process started by es. Afterward, sigint is forever ignored. Hi Noah, Until today, I had never seen this problem on Linux (mainly since I don't use Linux day to day). I have, however, seen this problem under OSF1 and other environments depending on the exact commands. For example: ; while {true}{true} [manually hit C-c] ; while {true}{true} [manually hit C-c] appears to produce a hung es process for all machines on which I have es compiled (in all cases, against the GNU readline library). However, that case is somewhat pathological (and I just avoid it). On FreeBSD and Solaris, as long as the predicate is not a built-in command, terminal interruption appears to work properly multiple times in a row. Thus: ; while {sleep 1}{true} [manually hit C-c] ; while {sleep 1}{true} [manually hit C-c] Regards, Loren From es-owner Mon Jan 24 17:15:36 2000 Received: from martens.math.ntnu.no ([129.241.15.250]) by hawkwind.utcs.utoronto.ca with SMTP id <25847>; Mon, 24 Jan 2000 16:25:08 -0500 Received: (qmail 25185 invoked from network); 24 Jan 2000 06:56:06 -0000 Received: from localhost (13799@127.0.0.1) by localhost with SMTP; 24 Jan 2000 06:56:06 -0000 To: friedman@splode.com Cc: es@hawkwind.utcs.toronto.edu Subject: Re: can only interrupt once In-Reply-To: Your message of "Fri, 21 Jan 2000 08:41:42 -0500" <20000121054038.937961.FMU887@piglet.prv.splode.com> References: <20000121054038.937961.FMU887@piglet.prv.splode.com> X-Mailer: Mew version 1.92.4 on Emacs 19.34 X-URL: http://www.math.ntnu.no/~hanche/ Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 8bit Message-Id: <20000124075606N.hanche@math.ntnu.no> From: Harald Hanche-Olsen X-Dispatcher: imput version 980905(IM100) Lines: 44 Date: Mon, 24 Jan 2000 01:56:26 -0500 + Noah Friedman : | Has anyone else noticed this behavior? | | On linux (redhat 6.1), if I start es, I can hit C-c once to interrupt a | process started by es. Afterward, sigint is forever ignored. Hmmm... Sounds familiar. In fact, I saw that problem back in 1996 (but not on linux I think). Could it be that configure doesn't correctly set HAVE_SIGSETJMP? (See stdenv.h). I never understood the problem then, but managed to expose it enough that someone who did understand could fix it. In my case, I think the interrupt wasn't ignored, but rather masked (with sigsetmask). I wrote the following tiny little program to diagnose the problem: #include #include #include void main() { sigset_t oset; if (sigprocmask(SIG_UNBLOCK, NULL, &oset)) perror("sigprocmask"); else printf("sigprocmask={%08x,%08x,%08x,%08x}\n", oset.__sigbits[0], oset.__sigbits[1], oset.__sigbits[2], oset.__sigbits[3]); } Running this from your signal-less shell might tell you whether or not signals are blocked. (Warning: I have no idea how portable the program is. I think I wrote it on a sunos4 machine.) Interesting you should write just now, BTW. I had been thinking about the es list, wondering if it still worked and if anybody actually uses es. Obviously someone does. I use it as my login shell still, and have found no reason to switch. I've made sure it's available everywhere at my home university, and a number of people have looked at it and played with it, but still as far as I know I am the only regular user. - Harald From es-owner Thu Feb 10 15:06:04 2000 Received: from ftpbox.mot.com ([129.188.136.101]) by hawkwind.utcs.utoronto.ca with SMTP id <25205>; Thu, 10 Feb 2000 14:49:08 -0500 Received: [from pobox2.mot.com (pobox2.mot.com [136.182.15.8]) by ftpbox.mot.com (VWALL-IN-ftpbox 2.0) with ESMTP id QAA12354; Mon, 24 Jan 2000 16:59:46 -0700 (MST)] Received: [from latour.rsch.comm.mot.com (latour.rsch.comm.mot.com [145.1.80.116]) by pobox2.mot.com (MOT-pobox2 2.0) with ESMTP id QAA04317; Mon, 24 Jan 2000 16:59:45 -0700 (MST)] Received: (from rittle@localhost) by latour.rsch.comm.mot.com (8.9.3/8.9.3) id RAA87344; Mon, 24 Jan 2000 17:59:22 -0600 (CST) (envelope-from rittle) From: Loren James Rittle Message-Id: <200001242359.RAA87344@latour.rsch.comm.mot.com> To: friedman@splode.com, es@hawkwind.utcs.toronto.edu In-reply-to: <200001242109.PAA83100@latour.rsch.comm.mot.com> (message from Loren James Rittle on Mon, 24 Jan 2000 16:11:08 -0500) Subject: Re: can only interrupt once Return-Receipt-To: rittle@rsch.comm.mot.com Reply-to: rittle@rsch.comm.mot.com References: <20000121054038.937961.FMU887@piglet.prv.splode.com> <200001242109.PAA83100@latour.rsch.comm.mot.com> User-Agent: SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) Emacs/20.5 (i386-unknown-freebsdelf3.2) MULE/4.0 (HANANOEN) MIME-Version: 1.0 (generated by SEMI 1.13.7 - "Awazu") Content-Type: text/plain; charset=US-ASCII Date: Mon, 24 Jan 2000 19:00:42 -0500 Hi again Noah, My memory started working and I checked my archives from the es list. Here is a message that might be relevant to your problem (I can't recompile es on Linux against the bash version of the readline library at the moment to test if this might help you): From: Loren James Rittle To: es@hawkwind.utcs.toronto.edu In-Reply-To: <9703270106.AA27404@supra.rsch.comm.mot.com> (message from Loren James Rittle on Wed, 26 Mar 1997 20:06:02 -0500) Subject: Re: Incorrect signal handling under SYSV machines Reply-To: rittle@comm.mot.com > Under SunOS 5.5.1, the shell only responses to the first > Control C, all later Control Cs appear to be eaten somewhere. OK, I figured out that if I linked es against the version of readline that came with bash-2.0, everything is OK. Loren From es-owner Wed Mar 22 18:18:45 2000 Received: from lilly.ping.de ([195.37.120.2]) by hawkwind.utcs.utoronto.ca with SMTP id <28248>; Wed, 22 Mar 2000 17:32:37 -0500 Received: (qmail 19696 invoked by uid 10); 21 Mar 2000 15:00:42 -0000 Received: from aibon.ping.de by lilly.ping.de with UUCP (rmail-0.1-fdc); 21 Mar 2000 15:00:42 -0000 Received: (qmail 5629 invoked by uid 1013); 21 Mar 2000 14:56:14 -0000 Sender: szi@olivia.aibon.ping.de To: es@hawkwind.utcs.toronto.edu Subject: latest version From: Sascha Ziemann Message-ID: <7upusomkxd.fsf@olivia.aibon.ping.de> Lines: 6 User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.6 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 21 Mar 2000 10:02:00 -0500 Hi, is this the latest version of es? 1d0f771d94d9d8f958f264f1757b8620 es-0.9-beta1.tar.gz From es-owner Thu Mar 23 01:29:25 2000 Received: from mta4.snfc21.pbi.net ([206.13.28.142]) by hawkwind.utcs.utoronto.ca with SMTP id <26544>; Thu, 23 Mar 2000 01:26:10 -0500 Received: from adsl-216-102-199-169.dsl.snfc21.pacbell.net ([216.102.199.169]) by mta4.snfc21.pbi.net (Sun Internet Mail Server sims.3.5.2000.01.05.12.18.p9) with ESMTP id <0FRU001M9UFZQV@mta4.snfc21.pbi.net> for es@hawkwind.utcs.toronto.edu; Wed, 22 Mar 2000 19:16:48 -0800 (PST) Received: (from haahr@localhost) by adsl-216-102-199-169.dsl.snfc21.pacbell.net (8.8.7/8.8.7) id TAA23741; Wed, 22 Mar 2000 19:16:39 -0800 From: Paul Haahr Subject: Re: latest version In-reply-to: <7upusomkxd.fsf@olivia.aibon.ping.de> To: Sascha Ziemann Cc: es@hawkwind.utcs.toronto.edu Message-id: MIME-version: 1.0 X-Mailer: VM 6.30 under Emacs 20.3.1 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Attribution: haahr References: <7upusomkxd.fsf@olivia.aibon.ping.de> X-Authentication-warning: iadd.jivetech.com: haahr set sender to haahr@jivetech.com using -f Date: Wed, 22 Mar 2000 22:34:13 -0500 > is this the latest version of es? > > 1d0f771d94d9d8f958f264f1757b8620 es-0.9-beta1.tar.gz That's the last one I saw. Soren Dayton is currently the keeper of the flame, so he can speak more authoritatively than I can. --p From es-owner Thu Mar 23 16:45:48 2000 Received: from mout1.freenet.de ([62.104.201.3]) by hawkwind.utcs.utoronto.ca with SMTP id <28307>; Thu, 23 Mar 2000 16:42:57 -0500 Received: from [62.104.201.2] (helo=mx1.freenet.de) by mout1.freenet.de with esmtp (Exim 3.13 #1) id 12Y5Dm-0000wR-04; Thu, 23 Mar 2000 11:52:10 +0100 Received: from [213.6.17.68] (helo=spotteswoode.de) by mx1.freenet.de with esmtp (Exim 3.13 #1) id 12Y4tH-0007lF-00; Thu, 23 Mar 2000 11:31:00 +0100 Received: (from root@localhost) by spotteswoode.de (8.8.8/8.8.8) id IAA00418; Thu, 23 Mar 2000 08:53:08 +0100 (CET) (envelope-from inode@freenet.de) From: fischer To: Sascha Ziemann cc: es@hawkwind.utcs.toronto.edu Subject: Re: latest version In-Reply-To: <7upusomkxd.fsf@olivia.aibon.ping.de> Message-ID: Organization: private MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Date: Thu, 23 Mar 2000 05:53:09 -0500 On Tue, 21 Mar 2000, Sascha Ziemann wrote: > is this the latest version of es? > > 1d0f771d94d9d8f958f264f1757b8620 es-0.9-beta1.tar.gz at least that i know of... -- inode@freenet.de From es-owner Wed Apr 12 01:03:26 2000 Received: from mout1.freenet.de ([194.97.50.132]) by hawkwind.utcs.toronto.edu with SMTP id <24783>; Wed, 12 Apr 2000 00:51:43 -0400 Received: from [62.104.201.2] (helo=mx1.freenet.de) by mout1.freenet.de with esmtp (Exim 3.13 #3) id 12cmhZ-0000Zx-00 for es@hawkwind.utcs.toronto.edu; Wed, 05 Apr 2000 12:06:21 +0200 Received: from [213.6.10.156] (helo=spotteswoode.de) by mx1.freenet.de with esmtp (Exim 3.13 #1) id 12cmhX-0003Zc-00 for es@hawkwind.utcs.toronto.edu; Wed, 05 Apr 2000 12:06:20 +0200 Received: (from root@localhost) by spotteswoode.de (8.8.8/8.8.8) id KAA00779; Wed, 5 Apr 2000 10:12:45 +0200 (CEST) (envelope-from inode@freenet.de) Date: Wed, 5 Apr 2000 04:12:41 -0400 From: fischer To: es@hawkwind.utcs.toronto.edu Subject: why? Message-ID: Organization: private MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII excuse me. i got: fn log {let (q=`` \n {ls -t /var/log/* | head -15}; qq=''; i='') { qq=$q while {!~ $#q 0} { # this contruct avoids the echo $#q $qq($#q) # otherwise popular call q=$q(2 ...) # to `{expr $something + 1} } echo -n '## ? ' # input list of naturals i=<={%read} echo $i catch @ exc org msg { echo exception: $exc origin: $org echo message: $msg echo resuming std handler throw $exc $org $msg } { echo $qq($i) $qq($^i) %read $PAGER $qq($^i) } }} this should give a list of the most-recently-changed logfiles, which it does, and page it to my screen, which it refuses to do. it shows only one file, the first selected by the user during %read. ...BUT IT DOES NOT WORK! i tried almost everything by now, what should i do? am i too tired? if yes, of what? help awaiting, gnawing on my own teeth... -- inode@freenet.de From es-owner Wed Apr 12 01:04:16 2000 Received: from mout0.freenet.de ([194.97.50.131]) by hawkwind.utcs.toronto.edu with SMTP id <25262>; Wed, 12 Apr 2000 00:53:31 -0400 Received: from [194.97.50.135] (helo=mx2.freenet.de) by mout0.freenet.de with esmtp (Exim 3.13 #1) id 12f5AZ-0007Vd-00; Tue, 11 Apr 2000 20:13:47 +0200 Received: from [213.6.9.72] (helo=spotteswoode.de) by mx2.freenet.de with esmtp (Exim 3.13 #3) id 12f5AY-0004cz-00; Tue, 11 Apr 2000 20:13:46 +0200 Received: (from root@localhost) by spotteswoode.de (8.8.8/8.8.8) id UAA00409; Tue, 11 Apr 2000 20:11:23 +0200 (CEST) (envelope-from inode@freenet.de) Date: Tue, 11 Apr 2000 14:11:21 -0400 From: fischer To: es-list@hawkwind.utcs.toronto.edu, es@hawkwind.utcs.toronto.edu Subject: hello, world!\n Message-ID: Organization: private MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII hi there, i'm bobby brown, you propably know me from movies as "lost in space", "the sompsons" or "james bond - revised^3". you will like to hear that on answering this mail and mentioning my name you will personally like to hear that on answering this mail and mentioning my name you will personally like to hear that on answering this mail and mentioning my name you will perCORE DUMPED am i the only person in the biz who uses es(local) as a login shell and, moreover, would be bold enough to post to this mailing list? if yes, why? yours affectionately, -- inode@freenet.de From es-owner Wed Apr 12 01:04:23 2000 Received: from mout0.freenet.de ([194.97.50.131]) by hawkwind.utcs.toronto.edu with SMTP id <25167>; Wed, 12 Apr 2000 00:53:25 -0400 Received: from [62.104.201.2] (helo=mx1.freenet.de) by mout0.freenet.de with esmtp (Exim 3.13 #1) id 12eNT9-0008JK-00; Sun, 09 Apr 2000 21:34:03 +0200 Received: from [213.6.17.248] (helo=spotteswoode.de) by mx1.freenet.de with esmtp (Exim 3.13 #1) id 12eNT7-00089l-00; Sun, 09 Apr 2000 21:34:02 +0200 Received: (from root@localhost) by spotteswoode.de (8.8.8/8.8.8) id UAA00292; Sun, 9 Apr 2000 20:34:57 +0200 (CEST) (envelope-from inode@freenet.de) Date: Sun, 9 Apr 2000 14:34:54 -0400 From: fischer To: es-list@hawkwind.utcs.toronto.edu, es@hawkwind.utcs.toronto.edu Subject: my recent request for help Message-ID: Organization: private MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII thanx guys, for all the help. i got exactly zero messages on a fairly simple problem 7^/ now for the good part: it may happen to you as well, that you input a list of integers like this: i = <=%read ...and want to use it like this: echo $list($i) ...just to see that only one single little value will be returned, the first one called for in the indice-list. have no fear, because i got the solution. when reading several values using %read, they will be returned in one simple flat value. to index a list you would rather want several distinguishable values, and it happens like this: i = <=%read; i = `{echo $i} echo $list($i) ...then will work as expected. -- inode@freenet.de From es-owner Thu Apr 13 04:31:31 2000 Received: from grey.cloud.rain.com ([24.12.160.67]) by hawkwind.utcs.toronto.edu with SMTP id <25337>; Thu, 13 Apr 2000 04:23:39 -0400 Received: (qmail 53397 invoked from network); 13 Apr 2000 03:04:55 -0000 Received: from localhost.cloud.rain.com (HELO cloud.rain.com) (@127.0.0.1) by localhost.cloud.rain.com with SMTP; 13 Apr 2000 03:04:55 -0000 To: fischer Subject: Re: my recent request for help References: cc: es@hawkwind.utcs.toronto.edu MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <53393.955595095.1@cloud.rain.com> Date: Wed, 12 Apr 2000 23:04:55 -0400 Message-ID: <53394.955595095@cloud.rain.com> From: Bill Trost fischer writes: thanx guys, for all the help. i got exactly zero messages on a fairly simple problem 7^/ Your original email message arrived an April 12th, along with your other two. It looks to me like your message got hung up at mout1.freenet.de before ever reaching the es list. So, go put your teeth back in and complain to your Internet Service Provider (you did say you were gnawing on your own teeth...). now for the good part: it may happen to you as well, that you input a list of integers like this: i = <=%read ...and want to use it like this: echo $list($i) ...to index a list you would rather want several distinguishable values, and it happens like this: i = <=%read; i = `{echo $i} echo $list($i) Good, I see you found the problem. %read is documented as returning zero or one value. A less expensive (subprocess-free) way to do what you want would be echo $list(<={%split $^ifs $i}) From es-owner Thu Apr 13 04:32:13 2000 Received: from martens.math.ntnu.no ([129.241.15.250]) by hawkwind.utcs.toronto.edu with SMTP id <25301>; Thu, 13 Apr 2000 04:23:34 -0400 Received: (qmail 29025 invoked from network); 12 Apr 2000 14:29:17 -0000 Received: from localhost (13799@127.0.0.1) by localhost with SMTP; 12 Apr 2000 14:29:17 -0000 To: es@hawkwind.utcs.toronto.edu Subject: Re: my recent request for help In-Reply-To: References: X-Mailer: Mew version 1.94.2 on Emacs 20.6 / Mule 4.0 (HANANOEN) X-URL: http://www.math.ntnu.no/~hanche/ Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 8bit Message-Id: <20000412162917P.hanche@math.ntnu.no> Date: Wed, 12 Apr 2000 10:29:17 -0400 From: Harald Hanche-Olsen X-Dispatcher: imput version 20000228(IM140) Lines: 42 + fischer : | thanx guys, for all the help. | | i got exactly zero messages on a fairly simple problem 7^/ Hey, the list has obviously been out of commision for several days. How about a little patience? | have no fear, because i got the solution. OK, glad you found it on your own. | when reading several values using %read, they will be returned in | one simple flat value. to index a list you would rather want | several distinguishable values, and it happens like this: | | i = <=%read; i = `{echo $i} | echo $list($i) | | ...then will work as expected. Yes, but using echo in backquotes to split a string is the sh way. The es way would be i = <={%split $^ifs <=%read} BTW, if like me you have set PAGER='less -s' then running $PAGER from es will not work; you will have to run <={%split $^ifs $PAGER} instead. es's way of never gratuitously splitting single arguments containing spaces makes for fewer surprises, albeit at the cost of a little extra work once in a while. | am i the only person in the biz who uses es(local) as a login shell | and, moreover, would be bold enough to post to this mailing list? In what biz? I sure use es as a login shell, but I may be in the wrong biz. 8-) - Harald From es-owner Thu Apr 13 04:32:40 2000 Received: from adsl-216-102-199-169.dsl.snfc21.pacbell.net ([216.102.199.169]) by hawkwind.utcs.toronto.edu with SMTP id <25284>; Thu, 13 Apr 2000 04:22:45 -0400 Received: (from haahr@localhost) by adsl-216-102-199-169.dsl.snfc21.pacbell.net (8.8.7/8.8.7) id XAA03725; Tue, 11 Apr 2000 23:04:01 -0700 X-Authentication-Warning: iadd.jivetech.com: haahr set sender to haahr@jivetech.com using -f From: Paul Haahr X-Attribution: haahr Message-Id: Date: Wed, 12 Apr 2000 02:04:00 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: inode@freenet.de Cc: es@hawkwind.utcs.toronto.edu Subject: Re: hello, world!\n In-Reply-To: References: X-Mailer: VM 6.30 under Emacs 20.3.1 fischer wrote > am i the only person in the biz who uses es(local) as a login shell > and, moreover, would be bold enough to post to this mailing list? No, but the list often has substantial delays before messages are delivered. Since traffic tends to be on the order of a couple of messages a week, this isn't usually an issue. > now for the good part: it may happen to you as well, that you input a > list of integers like this: > > i = <=%read > > ...and want to use it like this: > > echo $list($i) > > ...just to see that only one single little value will be returned, the > first one called for in the indice-list. have no fear, because i got > the solution. when reading several values using %read, they will be > returned in one simple flat value. to index a list you would rather > want several distinguishable values, and it happens like this: > > i = <=%read; i = `{echo $i} > echo $list($i) > > ...then will work as expected. %read is a really, really flakey part of es to be using. If you want to use it and not go through the backquote mechanism, you could use: i = <={ %fsplit ' '\t <=%read } But it's probably much better to use an external program like line, which reads a single line of input, prints it, and exits. If you can't find line on your system or in some unix tools archive, this should work: i = `{ awk '{ print $0; exit }' /dev/tty } --p From es-owner Fri Apr 14 17:38:50 2000 Received: from mout1.freenet.de ([194.97.50.132]) by hawkwind.utcs.toronto.edu with SMTP id <25262>; Fri, 14 Apr 2000 17:33:26 -0400 Received: from [62.104.201.2] (helo=mx1.freenet.de) by mout1.freenet.de with esmtp (Exim 3.14 #1) id 12fhNF-0002Y1-00; Thu, 13 Apr 2000 13:01:25 +0200 Received: from [213.6.5.166] (helo=spotteswoode.de) by mx1.freenet.de with esmtp (Exim 3.13 #1) id 12fhNE-0001DE-00; Thu, 13 Apr 2000 13:01:25 +0200 Received: (from root@localhost) by spotteswoode.de (8.8.8/8.8.8) id NAA00465; Thu, 13 Apr 2000 13:00:09 +0200 (CEST) (envelope-from inode@freenet.de) Date: Thu, 13 Apr 2000 07:00:06 -0400 From: fischer To: Bill Trost cc: es@hawkwind.utcs.toronto.edu Subject: Re: my recent request for help In-Reply-To: <53394.955595095@cloud.rain.com> Message-ID: Organization: private MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Wed, 12 Apr 2000, Bill Trost wrote: > Your original email message arrived an April 12th, along with your other two. > It looks to me like your message got hung up at mout1.freenet.de before ever > reaching the es list. So, go put your teeth back in and complain to your Internet > Service Provider (you did say you were gnawing on your own teeth...). ok. [mblgrschlpf]. if somebody has my original email still stashed(tm) somewhere, please return it to me with all headers included, so i can tell my isp about this nicety. > A less expensive (subprocess-free) way to do what you want would be > echo $list(<={%split $^ifs $i}) thanks. to summarize, this is the final solution(also tm): fn pick from {let (q=`` \n $from; qq=''; i='') { qq=$q while {!~ $#q 0} { # this contruct avoids the >/dev/tty echo $#q $qq($#q) # otherwise popular call q=$q(2 ...) # to `{expr $something + 1} } >/dev/tty echo -n '## ? ' i = <={%split $^ifs <={; Thu, 8 Jun 2000 00:47:19 -0400 Received: from [194.97.50.138] (helo=mx0.freenet.de) by mout1.freenet.de with esmtp (Exim 3.14 #3) id 12zBqS-00013t-00 for es@hawkwind.utcs.toronto.edu; Tue, 06 Jun 2000 07:24:08 +0200 Received: from [213.6.17.172] (helo=spotteswoode.de) by mx0.freenet.de with smtp (Exim 3.14 #3) id 12zBqQ-00087I-00 for es@hawkwind.utcs.toronto.edu; Tue, 06 Jun 2000 07:24:07 +0200 Received: (qmail 797 invoked by uid 0); 6 Jun 2000 05:22:24 -0000 From: "clemensF" Date: Tue, 6 Jun 2000 01:22:23 -0400 To: es@hawkwind.utcs.toronto.edu Subject: a few scripts... Message-ID: <20000606072223.A736@spotteswoode.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: private X-PGP-ID: 0xD4685B88-4894C483/DH X-PGP-FPR: 0FAE 5F53 CEB9 49DE 9300 3035 D468 5B88 4894 C483 hi folks. i collected scripts for my private amusement. i did them myself, no copyright issues. there may even be rc-scripts in my collection, because i linked a static copy of rc(1) including integer x, : and + integer operators to provide for a fast little scripter. 1. i use mutt(1) as mua and needed a quick mail-aliases lookup for the "external-query" command. the program is configured in .muttrc like so: "set query_command="/l/bin/grepmalias '%s'", and has to answer with an arbitrary number of rows consisting of "email-address full-name comments": #!/bin/es # grepmalias, greps into mail aliases ino: Fri-02.06.00-03:53 # does still not work on: fn aline l { name=(); address=() for (ll=$l) { n = <={~~ $ll \<*\>} !~ $#n 0 && address = ( $address $n ) ~ $#n 0 && { if {~ $ll *@*} { address = ( $address $ll ) } { name = ( $name $ll ) } } } return ( $address \t $name ) } alis = `` \n {pgrep -i $1 ~/mail/.mail_aliases} echo found $#alis matches while {!~ $#alis 0} { line = <={%split $^ifs $alis(1)} line = $line(3 ...) alis = $alis(2 ...) outl = <={aline $line} echo $outl } 2. saldo is a script called whenever my ppp dialup line terminates. it is called in /etc/ppp/ppp.linkdown with: " !bg /l/bin/saldo". #!/bin/rc # /usr/local/bin/saldo, Mon Feb 21 01:33:48 CET 2000, -ino: # switched from sh() to rc() 29.02.2000-Tue-07:23 -ino: # hier gez wiaklich loos. # the raw connection time should be converted to minutes and logged according # to time of day multiplied by the three appropriate rates (5/4/3 to be on the # save/expensive side), and the charge for connecting (6feng). # die ganze scheisssseee lehrt mir, dass sowohl expr() als auch sed() sich mit # dem kuerzestmoeglichen match aus der affaere ziehen wollen! # ..und ueber die order of evaluation weiss ich auch nix. # kommen die '//' zeilen im log.connect von timing probs in pppctl? # ..sei's wie's is: nach sleep gips no probs no mo' # -*- NB: rechnen (+ addieren,x multen,: diven), geht nur mit mod. rc() -*- # -*- NB: in "/etc/ppp/ppp.conf werden die connex mit "rename " benannt. # begin config section # tarife in hundertstel feng, bitte, und incl. mehrwert billig=250 mittel=330 teuer=722 tarif-tubfish930 = $teuer tarif-inottub = $teuer tarif-tubfish933 = $teuer tarif-germcity = $mittel tarif-germany = $teuer tarif-germtranscity = $mittel tarif-germtrans = $teuer tarif-freenet = $billig tarif-LuebeckerNachrichten = $teuer tarif-talkline = $teuer # end config section, give sleep a chance sleep 2 sex=`{/usr/sbin/pppctl -ppp 3000 show modem | /usr/bin/grep 'time:'} isp=`{/usr/sbin/pppctl -ppp 3000 show modem | /usr/bin/grep 'Name:'} isp=$isp(2) {{~ $#(tarif-^$isp) 0} && tarif=$teuer} || tarif=$(tarif-^$isp) n=$sex(3) n1=`{x $n $tarif} n1=`{: $n1 6000} # n1=`{+ $n1 6} die einwahlgebuehr entfaellt ab april 2000! n=`{: $n 60} sex=`{/bin/date +%a-%d.%m.%y-%H:%M} >> /var/log/saldo.connect \ echo ' | ' $sex '|' $isp '|' $n min '*' $tarif '|' $n1 > /dev/speaker echo C -- clemens From es-owner Mon Jul 24 20:45:14 2000 Received: from 000pri069.bresnanlink.net ([24.17.34.186]) by hawkwind.utcs.utoronto.ca with SMTP id <44352>; Mon, 24 Jul 2000 20:34:35 -0500 Received: (from colin@localhost) by 000pri069.bresnanlink.net (8.8.7/8.8.7) id OAA11041 for es@hawkwind.utcs.toronto.edu; Sun, 23 Jul 2000 14:54:06 -0400 Date: Sun, 23 Jul 2000 14:54:06 -0500 From: Colin DeVilbiss To: es@hawkwind.utcs.toronto.edu Subject: plan9 building? Message-ID: <20000723145405.A10946@000pri069.bresnanlink.net> Reply-To: Colin DeVilbiss Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i does es build on plan9 natively, or does one have to use the APE to do it? (new plan9 convert asking). -- Colin DeVilbiss crdevilb@mtu.edu From es-owner Mon Jul 24 21:36:01 2000 Received: from susankarp.com ([63.203.198.9]) by hawkwind.utcs.utoronto.ca with SMTP id <44199>; Mon, 24 Jul 2000 21:34:56 -0500 Received: (from haahr@localhost) by susankarp.com (8.8.7/8.8.7) id SAA07831; Mon, 24 Jul 2000 18:33:48 -0700 X-Authentication-Warning: iadd.jivetech.com: haahr set sender to haahr@jivetech.com using -f From: Paul Haahr X-Attribution: haahr Message-Id: Date: Mon, 24 Jul 2000 21:33:48 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Colin DeVilbiss Cc: es@hawkwind.utcs.toronto.edu Subject: Re: plan9 building? In-Reply-To: <20000723145405.A10946@000pri069.bresnanlink.net> References: <20000723145405.A10946@000pri069.bresnanlink.net> X-Mailer: VM 6.30 under Emacs 20.3.1 > does es build on plan9 natively, or does one have to use the APE to do > it? (new plan9 convert asking). To the best of my knowledge, es has never been built on Plan 9. --p From es-owner Wed Jul 26 16:44:23 2000 Received: from whitecrow.demon.co.uk ([194.222.126.246]) by hawkwind.utcs.utoronto.ca with SMTP id <44241>; Wed, 26 Jul 2000 16:41:24 -0500 Received: from whitecrow.demon.co.uk (steve@localhost [127.0.0.1]) by whitecrow.demon.co.uk (8.8.7/8.8.7) with ESMTP id HAA12175; Tue, 25 Jul 2000 07:42:26 +0100 Message-Id: <200007250642.HAA12175@whitecrow.demon.co.uk> X-Mailer: exmh version 2.0zeta 7/24/97 To: Colin DeVilbiss cc: es@hawkwind.utcs.toronto.edu Subject: Re: plan9 building? In-reply-to: Your message of "Tue, 25 Jul 2000 01:38:26 BST." <20000723145405.A10946@000pri069.bresnanlink.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 25 Jul 2000 01:42:26 -0500 From: Steve Kilbane > does es build on plan9 natively, or does one have to use the APE to do > it? (new plan9 convert asking). It strikes me that es doesn't have _quite_ the right architecture for Plan 9. It's almost there, but not quite. I feel there should be a separation between the sugary syntax at the user interface, and the real functions underneath. The real functions could just be files, served by a shell server. es rewrites normal statements into echo > /srv/es/file / cat /srv/es/file combinations. :-) - honest. steve From es-owner Mon Jul 31 20:22:19 2000 Received: from smtp.web.de ([194.45.170.160]) by hawkwind.utcs.utoronto.ca with SMTP id <44208>; Mon, 31 Jul 2000 20:07:47 -0500 Received: from spotteswoode.de by smtp.web.de with smtp (freemail 4.1.0.0 #62) id m13I2P2-003yGCC; Fri, 28 Jul 2000 07:09 +0200 Received: (qmail 2489 invoked by uid 0); 28 Jul 2000 05:09:47 -0000 From: "clemensF" Date: Fri, 28 Jul 2000 01:09:47 -0500 To: Steve Kilbane Cc: Colin DeVilbiss , es@hawkwind.utcs.toronto.edu Subject: Re: plan9 building? Message-ID: <20000728070947.J1669@spotteswoode.de> References: <20000723145405.A10946@000pri069.bresnanlink.net> <200007250642.HAA12175@whitecrow.demon.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200007250642.HAA12175@whitecrow.demon.co.uk>; from steve@whitecrow.demon.co.uk on Tue, Jul 25, 2000 at 01:42:26AM -0500 Organization: private X-PGP-ID: 0xD4685B88-4894C483 > Steve Kilbane: > I feel there should be a separation between the sugary syntax at the > user interface, and the real functions underneath. The real functions > could just be files, served by a shell server. es rewrites normal > statements into echo > /srv/es/file / cat /srv/es/file combinations. this is a /very/ powerful concept. it reminds me somewhat of what emacs would propably like to be. are you running plan9? or could you give some associations why you think of a shell-server wrt es? clemens From es-owner Mon Jul 31 20:22:21 2000 Received: from whitecrow.demon.co.uk ([194.222.126.246]) by hawkwind.utcs.utoronto.ca with SMTP id <44268>; Mon, 31 Jul 2000 20:10:01 -0500 Received: from whitecrow.demon.co.uk (steve@localhost [127.0.0.1]) by whitecrow.demon.co.uk (8.8.7/8.8.7) with ESMTP id MAA18573 for ; Sat, 29 Jul 2000 12:37:33 +0100 Message-Id: <200007291137.MAA18573@whitecrow.demon.co.uk> X-Mailer: exmh version 2.0zeta 7/24/97 To: es@hawkwind.utcs.toronto.edu Subject: Re: plan9 building? In-reply-to: Your message of "Fri, 28 Jul 2000 07:09:47 +0200." <20000728070947.J1669@spotteswoode.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 29 Jul 2000 06:37:33 -0500 From: Steve Kilbane > this is a /very/ powerful concept. it reminds me somewhat of what emacs > would propably like to be. well, there, i can't comment, having learned nothing of emacs apart from how to get out of it when it unexpectedly gets invoked. > are you running plan9 alas, no. problems of an unsuitable machine and no time to arrange for an alternative. > or could you give > some associations why you think of a shell-server wrt es? well, i wasn't entirely serious, but in most cases, the plan 9 approach is to say, "what would work well as a file server, and what would be pushing things too far?" es's rewriting reminds me a little of Tcl's embedded capabilities, but rather than embedding es into an application, it could mount it. this would allow processes across the system to share a common shell state, rather than just an environment. is this a good thing? no idea. But it would also allow the syntax to be entirely separate from the shell, even going as far as having a tk front end instead. i'm just waffling here, though. this is probably really impractical. steve From es-owner Mon Jul 31 21:37:35 2000 Received: from mxout2.cac.washington.edu ([140.142.33.4]) by hawkwind.utcs.utoronto.ca with SMTP id <44197>; Mon, 31 Jul 2000 21:34:04 -0500 Received: from mailhost1.u.washington.edu (mailhost1.u.washington.edu [140.142.32.2]) by mxout2.cac.washington.edu (8.9.3+UW00.02/8.9.3+UW99.09) with ESMTP id RAA31223 for ; Mon, 31 Jul 2000 17:32:12 -0700 Received: from xceed.cac.washington.edu (xceed.cac.washington.edu [128.95.135.150]) by mailhost1.u.washington.edu (8.9.3+UW00.02/8.9.3+UW00.01) with ESMTP id RAA30914 for ; Mon, 31 Jul 2000 17:32:11 -0700 Date: Mon, 31 Jul 2000 20:32:11 -0500 Message-Id: <200008010032.RAA30914@mailhost1.u.washington.edu> From: Donn Cave To: X-Mailer: BeOS-PyNR V1 Subject: Re: plan9 building? Quoth Steve Kilbane : ... | well, i wasn't entirely serious, but in most cases, the plan 9 | approach is to say, "what would work well as a file server, and what | would be pushing things too far?" es's rewriting reminds me a little of | Tcl's embedded capabilities, but rather than embedding es into an application, | it could mount it. this would allow processes across the system to share | a common shell state, rather than just an environment. is this a good thing? | no idea. But it would also allow the syntax to be entirely separate from the | shell, even going as far as having a tk front end instead. Like, job control but not tied to the terminal driver? Stop a job from one window, come back later and resume it in another? Sounds kind of interesting to me. Donn Cave, donn@u.washington.edu From es-owner Tue Aug 1 18:48:08 2000 Received: from whitecrow.demon.co.uk ([194.222.126.246]) by hawkwind.utcs.utoronto.ca with SMTP id <44250>; Tue, 1 Aug 2000 18:46:30 -0500 Received: from whitecrow.demon.co.uk (steve@localhost [127.0.0.1]) by whitecrow.demon.co.uk (8.8.7/8.8.7) with ESMTP id IAA13138 for ; Tue, 1 Aug 2000 08:05:30 +0100 Message-Id: <200008010705.IAA13138@whitecrow.demon.co.uk> X-Mailer: exmh version 2.0zeta 7/24/97 To: es@hawkwind.utcs.toronto.edu Subject: Re: plan9 building? In-reply-to: Your message of "Tue, 01 Aug 2000 02:33:45 BST." <200008010032.RAA30914@mailhost1.u.washington.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 1 Aug 2000 02:05:30 -0500 From: Steve Kilbane > Like, job control but not tied to the terminal driver? Stop a job > from one window, come back later and resume it in another? Sounds > kind of interesting to me. i suppose. kind of reminds me of the hacked 9wm i had, to accept a simple set of commands from a named pipe for window placement. i wrote 9vwm, a virtual window manager, in es. god, it was horrible. never used it. :-) steve From es-owner Thu Aug 3 16:30:19 2000 Received: from smtp.web.de ([194.45.170.160]) by hawkwind.utcs.utoronto.ca with SMTP id <44256>; Thu, 3 Aug 2000 15:23:07 -0500 Received: from spotteswoode.de by smtp.web.de with smtp (freemail 4.1.0.0 #62) id m13JzVQ-003yzuC; Wed, 2 Aug 2000 16:28 +0200 Received: (qmail 1604 invoked by uid 0); 2 Aug 2000 14:28:45 -0000 From: "clemensF" Date: Wed, 2 Aug 2000 10:28:44 -0500 To: Steve Kilbane Cc: es@hawkwind.utcs.toronto.edu Subject: Re: plan9 building? Message-ID: <20000802162844.A1590@spotteswoode.de> References: <20000728070947.J1669@spotteswoode.de> <200007291137.MAA18573@whitecrow.demon.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200007291137.MAA18573@whitecrow.demon.co.uk>; from steve@whitecrow.demon.co.uk on Sat, Jul 29, 2000 at 06:37:33AM -0500 Organization: private X-PGP-ID: 0xD4685B88-4894C483 > Steve Kilbane: > it could mount it. this would allow processes across the system to share > a common shell state, rather than just an environment. is this a good thing? yes. when bash says "there are stopped jobs", one would just proceed to logout, knowing that one can always resume a job. aliases and environment variables would be set, but one would never have to save them into .bashrc statements to be set on next "virgin" login. instead, the shell gets resumed. that's it! clemens From es-owner Thu Aug 3 16:33:58 2000 Received: from smtp3.fas.harvard.edu ([140.247.30.83]) by hawkwind.utcs.utoronto.ca with SMTP id <44200>; Thu, 3 Aug 2000 16:33:40 -0500 Received: from poodle-pc.deas.harvard.edu (poodle-pc.deas.harvard.edu [140.247.51.128]) by smtp3.fas.harvard.edu with SMTP id QAA27308 Message-Id: <200008032030.QAA27308@smtp3.fas.harvard.edu> To: rabat@web.de, es@hawkwind.utcs.toronto.edu Subject: Re: plan9 building? From: "Russ Cox" Date: Thu, 3 Aug 2000 16:30:26 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit aliases and environment variables would be set, but one would never have to save them into .bashrc statements to be set on next "virgin" login. instead, the shell gets resumed. that's it! what happens when the machine goes down, or when you log into another machine? this seems an interesting idea, but my first instinct is to run away from it. feels like there's something worthwhile lurking though. From es-owner Tue Dec 12 18:04:14 2000 Received: from motgate.mot.com ([129.188.136.100]) by hawkwind.utcs.utoronto.ca with SMTP id <45157>; Tue, 12 Dec 2000 17:56:37 -0500 Received: [from pobox4.mot.com (pobox4.mot.com [10.64.251.243]) by motgate.mot.com (motgate 2.1) with ESMTP id SAA26494; Thu, 7 Dec 2000 18:19:14 -0700 (MST)] Received: [from latour.rsch.comm.mot.com (latour.rsch.comm.mot.com [145.1.80.116]) by pobox4.mot.com (MOT-pobox4 2.0) with ESMTP id SAA20049; Thu, 7 Dec 2000 18:19:13 -0700 (MST)] Received: (from rittle@localhost) by latour.rsch.comm.mot.com (8.11.1/8.11.1) id eB81JDe98193; Thu, 7 Dec 2000 19:19:13 -0600 (CST) (envelope-from rittle) Date: Thu, 7 Dec 2000 20:19:13 -0500 From: Loren James Rittle Message-Id: <200012080119.eB81JDe98193@latour.rsch.comm.mot.com> To: es@hawkwind.utcs.toronto.edu CC: ports@FreeBSD.org Subject: Small memory handling error in es-0.9-beta1.tar.gz Reply-to: rittle@rsch.comm.mot.com User-Agent: SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) Emacs/20.5 (i386-unknown-freebsdelf3.2) MULE/4.0 (HANANOEN) MIME-Version: 1.0 (generated by SEMI 1.13.7 - "Awazu") Content-Type: text/plain; charset=US-ASCII I have no idea if anyone besides me still runs es (or anyone cares to maintain their copies), but here is a patch to the last public release (that I know of). It bites you when you configure --with-readline and then proceed to enter a really long command line under the built shell. To ensure that you don't accidentally reverse patch it to a source tree where it was already done: It is strictly not legal to call the sequence: ``efree(X); X = erealloc(X, Y);''. I always love it when you can fix a bug by removing code. ;-) [Note to BSD ports maintainer: The port lives in /usr/ports/shells/es and this patch has been tested as /usr/ports/shells/es/files/patch-ab . Also (responding to the comment in revision 1.9 of the port's Makefile), as a non-committer and only if it helps, I would be happy to be listed in the Makefile as MAINTAINER= ljrittle@acm.org .] *** input.c.orig Tue Aug 12 18:59:26 1997 --- input.c Thu Dec 7 18:35:01 2000 *************** *** 307,313 **** if (in->buflen < nread) { while (in->buflen < nread) in->buflen *= 2; - efree(in->bufbegin); in->bufbegin = erealloc(in->bufbegin, in->buflen); } memcpy(in->bufbegin, rlinebuf, nread - 1); --- 307,312 ---- From es-owner Tue Dec 12 18:05:04 2000 Received: from ringworld.nanolink.com ([212.95.170.207]) by hawkwind.utcs.utoronto.ca with SMTP id <45201>; Tue, 12 Dec 2000 18:04:14 -0500 Received: (qmail 1646 invoked by uid 1000); 8 Dec 2000 13:10:35 -0000 Date: Fri, 8 Dec 2000 08:10:35 -0500 From: Peter Pentchev To: rittle@rsch.comm.mot.com Cc: es@hawkwind.utcs.toronto.edu, ports@FreeBSD.org Subject: Re: Small memory handling error in es-0.9-beta1.tar.gz Message-ID: <20001208151035.D451@ringworld.oblivion.bg> Mail-Followup-To: rittle@rsch.comm.mot.com, es@hawkwind.utcs.toronto.edu, ports@FreeBSD.org References: <200012080119.eB81JDe98193@latour.rsch.comm.mot.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200012080119.eB81JDe98193@latour.rsch.comm.mot.com>; from rittle@latour.rsch.comm.mot.com on Thu, Dec 07, 2000 at 07:19:13PM -0600 Your patch has been added to the FreeBSD port, and ljrittle@acm.org is now listed as the port maintainer. Congratulations for the new reason for people to bug you ;) G'luck, Peter -- "yields falsehood, when appended to its quotation." yields falsehood, when appended to its quotation. On Thu, Dec 07, 2000 at 07:19:13PM -0600, Loren James Rittle wrote: > I have no idea if anyone besides me still runs es (or anyone cares to > maintain their copies), but here is a patch to the last public release > (that I know of). It bites you when you configure --with-readline and > then proceed to enter a really long command line under the built > shell. To ensure that you don't accidentally reverse patch it to a > source tree where it was already done: It is strictly not legal to > call the sequence: ``efree(X); X = erealloc(X, Y);''. > > I always love it when you can fix a bug by removing code. ;-) > > [Note to BSD ports maintainer: The port lives in /usr/ports/shells/es > and this patch has been tested as /usr/ports/shells/es/files/patch-ab . > Also (responding to the comment in revision 1.9 of the port's > Makefile), as a non-committer and only if it helps, I would be happy > to be listed in the Makefile as MAINTAINER= ljrittle@acm.org .] From es-owner Wed Dec 13 14:17:36 2000 Received: from motgate2.mot.com ([136.182.1.10]) by hawkwind.utcs.utoronto.ca with SMTP id <45081>; Wed, 13 Dec 2000 14:14:13 -0500 Received: [from pobox2.mot.com (pobox2.mot.com [136.182.15.8]) by motgate2.mot.com (motgate2 2.1) with ESMTP id CAA12535; Wed, 13 Dec 2000 02:10:52 -0700 (MST)] Received: [from latour.rsch.comm.mot.com (latour.rsch.comm.mot.com [145.1.80.116]) by pobox2.mot.com (MOT-pobox2 2.0) with ESMTP id CAA09313; Wed, 13 Dec 2000 02:10:51 -0700 (MST)] Received: (from rittle@localhost) by latour.rsch.comm.mot.com (8.11.1/8.11.1) id eBD9ApC75012; Wed, 13 Dec 2000 03:10:51 -0600 (CST) (envelope-from rittle) Date: Wed, 13 Dec 2000 04:10:51 -0500 From: Loren James Rittle Message-Id: <200012130910.eBD9ApC75012@latour.rsch.comm.mot.com> To: haahr@jivetech.com CC: es@hawkwind.utcs.toronto.edu, hanche@math.ntnu.no, friedman@splode.com In-reply-to: (message from Paul Haahr on Tue, 12 Dec 2000 15:25:29 -0800 (PST)) Subject: Possible fix for the signal-handling problem in es-0.9-beta1.tar.gz Reply-to: rittle@rsch.comm.mot.com References: <200012080119.eB81JDe98193@latour.rsch.comm.mot.com> User-Agent: SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) Emacs/20.5 (i386-unknown-freebsdelf3.2) MULE/4.0 (HANANOEN) MIME-Version: 1.0 (generated by SEMI 1.13.7 - "Awazu") Content-Type: text/plain; charset=US-ASCII In article , Paul Haahr writes: >> I have no idea if anyone besides me still runs es (or anyone cares to >> maintain their copies), > Well, I still run it. Hi Paul, [Since the es list appears to insert a rather large time delay, I have explicitly CC'd parties that were known to be interested in this problem back in January 2000.] It is always great to hear from the author of the software that they still run it. ;-) > Hasn't needed much maintenance lately, How true: The only reason I found the minor memory-handling bug is that I upgraded my operating system recently. The new version (FreeBSD 4.2) checks for that exact type of memory handling error and many others (by default). IIRC, I seem to have hit this problem before but the crash/failure was not always so predictable. At least, I am quite sure I was never able to pinpoint the errant code. > but I've been meaning to fix the damn control-C on Linux bug for a > long time. OK, the signal-handling code for interactive use could still use some minor tuning. ;-) Of course, I could never do the amount of work on es that you did, but as a small token of my gratitude, I have finally attempted to debug this problem in earnest and produce a patch for it. It works for me on FreeBSD, OSF1 and Solaris (sorry, can't test Linux at the moment). If you are referring to the same long-standing bug that I am aware of (and that I can reproduce on Linux, Solaris, FreeBSD and OSF1), then it is not Linux-specific. I assume that Linux also configures to HAVE_SIGACTION=1 (even if it doesn't, I have also found an unrelated regression that affects platforms that configure to HAVE_SIGACTION=0, SYSV_SIGNALS=1). If so, then you may enjoy this analysis and possible patch. Below is a patch that was found tonight by manual inspection after getting a handle on the failure mode. I found that the file-scoped variable ``blocked'' in signal.c became non-zero forever after the first interrupt was processed inside a shell-level while loop. Thus, clearly, an imbalance in calls to blocksignals()/unblocksignals() must be present in some code path. I hope I am not just trading the obvious fix of the call pairing for a race condition in some other case (I figure that you can judge this far faster than I). Although perhaps benign whenever HAVE_SIGACTION=1, I also removed the gratuitous signal() call in catcher() when SYSV_SIGNALS=0 and, conversely, added the needed signal() call in catcher() when SYSV_SIGNALS=1. According to my local CVS archive of es, someone clearly hosed this between ES-0_9-ALPHA1 and ES-0_9-BETA1. Regards, Loren *** prim-ctl.c.orig Fri Apr 11 15:54:34 1997 --- prim-ctl.c Wed Dec 13 00:55:27 2000 *************** *** 77,84 **** if (termeq(fromcatcher->term, "retry")) { retry = TRUE; unblocksignals(); ! } else throw(fromcatcher); EndExceptionHandler EndExceptionHandler --- 77,86 ---- if (termeq(fromcatcher->term, "retry")) { retry = TRUE; unblocksignals(); ! } else { ! unblocksignals(); throw(fromcatcher); + } EndExceptionHandler EndExceptionHandler *** signal.c.orig Fri Apr 11 15:54:37 1997 --- signal.c Wed Dec 13 00:59:29 2000 *************** *** 68,74 **** /* catcher -- catch (and defer) a signal from the kernel */ static void catcher(int sig) { ! #if !SYSV_SIGNALS /* only do this for unreliable signals */ signal(sig, catcher); #endif if (hasforked) --- 68,74 ---- /* catcher -- catch (and defer) a signal from the kernel */ static void catcher(int sig) { ! #if SYSV_SIGNALS /* only do this for unreliable signals */ signal(sig, catcher); #endif if (hasforked) From es-owner Wed Dec 13 14:18:43 2000 Received: from susankarp.com ([63.203.198.9]) by hawkwind.utcs.utoronto.ca with SMTP id <45260>; Wed, 13 Dec 2000 14:18:11 -0500 Received: (from haahr@localhost) by susankarp.com (8.8.7/8.8.7) id PAA23078; Tue, 12 Dec 2000 15:25:30 -0800 X-Authentication-Warning: iadd.jivetech.com: haahr set sender to haahr@jivetech.com using -f From: Paul Haahr Message-Id: Date: Tue, 12 Dec 2000 18:25:29 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: rittle@rsch.comm.mot.com Cc: es@hawkwind.utcs.toronto.edu Subject: Re: Small memory handling error in es-0.9-beta1.tar.gz In-Reply-To: <200012080119.eB81JDe98193@latour.rsch.comm.mot.com> References: <200012080119.eB81JDe98193@latour.rsch.comm.mot.com> X-Mailer: VM 6.30 under Emacs 20.3.1 > I have no idea if anyone besides me still runs es (or anyone cares to > maintain their copies), Well, I still run it. Hasn't needed much maintenance lately, but I've been meaning to fix the damn control-C on Linux bug for a long time. --p From es-owner Wed Dec 13 14:19:27 2000 Received: from fiinbeck.math.ntnu.no ([129.241.15.140]) by hawkwind.utcs.utoronto.ca with SMTP id <45330>; Wed, 13 Dec 2000 14:19:01 -0500 Received: (qmail 94325 invoked from network); 13 Dec 2000 19:02:16 -0000 Received: from localhost (127.0.0.1) by localhost with SMTP; 13 Dec 2000 19:02:16 -0000 To: rittle@rsch.comm.mot.com Cc: haahr@jivetech.com, es@hawkwind.utcs.toronto.edu, friedman@splode.com, csdayton@cs.uchicago.edu Subject: Re: Possible fix for the signal-handling problem in es-0.9-beta1.tar.gz In-Reply-To: <200012130910.eBD9ApC75012@latour.rsch.comm.mot.com> References: <200012080119.eB81JDe98193@latour.rsch.comm.mot.com> <200012130910.eBD9ApC75012@latour.rsch.comm.mot.com> X-Mailer: Mew version 1.94.2 on Emacs 20.6 / Mule 4.0 (HANANOEN) X-URL: http://www.math.ntnu.no/~hanche/ Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 8bit Message-Id: <20001213200216D.hanche@math.ntnu.no> Date: Wed, 13 Dec 2000 14:02:16 -0500 From: Harald Hanche-Olsen X-Dispatcher: imput version 20000228(IM140) Lines: 48 + Loren James Rittle : | In article , | Paul Haahr writes: | | >> I have no idea if anyone besides me still runs es (or anyone cares to | >> maintain their copies), | | > Well, I still run it. Me too. Es has been my login shell since 1993, and I have no plans of changing this happe state of affairs. (Actually, I recruited yet another es user recently, perhaps in the process doubling the number of es users in Norway.) But I am not writing to tell you this. | [Since the es list appears to insert a rather large time delay, I have | explicitly CC'd parties that were known to be interested in this | problem back in January 2000.] So did I, and I added Soren Dayton as well. Too bad the list is so sluggish it makes us do these things. | OK, the signal-handling code for interactive use could still use some | minor tuning. ;-) | | Of course, I could never do the amount of work on es that you did, but | as a small token of my gratitude, I have finally attempted to debug | this problem in earnest and produce a patch for it. Great! This and your other recent patch ought to clear up my one remaining quarrel with es. I wonder which 0.9-beta1 version you have patched, though: I think there are two of them out there. Back in September of 1997, Soren Dayton introduced the new primitive $&getpid and used it to fix a problem with %readfrom and %writeto. (The problem only bites on machines that do not have /dev/fd/, and on which es does not have the $&readfrom and $&writeto primitives.) But I don't know if his patch ever made it into the world at large. If Soren is still out there, maybe he can apply your patches to the source, including the getpid primitive, and release it as 0.9-beta2? (I'll forward the patches to him, as he probably hasn't gotten them.) - Harald From es-owner Wed Dec 13 18:05:59 2000 Received: from susankarp.com ([63.203.198.9]) by hawkwind.utcs.utoronto.ca with SMTP id <45331>; Wed, 13 Dec 2000 18:05:26 -0500 Received: (from haahr@localhost) by susankarp.com (8.8.7/8.8.7) id LAA23575; Wed, 13 Dec 2000 11:27:40 -0800 X-Authentication-Warning: iadd.jivetech.com: haahr set sender to haahr@jivetech.com using -f From: Paul Haahr Message-Id: Date: Wed, 13 Dec 2000 14:27:40 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: rittle@rsch.comm.mot.com, Harald Hanche-Olsen Cc: es@hawkwind.utcs.toronto.edu, Noah Friedman , Soren Dayton Subject: Re: Possible fix for the signal-handling problem in es-0.9-beta1.tar.gz In-Reply-To: <200012130910.eBD9ApC75012@latour.rsch.comm.mot.com> References: <200012080119.eB81JDe98193@latour.rsch.comm.mot.com> <200012130910.eBD9ApC75012@latour.rsch.comm.mot.com> <20001213200216D.hanche@math.ntnu.no> X-Mailer: VM 6.30 under Emacs 20.3.1 Loren wrote: > It is always great to hear from the author of the software that they > still run it. ;-) I guess that wasn't exactly the confidence-boosting statement I intended it to be. > > but I've been meaning to fix the damn control-C on Linux bug for a > > long time. > > OK, the signal-handling code for interactive use could still use some > minor tuning. ;-) To put it mildly. > Of course, I could never do the amount of work on es that you did, but > as a small token of my gratitude, I have finally attempted to debug > this problem in earnest and produce a patch for it. It works for me > on FreeBSD, OSF1 and Solaris (sorry, can't test Linux at the moment). Unfortunately, it doesn't appear to fix the bug I've been seeing on Linux. > If you are referring to the same long-standing bug that I am aware of > (and that I can reproduce on Linux, Solaris, FreeBSD and OSF1), then > it is not Linux-specific. I assume that Linux also configures to > HAVE_SIGACTION=1 It does. > (even if it doesn't, I have also found an unrelated regression that > affects platforms that configure to HAVE_SIGACTION=0, SYSV_SIGNALS=1). > If so, then you may enjoy this analysis and possible patch. > > Below is a patch that was found tonight by manual inspection after > getting a handle on the failure mode. I found that the file-scoped > variable ``blocked'' in signal.c became non-zero forever after the > first interrupt was processed inside a shell-level while loop. Thus, > clearly, an imbalance in calls to blocksignals()/unblocksignals() must > be present in some code path. That makes a lot of sense as an explanation. However, I still get the symptoms, which is an unexpected ``wait: No child processes'' on the first interrupt, and no effect from the second interrupt. > I hope I am not just trading the obvious fix of the call pairing for a > race condition in some other case (I figure that you can judge this > far faster than I). Alas, it's been so long since I looked at es's signal handling, I have no sense of what is supposed to happen. > Although perhaps benign whenever HAVE_SIGACTION=1, I also removed the > gratuitous signal() call in catcher() when SYSV_SIGNALS=0 and, > conversely, added the needed signal() call in catcher() when > SYSV_SIGNALS=1. According to my local CVS archive of es, someone > clearly hosed this between ES-0_9-ALPHA1 and ES-0_9-BETA1. Interesting. No memory at all of what that code does. Harald wrote > (Actually, I recruited yet another es user recently, perhaps in the > process doubling the number of es users in Norway.) (Does that leave Norway with the highest per-capita es usage?) > I wonder which 0.9-beta1 version you have patched, though: I think > there are two of them out there. Oh, that's scary. Perhaps after three years of our rigorous testing we should pull it out of beta and declare es-0.9 ready for usa? Our fans have been waiting. :-) --p From es-owner Wed Dec 13 18:06:00 2000 Received: from susankarp.com ([63.203.198.9]) by hawkwind.utcs.utoronto.ca with SMTP id <45334>; Wed, 13 Dec 2000 18:05:40 -0500 Received: (from haahr@localhost) by susankarp.com (8.8.7/8.8.7) id LAA23589; Wed, 13 Dec 2000 11:44:56 -0800 X-Authentication-Warning: iadd.jivetech.com: haahr set sender to haahr@jivetech.com using -f From: Paul Haahr Message-Id: Date: Wed, 13 Dec 2000 14:44:56 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Loren James Rittle , Harald Hanche-Olsen cc: es@hawkwind.utcs.toronto.edu Subject: es signal handling bug on recent Linuces X-Mailer: VM 6.30 under Emacs 20.3.1 I added a little bit of debugging code to es, which prints the state of the infamous blocked variable before it calls parse. Here's the behavior I get: ; exec es /* blocked = 0 */ ; sleep 100 /* blocked = 0 */ /* blocked = 0 */ /* blocked = 0 */ ^C/* blocked = 1 */ wait: No child processes /* blocked = 1 */ /* blocked = 0 */ ; sleep 100 ^C/* blocked = 0 */ ; At the first ^C, the program gets interrupted. The second ^C gets ignored. I don't think it's a problem with es's internal state, but rather with how it sets the signal handling bits for the process. Because, once it's in the hose state, I can do: ; exec es /* blocked = 0 */ ; sleep 10 ^C/* blocked = 0 */ ; and the control-C is again ignored. This is running es without readline, inside an emacs shell buffer. This problem didn't occur with RedHat 5.x releases, and does occur with RedHat 6.x. I suspect there was a change between the 2.0.x and 2.2.x kernels, but I haven't expended the effort to track down what the difference is. Yet. --p From es-owner Thu Dec 14 00:37:06 2000 Received: from susankarp.com ([63.203.198.9]) by hawkwind.utcs.utoronto.ca with SMTP id <45250>; Thu, 14 Dec 2000 00:36:59 -0500 Received: (from haahr@localhost) by susankarp.com (8.8.7/8.8.7) id RAA23771; Wed, 13 Dec 2000 17:11:25 -0800 X-Authentication-Warning: iadd.jivetech.com: haahr set sender to haahr@jivetech.com using -f From: Paul Haahr Message-Id: Date: Wed, 13 Dec 2000 20:11:24 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Scott Schwartz Cc: Loren James Rittle , Harald Hanche-Olsen , es@hawkwind.utcs.toronto.edu Subject: Re: es signal handling bug on recent Linuces In-Reply-To: <20001214010615.10392.qmail@g.bio.cse.psu.edu> References: <20001214010615.10392.qmail@g.bio.cse.psu.edu> X-Mailer: VM 6.30 under Emacs 20.3.1 > The linux manpage says: > > NOTES > POSIX does not specify whether setjmp will save the signal > context. (In SYSV it will not. In BSD4.3 it will, and > there is a function _setjmp that will not.) If you want > to save signal masks, use sigsetjmp. > > setjmp() and sigsetjmp make programs hard to understand > and maintain. If possible an alternative should be used. > > > Perhaps you need to use the sig* versions. I haven't looked at the es > code in eons, but I vaguely recall that rc having some sigsetjmp related > changes proposed at some point. This makes sense. A lot of sense. I'll probably recode to use sigsetjmp very soon. Thank you. --p From es-owner Thu Dec 14 00:37:07 2000 Received: from susankarp.com ([63.203.198.9]) by hawkwind.utcs.utoronto.ca with SMTP id <45248>; Thu, 14 Dec 2000 00:36:59 -0500 Received: (from haahr@localhost) by susankarp.com (8.8.7/8.8.7) id QAA23762; Wed, 13 Dec 2000 16:54:11 -0800 X-Authentication-Warning: iadd.jivetech.com: haahr set sender to haahr@jivetech.com using -f From: Paul Haahr Message-Id: Date: Wed, 13 Dec 2000 19:54:09 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Loren James Rittle , Scott Schwartz , Harald Hanche-Olsen cc: es@hawkwind.utcs.toronto.edu Subject: spurious ``wait: No child processes'' messages In-Reply-To: References: <20001213231306.5473.qmail@f.bio.cse.psu.edu> X-Mailer: VM 6.30 under Emacs 20.3.1 I wrote: > ... though es still sometimes reports ``wait: No child processes'' > when processes are interrupted. No idea what that happens. Ok, I have a bit of a clue, which leaves me wondering why this ever worked before. The symptom is that es prints ``wait: No child processes'', even though there everybody knows there was a process to wait on. The key routine is: /* dowait -- a wait wrapper that interfaces with signals */ static int dowait(int *statusp) { int n; interrupted = FALSE; if (!setjmp(slowlabel)) { slow = TRUE; n = interrupted ? -2 : #if HAVE_WAIT3 wait3((void *) statusp, 0, &wait_rusage); #else wait((void *) statusp); #endif } else n = -2; slow = FALSE; if (n == -2) { errno = EINTR; n = -1; } return n; } This time, strace was quite helpful. Basically, what seems to happen is that wait() returns -- in this case, wait4, which is invoked by wait3 -- but before the result gets propagated anywhere useful, the signal comes in. So, the process has been waited for, but we never do anything useful with the status. Judging from the code, the ``if (slow)'' mechanism is intended to deal with this case, but there's a race condition it's facing -- if wait returns before the global slow gets set to false, data is lost. In this case, the what's lost is our memory of waiting for the process to exit. Anyone got any ideas how to fix this? Or why it worked in the first place? --p From es-owner Thu Dec 14 00:37:08 2000 Received: from susankarp.com ([63.203.198.9]) by hawkwind.utcs.utoronto.ca with SMTP id <45246>; Thu, 14 Dec 2000 00:36:58 -0500 Received: (from haahr@localhost) by susankarp.com (8.8.7/8.8.7) id QAA23749; Wed, 13 Dec 2000 16:20:29 -0800 X-Authentication-Warning: iadd.jivetech.com: haahr set sender to haahr@jivetech.com using -f From: Paul Haahr Message-Id: Date: Wed, 13 Dec 2000 19:20:29 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Loren James Rittle , Scott Schwartz Cc: Harald Hanche-Olsen , es@hawkwind.utcs.toronto.edu Subject: Re: es signal handling bug on recent Linuces In-Reply-To: References: <20001213231306.5473.qmail@f.bio.cse.psu.edu> X-Mailer: VM 6.30 under Emacs 20.3.1 I wrote: > I don't think it's a problem with es's internal state, but rather with > how it sets the signal handling bits for the process. [...] After a little bit of testing, useless exploration with strace, and a profitable visit to /proc, it appears that, when the SIGINT signal handler is called, SIGINT is blocked. If memory serves (and it may not; es was the last real Unix code I've written), that's the way things are supposed to be. But, when the signal handler exits, either by return or longjmp, the signal is supposed to be unblocked. That unblocking was not occurring. (I wonder if it has to do with the longjmp.) I've appended some code to this message which appears to cure the bug when the appropriate compile-time flag is set, though es still sometimes reports ``wait: No child processes'' when processes are interrupted. No idea what that happens. Any suggestions are welcome. Needs to be packaged better, of course. Scott wrote: > To add fuel to your fire: Folks around here using bash2 have noticed > that keyboard signals sometimes behave strangely under RH2.6. Can you say more about the symptoms? --p /* catcher -- catch (and defer) a signal from the kernel */ static void catcher(int sig) { #if SYSV_SIGNALS /* only do this for unreliable signals */ signal(sig, catcher); #endif if (hasforked) /* exit unconditionally on a signal in a child process */ exit(1); if (caught[sig] == 0) { caught[sig] = TRUE; ++sigcount; } interrupted = TRUE; #if DUMB_ASS_LINUX_BUG { sigset_t unblock; sigemptyset(&unblock); sigaddset(&unblock, sig); sigprocmask(SIG_UNBLOCK, &unblock, NULL); } #endif if (slow) longjmp(slowlabel, 1); } From es-owner Thu Dec 14 00:37:13 2000 Received: from bio.cse.psu.edu ([130.203.12.17]) by hawkwind.utcs.utoronto.ca with SMTP id <45242>; Thu, 14 Dec 2000 00:36:50 -0500 Received: (qmail 8965 invoked from network); 13 Dec 2000 23:13:06 -0000 Received: from roke.cse.psu.edu (HELO bio.cse.psu.edu) (130.203.12.14) by galapagos.cse.psu.edu with SMTP; 13 Dec 2000 23:13:06 -0000 Received: (qmail 5475 invoked by uid 991); 13 Dec 2000 23:13:06 -0000 Message-ID: <20001213231306.5473.qmail@f.bio.cse.psu.edu> To: Paul Haahr cc: Loren James Rittle , Harald Hanche-Olsen , es@hawkwind.utcs.toronto.edu Subject: Re: es signal handling bug on recent Linuces In-Reply-To: Message from Paul Haahr of "Wed, 13 Dec 2000 14:44:56 EST." Date: Wed, 13 Dec 2000 18:13:05 -0500 From: Scott Schwartz | This problem didn't occur with RedHat 5.x releases, and does occur with | RedHat 6.x. I suspect there was a change between the 2.0.x and 2.2.x | kernels, but I haven't expended the effort to track down what the | difference is. Yet. To add fuel to your fire: Folks around here using bash2 have noticed that keyboard signals sometimes behave strangely under RH2.6. From es-owner Thu Dec 14 00:37:46 2000 Received: from bio.cse.psu.edu ([130.203.12.17]) by hawkwind.utcs.utoronto.ca with SMTP id <45249>; Thu, 14 Dec 2000 00:36:59 -0500 Received: (qmail 10394 invoked by uid 991); 14 Dec 2000 01:06:15 -0000 Message-ID: <20001214010615.10392.qmail@g.bio.cse.psu.edu> To: Paul Haahr cc: Loren James Rittle , Harald Hanche-Olsen , es@hawkwind.utcs.toronto.edu Subject: Re: es signal handling bug on recent Linuces In-Reply-To: Message from Paul Haahr of "Wed, 13 Dec 2000 16:20:29 PST." Date: Wed, 13 Dec 2000 20:06:15 -0500 From: Scott Schwartz The linux manpage says: NOTES POSIX does not specify whether setjmp will save the signal context. (In SYSV it will not. In BSD4.3 it will, and there is a function _setjmp that will not.) If you want to save signal masks, use sigsetjmp. setjmp() and sigsetjmp make programs hard to understand and maintain. If possible an alternative should be used. Perhaps you need to use the sig* versions. I haven't looked at the es code in eons, but I vaguely recall that rc having some sigsetjmp related changes proposed at some point. The linux thing was simply that ctrl-C sometimes doesn't work, but I can never reproduce it when I want to. From es-owner Thu Dec 14 03:03:28 2000 Received: from fangorn.net ([213.97.100.48]) by hawkwind.utcs.utoronto.ca with SMTP id <45190>; Thu, 14 Dec 2000 03:03:22 -0500 Received: from david by fangorn.net with local (Exim 3.20 #1 (Debian)) id 146T5d-0002vA-00 for ; Thu, 14 Dec 2000 08:46:09 +0100 Date: Thu, 14 Dec 2000 02:46:09 -0500 To: Lista es Subject: Es and autocompleting Message-ID: <20001214084609.A11220@fangorn.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i From: DaVinci Sender: DaVinci Hi all. I thought this list was died. It's a good surprise to read you ;) I have discovered es recently. My desire is using it like login shell and for all in general. But I find a little incomodity in interactive use. It has autocompleting for files, but not for commands. I have encountered this feature in other shells and it seems to me very pleasant for large command names. Would it be posible to implement it in es without much work? Is there any problem for you not wanting it in es? Have you any ideas to work quickly without autocomplete commands?. Thnks a lot for your time. Greets. David From es-owner Thu Dec 14 13:55:46 2000 Received: from fiinbeck.math.ntnu.no ([129.241.15.140]) by hawkwind.utcs.utoronto.ca with SMTP id <44709>; Thu, 14 Dec 2000 13:55:37 -0500 Received: (qmail 15767 invoked from network); 14 Dec 2000 10:24:58 -0000 Received: from localhost (127.0.0.1) by localhost with SMTP; 14 Dec 2000 10:24:58 -0000 To: es@hawkwind.utcs.toronto.edu Subject: Re: Es and autocompleting In-Reply-To: <20001214084609.A11220@fangorn.net> References: <20001214084609.A11220@fangorn.net> X-Mailer: Mew version 1.94.2 on Emacs 20.6 / Mule 4.0 (HANANOEN) X-URL: http://www.math.ntnu.no/~hanche/ Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 8bit Message-Id: <20001214112457A.hanche@math.ntnu.no> Date: Thu, 14 Dec 2000 05:24:57 -0500 From: Harald Hanche-Olsen X-Dispatcher: imput version 20000228(IM140) Lines: 49 + DaVinci : | I thought this list was died. It's a good surprise to read you ;) Yeah, we who have been on the list for the past seven years or more are kind of surprised too. | But I find a little incomodity in interactive use. It has | autocompleting for files, but not for commands. I have encountered | this feature in other shells and it seems to me very pleasant for | large command names. Um, do you frequently have to type command names so long that this is an issue? When I observe people using this feature, it seems to me that they use it more to remind themselves of the name of a command they have half forgotten. | Would it be posible to implement it in es without much work? Is | there any problem for you not wanting it in es? Well, there is always the creeping featuritis argument: Features creep in one by one, eventually swelling the shell to a gigantic and unmanagable size. This resistance to feeping creatures can be said to be inherited from rc, and is something that I heartily endorse, though I have been known to ask for the occasional feature myself. Perhaps more to the point, however, is that in es, path searching is not done internally in C code, but rather in es code (%pathsearch). This will certainly make it trickier to implement a command search, particularly as you can write your own %pathsearch that is free to invent a command of its own in response to a query. | Have you any ideas to work quickly without autocomplete commands?. I rarely miss it. And when I do, it's because I forgot the name of a command, in which case man -k is usually a better tool. If I find myself frequently using a command with a long name, I create a brief acronym for it. For example, fn gv {ghostview $*} or even fn-gv=ghostview (Of course this is a bad example, since gv is an actual program that is better than ghostview anyway. But you get my drift.) - Harald From es-owner Thu Dec 14 13:56:03 2000 Received: from fiinbeck.math.ntnu.no ([129.241.15.140]) by hawkwind.utcs.utoronto.ca with SMTP id <45204>; Thu, 14 Dec 2000 13:55:52 -0500 Received: (qmail 15428 invoked from network); 14 Dec 2000 10:09:59 -0000 Received: from localhost (127.0.0.1) by localhost with SMTP; 14 Dec 2000 10:09:59 -0000 To: es@hawkwind.utcs.toronto.edu Subject: Re: es signal handling bug on recent Linuces In-Reply-To: References: <20001214010615.10392.qmail@g.bio.cse.psu.edu> X-Mailer: Mew version 1.94.2 on Emacs 20.6 / Mule 4.0 (HANANOEN) X-URL: http://www.math.ntnu.no/~hanche/ Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 8bit Message-Id: <20001214110959X.hanche@math.ntnu.no> Date: Thu, 14 Dec 2000 05:09:59 -0500 From: Harald Hanche-Olsen X-Dispatcher: imput version 20000228(IM140) Lines: 28 + Paul Haahr : | This makes sense. A lot of sense. I'll probably recode to use | sigsetjmp very soon. Been there, done that: I raised the sigsetjmp issue in October 1996, and Soren got it into the autoconf'd 0.9 beta1 in August 1997. In fact, stdenv.h says #if HAVE_SIGSETJMP /* Some versions of linux are helpful by providing sigsetjmp as a macro rather than as a function. *arg* */ # ifndef sigsetjmp # define setjmp(buf) sigsetjmp(buf,1) # define longjmp siglongjmp # define jmp_buf sigjmp_buf # endif #endif so if sigsetjmp() isn't used in your copy of es, it must be the configure script that is acting up. - Harald PS. Since the list seems sort of responsive now, I'm putting an end to this business of Cc:ing everybody and his grandmother. From es-owner Thu Dec 14 13:56:06 2000 Received: from bree.net ([62.37.149.38]) by hawkwind.utcs.utoronto.ca with SMTP id <45259>; Thu, 14 Dec 2000 13:55:54 -0500 Received: from david by bree.net with local (Exim 3.20 #1 (Debian)) id 146dPF-00007J-00; Thu, 14 Dec 2000 19:47:05 +0100 Date: Thu, 14 Dec 2000 13:47:05 -0500 To: es@hawkwind.utcs.toronto.edu Subject: Re: Es and autocompletion Message-ID: <20001214194705.A441@bree.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i From: DaVinci Sender: DaVinci On Thu, Dec 14, 2000 at 07:21:58AM -0800, Paul Haahr wrote: > > I have discovered es recently. My desire is using it like login shell > > and for all in general. But I find a little incomodity in interactive > > use. It has autocompleting for files, but not for commands. I have > > encountered this feature in other shells and it seems to me very > > pleasant for large command names. > > I thought it had command completion, if you linked it with readline. At > one point, we did a little extra work to ensure that readline saw the > right PATH variable, just so that worked. I use es in Debian GNU/Linux, and there is no command completion. Is it a bug or a compilation problem, perhaps?. In Debian es is linked with readline. David From es-owner Thu Dec 14 13:56:07 2000 Received: from susankarp.com ([63.203.198.9]) by hawkwind.utcs.utoronto.ca with SMTP id <45247>; Thu, 14 Dec 2000 13:55:53 -0500 Received: (from haahr@localhost) by susankarp.com (8.8.7/8.8.7) id HAA23995; Thu, 14 Dec 2000 07:21:58 -0800 X-Authentication-Warning: iadd.jivetech.com: haahr set sender to haahr@jivetech.com using -f From: Paul Haahr X-Attribution: haahr Message-Id: <8Weemm762r@iadd.jivetech.com> Date: Thu, 14 Dec 2000 10:21:58 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: DaVinci Cc: Lista es Subject: Re: Es and autocompleting In-Reply-To: <20001214084609.A11220@fangorn.net> References: <20001214084609.A11220@fangorn.net> X-Mailer: VM 6.30 under Emacs 20.3.1 > I have discovered es recently. My desire is using it like login shell > and for all in general. But I find a little incomodity in interactive > use. It has autocompleting for files, but not for commands. I have > encountered this feature in other shells and it seems to me very > pleasant for large command names. I thought it had command completion, if you linked it with readline. At one point, we did a little extra work to ensure that readline saw the right PATH variable, just so that worked. I don't know whether editline does completing for commands. --p From es-owner Thu Dec 14 13:56:10 2000 Received: from mout1.freenet.de ([194.97.50.132]) by hawkwind.utcs.utoronto.ca with SMTP id <45234>; Thu, 14 Dec 2000 13:55:53 -0500 Received: from [194.97.50.135] (helo=mx2.freenet.de) by mout1.freenet.de with esmtp (Exim 3.20 #2) id 146Yns-0003EP-00 for es@hawkwind.utcs.toronto.edu; Thu, 14 Dec 2000 14:52:12 +0100 Received: from a0518.pppool.de ([213.6.5.24] helo=spotteswoode.yi.org) by mx2.freenet.de with smtp (Exim 3.20 #2) id 146Yns-0002w0-00 for es@hawkwind.utcs.toronto.edu; Thu, 14 Dec 2000 14:52:12 +0100 Received: (qmail 1082 invoked by uid 0); 14 Dec 2000 13:52:57 -0000 Date: Thu, 14 Dec 2000 08:52:57 -0500 From: clemensF To: DaVinci Cc: Lista es Subject: Re: Es and autocompleting Message-ID: <20001214145257.A1019@spotteswoode.yi.org> References: <20001214084609.A11220@fangorn.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20001214084609.A11220@fangorn.net>; from bombadil@wanadoo.es on Thu, Dec 14, 2000 at 02:46:09AM -0500 Organization: private X-PGP-ID: 0x214190AF X-Stamper-To: post@stamper.itconsult.co.uk > DaVinci: > Would it be posible to implement it in es without much work? Is there any > problem for you not wanting it in es? Have you any ideas to work quickly > without autocomplete commands?. i used aliases "fn short {very-long-command $*}". clemens From es-owner Thu Dec 14 14:51:35 2000 Received: from bree.net ([62.36.145.58]) by hawkwind.utcs.utoronto.ca with SMTP id <45076>; Thu, 14 Dec 2000 14:51:17 -0500 Received: from david by bree.net with local (Exim 3.20 #1 (Debian)) id 146dvx-0000C2-00; Thu, 14 Dec 2000 20:20:53 +0100 Date: Thu, 14 Dec 2000 14:20:53 -0500 To: es@hawkwind.utcs.toronto.edu Subject: Problems with ~ and ~~ Message-ID: <20001214202053.A675@bree.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i From: DaVinci Sender: DaVinci Hi all. I have problems to understand pattern extraction. When trying: ; a = {~~ (foo.c foo.x bar.h) *.[ch]} ; echo $a I get: {~~ (foo.c foo.x bar.h) *.[ch]} Is this normal?. David From es-owner Thu Dec 14 15:47:06 2000 Received: from susankarp.com ([63.203.198.9]) by hawkwind.utcs.utoronto.ca with SMTP id <45241>; Thu, 14 Dec 2000 15:46:59 -0500 Received: (from haahr@localhost) by susankarp.com (8.8.7/8.8.7) id LAA24466; Thu, 14 Dec 2000 11:55:14 -0800 X-Authentication-Warning: iadd.jivetech.com: haahr set sender to haahr@jivetech.com using -f From: Paul Haahr Message-Id: Date: Thu, 14 Dec 2000 14:55:14 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Harald Hanche-Olsen Cc: es@hawkwind.utcs.toronto.edu Subject: Re: es signal handling bug on recent Linuces In-Reply-To: <20001214110959X.hanche@math.ntnu.no> References: <20001214010615.10392.qmail@g.bio.cse.psu.edu> <20001214110959X.hanche@math.ntnu.no> X-Mailer: VM 6.30 under Emacs 20.3.1 > Been there, done that: I raised the sigsetjmp issue in October 1996, > and Soren got it into the autoconf'd 0.9 beta1 in August 1997. > > In fact, stdenv.h says [...] so if sigsetjmp() isn't used in your > copy of es, it must be the configure script that is acting up. HAVE_SIGSETJMP isn't set for me, so something does appear wrong with the configurator. --p From es-owner Thu Dec 14 15:47:08 2000 Received: from susankarp.com ([63.203.198.9]) by hawkwind.utcs.utoronto.ca with SMTP id <45292>; Thu, 14 Dec 2000 15:46:59 -0500 Received: (from haahr@localhost) by susankarp.com (8.8.7/8.8.7) id LAA24469; Thu, 14 Dec 2000 11:56:51 -0800 X-Authentication-Warning: iadd.jivetech.com: haahr set sender to haahr@jivetech.com using -f From: Paul Haahr Message-Id: Date: Thu, 14 Dec 2000 14:56:51 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: DaVinci Cc: es@hawkwind.utcs.toronto.edu Subject: Re: Problems with ~ and ~~ In-Reply-To: <20001214202053.A675@bree.net> References: <20001214202053.A675@bree.net> X-Mailer: VM 6.30 under Emacs 20.3.1 > I have problems to understand pattern extraction. > > When trying: > > ; a = {~~ (foo.c foo.x bar.h) *.[ch]} > ; echo $a > > I get: > > {~~ (foo.c foo.x bar.h) *.[ch]} > > Is this normal?. Yes. I think you want a = <={~~ (foo.c foo.x bar.h) *.[ch]} using the absolute worst syntax I've ever invented. --p From es-owner Thu Dec 14 15:47:09 2000 Received: from susankarp.com ([63.203.198.9]) by hawkwind.utcs.utoronto.ca with SMTP id <45240>; Thu, 14 Dec 2000 15:46:54 -0500 Received: (from haahr@localhost) by susankarp.com (8.8.7/8.8.7) id LAA24463; Thu, 14 Dec 2000 11:53:13 -0800 X-Authentication-Warning: iadd.jivetech.com: haahr set sender to haahr@jivetech.com using -f From: Paul Haahr Message-Id: Date: Thu, 14 Dec 2000 14:53:13 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Harald Hanche-Olsen Cc: es@hawkwind.utcs.toronto.edu Subject: Re: Es and autocompleting In-Reply-To: <20001214112457A.hanche@math.ntnu.no> References: <20001214084609.A11220@fangorn.net> <20001214112457A.hanche@math.ntnu.no> X-Mailer: VM 6.30 under Emacs 20.3.1 > | But I find a little incomodity in interactive use. It has > | autocompleting for files, but not for commands. I have encountered > | this feature in other shells and it seems to me very pleasant for > | large command names. > > Um, do you frequently have to type command names so long that this is > an issue? When I observe people using this feature, it seems to me > that they use it more to remind themselves of the name of a command > they have half forgotten. Which isn't a bad purpose at all. I guess I've switched from an anti-completion to pro-completion over the years. Since I switched, I've moved to using much longer, easier to remember (though harder to type) command names. I consider that a good thing. I still don't think completion should be in the shell, but that's an architecture issue, not functionality. Which is why I've run all my shells from inside emacs for the past five or so years. (Running emacs probably makes me a heretic on this list, and certainly it is a big change from what I advocated years ago.) --p From es-owner Thu Dec 14 15:47:10 2000 Received: from fiinbeck.math.ntnu.no ([129.241.15.140]) by hawkwind.utcs.utoronto.ca with SMTP id <45297>; Thu, 14 Dec 2000 15:47:00 -0500 Received: (qmail 30249 invoked from network); 14 Dec 2000 20:20:36 -0000 Received: from localhost (127.0.0.1) by localhost with SMTP; 14 Dec 2000 20:20:36 -0000 To: es@hawkwind.utcs.toronto.edu Subject: Re: Problems with ~ and ~~ In-Reply-To: <20001214202053.A675@bree.net> References: <20001214202053.A675@bree.net> X-Mailer: Mew version 1.94.2 on Emacs 20.6 / Mule 4.0 (HANANOEN) X-URL: http://www.math.ntnu.no/~hanche/ Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 8bit Message-Id: <20001214212036I.hanche@math.ntnu.no> Date: Thu, 14 Dec 2000 15:20:36 -0500 From: Harald Hanche-Olsen X-Dispatcher: imput version 20000228(IM140) Lines: 26 + DaVinci : | When trying: | | ; a = {~~ (foo.c foo.x bar.h) *.[ch]} | ; echo $a | | I get: | | {~~ (foo.c foo.x bar.h) *.[ch]} | | Is this normal?. Yep. Oh, you wanted a more detailed answer? Try this: ; a = <={~~ (foo.c foo.x bar.h) *.[ch]} ; echo $a foo c bar h You only assigned a command to a. The <= in front evaluates the command and substitutes the result in the command line. - Harald From es-owner Thu Dec 14 16:05:42 2000 Received: from bree.net ([62.37.158.198]) by hawkwind.utcs.utoronto.ca with SMTP id <45316>; Thu, 14 Dec 2000 16:05:40 -0500 Received: from david by bree.net with local (Exim 3.20 #1 (Debian)) id 146faD-0000MB-00; Thu, 14 Dec 2000 22:06:33 +0100 Date: Thu, 14 Dec 2000 16:06:33 -0500 To: es@hawkwind.utcs.toronto.edu Subject: Re: Problems with ~ and ~~ Message-ID: <20001214220633.A1355@bree.net> Mail-Followup-To: es@hawkwind.utcs.toronto.edu References: <20001214202053.A675@bree.net> <20001214212036I.hanche@math.ntnu.no> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20001214212036I.hanche@math.ntnu.no>; from hanche@math.ntnu.no on Thu, Dec 14, 2000 at 03:20:36PM -0500 From: DaVinci Sender: DaVinci On Thu, Dec 14, 2000 at 03:20:36PM -0500, Harald Hanche-Olsen wrote: > Oh, you wanted a more detailed answer? Try this: > > ; a = <={~~ (foo.c foo.x bar.h) *.[ch]} > ; echo $a > foo c bar h > > You only assigned a command to a. The <= in front evaluates the > command and substitutes the result in the command line. I don't understand well <= role. Man page says that it is for return value of external command. Doesn't make more sense using `{} or eval in this case?... Simple curiosity 0:) David From es-owner Thu Dec 14 16:05:43 2000 Received: from bree.net ([62.37.158.198]) by hawkwind.utcs.utoronto.ca with SMTP id <45303>; Thu, 14 Dec 2000 16:05:34 -0500 Received: from david by bree.net with local (Exim 3.20 #1 (Debian)) id 146fSC-0000Ko-00; Thu, 14 Dec 2000 21:58:16 +0100 Date: Thu, 14 Dec 2000 15:58:16 -0500 To: Lista Es Subject: Pattern extraction and Wildcard expansion Message-ID: <20001214215816.A1256@bree.net> Mail-Followup-To: Lista Es Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i From: DaVinci Sender: DaVinci Hi again :) I have the function: nl = { } fn s pat { lis = `{for (dir = $path) ls $dir} a = <={~~ $lis $pat} echo $a^$nl } and try to execute: ; s l* Mi intention is to get a list of commands that begin with "l", but there is no output. Where is my error? Thanks. David From es-owner Thu Dec 14 16:05:44 2000 Received: from bio.cse.psu.edu ([130.203.12.17]) by hawkwind.utcs.utoronto.ca with SMTP id <45315>; Thu, 14 Dec 2000 16:05:40 -0500 Received: (qmail 3005 invoked from network); 14 Dec 2000 20:57:06 -0000 Received: from roke.cse.psu.edu (HELO bio.cse.psu.edu) (130.203.12.14) by galapagos.cse.psu.edu with SMTP; 14 Dec 2000 20:57:06 -0000 Received: (qmail 6479 invoked by uid 991); 14 Dec 2000 20:57:06 -0000 Message-ID: <20001214205706.6477.qmail@f.bio.cse.psu.edu> To: Paul Haahr cc: es@hawkwind.utcs.toronto.edu Subject: Re: Es and autocompleting In-Reply-To: Message from Paul Haahr of "Thu, 14 Dec 2000 14:53:13 EST." Date: Thu, 14 Dec 2000 15:57:05 -0500 From: Scott Schwartz | I still don't think completion should be in the shell, but that's an | architecture issue, not functionality. Which is why I've run all my | shells from inside emacs for the past five or so years. Years ago there was a very cool but badly written program called "rk" floating around. It was "the reactive keyboard", a pty based thingy that watched your keystrokes, built a markov chain, and suggested completions. A very hacked version for Tk can be found here: http://www.cse.psu.edu/~schwartz/rktcl.tar.gz From es-owner Thu Dec 14 16:35:53 2000 Received: from susankarp.com ([63.203.198.9]) by hawkwind.utcs.utoronto.ca with SMTP id <45327>; Thu, 14 Dec 2000 16:35:44 -0500 Received: (from haahr@localhost) by susankarp.com (8.8.7/8.8.7) id NAA24548; Thu, 14 Dec 2000 13:31:30 -0800 X-Authentication-Warning: iadd.jivetech.com: haahr set sender to haahr@jivetech.com using -f From: Paul Haahr Message-Id: Date: Thu, 14 Dec 2000 16:31:30 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: DaVinci Cc: es@hawkwind.utcs.toronto.edu Subject: Re: Problems with ~ and ~~ In-Reply-To: <20001214220633.A1355@bree.net> References: <20001214202053.A675@bree.net> <20001214212036I.hanche@math.ntnu.no> <20001214220633.A1355@bree.net> X-Mailer: VM 6.30 under Emacs 20.3.1 > > ; a = <={~~ (foo.c foo.x bar.h) *.[ch]} > > ; echo $a > > foo c bar h > > > > You only assigned a command to a. The <= in front evaluates the > > command and substitutes the result in the command line. > > I don't understand well <= role. Man page says that it is for return > value of external command. Doesn't make more sense using `{} or eval > in this case?... ` and <= are very similar. Both evaluate their arguments, and both fill in values that can be used as command arguments. ` gets its values from the output of its argument. <= gets its values from the ``return value'' of its argument; the return value of an external command is its exit status (or exit signal), but the return value of an internal function can be anything. It's a fairly messy distinction. I'm very unhappy with it. If Unix didn't have exit statuses, it would probably never have happened. Instead, I generalized exit statuses in a way they shouldn't have been. Making ~~ print its results would probably have been the right thing; it doesn't, if I remember correctly, because I was concerned about quoting issues and separators and things like that. If it had just printed its results, you could have used ` and it would be easier to see results. --p From es-owner Thu Dec 14 18:20:32 2000 Received: from susankarp.com ([63.203.198.9]) by hawkwind.utcs.utoronto.ca with SMTP id <45340>; Thu, 14 Dec 2000 18:20:25 -0500 Received: (from haahr@localhost) by susankarp.com (8.8.7/8.8.7) id NAA24553; Thu, 14 Dec 2000 13:49:16 -0800 X-Authentication-Warning: iadd.jivetech.com: haahr set sender to haahr@jivetech.com using -f From: Paul Haahr Message-Id: Date: Thu, 14 Dec 2000 16:49:16 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: DaVinci Cc: Lista Es Subject: Re: Pattern extraction and Wildcard expansion In-Reply-To: <20001214215816.A1256@bree.net> References: <20001214215816.A1256@bree.net> X-Mailer: VM 6.30 under Emacs 20.3.1 > I have the function: > > nl = { > } > fn s pat { > lis = `{for (dir = $path) ls $dir} > a = <={~~ $lis $pat} > echo $a^$nl > } > > and try to execute: > > ; s l* > > Mi intention is to get a list of commands that begin with "l", but > there is no output. > > Where is my error? Quoting. ~ and ~~ are special with regard to quoting. The pattern argument to ~ and ~~, if it includes wildcards, must be an unquoted literal. Eval might be helpful here, but introduces at least as many problems as it solves. I tend to do that sort of thing with ``here's the prefix I'm interested in'' explicitly, though you can make eval work properly, with care. There are a couple of other problems. The l* argument to s will be expanded against the list of files in the current directory before s is called, so you're matching againt the wrong thing; if l* doesn't match anything in the current directory, you'll get the equivalent of 'l*'. --p Here's a crude toy, based on the thing you were writing: fn commands-starting-with prefixes { for (dir = $path) { for (file = $dir/$prefixes^*) { if { access -x $file } { echo $file } } } } ; commands-starting-with ghost java /home/jdk/bin/java /home/jdk/bin/java-rmi.cgi /home/jdk/bin/javac /home/jdk/bin/javadoc /home/jdk/bin/javah /home/jdk/bin/javap /usr/bin/ghostscript /usr/bin/X11/ghostview /usr/X11R6/bin/ghostview ; I think it should be reasonable to do something like: commands-matching '*view' by using eval, but that's left as an exercise for the reader. --p From es-owner Thu Dec 14 18:20:33 2000 Received: from vitanuova.com ([212.240.227.6]) by hawkwind.utcs.utoronto.ca with SMTP id <45352>; Thu, 14 Dec 2000 18:20:30 -0500 To: hawkwind.utcs.toronto.edu Subject: Re: Pattern extraction and Wildcard expansion Date: Thu, 14 Dec 2000 19:03:03 -0500 From: rog MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <00Dec14.182030edt.45352@hawkwind.utcs.utoronto.ca> > and try to execute: > > ; s l* > > Mi intention is to get a list of commands that begin with "l", but there is > no output. > > Where is my error? you've run into a fundamental design issue with es. in common with rc, es is very careful not to reparse its input. in particular, wildcards are expanded once only. it's perfectly permissable to have a filename containing a '*' character for example. a variable containing such a filename as a value will, unlike in the bourne or korn shells, never be unintentionally expanded when used later in the script. what this means is that if you type: s x* the x* gets expanded (or not) there and then. the function that is called gets the resulting argument list as a simple list of string. this makes for a much simpler and more predictable interface. it means that, for instance, the s function can count the number of items in its list reliably. lazy evaluation of wildcards would mean that a function: fn s pat { echo $#pat cd / echo $#pat } could print two different numbers! this does happen in bourne shell derivatives. for instance, the bourne shell script: s() { x=$* echo $x cd / echo $x } s '*' is likely to print two entirely different things. this is a huge source of errors (and security holes) in shell scripts. i'm actually a little surprised. i thought that es, of all shells, might have a globbing (pattern matching) primitive available for user consumption. but it appears not. as far as i'm aware, the best you can do is: fn s pat { lis = `{for (dir = $path) ls $dir} a = <={eval 'result <={~~ $lis ' ^ $pat ^ '}'} echo $a^$nl } but that leads you into all sorts of potential trouble if there are files around containing es metacharacters (e.g. a file names ';rm -rf *'...). not to mention files containing spaces. if you *really* want to do something like this, you could use a sed script to mutate the shell wild-card style pattern into a sed-style pattern, which you could then run over the files. but even this, although safer, won't always give correct results. basically you'd be better off writing a function that took grep-style patterns than shell-style patterns. so you might do something like: fn s pat { {for (dir = $path) ls $dir} | grep -e '^' ^ $pat ^ '$' } so you could do: s 'l.*' to get what you wanted. it's still not perfect, as it won't work with filenames containing newlines... but you can't have everything :-) hope this helps, rog. From es-owner Fri Dec 15 00:51:20 2000 Received: from bree.net ([62.37.154.243]) by hawkwind.utcs.utoronto.ca with SMTP id <45361>; Fri, 15 Dec 2000 00:51:11 -0500 Received: from david by bree.net with local (Exim 3.20 #1 (Debian)) id 146iG2-0000Ub-00; Fri, 15 Dec 2000 00:57:54 +0100 Date: Thu, 14 Dec 2000 18:57:54 -0500 To: Lista Es Subject: Re: Pattern extraction and Wildcard expansion Message-ID: <20001215005754.A1799@bree.net> Mail-Followup-To: Lista Es References: <20001214215816.A1256@bree.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from haahr@jivetech.com on Thu, Dec 14, 2000 at 04:49:16PM -0500 From: DaVinci Sender: DaVinci Thanks rog, thanks Paul. It's nice to read your solutions. Now I have a broader vision of posibilities. Greets. David From es-owner Fri Dec 15 00:51:24 2000 Received: from motgate2.mot.com ([136.182.1.10]) by hawkwind.utcs.utoronto.ca with SMTP id <45378>; Fri, 15 Dec 2000 00:51:17 -0500 Received: [from pobox.mot.com (pobox.mot.com [129.188.137.100]) by motgate2.mot.com (motgate2 2.1) with ESMTP id VAA05965; Thu, 14 Dec 2000 21:04:27 -0700 (MST)] Received: [from latour.rsch.comm.mot.com (latour.rsch.comm.mot.com [145.1.80.116]) by pobox.mot.com (MOT-pobox 2.0) with ESMTP id VAA07738; Thu, 14 Dec 2000 21:04:26 -0700 (MST)] Received: (from rittle@localhost) by latour.rsch.comm.mot.com (8.11.1/8.11.1) id eBF44Qf23900; Thu, 14 Dec 2000 22:04:26 -0600 (CST) (envelope-from rittle) Date: Thu, 14 Dec 2000 23:04:26 -0500 From: Loren James Rittle Message-Id: <200012150404.eBF44Qf23900@latour.rsch.comm.mot.com> To: hanche@math.ntnu.no CC: haahr@jivetech.com, es@hawkwind.utcs.toronto.edu, friedman@splode.com, csdayton@cs.uchicago.edu In-reply-to: <20001213200216D.hanche@math.ntnu.no> (message from Harald Hanche-Olsen on Wed, 13 Dec 2000 20:02:16 +0100) Subject: Re: Possible fix for the signal-handling problem in es-0.9-beta1.tar.gz Reply-to: rittle@rsch.comm.mot.com References: <200012080119.eB81JDe98193@latour.rsch.comm.mot.com> <200012130910.eBD9ApC75012@latour.rsch.comm.mot.com> <20001213200216D.hanche@math.ntnu.no> User-Agent: SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) Emacs/20.5 (i386-unknown-freebsdelf3.2) MULE/4.0 (HANANOEN) MIME-Version: 1.0 (generated by SEMI 1.13.7 - "Awazu") Content-Type: text/plain; charset=US-ASCII > Me too. Es has been my login shell since 1993, and I have no plans of > changing this happe state of affairs. (Actually, I recruited yet > another es user recently, perhaps in the process doubling the number > of es users in Norway.) Hi Harald, Good to hear from you to. > I wonder which 0.9-beta1 version you have patched, though: I think > there are two of them out there. I can confirm that this tarball: ftp://ftp.sys.toronto.edu/pub/es/es-0.9-beta1.tar.gz matches the one I have locally. Regards, Loren From es-owner Fri Dec 15 00:51:25 2000 Received: from ftpbox.mot.com ([129.188.136.101]) by hawkwind.utcs.utoronto.ca with SMTP id <45382>; Fri, 15 Dec 2000 00:51:17 -0500 Received: [from pobox3.mot.com (pobox3.mot.com [10.64.251.242]) by ftpbox.mot.com (ftpbox 2.1) with ESMTP id WAA06465 for ; Thu, 14 Dec 2000 22:08:07 -0700 (MST)] Received: [from latour.rsch.comm.mot.com (latour.rsch.comm.mot.com [145.1.80.116]) by pobox3.mot.com (MOT-pobox3 2.0) with ESMTP id WAA19527 for ; Thu, 14 Dec 2000 22:05:04 -0700 (MST)] Received: (from rittle@localhost) by latour.rsch.comm.mot.com (8.11.1/8.11.1) id eBF587324146; Thu, 14 Dec 2000 23:08:07 -0600 (CST) (envelope-from rittle) Date: Fri, 15 Dec 2000 00:08:07 -0500 From: Loren James Rittle Message-Id: <200012150508.eBF587324146@latour.rsch.comm.mot.com> To: es@hawkwind.utcs.toronto.edu In-reply-to: (message from Paul Haahr on Wed, 13 Dec 2000 11:27:40 -0800 (PST)) Subject: Re: Possible fix for the signal-handling problem in es-0.9-beta1.tar.gz Reply-to: rittle@rsch.comm.mot.com References: <200012080119.eB81JDe98193@latour.rsch.comm.mot.com> <200012130910.eBD9ApC75012@latour.rsch.comm.mot.com> <20001213200216D.hanche@math.ntnu.no> In article , Paul Haahr writes: >> this problem in earnest and produce a patch for it. It works for me >> on FreeBSD, OSF1 and Solaris (sorry, can't test Linux at the moment). > Unfortunately, it doesn't appear to fix the bug I've been seeing on > Linux. OK, I have access to a Red Hat 6.1 Linux box again (in the near future, I can get access to 6.2 and 7.0 as well). I now understand the failure mode you see in modern Linux. My known failure mode (before signal-handling patch) was a bit more complex than yours: ; while {true} {true} ^C ; while {true} {true} ^C [shell does not respond to one or more interrupts at this point.] I can confirm: - I see the problem you see on modern Linux - my patch doesn't help on modern Linux (since...) - configure on Red Hat 6.1 isn't getting a lot of stuff right. The big issue appears to be that whatever version of glibc they now use insists that the correct headers are included before symbols can be found at link time. When configure tests to find various symbols, it is not arranging for those correct headers to be included... I am not an autoconfig guru but I know enough to be dangerous. I will see what I can do. Regards, Loren From es-owner Fri Dec 15 00:51:28 2000 Received: from motgate2.mot.com ([136.182.1.10]) by hawkwind.utcs.utoronto.ca with SMTP id <45383>; Fri, 15 Dec 2000 00:51:18 -0500 Received: [from pobox2.mot.com (pobox2.mot.com [136.182.15.8]) by motgate2.mot.com (motgate2 2.1) with ESMTP id WAA03743; Thu, 14 Dec 2000 22:10:59 -0700 (MST)] Received: [from latour.rsch.comm.mot.com (latour.rsch.comm.mot.com [145.1.80.116]) by pobox2.mot.com (MOT-pobox2 2.0) with ESMTP id WAA01585; Thu, 14 Dec 2000 22:10:59 -0700 (MST)] Received: (from rittle@localhost) by latour.rsch.comm.mot.com (8.11.1/8.11.1) id eBF5Axl24160; Thu, 14 Dec 2000 23:10:59 -0600 (CST) (envelope-from rittle) Date: Fri, 15 Dec 2000 00:10:59 -0500 From: Loren James Rittle Message-Id: <200012150510.eBF5Axl24160@latour.rsch.comm.mot.com> To: bombadil@wanadoo.es CC: es@hawkwind.utcs.toronto.edu In-reply-to: <20001214202053.A675@bree.net> (message from DaVinci on Thu, 14 Dec 2000 14:20:53 -0500) Subject: Re: Problems with ~ and ~~ Reply-to: rittle@rsch.comm.mot.com References: <20001214202053.A675@bree.net> User-Agent: SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) Emacs/20.5 (i386-unknown-freebsdelf3.2) MULE/4.0 (HANANOEN) MIME-Version: 1.0 (generated by SEMI 1.13.7 - "Awazu") Content-Type: text/plain; charset=US-ASCII In article <20001214202053.A675@bree.net>, DaVinci writes: > When trying: > ; a = {~~ (foo.c foo.x bar.h) *.[ch]} > ; echo $a > I get: > {~~ (foo.c foo.x bar.h) *.[ch]} > Is this normal?. Try this instead: S rittle@latour; a = <={~~ (foo.c foo.x bar.h) *.[ch]} S rittle@latour; echo $a foo c bar h The ~~ operator returns a list value. ``The return value of a command is obtained with the construct: <={ command }'' From es-owner Fri Dec 15 00:51:31 2000 Received: from vitanuova.com ([212.240.227.6]) by hawkwind.utcs.utoronto.ca with SMTP id <45362>; Fri, 15 Dec 2000 00:51:17 -0500 To: es@hawkwind.utcs.toronto.edu Subject: Re: Problems with ~ and ~~ Date: Thu, 14 Dec 2000 20:12:18 -0500 From: rog@vitanuova.com MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <00Dec15.005117edt.45362@hawkwind.utcs.utoronto.ca> > It's a fairly messy distinction. I'm very unhappy with it. If Unix > didn't have exit statuses, it would probably never have happened. > Instead, I generalized exit statuses in a way they shouldn't have been. i thought about this quite hard when deciding what to do about this issue in my es-reminiscent shell for inferno (named, unimaginatively "sh"). eventually i decided that exit status and return value are two quite different things, one being essentially true/false, and the other multi-valued. unlike es, i wasn't limited by the strict exec/wait boundary, so i implemented two classes of runnable shell objects, commands, and "substitution operators" (a terrible name). commands are run as usual; substitution operators look like braced commands run with the $ operator. e.g. x = ${split e 'hello there'} there is no "split" command - names invoked by the ${} operator are taken from a different namespace. this means that normal commands retain their true/false nature, while substitution operators (which are dynamically definable) don't try to stretch the definition of "true" and "false". does if {%split x 'hello there'} { ... } really have any useful meaning? it's quite nice being able to use the "split" unambiguously for both the above: x = ${split e 'hello there'} and also: split -1000 somefile (the unix-style command). if anyone's interested, this shell takes the one core es concept (braced blocks as values) and tries to push it as far as it'll go, while keeping the core syntax to a bare minimum. it manages to be an extensible shell, not because you can override stuff underneath the syntactic sugar, as with es, but because almost all of what would be considered "code syntax" in most shells is implemented externally (e.g. if, while, fn, etc, etc) and hence can be redefined or reinvented. it allows the core shell to be fairly small (2480 lines total, a 40K binary) but more powerful than most. if you are interested, there's a wee paper on it at: http://www.vitanuova.com/inferno/papers/sh.html and the documentation at: http://www.vitanuova.com/inferno/man/1/sh.html and if you're using Internet Explorer under Windows and can't be bothered with the 14MB free download, you can even have a play with it in your web browser! http://www.vitanuova.com/inferno/pi/shell/index.html now i'll see whether i can get my conversation with the SMTP server correct this time (the local SMTP client got a bounce saying "please use your fully qualified real domain name", and since i don't control it, i guess manual telnet is the only way!) cheers, rog. (rog@vitanuova.com a.k.a. rog@ohm.york.ac.uk, in case this post also comes through with an odd address!) From es-owner Fri Dec 15 16:27:32 2000 Received: from fiinbeck.math.ntnu.no ([129.241.15.140]) by hawkwind.utcs.utoronto.ca with SMTP id <45375>; Fri, 15 Dec 2000 16:26:54 -0500 Received: (qmail 49950 invoked from network); 15 Dec 2000 10:37:50 -0000 Received: from localhost (127.0.0.1) by localhost with SMTP; 15 Dec 2000 10:37:50 -0000 To: es@hawkwind.utcs.toronto.edu Subject: Re: Possible fix for the signal-handling problem in es-0.9-beta1.tar.gz In-Reply-To: <200012150404.eBF44Qf23900@latour.rsch.comm.mot.com> References: <200012130910.eBD9ApC75012@latour.rsch.comm.mot.com> <20001213200216D.hanche@math.ntnu.no> <200012150404.eBF44Qf23900@latour.rsch.comm.mot.com> X-Mailer: Mew version 1.94.2 on Emacs 20.6 / Mule 4.0 (HANANOEN) X-URL: http://www.math.ntnu.no/~hanche/ Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Fri_Dec_15_11:37:25_2000_809)--" Content-Transfer-Encoding: 7bit Message-Id: <20001215113750A.hanche@math.ntnu.no> Date: Fri, 15 Dec 2000 05:37:50 -0500 From: Harald Hanche-Olsen X-Dispatcher: imput version 20000228(IM140) Lines: 284 ----Next_Part(Fri_Dec_15_11:37:25_2000_809)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit + Loren James Rittle : | I can confirm that this tarball: | | ftp://ftp.sys.toronto.edu/pub/es/es-0.9-beta1.tar.gz | | matches the one I have locally. Um yes, I think that means that the diff Soren sent me in September 1997 was never made official. I'll attach it here, for everyone to look at. Possibly it should make it into the official distribution? (Or possibly not, without further refinement - see below.) Let me shortly reiterate its purpose: This patch was meant to address a problem with %readfrom and %writeto: The two functions implementing the <{...} and >{...} functionality. The problem does not exist at all on systems which have /dev/fd/, for there this is handled by builtins $&readfrom and $&writeto. But for But on other systems, these functions create a temporary file (or fifo, if you preferred) /tmp/es.$var.$pid for one process to write to and the other to read from. Here, $var holds the number of the file descriptor used in the parent shell. However, since $pid is only set when the shell starts up, and never changes when it forks, you could get name collisions that way. The example I quoted when first reporting this was as follows: ; for (x=1 2 3) { cat <{echo $x} & } 15946 15947 15948 ; mknod: /tmp/es._devfd0.15685: File exists mknod: /tmp/es._devfd0.15685: File exists 2 1 3 ; Those want more details could go back and read the thread "Flaw in %readfrom and %writeto" from September 1997, if they have kept an archive of the list. Anyway, I have found that there is a problem with Soren's solution. He introduced a new primitive getpid which returns the pid of the current process, and replaces $pid in the definition of %readfrom and %writeto by <=$&getpid. So far, so good. But he also removed the initialization of $pid from main.c and inserted it into %batch-loop and %interactive-loop instead. That might not be such a clever idea, since the value of $pid can now change in unexpected places: ; . <{echo echo hi there $pid '$pid'} hi there 93689 93689 ; fork {var pid; . <{echo echo hi there $pid '$pid'}; var pid} pid = 93689 hi there 93689 49463 pid = 49463 (Ouch!) So I suggest keeping the new primitive getpid and its usage in %readfrom and %writeto (in initial.es), but to reject its application in %batch-loop and %interactive-loop and to keep the initialization of $pid in main.c the way it was. Again, this is really only necessary on systems without /dev/fd/, and I suppose it could be argued that the new primitive should only be implemented on such systems. But I think that complicates things too much. ----Next_Part(Fri_Dec_15_11:37:25_2000_809)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="patch-getpid-0.9-beta1.diff" Index: CHANGES =================================================================== RCS file: /homes/csdayton/.CVSROOT/es/CHANGES,v retrieving revision 1.4 diff -c -r1.4 CHANGES *** CHANGES 1997/08/12 23:59:08 1.4 --- CHANGES 1997/09/17 05:15:24 *************** *** 1,6 **** --- 1,15 ---- CHANGES -*- mode: indented-text -*- ($Revision: 1.4 $) ======= + 0.9beta to 0.9beta1 + ------------------- + + Created a new primitive `getpid' which runs the equivalent C function + and replaced the special treatment of `pid' in main.c. This means that + %batch-loop and %interactive-loop now update pid. This was done because + %readfrom and %writeto fail when several are used in parallel and in the + background on OS's that do not have /dev/fd/ file systems. + 0.9-alpha2 to 0.9beta --------------------- Index: initial.es =================================================================== RCS file: /homes/csdayton/.CVSROOT/es/initial.es,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -c -r1.1.1.1 -r1.2 *** initial.es 1997/04/11 20:54:33 1.1.1.1 --- initial.es 1997/09/17 05:11:38 1.2 *************** *** 1,4 **** ! # initial.es -- set up initial interpreter state ($Revision: 1.1.1.1 $) # --- 1,4 ---- ! # initial.es -- set up initial interpreter state ($Revision: 1.2 $) # *************** *** 494,500 **** fn-%readfrom = $&readfrom } { fn %readfrom var input cmd { ! local ($var = /tmp/es.$var.$pid) { unwind-protect { $input > $$var # text of $cmd is command file --- 494,500 ---- fn-%readfrom = $&readfrom } { fn %readfrom var input cmd { ! local ($var = /tmp/es.$var.<=$&getpid) { unwind-protect { $input > $$var # text of $cmd is command file *************** *** 510,516 **** fn-%writeto = $&writeto } { fn %writeto var output cmd { ! local ($var = /tmp/es.$var.$pid) { unwind-protect { > $$var $cmd --- 510,516 ---- fn-%writeto = $&writeto } { fn %writeto var output cmd { ! local ($var = /tmp/es.$var.$&getpid) { unwind-protect { > $$var $cmd *************** *** 625,634 **** # result gets set to zero when it should not be. fn-%parse = $&parse ! fn-%batch-loop = $&batchloop fn-%is-interactive = $&isinteractive fn %interactive-loop { let (result = <=true) { catch @ e type msg { if {~ $e eof} { --- 625,640 ---- # result gets set to zero when it should not be. fn-%parse = $&parse ! ! fn %batch-loop { ! pid = <=$&getpid ! $&batchloop ! } ! fn-%is-interactive = $&isinteractive fn %interactive-loop { + pid = <=$&getpid let (result = <=true) { catch @ e type msg { if {~ $e eof} { Index: main.c =================================================================== RCS file: /homes/csdayton/.CVSROOT/es/main.c,v retrieving revision 1.3 retrieving revision 1.4 diff -c -r1.3 -r1.4 *** main.c 1997/08/12 23:59:28 1.3 --- main.c 1997/09/17 05:11:40 1.4 *************** *** 1,4 **** ! /* main.c -- initialization for es ($Revision: 1.3 $) */ #include "es.h" --- 1,4 ---- ! /* main.c -- initialization for es ($Revision: 1.4 $) */ #include "es.h" *************** *** 44,54 **** RefEnd(list); } - /* initpid -- set $pid for this shell */ - static void initpid(void) { - vardef("pid", NULL, mklist(mkstr(str("%d", getpid())), NULL)); - } - /* runesrc -- run the user's profile, if it exists */ static void runesrc(void) { char *esrc = str("%L/.esrc", varlookup("home", NULL), "\001"); --- 44,49 ---- *************** *** 184,190 **** runinitial(); initpath(); - initpid(); initsignals(runflags & run_interactive, allowquit); hidevariables(); initenv(environ, protected); --- 179,184 ---- Index: prim-sys.c =================================================================== RCS file: /homes/csdayton/.CVSROOT/es/prim-sys.c,v retrieving revision 1.2 retrieving revision 1.3 diff -c -r1.2 -r1.3 *** prim-sys.c 1997/08/12 23:59:33 1.2 --- prim-sys.c 1997/09/17 05:11:41 1.3 *************** *** 1,4 **** ! /* prim-sys.c -- system call primitives ($Revision: 1.2 $) */ #define REQUIRE_IOCTL 1 --- 1,4 ---- ! /* prim-sys.c -- system call primitives ($Revision: 1.3 $) */ #define REQUIRE_IOCTL 1 *************** *** 64,69 **** --- 64,73 ---- return mklist(mkstr(mkstatus(status)), NULL); } + PRIM(getpid) { + return mklist(mkstr(str("%d", getpid())), NULL); + } + PRIM(run) { char *file; if (list == NULL) *************** *** 444,449 **** --- 448,454 ---- X(umask); X(cd); X(fork); + X(getpid); X(run); X(setsignals); #if BSD_LIMITS ----Next_Part(Fri_Dec_15_11:37:25_2000_809)---- From es-owner Mon Dec 18 22:05:13 2000 Received: from gap.cco.caltech.edu ([131.215.139.43]) by hawkwind.utcs.utoronto.ca with SMTP id <45449>; Mon, 18 Dec 2000 22:05:08 -0500 Received: (from news@localhost) by gap.cco.caltech.edu (8.9.3/8.9.3) id PAA12178; Mon, 18 Dec 2000 15:59:53 -0800 (PST) To: mlist-es@nntp-server.caltech.edu Path: egnor From: egnor@ofb.net (Dan Egnor) Newsgroups: mlist.es Subject: Re: Es and autocompleting Date: Mon, 18 Dec 2000 18:59:51 -0500 Organization: California Institute of Technology, Pasadena Lines: 20 Message-ID: References: NNTP-Posting-Host: aclarke.colo.mv.meer.net User-Agent: slrn/0.9.6.2 (Linux) In article , Paul Haahr wrote: >I still don't think completion should be in the shell, but that's an >architecture issue, not functionality. Which is why I've run all my >shells from inside emacs for the past five or so years. Could you expand on this belief? (Or point me at some place where you already have done so.) It seems to me (probably naively) that the shell is in the best position to know the context of the current command, and therefore to be able to predict the set of possible choices. For example, the current working directory is known only to the shell, and the set of valid pathnames depends on that information. >(Running emacs probably makes me a heretic on this list, and certainly >it is a big change from what I advocated years ago.) What changed your mind? Dan From es-owner Mon Dec 18 22:05:14 2000 Received: from mout0.freenet.de ([194.97.50.131]) by hawkwind.utcs.utoronto.ca with SMTP id <45430>; Mon, 18 Dec 2000 22:04:52 -0500 Received: from [194.97.50.138] (helo=mx0.freenet.de) by mout0.freenet.de with esmtp (Exim 3.20 #2) id 1488J4-0001pd-00 for es@hawkwind.utcs.toronto.edu; Mon, 18 Dec 2000 22:58:54 +0100 Received: from b40e7.pppool.de ([213.7.64.231] helo=spotteswoode.yi.org) by mx0.freenet.de with smtp (Exim 3.20 #2) id 1488J0-0001hV-00 for es@hawkwind.utcs.toronto.edu; Mon, 18 Dec 2000 22:58:51 +0100 Received: (qmail 6380 invoked by uid 0); 18 Dec 2000 21:59:11 -0000 Date: Mon, 18 Dec 2000 16:59:11 -0500 From: clemensF To: Lista Es Subject: Re: Pattern extraction and Wildcard expansion Message-ID: <20001218225911.C6131@spotteswoode.yi.org> References: <20001214215816.A1256@bree.net> <20001215005754.A1799@bree.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20001215005754.A1799@bree.net>; from bombadil@wanadoo.es on Thu, Dec 14, 2000 at 06:57:54PM -0500 Organization: private X-PGP-ID: 0x214190AF X-Stamper-To: post@stamper.itconsult.co.uk > DaVinci: > Thanks rog, thanks Paul. > > It's nice to read your solutions. Now I have a broader vision of > posibilities. then why not share them with us? was it missing-quotes, regarding your previous post? clemens From es-owner Tue Dec 19 19:10:00 2000 Received: from bree.net ([62.36.133.222]) by hawkwind.utcs.utoronto.ca with SMTP id <45497>; Tue, 19 Dec 2000 19:09:57 -0500 Received: from david by bree.net with local (Exim 3.20 #1 (Debian)) id 148Sf8-0000Cg-00; Tue, 19 Dec 2000 20:43:02 +0100 Date: Tue, 19 Dec 2000 14:43:02 -0500 To: Lista Es Subject: Re: Pattern extraction and Wildcard expansion Message-ID: <20001219204302.D744@bree.net> Mail-Followup-To: Lista Es References: <20001214215816.A1256@bree.net> <20001215005754.A1799@bree.net> <20001218225911.C6131@spotteswoode.yi.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20001218225911.C6131@spotteswoode.yi.org>; from rabat@web.de on Mon, Dec 18, 2000 at 04:59:11PM -0500 From: DaVinci Sender: DaVinci On Mon, Dec 18, 2000 at 04:59:11PM -0500, clemensF wrote: > > DaVinci: > > > Thanks rog, thanks Paul. > > > > It's nice to read your solutions. Now I have a broader vision of > > posibilities. > > then why not share them with us? Ops. Sorry. I thought it was obvious reading past messages. Sumary is: you can use eval for matching a pattern that is a parameter to function and can use other tools like grep. You decide best option ;) Greets. David From es-owner Tue Dec 19 19:10:03 2000 Received: from gap.cco.caltech.edu ([131.215.139.43]) by hawkwind.utcs.utoronto.ca with SMTP id <45528>; Tue, 19 Dec 2000 19:09:57 -0500 Received: from whitecrow.demon.co.uk (IDENT:root@whitecrow.demon.co.uk [194.222.126.246]) by gap.cco.caltech.edu (8.9.3/8.9.3) with ESMTP id PAA19592 for ; Tue, 19 Dec 2000 15:42:16 -0800 (PST) Received: from whitecrow.demon.co.uk (steve@localhost [127.0.0.1]) by whitecrow.demon.co.uk (8.8.7/8.8.7) with ESMTP id IAA29234; Tue, 19 Dec 2000 08:47:07 GMT Message-Id: <200012190847.IAA29234@whitecrow.demon.co.uk> X-Mailer: exmh version 2.0zeta 7/24/97 To: egnor@ofb.net (Dan Egnor) cc: mlist-es@nntp-server.caltech.edu Subject: Re: Es and autocompleting In-reply-to: Your message of "Tue, 19 Dec 2000 02:59:24 GMT." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 19 Dec 2000 03:47:07 -0500 From: Steve Kilbane Dan asked: > Could you expand on this belief? > (Or point me at some place where you already have done so.) While Paul's previous comments are probably on a list archive somewhere, a fresh articulation might be good, since he's already admitted to one shift in the last half-decade. :-) FWIW, my own objections to completion are distinctly dodgy, but I'll put them forth anyway: - In a general-purpose UNIX shell, completion demands a lot of its environment. It has to handle key characters specially beyond the usual character/word deletion operations, and that raises the complexity both of the read/execute loop and the porting process. - It's something that is completely unnecessary in a non-interactive state. - It's laziness; I like being able to type. :-> > It seems to me (probably naively) that the shell is in the best position > to know the context of the current command, and therefore to be able to > predict the set of possible choices. Well, maybe. Things are a little different in Plan 9, where the path is always just dot and /bin, but that can mean many different things. Similarly, in a windowing system, the window environment multiplexes the keystrokes and has to handle the edit stream, so why not let it do the completion magic too? It can also provide history, do so across different windows for a single history file, and maybe even provide other command mechanisms, too. As a minor example, I once had a hacked version of 9term that would receive commands from a pipe and forward them to the shell. steve From es-owner Thu Dec 21 18:20:20 2000 Received: from gap.cco.caltech.edu ([131.215.139.43]) by hawkwind.utcs.utoronto.ca with SMTP id <45636>; Thu, 21 Dec 2000 18:19:31 -0500 Received: from grey.cloud.rain.com (c1029014-a.bvrtn1.or.home.com [24.12.160.67]) by gap.cco.caltech.edu (8.9.3/8.9.3) with ESMTP id RAA29409 for ; Wed, 20 Dec 2000 17:42:03 -0800 (PST) Received: (qmail 34529 invoked from network); 21 Dec 2000 01:41:45 -0000 Received: from localhost.cloud.rain.com (HELO cloud.rain.com) (@127.0.0.1) by localhost.cloud.rain.com with SMTP; 21 Dec 2000 01:41:45 -0000 To: mlist-es@nntp-server.caltech.edu Subject: Re: Es and autocompleting References: <200012190847.IAA29234@whitecrow.demon.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <34525.977362905.1@cloud.rain.com> Date: Wed, 20 Dec 2000 20:41:45 -0500 Message-ID: <34526.977362905@cloud.rain.com> From: Bill Trost Steve Kilbane writes: Similarly, in a windowing system, the window environment multiplexes the keystrokes and has to handle the edit stream, so why not let it do the completion magic too? It can also provide history, do so across different windows for a single history file, and maybe even provide other command mechanisms, too. In that vein, take a look at rk, the reactive keyboard. http://www.cyberpass.net/~dummy/robert/software/rk.shtml claims to have an up-to-dater copy, but I haven't tried the version there myself, yet. It's actually based on pseudo-ttys, and therefore isn't constrained to being used under a windowing system (I often use it over slogin or dialup links). Rk isn't about editing command lines or completion (although it does that, too). Rather, it uses your prior input to offer predictions about what you want to type next. If its predictions are right (and they often can be), you can avoid lots and lots of typing. From es-owner Wed Dec 27 19:51:21 2000 Received: from piglet.prv.splode.com ([207.44.243.49]) by hawkwind.utcs.utoronto.ca with SMTP id <45819>; Wed, 27 Dec 2000 19:51:14 -0500 Received: (from friedman@localhost) by piglet.prv.splode.com (8.9.3/8.9.3) id QAA14735; Wed, 27 Dec 2000 16:01:07 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Noah Friedman To: steve@whitecrow.demon.co.uk Cc: egnor@ofb.net, es@hawkwind.utcs.toronto.edu Subject: Re: Es and autocompleting Reply-To: Noah Friedman In-Reply-To: <200012190847.IAA29234@whitecrow.demon.co.uk> (steve@whitecrow.demon.co.uk Tuesday, 19 Dec 2000 03:47:07 -0500) References: <200012190847.IAA29234@whitecrow.demon.co.uk> Date: Wed, 27 Dec 2000 19:01:07 -0500 Message-Id: <20001227160107.762871.FMU6828@piglet.prv.splode.com> >in a windowing system, the window environment multiplexes the keystrokes >and has to handle the edit stream, so why not let it do the completion >magic too? It can also provide history, do so across different windows >for a single history file, and maybe even provide other command >mechanisms, too. As a minor example, I once had a hacked version of 9term >that would receive commands from a pipe and forward them to the shell. Completion is context-sensitive and requires knowledge of grammar and syntax, which vary from shell to shell. If you have to teach the window system how to do context-sensitive completion and history for csh, sh, rc, scsh, etc. you've now moved a lot of application-specific knowledge into the window system where it will never be kept up to date because a different vendor is responsible for maintaining it. I don't understand what advantage is obtained in terms of UI, architecture, or overall code bloat. From es-owner Wed Dec 27 19:51:24 2000 Received: from new.ofb.net ([209.245.148.70]) by hawkwind.utcs.utoronto.ca with SMTP id <45820>; Wed, 27 Dec 2000 19:51:18 -0500 Received: by new.ofb.net (Postfix, from userid 7068) id D4E35EBB5A; Wed, 27 Dec 2000 16:32:06 -0800 (PST) Date: Wed, 27 Dec 2000 19:32:06 -0500 To: Noah Friedman Cc: steve@whitecrow.demon.co.uk, es@hawkwind.utcs.toronto.edu Subject: Re: Es and autocompleting Message-ID: <20001227163206.O986@ofb.net> References: <200012190847.IAA29234@whitecrow.demon.co.uk> <20001227160107.762871.FMU6828@piglet.prv.splode.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20001227160107.762871.FMU6828@piglet.prv.splode.com>; from friedman@splode.com on Wed, Dec 27, 2000 at 04:01:07PM -0800 From: egnor@ofb.net (Dan Egnor) On Wed, Dec 27, 2000 at 04:01:07PM -0800, Noah Friedman wrote: > If you have to teach the window system how to do context-sensitive > completion and history for csh, sh, rc, scsh, etc. you've now moved a lot > of application-specific knowledge into the window system where it will > never be kept up to date because a different vendor is responsible for > maintaining it. On the other hand, a good context-sensitive completion system also has to know about the commands you're running. For example, if you install a recent version of zsh, it comes with completion files for everything from CVS to RPM. If you type "cvs remove ", it will complete only files which are in the CVS repository for the current directory but are not in the current directory (yes, it knows how to parse CVS/Entries). If you type "rpm --verify ", it will complete the names of RPM packages installed on your system (yes, it runs "rpm -qa" to generate the list). If you type "tar xvfz mytarball.tgz ", it will complete the names of files inside the tarball (yes, it runs "tar" behind the scenes to get the list). Talk about application-specific knowledge! You're probably recoiling in horror (and we all know the zsh developers are insane lunatics), but this sort of thing is amazingly valuable (much more so than something which merely autocompletes strings you happen to have typed in the past). It's more than a shortcut mechanism, it's actually a fingertip-level exploration tool. You may pish and tush, but it's still pretty nifty. I would argue that, if anything, completion logic needs to move "down", closer to the applications that provide the necessary context, but command line editing and history recall need to move "up", closer to the terminal's user interface. I have no idea how to actually accomplish this motion, however. Ignore me, I'll go back to lurking... Dan From es-owner Fri Dec 29 23:03:15 2000 Received: from whitecrow.demon.co.uk ([194.222.126.246]) by hawkwind.utcs.utoronto.ca with SMTP id <44847>; Fri, 29 Dec 2000 22:53:39 -0500 Received: from whitecrow.demon.co.uk (steve@localhost [127.0.0.1]) by whitecrow.demon.co.uk (8.8.7/8.8.7) with ESMTP id NAA04593; Fri, 29 Dec 2000 13:55:25 GMT Message-Id: <200012291355.NAA04593@whitecrow.demon.co.uk> X-Mailer: exmh version 2.0zeta 7/24/97 To: Noah Friedman cc: egnor@ofb.net, es@hawkwind.utcs.toronto.edu Subject: Re: Es and autocompleting In-reply-to: Your message of "Wed, 27 Dec 2000 16:01:07 PST." <20001227160107.762871.FMU6828@piglet.prv.splode.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 29 Dec 2000 08:55:25 -0500 From: Steve Kilbane > Completion is context-sensitive and requires knowledge of grammar and > syntax, which vary from shell to shell. Not necessarily. Depends on how much you do. I was thinking primarily in terms of path searching. Adding simple expansions for internal commands isn't hard. > If you have to teach the window system how to do context-sensitive > completion and history for csh, sh, rc, scsh, etc. you've now moved a lot > of application-specific knowledge into the window system where it will > never be kept up to date because a different vendor is responsible for > maintaining it. Actually, no. You move a pattern-match-and-replace process into the window system. Everything else is configurable by an external file. It won't get everything right every time, but then, DWIM never does. > I don't understand what advantage is obtained in terms of UI, architecture, > or overall code bloat. Nor do I, but then I'm against completion in general. steve From es-owner Sat Dec 30 17:27:02 2000 Received: from grey.cloud.rain.com ([24.12.160.67]) by hawkwind.utcs.utoronto.ca with SMTP id <45279>; Sat, 30 Dec 2000 17:14:46 -0500 Received: (qmail 51654 invoked from network); 30 Dec 2000 17:30:21 -0000 Received: from localhost.cloud.rain.com (HELO cloud.rain.com) (@127.0.0.1) by localhost.cloud.rain.com with SMTP; 30 Dec 2000 17:30:21 -0000 To: es@hawkwind.utcs.toronto.edu Subject: Re: Es and autocompleting References: <20001227160107.762871.FMU6828@piglet.prv.splode.com> <200012190847.IAA29234@whitecrow.demon.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <51650.978197421.1@cloud.rain.com> Date: Sat, 30 Dec 2000 12:30:21 -0500 Message-ID: <51651.978197421@cloud.rain.com> From: Bill Trost Noah Friedman writes: Completion is context-sensitive and requires knowledge of grammar and syntax, which vary from shell to shell. If you have to teach the window system how to do context-sensitive completion and history for csh, sh, rc, scsh, etc. you've now moved a lot of application-specific knowledge... The claim has been made that the shell is the best place to do command-line editing because of application-specific knowledge. You could reasonably also claim: * The debugger is the best place to do command-line editing because of application-specific knowledge (such as grammar and syntax, variables in the debuggee, ...). * The mail client is the best place to do command-line editing (grammar and syntax, email addresses, ...). * The ftp client is the best place to do command-line editing (grammar and syntax, remote filename completion, ...). As you start adding completion to every program, you get complexity and code bloat in every program -- except, of course, the ones you haven't spent the time adding command-line editing to. If the command-line editor is at a level above the shell (I hesitate to say "window system"), then you get that editing with *every* program -- even trivial ones like "cat". Furthermore, if you have the command-line editing above the shell level, and this level sports some sort of completion mechanism (like rk), then you can actually have completion mechanisms that can be helpful *across* the exec barrier. For example, when I run the command "telnet foo.com smtp", rk might suggest that the next line I want to type is "ehlo cloud.rain.com", and then "mail from:". On the other hand, if I type "telnet foo.com http", rk can suggest "GET /" as the next thing to type. (Yes, these are realistic examples -- I was doing some tiger-team work a few months back). Zsh hackers aside, I hope no one suggests that telnet should include command-line editors for every port you might want to type at, but with a good higher-level command-line editor, you get this all for free. From es-owner Thu Jan 4 17:59:59 2001 Received: from localhost by hawkwind.utcs.utoronto.ca with SMTP id <44210>; Thu, 4 Jan 2001 17:55:31 -0500 To: es Subject: List archive [was Re: Possible fix for the signal-handling problem in es-0.9-beta1.tar.gz] In-reply-to: hanche's message of Fri, 15 Dec 2000 05:37:50 -0500. <20001215113750A.hanche@math.ntnu.no> Date: Thu, 4 Jan 2001 17:46:45 -0500 From: Chris Siebenmann Message-Id: <01Jan4.175531edt.44210@hawkwind.utcs.utoronto.ca> | Those want more details could go back and read the thread "Flaw in | %readfrom and %writeto" from September 1997, if they have kept an | archive of the list. As a note for people who may have forgotten (or never known): the list archives are available at ftp.sys.toronto.edu in /pub/es, as 'es-list' for the recent collection of them. - cks From es-owner Thu Apr 12 16:34:36 2001 Received: from bree.net ([62.37.146.211]) by hawkwind.utcs.utoronto.ca with SMTP id <45886>; Thu, 12 Apr 2001 16:33:20 -0500 Received: from david by bree.net with local (Exim 3.22 #1 (Debian)) id 14lHa3-0000Fu-00; Thu, 05 Apr 2001 23:46:15 +0200 Date: Thu, 5 Apr 2001 17:46:15 -0500 To: es@hawkwind.utcs.toronto.edu Subject: Problem with console and terminals Message-ID: <20010405234615.A926@bree.net> Mail-Followup-To: es@hawkwind.utcs.toronto.edu References: <200012080119.eB81JDe98193@latour.rsch.comm.mot.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.15i In-Reply-To: <200012080119.eB81JDe98193@latour.rsch.comm.mot.com>; from rittle@latour.rsch.comm.mot.com on Thu, Dec 07, 2000 at 08:19:13PM -0500 From: DaVinci Sender: DaVinci Hello. I have a problem with es and input from console or terminal emulator in Linux. When line lenght is greater than max number of characters, edition doesn't go to next line, but stays on same, corrupting it. Has anybody this problem? Is there some way to repare it?. Thanks. David From es-owner Thu Apr 12 18:36:05 2001 Received: from fiinbeck.math.ntnu.no ([129.241.15.140]) by hawkwind.utcs.utoronto.ca with SMTP id <44207>; Thu, 12 Apr 2001 18:36:02 -0500 Received: (qmail 93824 invoked from network); 12 Apr 2001 21:35:17 -0000 Received: from localhost (127.0.0.1) by localhost with SMTP; 12 Apr 2001 21:35:17 -0000 To: bombadil@wanadoo.es Cc: es@hawkwind.utcs.toronto.edu Subject: Re: Problem with console and terminals In-Reply-To: <20010405234615.A926@bree.net> References: <200012080119.eB81JDe98193@latour.rsch.comm.mot.com> <20010405234615.A926@bree.net> X-Mailer: Mew version 1.94.2 on Emacs 20.7 / Mule 4.0 (HANANOEN) X-URL: http://www.math.ntnu.no/~hanche/ Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 8bit Message-Id: <20010412233517J.hanche@math.ntnu.no> Date: Thu, 12 Apr 2001 17:35:17 -0500 From: Harald Hanche-Olsen X-Dispatcher: imput version 20000228(IM140) Lines: 24 + DaVinci : | I have a problem with es and input from console or terminal | emulator in Linux. | | When line lenght is greater than max number of characters, edition | doesn't go to next line, but stays on same, corrupting it. | | Has anybody this problem? Is there some way to repare it?. You don't say if your es is linked with readline or editline. And is your terminal type (in the TERM environment variable) set properly? If not, you may even need to first set it, then exec a new shell, since I think readline only examines the environment on startup. Personally, I use readline and have set horizontal-scroll-mode off in my .inputrc, but I think that is more a personal preference than a fix for any problem. (My .inputrc is over four years old, so I no longer know why I put that line in there.) - Harald From es-owner Thu Apr 12 18:36:10 2001 Received: from susankarp.com ([63.203.198.9]) by hawkwind.utcs.utoronto.ca with SMTP id <44209>; Thu, 12 Apr 2001 18:36:08 -0500 Received: (from haahr@localhost) by susankarp.com (8.8.7/8.8.7) id PAA05492; Thu, 12 Apr 2001 15:01:23 -0700 X-Authentication-Warning: iadd.jivetech.com: haahr set sender to haahr@jivetech.com using -f Message-Id: Date: Thu, 12 Apr 2001 18:01:23 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Paul Haahr To: DaVinci Cc: es@hawkwind.utcs.toronto.edu Subject: Re: Problem with console and terminals In-Reply-To: <20010405234615.A926@bree.net> References: <200012080119.eB81JDe98193@latour.rsch.comm.mot.com> <20010405234615.A926@bree.net> X-Mailer: VM 6.30 under Emacs 20.3.1 > I have a problem with es and input from console or terminal emulator > in Linux. > > When line lenght is greater than max number of characters, edition > doesn't go to next line, but stays on same, corrupting it. Are you running es with readline, editline, or another such library, or without any command line editing? I suspect that the bug is in the interface to a command editing library, but can't tell from the limited description you wrote. --p From es-owner Mon Apr 16 16:44:34 2001 Received: from fangorn.net ([213.97.100.48]) by hawkwind.utcs.utoronto.ca with SMTP id <44319>; Mon, 16 Apr 2001 16:44:13 -0500 Received: from david by fangorn.net with local (Exim 3.22 #1 (Debian)) id 14p2ca-0002x1-00 for ; Mon, 16 Apr 2001 08:36:24 +0200 Date: Mon, 16 Apr 2001 02:36:23 -0500 To: es@hawkwind.utcs.toronto.edu Subject: Re: Problem with console and terminals Message-ID: <20010416083623.A10766@fangorn.net> References: <200012080119.eB81JDe98193@latour.rsch.comm.mot.com> <20010405234615.A926@bree.net> <20010412233517J.hanche@math.ntnu.no> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.17i In-Reply-To: <20010412233517J.hanche@math.ntnu.no>; from hanche@math.ntnu.no on Thu, Apr 12, 2001 at 05:35:17PM -0500 From: DaVinci Sender: DaVinci On Thu, Apr 12, 2001 at 05:35:17PM -0500, Harald Hanche-Olsen wrote: > + DaVinci : > > | I have a problem with es and input from console or terminal > | emulator in Linux. > | > | When line lenght is greater than max number of characters, edition > | doesn't go to next line, but stays on same, corrupting it. > | > | Has anybody this problem? Is there some way to repare it?. > > You don't say if your es is linked with readline or editline. And is > your terminal type (in the TERM environment variable) set properly? > If not, you may even need to first set it, then exec a new shell, since > I think readline only examines the environment on startup. It is linked o readline. The TERM variable looks in order. David From es-owner Thu May 10 18:53:36 2001 Received: from fiinbeck.math.ntnu.no ([129.241.15.140]) by hawkwind.utcs.utoronto.ca with SMTP id <44390>; Thu, 10 May 2001 18:50:44 -0500 Received: (qmail 9644 invoked from network); 16 Apr 2001 21:19:58 -0000 Received: from localhost (127.0.0.1) by localhost with SMTP; 16 Apr 2001 21:19:58 -0000 To: es@hawkwind.utcs.toronto.edu Subject: Re: Problem with console and terminals In-Reply-To: <20010416083623.A10766@fangorn.net> References: <20010405234615.A926@bree.net> <20010412233517J.hanche@math.ntnu.no> <20010416083623.A10766@fangorn.net> X-Mailer: Mew version 1.94.2 on Emacs 20.7 / Mule 4.0 (HANANOEN) X-URL: http://www.math.ntnu.no/~hanche/ Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 8bit Message-Id: <20010416231958O.hanche@math.ntnu.no> Date: Mon, 16 Apr 2001 17:19:58 -0500 From: Harald Hanche-Olsen X-Dispatcher: imput version 20000228(IM140) Lines: 26 + DaVinci : | On Thu, Apr 12, 2001 at 05:35:17PM -0500, Harald Hanche-Olsen wrote: | > + DaVinci : | > | > | I have a problem with es and input from console or terminal | > | emulator in Linux. | > | When line lenght is greater than max number of characters, edition | > | doesn't go to next line, but stays on same, corrupting it. | > | [...] | It is linked o readline. The TERM variable looks in order. Maybe the terminal driver is confused about the size of the screen? Check what stty -a is saying: ; stty -a speed 9600 baud; rows 24; columns 80; [...] If the numbers are wrong for some reason, stty can usually set them. (If they're 0, that means whatever the termcap or terminfo database says about that particular terminal type.) If this isn't it either, then I haven't got any more suggestions... - Harald From es-owner Mon Apr 22 16:29:34 2002 Received: from max5.rrze.uni-erlangen.de ([131.188.3.50]) by hawkwind.utcs.utoronto.ca with SMTP id <72652>; Mon, 22 Apr 2002 16:28:33 -0500 Return-Path: Received: from [131.188.166.80] by max5.rrze.uni-erlangen.de with ESMTP for es@hawkwind.utcs.toronto.edu; Mon, 22 Apr 2002 19:38:16 +0200 Sender: rogalsky@max5.rrze.uni-erlangen.de Message-Id: <3CC44A87.7070F58@physik.uni-erlangen.de> Date: Mon, 22 Apr 2002 13:38:15 -0500 From: Olaf Rogalsky X-Mailer: Mozilla 4.61 [en] (X11; U; AIX 4.1) X-Accept-Language: en MIME-Version: 1.0 To: es@hawkwind.utcs.toronto.edu Subject: job control for the es shell Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit A feature, which IMHO is badly missing form the es shell, is job control. That's why I made a hack that implements it. If your are interested, you can get it form: http://theorie1.physik.uni-erlangen.de/rogalsky/es/es.html Some Notes: 1) The patch makes use of the waitpid subroutine. Make sure, that your C-library has the waitpid subroutine. 2) In contrast to the wait3 subroutine waitpid gives no information on rusage. Therefore wait3 support is broken. You have to out comment USE_WAIT3 in config.h manually. (It is possible to replace waitpid with wait4, which gives rusage information. Unfortunately I don't have wait4.) 3) A small modification to %interactive-loop is necessary. You can change initial.es or supply your own %interactive-loop in .esrc. Until I finish the development phase and switch to the maintain/ bugfixing phase I leave the initial.es untouched and put all job control scripting into my .esrc. I included my .esrc in the source. I also patched the LIBREADLINE support: 1) The saved history gets read in if you set $history. But this is a hack and needs to be rewritten. 2) I fixed a memory leak: LIBREADLINE expects the input line buffers to be freed by the application. P.S.: Can anybody explain to me, what the Ref, RefPop, RefReturn etc macros are for? -- +----------------------------------------------------------------------+ I Dipl. Phys. Olaf Rogalsky Institut f. Theo. Physik I I I Tel.: 09131 8528440 Univ. Erlangen-Nuernberg I I Fax.: 09131 8528444 Staudtstrasse 7 B3 I I rogalsky@theorie1.physik.uni-erlangen.de D-91058 Erlangen I +----------------------------------------------------------------------+ From es-owner Mon Apr 22 16:37:01 2002 Received: from presto.vitanuova.com ([62.254.170.97]) by hawkwind.utcs.utoronto.ca with SMTP id <72302>; Mon, 22 Apr 2002 16:36:57 -0500 To: es@hawkwind.utcs.toronto.edu Subject: Re: job control for the es shell Date: Mon, 22 Apr 2002 16:39:35 -0500 From: rog@vitanuova.com MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <02Apr22.163657edt.72302@hawkwind.utcs.utoronto.ca> > A feature, which IMHO is badly missing form the es shell, is job control. out of interest, what does job control give you that you can't get quite easily via virtual terminals? From es-owner Mon Apr 22 17:30:07 2002 Received: from galapagos.cse.psu.edu ([130.203.12.17]) by hawkwind.utcs.utoronto.ca with SMTP id <72662>; Mon, 22 Apr 2002 17:30:03 -0500 Received: (qmail 29664 invoked by uid 991); 22 Apr 2002 21:12:30 -0000 Message-ID: <20020422211230.29663.qmail@g.bio.cse.psu.edu> Date: Mon, 22 Apr 2002 17:12:30 -0500 To: Olaf Rogalsky cc: es@hawkwind.utcs.toronto.edu Subject: Re: job control for the es shell In-Reply-To: Message from Olaf Rogalsky of "Mon, 22 Apr 2002 13:38:15 CDT." <3CC44A87.7070F58@physik.uni-erlangen.de> Date: Mon, 22 Apr 2002 17:12:30 -0500 From: Scott Schwartz > A feature, which IMHO is badly missing form the es shell, is job control. A reasonable alternative: use the "screen" program and bind its command character to ctrl-Z (instead of the default ctrl-A). From es-owner Mon Apr 22 17:30:09 2002 Received: from mailout03.sul.t-online.com ([194.25.134.81]) by hawkwind.utcs.utoronto.ca with SMTP id <72663>; Mon, 22 Apr 2002 17:29:56 -0500 Received: from fwd11.sul.t-online.de by mailout03.sul.t-online.com with smtp id 16zlMi-00010j-0A; Mon, 22 Apr 2002 23:28:52 +0200 Received: from spotteswoode.dnsalias.org (520082050842-0001@[217.80.22.35]) by fmrl11.sul.t-online.com with esmtp id 16zlMe-1yr0jYC; Mon, 22 Apr 2002 23:28:48 +0200 Received: (qmail 28785 invoked by uid 0); 22 Apr 2002 21:28:47 -0000 Date: Mon, 22 Apr 2002 17:28:47 -0500 Message-ID: <20020422212847.GJ606@spotteswoode.de.eu.org> From: "clemensF" Mail-Followup-To: es@hawkwind.utcs.toronto.edu To: es@hawkwind.utcs.toronto.edu X-pymsgauth-token: 1b4001e4f8852fcc4cc1e04fe4a7cde91a2cf432 Subject: Re: job control for the es shell References: <3CC44A87.7070F58@physik.uni-erlangen.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3CC44A87.7070F58@physik.uni-erlangen.de> Organization: no X-PGP-ID: 0x214190AF X-Stamper-To: post@stamper.itconsult.co.uk X-Sender: 520082050842-0001@t-dialin.net > Olaf Rogalsky: > A feature, which IMHO is badly missing form the es shell, is job control. > That's why I made a hack that implements it. If your are interested, > you can get it form: > http://theorie1.physik.uni-erlangen.de/rogalsky/es/es.html hurray! -- clemens fischer From es-owner Mon Apr 22 18:01:04 2002 Received: from mailout03.sul.t-online.com ([194.25.134.81]) by hawkwind.utcs.utoronto.ca with SMTP id <72668>; Mon, 22 Apr 2002 18:01:02 -0500 Received: from fwd11.sul.t-online.de by mailout03.sul.t-online.com with smtp id 16zlr7-0007Qu-08; Tue, 23 Apr 2002 00:00:17 +0200 Received: from spotteswoode.dnsalias.org (520082050842-0001@[217.80.22.35]) by fmrl11.sul.t-online.com with esmtp id 16zlqw-1gKxXsC; Tue, 23 Apr 2002 00:00:06 +0200 Received: (qmail 29633 invoked by uid 0); 22 Apr 2002 22:00:05 -0000 Date: Mon, 22 Apr 2002 18:00:05 -0500 Message-ID: <20020422220005.GK606@spotteswoode.de.eu.org> From: "clemensF" Mail-Followup-To: es@hawkwind.utcs.toronto.edu To: es@hawkwind.utcs.toronto.edu X-pymsgauth-token: 77e6839ee5f26865f99d278f5e3472e7bb84286b Subject: Re: job control for the es shell References: <3CC44A87.7070F58@physik.uni-erlangen.de> <20020422211230.29663.qmail@g.bio.cse.psu.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020422211230.29663.qmail@g.bio.cse.psu.edu> Organization: no X-PGP-ID: 0x214190AF X-Stamper-To: post@stamper.itconsult.co.uk X-Sender: 520082050842-0001@t-dialin.net > Scott Schwartz: > > A feature, which IMHO is badly missing form the es shell, is job control. > > A reasonable alternative: use the "screen" program and bind its command > character to ctrl-Z (instead of the default ctrl-A). i think the patch is worth it, if not for the jobs, then for readline history and the readline leak. -- clemens fischer From es-owner Tue Apr 23 15:26:35 2002 Received: from max5.rrze.uni-erlangen.de ([131.188.3.50]) by hawkwind.utcs.utoronto.ca with SMTP id <72704>; Tue, 23 Apr 2002 15:26:31 -0500 Return-Path: Received: from [131.188.166.80] by max5.rrze.uni-erlangen.de with ESMTP for es@hawkwind.utcs.toronto.edu; Tue, 23 Apr 2002 16:57:44 +0200 Sender: rogalsky@max5.rrze.uni-erlangen.de Message-Id: <3CC57668.8EA7507C@physik.uni-erlangen.de> Date: Tue, 23 Apr 2002 10:57:44 -0500 From: Olaf Rogalsky X-Mailer: Mozilla 4.61 [en] (X11; U; AIX 4.1) X-Accept-Language: en MIME-Version: 1.0 To: es@hawkwind.utcs.toronto.edu Subject: Re: job control for the es shell Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Scott Schwartz wrote: > > > A feature, which IMHO is badly missing form the es shell, is job control. > > A reasonable alternative: use the "screen" program and bind its command > character to ctrl-Z (instead of the default ctrl-A). I tried screen, but it has not the same feeling and not the same semantics as conventional job control. I am to used to the bourne job control. Personally, I won't use a shell without job control. But then, if anybody does not like my patch: DON'T USE IT! It is just an option to those people, who want to have it :-) PS: To get rid of the memory leak in the LIBREADLINE support add the following lines after line 314 in input.c (in->nufbegin[nre...): #if LIBREADLINE free(rlinebuf); #endif -- +----------------------------------------------------------------------+ I Dipl. Phys. Olaf Rogalsky Institut f. Theo. Physik I I I Tel.: 09131 8528440 Univ. Erlangen-Nuernberg I I Fax.: 09131 8528444 Staudtstrasse 7 B3 I I rogalsky@theorie1.physik.uni-erlangen.de D-91058 Erlangen I +----------------------------------------------------------------------+ From es-owner Tue Apr 23 15:26:36 2002 Received: from dmul.paulhaahr.com ([63.203.198.9]) by hawkwind.utcs.utoronto.ca with SMTP id <72686>; Tue, 23 Apr 2002 15:26:20 -0500 Received: (qmail 26400 invoked by uid 500); 23 Apr 2002 05:49:50 -0000 Message-Id: Date: Tue, 23 Apr 2002 01:49:50 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Paul Haahr To: Olaf Rogalsky Cc: es@hawkwind.utcs.toronto.edu Subject: Re: job control for the es shell In-Reply-To: <3CC44A87.7070F58@physik.uni-erlangen.de> References: <3CC44A87.7070F58@physik.uni-erlangen.de> X-Mailer: VM 6.30 under Emacs 20.7.1 Olaf Rogalsky wrote > A feature, which IMHO is badly missing form the es shell, is job control. > That's why I made a hack that implements it. If your are interested, > you can get it form: Nice going. I haven't had a chance to look at it, but I'm impressed that you were able to shoehorn it in. > P.S.: Can anybody explain to me, what the Ref, RefPop, RefReturn etc > macros are for? Identifying the root set for the purposes of garbage collection. If in doubt about whether you have them correct, run with GCDEBUG and GCALWAYS on and any GC bugs should show up fairly quickly. --p From es-owner Wed Apr 24 17:42:11 2002 Received: from finch-post-11.mail.demon.net ([194.217.242.39]) by hawkwind.utcs.utoronto.ca with SMTP id <72719>; Wed, 24 Apr 2002 17:41:49 -0500 Received: from whitecrow.demon.co.uk ([194.222.126.246] helo=localhost.localdomain) by finch-post-11.mail.demon.net with esmtp (Exim 3.35 #1) id 170GHD-0003Mr-0B for es@hawkwind.utcs.toronto.edu; Wed, 24 Apr 2002 06:29:15 +0000 Received: from whitecrow (IDENT:steve@whitecrow [127.0.0.1]) by localhost.localdomain (8.9.3/8.8.7) with ESMTP id WAA27487 for ; Tue, 23 Apr 2002 22:47:09 +0100 Message-Id: <200204232147.WAA27487@localhost.localdomain> X-Mailer: exmh version 2.1.1 10/15/1999 To: es@hawkwind.utcs.toronto.edu Subject: Re: job control for the es shell In-Reply-To: Message from Olaf Rogalsky of "Tue, 23 Apr 2002 10:57:44 CDT." <3CC57668.8EA7507C@physik.uni-erlangen.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 23 Apr 2002 17:47:09 -0500 From: Steve Kilbane Olaf wrote: > I tried screen, but it has not the same feeling and not the same semantics as > conventional job control. ... which is sort of the point. :-) > I am to used to the bourne job control. What, none? [ Cue various shell historians on Bourne vs Korn vs Bash vs ... ] > Personally, > I won't use a shell without job control. Someone on the es list with strong opinions about shell features? Shocking. What _is_ the world coming to? > But then, if anybody does not like my patch: DON'T USE IT! A laudable statement. Just don't feel too offended if it doesn't get rolled in. steve From es-owner Thu Apr 25 17:01:06 2002 Received: from presto.vitanuova.com ([62.254.170.97]) by hawkwind.utcs.utoronto.ca with SMTP id <72770>; Thu, 25 Apr 2002 17:00:58 -0500 To: es@hawkwind.utcs.toronto.edu Subject: Re: job control for the es shell Date: Thu, 25 Apr 2002 11:57:21 -0500 From: rog@vitanuova.com MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <02Apr25.170058edt.72770@hawkwind.utcs.utoronto.ca> > out of interest, what does job control give you that you can't get > quite easily via virtual terminals? > > "Oh rats, I need to reboot my Windoze box *again*, but I don't want to > interrupt that job I started half an hour ago. I know, I can just put it > into the background." create a new window for the new job? or if you're on a genuine terminal, as somebody suggested, screen works admirably to the same purpose. in fact, i remember at uni using screen - it was great, i could go from one terminal room to another and pick up the same session on a different terminal. not many window systems offer that functionality, let along csh-style job control (VNC could be construed as such i guess). or does the job control-style "background" do something different? i've never used it, only browsed through the man pages, so i'm probably misguided. cheers, rog. From es-owner Thu Apr 25 17:01:08 2002 Received: from grey.cloud.rain.com ([12.224.247.202]) by hawkwind.utcs.utoronto.ca with SMTP id <72768>; Thu, 25 Apr 2002 17:00:58 -0500 Received: (qmail 1066 invoked from network); 25 Apr 2002 14:28:40 -0000 Received: from localhost (HELO cloud.rain.com) (@127.0.0.1) by localhost with SMTP; 25 Apr 2002 14:28:40 -0000 To: rog@vitanuova.com To: es@hawkwind.utcs.toronto.edu Subject: Re: job control for the es shell References: <02Apr22.163657edt.72302@hawkwind.utcs.utoronto.ca> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1062.1019744920.1@cloud.rain.com> Date: Thu, 25 Apr 2002 10:28:40 -0500 Message-ID: <1063.1019744920@cloud.rain.com> From: Bill Trost rog@vitanuova.com writes: > A feature, which IMHO is badly missing form the es shell, is job > control. out of interest, what does job control give you that you can't get quite easily via virtual terminals? "Oh rats, I need to reboot my Windoze box *again*, but I don't want to interrupt that job I started half an hour ago. I know, I can just put it into the background." From es-owner Thu Apr 25 17:01:14 2002 Received: from max5.rrze.uni-erlangen.de ([131.188.3.50]) by hawkwind.utcs.utoronto.ca with SMTP id <72766>; Thu, 25 Apr 2002 17:00:41 -0500 Return-Path: Received: from [131.188.166.80] by max5.rrze.uni-erlangen.de with ESMTP; Thu, 25 Apr 2002 12:01:08 +0200 Sender: rogalsky@max5.rrze.uni-erlangen.de Message-Id: <3CC7D3E4.D4C1C9A9@physik.uni-erlangen.de> Date: Thu, 25 Apr 2002 06:01:08 -0500 From: Olaf Rogalsky X-Mailer: Mozilla 4.61 [en] (X11; U; AIX 4.1) X-Accept-Language: en MIME-Version: 1.0 To: Steve Kilbane CC: es@hawkwind.utcs.toronto.edu Subject: Re: job control for the es shell References: <200204232147.WAA27487@localhost.localdomain> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Steve Kilbane wrote: > Blablabla... This is not the first flame^h^h^h^h diskussion on job control in this list. I wonna have it. I implement it. I share it with others, who wanna have it, too. > A laudable statement. Just don't feel too offended if it doesn't get > rolled in. No, I won't, see above. Have a nice day, Olaf -- +----------------------------------------------------------------------+ I Dipl. Phys. Olaf Rogalsky Institut f. Theo. Physik I I I Tel.: 09131 8528440 Univ. Erlangen-Nuernberg I I Fax.: 09131 8528444 Staudtstrasse 7 B3 I I rogalsky@theorie1.physik.uni-erlangen.de D-91058 Erlangen I +----------------------------------------------------------------------+ From es-owner Fri Apr 26 16:14:31 2002 Received: from max5.rrze.uni-erlangen.de ([131.188.3.50]) by hawkwind.utcs.utoronto.ca with SMTP id <72843>; Fri, 26 Apr 2002 16:14:28 -0500 Return-Path: Received: from [131.188.166.80] by max5.rrze.uni-erlangen.de with ESMTP; Fri, 26 Apr 2002 17:07:09 +0200 Sender: rogalsky@max5.rrze.uni-erlangen.de Message-Id: <3CC96D1D.8EE30D23@physik.uni-erlangen.de> Date: Fri, 26 Apr 2002 11:07:09 -0500 From: Olaf Rogalsky X-Mailer: Mozilla 4.61 [en] (X11; U; AIX 4.1) X-Accept-Language: en MIME-Version: 1.0 To: Mikael Eklund CC: steve@whitecrow.demon.co.uk, es@hawkwind.utcs.toronto.edu Subject: Re: job control for the es shell References: <200204261350.g3QDoOK20479@brother.ludd.luth.se> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mikael Eklund wrote: > I remember what Paul said about jobcontrol many years ago. He felt it > didn't fit in with the functional programming style of es. He wanted > to add a feature called `first class continuation' before jobcontrol > could be added the right way. First class continuations would be nice, but I don't think they are essential for an interactive shell*. But tail recursion would be really nice. > Since then, I've had an idea that each internal command sequence (also > possibly containing external commands) should run as its own thread. > If I ever find the time to really learn threaded programming, this > would be a nice project. :-) This would be very hard, because of numerous global data structures, which then must be properly locked. And what would be the benefits of multithreading? IMHO, in a not too specialized programming language, the default behaviour should be the serial execution of successive commands. Otherwise ~> x=Hello World!; echo $x would give unpredictable results. Greetings, Olaf Footnotes: * Standard disclaimer: Job control isn't essential, as well. But I want to have it :-) -- +----------------------------------------------------------------------+ I Dipl. Phys. Olaf Rogalsky Institut f. Theo. Physik I I I Tel.: 09131 8528440 Univ. Erlangen-Nuernberg I I Fax.: 09131 8528444 Staudtstrasse 7 B3 I I rogalsky@theorie1.physik.uni-erlangen.de D-91058 Erlangen I +----------------------------------------------------------------------+ From es-owner Fri Apr 26 16:14:33 2002 Received: from mother.ludd.luth.se ([130.240.16.3]) by hawkwind.utcs.utoronto.ca with SMTP id <72839>; Fri, 26 Apr 2002 16:14:21 -0500 Received: from brother.ludd.luth.se (brother.ludd.luth.se [130.240.16.78]) by mother.ludd.luth.se (8.10.2+Sun/8.9.3) with ESMTP id g3QDoOF06399; Fri, 26 Apr 2002 15:50:24 +0200 (MEST) From: Mikael Eklund Received: (from li-fi@localhost) by brother.ludd.luth.se (8.10.2+Sun/8.9.3) id g3QDoOK20479; Fri, 26 Apr 2002 15:50:24 +0200 (MEST) Date: Fri, 26 Apr 2002 09:50:24 -0500 Message-Id: <200204261350.g3QDoOK20479@brother.ludd.luth.se> To: Olaf.Rogalsky@physik.uni-erlangen.de, steve@whitecrow.demon.co.uk Subject: Re: job control for the es shell Cc: es@hawkwind.utcs.toronto.edu I remember what Paul said about jobcontrol many years ago. He felt it didn't fit in with the functional programming style of es. He wanted to add a feature called `first class continuation' before jobcontrol could be added the right way. Since then, I've had an idea that each internal command sequence (also possibly containing external commands) should run as its own thread. If I ever find the time to really learn threaded programming, this would be a nice project. :-) From es-owner Sat Apr 27 19:04:51 2002 Received: from dmul.paulhaahr.com ([63.203.198.9]) by hawkwind.utcs.utoronto.ca with SMTP id <72875>; Sat, 27 Apr 2002 19:04:22 -0500 Received: (qmail 29219 invoked by uid 500); 26 Apr 2002 22:29:43 -0000 Message-Id: Date: Fri, 26 Apr 2002 18:29:43 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Paul Haahr To: Olaf Rogalsky Cc: Mikael Eklund , Steve Kilbane , es@hawkwind.utcs.toronto.edu Subject: Re: job control for the es shell In-Reply-To: <3CC96D1D.8EE30D23@physik.uni-erlangen.de> References: <200204261350.g3QDoOK20479@brother.ludd.luth.se> <3CC96D1D.8EE30D23@physik.uni-erlangen.de> X-Mailer: VM 6.30 under Emacs 20.7.1 I can't remember specifically what I said about continuations and job control, but my current understanding of that statement would be: (1) Correct job control in es requires some notion of (internal-to-es) thread (or process or ...) that can be stopped and started. (2) The right way to implement threads in es is using first class continuations (e.g., call/cc). I still believe (1), but I no longer believe (2). What do I mean by ``correct''? Basically, that es commands can be seemlessly interrupted and restarted regardless of whether they're running within the shell or in forked processes. I only tried your patch very quickly, but it doesn't appear to satisfy that criteria. (It's impressive nonetheless.) For examples, try interrupting (& restarting) things like while true { sleep 1 } while true { echo t } x = `{ date; sleep 100; date } --p From es-owner Mon Apr 29 17:45:19 2002 Received: from max5.rrze.uni-erlangen.de ([131.188.3.50]) by hawkwind.utcs.utoronto.ca with SMTP id <73028>; Mon, 29 Apr 2002 17:45:11 -0500 Return-Path: Received: from [131.188.166.80] by max5.rrze.uni-erlangen.de with ESMTP for es@hawkwind.utcs.toronto.edu; Mon, 29 Apr 2002 20:47:36 +0200 Sender: rogalsky@max5.rrze.uni-erlangen.de Message-Id: <3CCD9547.EDB4D662@physik.uni-erlangen.de> Date: Mon, 29 Apr 2002 14:47:35 -0500 From: Olaf Rogalsky X-Mailer: Mozilla 4.61 [en] (X11; U; AIX 4.1) X-Accept-Language: en MIME-Version: 1.0 To: es@hawkwind.utcs.toronto.edu Subject: [Fwd: Re: job control for the es shell] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Paul Haahr wrote: > (1) Correct job control in es requires some notion of (internal-to-es) > thread (or process or ...) that can be stopped and started. Indeed. The only stoppable objects in my patch are forked processes (process groups). > (2) The right way to implement threads in es is using first class > continuations (e.g., call/cc). It would be much easier, if unix had rich return values. Then a simple fork will allmost do the trick. Allmost ... > What do I mean by ``correct''? Basically, that es commands can be > seemlessly interrupted and restarted regardless of whether they're > running within the shell or in forked processes. I only tried your > patch very quickly, but it doesn't appear to satisfy that criteria. No, it doesn't. Unfortunately. > For examples, try interrupting (& restarting) things like > while true { sleep 1 } > while true { echo t } > x = `{ date; sleep 100; date } How do other shells do job control on those examples? Ksh88: Ksh simply disables job control for command sequences! A simple approach, but clean and predictable. bash2.0: Pressing ^Z or ^C has the expected result on all external processes in a sequence of commands. Any intenal (to bash) command is interrupted and not restartable. But there are bugs, too. Try to stop and then kill the following: echo $(sleep 9999|sleep 9999) mypatch: I have put a new version of the patch with several bugfixes on my web page: http://theorie1.physik.uni-erlangen.de/rogalsky/es It's still not fully tested, but at least the first two examples of yours are now interruptable. The last example only examplifies, that my patch isn't ``correct''. Thanks for your tests, Olaf -- +----------------------------------------------------------------------+ I Dipl. Phys. Olaf Rogalsky Institut f. Theo. Physik I I I Tel.: 09131 8528440 Univ. Erlangen-Nuernberg I I Fax.: 09131 8528444 Staudtstrasse 7 B3 I I rogalsky@theorie1.physik.uni-erlangen.de D-91058 Erlangen I +----------------------------------------------------------------------+ From es-owner Fri Nov 8 02:14:33 2002 Received: from fiinbeck.math.ntnu.no ([129.241.15.140]) by hawkwind.utcs.toronto.edu with SMTP id <36931>; Fri, 8 Nov 2002 02:14:16 -0500 Received: (qmail 30994 invoked from network); 7 Nov 2002 12:54:11 -0000 Received: from localhost (127.0.0.1) by localhost with SMTP; 7 Nov 2002 12:54:11 -0000 To: es@hawkwind.utcs.toronto.edu Subject: Re: multiple variable reference In-Reply-To: <9306152209.AA03969@astro.mv.us.adobe.com> References: <9306152209.AA03969@astro.mv.us.adobe.com> X-Mailer: Mew version 1.94.2 on Emacs 21.2 / Mule 5.0 (SAKAKI) X-URL: http://www.math.ntnu.no/~hanche/ Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 8bit Message-Id: <20021107135411U.hanche@math.ntnu.no> Date: Thu, 7 Nov 2002 07:54:11 -0500 From: Harald Hanche-Olsen X-Dispatcher: imput version 20000228(IM140) Lines: 30 + (Paul Haahr): | as i've noted to the list, the next version of es will have multiple | variable assignment. that is, | | (x y z) = 1 2 3 4 | | is the same as | | x = 1 | y = 2 | z = 3 4 That was written in June 1993. Thus, it only took me nine years and a few months to discover a really useful side effect of this change: ; for ((x y)=a b c d e f) echo $x $y a b c d e f Yes, for the past 9 years it has been *trivial* to process a list by twos, and I didn't find out until now. The other reason I am writing is for the novelty value of replying to a message more than nine years old. 8-) Also, it's useful to have a little traffic on the list now and then, lest people think that es is dead. It is not. - Harald From es-owner Fri Nov 8 18:04:59 2002 Received: from rapido.vitanuova.com ([62.254.170.97]) by hawkwind.utcs.toronto.edu with SMTP id <37027>; Fri, 8 Nov 2002 18:04:33 -0500 Message-ID: To: es@hawkwind.utcs.toronto.edu Subject: Re: multiple variable reference Date: Fri, 8 Nov 2002 08:56:31 -0500 From: rog@vitanuova.com MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit > | as i've noted to the list, the next version of es will have multiple > | variable assignment. that is, > | > | (x y z) = 1 2 3 4 that's interesting... i implemented exactly the same assignment semantics for the inferno shell (a kind of extremely simplified es) but was unaware of the above (consciously, anyway!). i wasn't sure whether (a b) = 1 should be an error, or should assign () to b (i chose the latter). sadly in that shell, i'm unable to take advantage of your "useful side effect", as "for" is just a command, not part of the syntax (as are all control-flow statements). cheers, rog. PS. oh, the lists we've forgotten we've subscribed to!