From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mod.civil.su.OZ.AU ([129.78.142.6]) by hawkwind.utcs.toronto.edu with SMTP id <2795>; Wed, 18 Nov 1992 21:55:42 -0500 Received: by mod.civil.su.oz.au id <28683>; Thu, 19 Nov 1992 13:54:58 +1100 From: John (For the colours are many, but the light is one.) Mackin Date: Wed, 18 Nov 1992 21:12:05 -0500 To: Sam Fans Subject: good move Chris In-Reply-To: <92Nov18.204207est.2795@hawkwind.utcs.toronto.edu> Message-ID: <199211191312.1153.sam.babaf@civil.su.oz.au> X-Face: 39seV7n\`#asqOFdx#oj/Uz*lseO_1n9n7rQS;~ve\e`&Z},nU1+>0X^>mg&M.^X$[ez>{F k5[Ah<7xBWF-@-ru?& @4K4-b`ydd^`(n%Z{ Thanks for creating this list. One day perhaps I will have time to do something with the new sam. If anyone _does_ do scrolling menus please let me know, else I will have to do it myself, in my copious spare time. Should an article advertising the existence of this list be posted to comp.editors? Now, finally, I have an audience to ask a question that has been bothering me for YEARS. Historical background: I first used sam on a Jerq in 1989, hosted by a VAX-11/780 running Eighth Edition. That version of sam (the `Pike original') didn't have what I call `tagged REs'; you could use parentheses as you liked as grouping operators in REs, but that was _all_ they did. You could not use \ on the right hand side of an s command to represent `what the n'th paren part matched.' I have always wanted to believe that Pike designed the command language of sam (composition of structural REs) with great precision, and I was disturbed to find, in the V8 days, that there appeared to be absolutely no way to accomplish the standard two-column interchange of ed: suppose you have a file with two words per line separated by one space, and you want to exchange them on each line, you [[NOTE, this is an _ed_ command]] 1,$s/\(.*\) \(.*\)/\2 \1/ I found that literally _impossible_ in the Pike original sam. I tried hard, but always ended up with the dread "changes out of sequence". The further history of this is that my friend and colleague Noel Hunt (you on this list, Noel? If not, you should be!) decided that he was going to add tagged REs to sam, and he did it. That code got sent back to Pike, and it appears now in the version of sam that they've distributed. I have always wondered (but never been brave enough to bother Pike) what the full story is. Challenge: can anyone find a sam command to accomplish the exchange _without_ using \ on the right side of an s command? (Note: please don't mail me any _theories_ about this; I worked at it for some days, and have already tried whatever you have theorised. I'm only interested if you have tested it in sam and it worked.) OK, John.