uutraffic report (in perl)

Larry Wall lwall at jato.Jpl.Nasa.Gov
Thu Nov 23 11:46:57 AEST 1989


In article <14947 at bfmny0.UU.NET> tneff at bfmny0.UU.NET (Tom Neff) writes:
: Perl attempts to win converts like Crocodile Dundee (naaooww, THAT's not
: a Swiss Army knife, THIS <swish> is a Swiss Army knife...) at the
: expense of compactness.  It's a worthy idea, but there are drawbacks.

Heh, heh.  In Unix World they just called it a Swiss Army Chainsaw.
I kinda like that.

: On System V/386, for instance, with all debugging #undef'd and with -O
: turned on, the latest perl executable *after* both 'strip' and 'mcs -d'
: subtends 229K, and takes ~5 seconds to load, compile and interpret an
: in-line script consisting of 'exit 0;'.

This says more about the OS than perl, I fear.  On a measly 68020 here
with a load average of over 2, the same program takes 0.0 user, 0.1 system
and 0:00 elapsed time (rounded to the nearest second).  I suspect that
as soon as most everyone gets System V.4 and demand paging, this argument
will not be so potent.

In general, however, I agree with you that religious zealotry does little
good.  Enthusiasm is one thing--I'm a wee bit enthusiastic about perl
myself, for some reason--but I don't like to see people picking fights.
It makes people think either/or when they should be thinking both/and.

: For overnight batch reports
: this is irrelevant, but there's little hope of using perl as a quickie
: tool to get something fun done in, say, a hacked Pnews as one might with
: sed.  The perl answer, unfortunately, is "so what, just rewrite Pnews
: in perl" but this illustrates the "hump" of acceptance.  "Switch over
: completely or suffer inconvenience" does *not* cut to the heart of the
: UNIX philosophy.  It is closer to the religious passions that retard
: UNIX than it is to UNIX strengths.

<enter quibble mode>

s/The perl answer/Some people's answer/ || warn "Larry is unhappy.\n";

If perl is saying "so what, just rewrite Pnews in perl" and "Switch over
completely or suffer inconvenience", then it's not the perl I know.
The perl I know reads from stdin and writes to stdout just like any
other filter, and it encourages you to write incoming and outgoing
pipelines of other unix tools.  It even lets you feed multiple pipelines
simultaneously and close them down in any order.  Not even the C library's
popen() lets you do that.

<exit quibble mode>

Anyway, folks, just because something CAN be done in perl doesn't mean it
SHOULD be done in perl.  Likewise for shell, awk, C, etc.

Perl is just one more option.  Use when reasonable.  Your definition of
reasonable is probably different from the next guy's.  My definition of
reasonable says you should at least make it available on your system
sometime within the next two years.  Your mileage may vary.

Larry Wall
lwall at jpl-devvax.jpl.nasa.gov



More information about the Alt.sources.d mailing list