Xref: utzoo comp.unix.wizards:9407 comp.unix.questions:7614 Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!ll-xn!mit-eddie!uw-beaver!tektronix!orca!tekecs!frip!andrew From: andrew@frip.gwd.tek.com (Andrew Klossner) Newsgroups: comp.unix.wizards,comp.unix.questions Subject: Re: Tool -flag considered harmful (was: grep replacement) Message-ID: <10086@tekecs.TEK.COM> Date: 15 Jun 88 20:22:30 GMT References: <7962@alice.UUCP> <4615@vdsvax.steinmetz.ge.com> <10989@cgl.ucsf.EDU> <23325@bu-cs.BU.EDU> Sender: andrew@tekecs.TEK.COM Organization: Tektronix, Wilsonville, Oregon Lines: 31 [] "I've yet to hear an argument here against putting the context function into grep other than weak bleatings of parsimony." How about "because the people writing the tool think it doesn't belong." This strikes me as a strong argument. If you have a contrasting vision of what a pattern matcher can be, implement it yourself; don't go beating on a toolmaker who isn't responsible to you. (I'll admit that some of the beating is appropriate because Andrew asked for comments, but this lambasting of his philosophy is out of line.) I think the exciting part of Andrew's announcement about gre (NOT grep!) is that the sophisticated pattern matching code will be encapsulated into library routines. The gre utility itself will just be a wrapper. Those of us tool builders who can make slingshots but aren't good enough to make scalpels will be able to produce whatever we think a pattern matching tool should be, since the hard part will be done and packaged for us. (Of course, none of us peons outside the Labs will ever see this, unless they export it via the Toolkit.) I have worked in software foundries where tool-building consisted of library routine building, not filter process building, and I found it to be a more powerful, more easily exploited approach to the crafting of wonderful programs. I like a locally-developed tool called "paragrep" which searches (English text) paragraphs instead of lines. It was written by a C novice, thanks to the re_comp/re_exec library routines. -=- Andrew Klossner (decvax!tektronix!tekecs!andrew) [UUCP] (andrew%tekecs.tek.com@relay.cs.net) [ARPA]