uutraffic report (in perl)

Tom Neff tneff at bfmny0.UU.NET
Wed Nov 22 15:24:11 AEST 1989


In article <JGREELY.89Nov21190844 at oz.cis.ohio-state.edu> J Greely <jgreely at cis.ohio-state.edu> writes:
>>  It's too early for [perl] to become a religious issue.
>
>(Two years after its first net release is too early?)

Oh yes absolutely.  Two years is nothing, or why are we at 3.0.

>  ... And yes, it *is* a religious issue.  It cuts to the heart of the
>Unix philosophy, performs a triple bypass, and gets some useful work
>done while sh is still in the first set of backquotes.  Ever seen a
>disk usage accounting system written in sh?  It's not a pretty sight.

More to the point, ever seen one in awk?  Probably not, because although
people may write 'em they don't get around.  Swiss Army Interpreters
occupy a peculiar middle zone between the pure shell -- dumb and
function-poor but, in Madge's immortal words, "you're soaking in it" --
and compiled C, which takes work up front but which can do anything
conceivable and will run maximally fast.  Depending on your "religion,"
awk/perl either combine the best of these worlds or the worst.

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.
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;'.  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.

So while I like and admire Perl and feel it's the best batched report
writer invented, I think its limitations preclude basic tool status.

Perhaps one solution would be to stop writing '?2p' translators for a
bit and write 'p2c' so that cherished perl tools can be C-compiled
for lasting freshness.  Then perl becomes a superb prototyper capable
of dashing off a fast tool for intensive use in other environments.

-- 
To have a horror of the bourgeois   (\(    Tom Neff
is bourgeois. -- Jules Renard        )\)   tneff at bfmny0.UU.NET



More information about the Alt.sources.d mailing list