http://qs1969.pair.com?node_id=573227


in reply to Reliable software: SOLVED (was: Reliable software OR Is CPAN the sacred cow)

Dear powerman,

almost all has been said so far in response to your valuable posting, but one point is missing.

print "Howdy, world!\n";

is one reason why people code in perl, which is really two, as expressed elsewhere:

Your way of speaking seems like trying to lay down the law.

Another reason for coding perl is aptly demonstrated by

$=[!print$=]=!map{$==$=[$#z]+=$=[@z]/@z,($=[@z]%=1+$#z--).=0}@z=@=for@ +==(1)x pop
which snippet calculates the Euler constant (1st argument is number of digits - credit is due to a wizard on the #perlgolf irc channel (not me :-)).

Another way goes like this:

use HTTP::Cache::Transparent (); use LWP::Simple qw(get); use Compress::Zlib (); HTTP::Cache::Transparent::init({BasePath => "/tmp/http-cache-transpare +nt-$>"}); my $gzipped = get "http://www.perl.com/CPAN/misc/lwall-quotes.txt.gz"; my $quotes = Compress::Zlib::memGunzip($gzipped); my @quotes = split /\n%%\n/, $quotes; print $quotes[rand @quotes], "\n";

Yet another splendid way of writing perl are the gems Erudil has posted.

A flavour of perl coding which I particularly like and greatly admire is Lingua::Romana::Perligata --

#! /usr/local/bin/perl -w use Lingua::Romana::Perligata; adnota Illud Cribrum Eratothenis maximum tum val inquementum tum biguttam tum stadium egresso scribe. vestibulo perlegementum da meo maximo . maximum tum novumversum egresso scribe. da II tum maximum conscribementa meis listis. dum damentum nexto listis decapitamentum fac sic lista sic hoc tum nextum recidementum cis vannementa da listis. + next tum biguttam tum stadium tum nextum tum novumversum scribe egresso. cis

With these examples I'm trying to mark (some) cornerstones of what perl is, and all of these are good uses of perl and splendid ways to make life interesting.

Ah, and don't let us forget the Acme namespace - that's all more Monty Python than any so-called python (scnr).

<update why="the point">
None of these coding examples are in any way meant to be reliable in other sense than "if it ain't broke, don't fix it".
</update>

I've upvoted your post, partly because it does adress a valid concern, partly because it rouses a good discussion, and partly because it's good if from time to time a pilgrim comes back to the monastery to shout

YOU ARE ALL SINNERS! REPENT!
at the fellow monks sitting at the table. I hope you'll not loose your harsh tone and your engagement in the quest (feel free to set up the perlgems.org domain - it's untaken at the moment - to publish the Carat weight of CPAN modules you come across :-), but don't go down the wrong way, don't end up like Jorge of Burgos who died poisoned by his own wrath.

Anyways - if you want really reliable code - you probably shouldn't use perl at all. Perl comes with all the ambiguities natural languages have. You should take the right tool for that, C perhaps, or assembler, and scrutinize the libraries your code uses, the underlying OS and the chips that OS runs on.

Last thing - CPAN isn't a holy cow at all. It's more aptly described as an ecosystem - there are so many interdependencies of modules, which reliably infest each others with parasites, pollution, bugs and even sudden death, cot death... there's no way to stand that but with the firm belief in your own open eyes, skill, and the good intent of your fellow coders.

Your good intent is highly welcome .

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}