From mboxrd@z Thu Jan 1 00:00:00 1970 From: Enache Adrian To: 9fans@cse.psu.edu Subject: Re: [9fans] Re: configure misery Message-ID: <20031117002402.GA1301@ratsnest.hole> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i Date: Mon, 17 Nov 2003 02:24:02 +0200 Topicbox-Message-UUID: 8cd43012-eacc-11e9-9e20-41e7f4b1d025 On Sun, Nov 16, 2003 a.d., Russ Cox wrote: > Finally (and this is more directed at Lyndon's post than yours) not all > GNU software is crap. Some of it is quite good, and I believe that gawk > and groff are examples of this. Arguably groff is built better than troff. > (I'm not as familar with gawk vs. awk so don't construe my lack of comment > as anything other than ignorance.) Assuming that GNU software has uniform There's another GPL'ed awk there, called mawk. || $ time awk -f mc.awk mtrace || 0 0 || 1 5898 || 2 66407 || 3 16749 || ... || gawk: || real 0m4.174s || user 0m4.078s || sys 0m0.080s || nawk: || real 0m6.078s || user 0m6.025s || sys 0m0.037s || mawk: || real 0m1.391s || user 0m1.320s || sys 0m0.055s || || $ ls -l `which gawk nawk mawk` || -rwxr-xr-x 1 root root 316530 Aug 11 2002 /bin/gawk || -rwxr-xr-x 1 root root 106352 Jan 9 2003 /opt/bin/nawk || -rwxr-xr-x 1 root root 94680 Jan 9 2003 /opt/bin/mawk || || $ ls -l mtrace || -rw-r--r-- 1 adi adi 16956443 Nov 17 01:49 mtrace || || where mc.awk is a silly script like that: || || BEGIN { FS="[ \t()]+" } || /malloc/ { sz[$5]++ } || END { for(i=0; i<7; i++) printf "%10d %10d\n", i, sz[i] } || || and mtrace contains lines of the form: || || xxxx: xx.c:130 malloc 0x0805e3d8 (48) || xxxx: xx.c:135 free 0x0805e1f0 || xxxx: xx.c:1635 malloc 0x0805e458 (2) || xxxx: xxxx.c:7183 realloc 0x08081de0 => 0x08081de0 (4) And it seems not to have some of gawk's bugs: || $ echo | gawk 'function p() { print "hi" } BEGIN { gsub(/a/, p()) }' || $ echo | nawk 'function p() { print "hi" } BEGIN { gsub(/a/, p()) }' || hi || $ echo | mawk 'function p() { print "hi" } BEGIN { gsub(/a/, p()) }' || hi Regards, Adi