18 years old?
traveler
created: 2005-12-18 16:47:01
Wikipedia says that this is the 18th anniversery of the day Larry Wall released perl to the world. And what an 18 years it has been! As one who has only been doing perl seriously for a third of that time, I'd like to hear from some "old timers" about the "good old days" :-).
Re: 18 years old?
created: 2005-12-18 17:03:05
The older we get, the better we were....

I've only been doing Perl for about ten years. Four as a SA, building quick scripts to get us out of jams, and the last six+ as a Perl Developer writing production code for various non-CGI applications.

I came in (thank all the Gods) at the back end of the Perl4 era; my first real Perl Coding assignment was to figure out if a Perl5 rewrite of a Perl4 system was behaving in the same way when handed a particularly nasty edge-case. A quick and somewhat painful introduction to Perl 4's Module and O-O structure ensued; followed immediate by a crash course (aided by Damian's Book) on how Perl5 OO should be handled.

Since then, it has been all Fun'n'Games.

----
I Go Back to Sleep, Now.

OGB

Re^2: 18 years old?
created: 2005-12-18 19:09:11
"The older we get, the better we were.... "

That "were" is very precise, so you realize perl is dead, or at least dying. I respect you so much for your hornesty, at least you dare to speak up in a dark world where truth is not appreciated.

Re^2: 18 years old?
created: 2005-12-18 19:20:19

As a perl programmer, I am ashamed to see that someone is calling perl OO. Perl is not OO, and will never succeed in that way (too late).

My advice to perl guys: don't ecven bother to pretend that you understand OO (at least not from perl).

Re: 18 years old?
created: 2005-12-18 19:10:01
"good old days"

Not any more for perl huh ;-?

Re: 18 years old?
created: 2005-12-19 03:28:45

Wikipedia says that this is the 18th anniversery

You overlooked Perl released on this day in 1987 which appeared in this place an hour before your post.

Cheers, Sören

Re: 18 years old?
created: 2005-12-20 02:53:40
Geezer alert!

From looking at my old files (am I a packrat?) it appears that I learned perl on December 22, 1994. My first program was a log file analyzer for our web server. In August of 1994 I visited just about every web site that I could access. The best search engine for this task back then was called 'A Ton of Web Sites' and was a nearly comprehensive linear list of every web server that could be found.

I have used Perl ever since, and I've attended most of the Perl Conferences (now called OSCON).

My first widely-used CGI-type program was from 1995. It used MAILTO and procmail instead of GET or POST. This allowed reliable form submission even if the web server was down, which was not so uncommon back then. This system tracked hardware modifications in our prototypes. Users would submit forms through a MAILTO link. Mailing the form entries would cause procmail to run a perl program that then edited the HTML files, making the site dynamic. This system ran for years without a hitch, and I think some form of it may still be in use.

I think that I had learned perl3 and used it once some years before then, but had forgotten it.

I first admired perl in this usenet posting to comp.sources.games, which included both the C versions and perl versions of a program to compute pi. Here is the perl version:

eval "exec nice -19 perl $0 $*"
       if $running_under_some_shell;
# ---------------------------------------------------------------------------
# pi.perl  computes pi (3.14...) about 5120 Digits
#
# W. Kebsch, July-1988  {uunet!mcvax}!unido!nixpbe!kebsch

$my_name = `basename $0`; chop($my_name);
$version = $my_name . "-1.2";

# some working parameter

$smax =  5120;          # max digits
$lmax =     4;          # digits per one array element
$hmax = 10000;          # one array element contains: 0..9999
$smin = $lmax;          # min digits
$mag  =     7;          # magic number

# subroutines

sub mul_tm              # multiply the tm array with a long value
{
   $cb = pop(@_);      # elements(array)
   $x  = pop(@_);      # value

   $c = 0;
   for($i = 1; $i <= $cb; $i++)
   {
       $z      = $tm[$i] * $x + $c;
       $c      = int($z / $hmax);
       $tm[$i] = $z - $c * $hmax;
   }
}

sub mul_pm              # multiply the pm array with a long value
{
   $cb = pop(@_);      # elements(array)
   $x  = pop(@_);      # value

   $c = 0;
   for($i = 1; $i <= $cb; $i++)
   {
       $z      = $pm[$i] * $x + $c;
       $c      = int($z / $hmax);
       $pm[$i] = $z - $c * $hmax;
   }
}

sub divide              # divide the tm array by a long value
{
   $cb = pop(@_);      # elements(array)
   $x  = pop(@_);      # value

   $c = 0;
   for($i = $cb; $i >= 1; $i--)
   {
       $z      = $tm[$i] + $c;
       $q      = int($z / $x);
       $tm[$i] = $q;
       $c      = ($z - $q * $x) * $hmax;
   }
}

sub add                 # add tm array to pm array

{
   $cb = pop(@_);      # elements(array)

   $c = 0;
   for($i = 1; $i <= $cb; $i++)
   {
       $z = $pm[$i] + $tm[$i] + $c;
       if($z >= $hmax)
       {
           $pm[$i] = $z - $hmax;
           $c      = 1;
       }
       else
       {
           $pm[$i] = $z;
           $c      = 0;
       }
   }
}

$m0 = 0; $m1 = 0; $m2 = 0;

sub check_xb            # reduce current no. of elements (speed up!)
{
   $cb = pop(@_);      # current no. of elements

   if(($pm[$cb] == $m0) && ($pm[$cb - 1] == $m1) && ($pm[$cb - 2] == $m2))
   {
       $cb--;
   }
   $m0 = $pm[$cb];
   $m1 = $pm[$cb - 1];
   $m2 = $pm[$cb - 2];
   $cb;
}

sub display             # show the result
{
   $cb = pop(@_);      # elements(array);

   printf("\n%3d.", $pm[$cb]);
   $j = $mag - $lmax;
   for($i = $cb - 1; $i >= $j; $i--)
   {
       printf(" %04d", $pm[$i]);
   }
   print "\n";
}

sub the_job             # let's do the job
{
   $s = pop(@_);       # no. of digits

   $s  = int(($s + $lmax - 1) / $lmax) * $lmax;
   $b  = int($s / $lmax) + $mag - $lmax;
   $xb = $b;
   $t  = int($s * 5 / 3);

   for($i = 1; $i <= $b; $i++)         # init arrays
   {
       $pm[$i] = 0;
       $tm[$i] = 0;
   }
   $pm[$b - 1] = $hmax / 2;
   $tm[$b - 1] = $hmax / 2;

   printf("digits:%5d, terms:%5d, elements:%5d\n", $s, $t, $b);
   for($n = 1; $n <= $t; $n++)
   {
       printf("\r\t\t\t  term:%5d", $n);
       if($n < 200)
       {
           do mul_tm((4 * ($n * $n - $n) + 1), $xb);
       }
       else
       {
           do mul_tm((2 * $n - 1), $xb);
           do mul_tm((2 * $n - 1), $xb);
       }
       if($n < 100)
       {
           do divide(($n * (16 * $n + 8)), $xb);
       }
       else

       {
           do divide((8 * $n), $xb);
           do divide((2 * $n + 1), $xb);
       }
       do add($xb);
       if($xb > $mag)
       {
           $xb = do check_xb($xb);
       }
   }
   do mul_pm(6, $b);
   do display($b);
   ($user,$sys,$cuser,$csys) = times;
   printf("\n[u=%g  s=%g  cu=%g  cs=%g]\n",$user, $sys, $cuser, $csys);
}

# main block ----------------------------------------------------------------

$no_of_args = $#ARGV + 1;
print("$version, ");
die("usage: $my_name ") unless($no_of_args == 1);
$digits = int($ARGV[0]);
die("no. of digits out of range [$smin\..$smax]")
                           unless(($digits >= $smin) && ($digits <= $smax));
do the_job($digits);
exit 0;

# That's all ----------------------------------------------------------------

It should work perfectly the first time! - toma

perlmonks.org content © perlmonks.org and Anonymous Monk, Happy-the-monk, Old_Gray_Bear, swimmingcartel, toma, traveler

prlmnks.org © 2006 edmund von der burg (eccles & toad)

v 0.03