9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Enache Adrian <enache@rdslink.ro>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Re: configure misery
Date: Mon, 17 Nov 2003 02:24:02 +0200	[thread overview]
Message-ID: <20031117002402.GA1301@ratsnest.hole> (raw)
In-Reply-To: <E1ALUjM-0006XR-Ba@t40.swtch.com>

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


  parent reply	other threads:[~2003-11-17  0:24 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-16  8:04 Aharon Robbins
2003-11-16  8:37 ` Geoff Collyer
2003-11-16 14:46   ` Charles Forsyth
2003-11-16  9:53 ` Bruce Ellis
2003-11-16 19:11 ` Lyndon Nerenberg
2003-11-16 19:32   ` andrey mirtchovski
2003-11-16 21:43     ` Dan Cross
2003-11-16 23:37       ` Lyndon Nerenberg
2003-11-17  0:04         ` mirtchov
2003-11-17  0:04           ` boyd, rounin
2003-11-17  3:18         ` Dan Cross
2003-11-17  3:28           ` boyd, rounin
2003-11-16 21:46     ` Russ Cox
2003-11-16 22:24       ` mirtchov
2003-11-16 22:47         ` Russ Cox
2003-11-17  0:38         ` Mike Haertel
2003-11-16 22:38       ` Lyndon Nerenberg
2003-11-16 22:41         ` boyd, rounin
2003-11-18 12:54         ` Aharon Robbins
2003-11-18 14:11           ` Russ Cox
2003-11-18 14:55             ` Joel Salomon
2003-11-17  0:24       ` Enache Adrian [this message]
2003-11-17 12:16         ` Aharon Robbins
2003-11-17 23:16           ` Taj Khattra
2003-11-16 19:58   ` boyd, rounin
2003-11-17  0:30     ` [9fans] mmap (was configure misery) Geoff Collyer
2003-11-17  0:29       ` boyd, rounin
2003-11-17 12:25   ` [9fans] Re: configure misery Aharon Robbins
2003-11-17  0:42 ` John Stalker
2003-11-17 12:28   ` Aharon Robbins
2003-11-17 12:42     ` Lucio De Re
2003-11-17 12:53       ` Lucio De Re
2003-11-17 13:43         ` Aharon Robbins
2003-11-17 15:06           ` mirtchov
2003-11-17 15:35           ` David Presotto
2003-11-17 16:31       ` John Stalker
2003-11-17 17:19         ` Aharon Robbins
2004-01-30 15:30 [9fans] Re: [hangar18-general] Frustration Jim Choate
2004-02-03 17:11 ` [9fans] Re: configure misery rog
2004-02-04 16:48   ` Jim Choate
2004-02-03  3:49 Li Yi
2004-02-03 11:30 ` Aharon Robbins
2004-02-03 13:32   ` a
2004-02-03 15:34     ` Jim Choate
2004-02-03 16:29       ` a
2004-02-03 14:18   ` andrey mirtchovski
2004-02-03 15:36     ` Jim Choate
2004-02-03 16:32       ` boyd, rounin
2004-02-03 16:42         ` Jim Choate
2004-02-03 23:53       ` David Presotto
2004-02-04  8:13     ` Aharon Robbins
2004-02-03 15:33   ` Jim Choate
2004-02-03 16:27     ` a
2004-02-03 16:44       ` Jim Choate
2004-02-03 16:53         ` andrey mirtchovski
2004-02-04 16:45           ` Jim Choate
2004-02-03 17:01         ` Wes Kussmaul
2004-02-04 17:47 Spamm Trapp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20031117002402.GA1301@ratsnest.hole \
    --to=enache@rdslink.ro \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).