develooper Front page | perl.fwp | Postings from March 2002

Re: TPR1 post-mortem

Thread Previous | Thread Next
March 9, 2002 17:24
Re: TPR1 post-mortem
Message ID:
Stephen Turner schreef op 09 maart 2002:
> Thanks for all the replies about the history of Perl golf.
> One more question: when is the earliest example of a proper
> organised competition, rather than just a challenge on a mailing
> list or whatever? Are there any before the recent five?

The ill-fated Perl Golf Apocalypse at the 4th Perl Conference,
Monterey, July 2000, was attempted but not actually run:
There were technical glitches (in front of a live audience
including Larry Wall) and the event was cancelled, replaced
by a Damian Conway talk.

I found this reference on Perl Monks, May 24, 2001:
jmcnamara talks about a "leadership table" but I cannot find
one in this thread. Does anyone know if there was one?
I am interested in seeing the final scoreboard and
solutions from this game.

The ill-named Santa Clause Golf Apocalypse started on fwp mailing
list on 2-Dec-2001. Here are some references to that game:
I happened to be stuck on holiday in Melbourne, and started the
game on a whim because I was bored.

This was not my first attempt to run such a game, however.
The first game I ran was during March 2001 at work. I had a
couple of raw 20-year-old programmers who knew Java and C++ but
not Perl. To encourage them to learn more Perl, I ran a golf game.
For historical interest, I include a summary of this game below:
In an epic duel, in which the lead changed hands no
less than seven times, Ankur has emerged the winner.
  Eric    236 characters
  Ankur   226
  Ankur   195
  Eric    183
  Ankur   182
  Ankur   169
  Ankur   157
  Eric    154
  Eric    145
  Ankur   142
  Eric    138
  Ankur   136
Ankur's winning bid was posted 10 minutes before time.
Eric showed supreme unorthodoxy in producing one solution
that took 40 hours to run and in producing another bizarre
solution that mangled Perl's run-time symbol table!
Here is Ankur's winning solution:
  use File'Find;
  @ARGV||die"usage:$0 dir...\n";
  -d||die"$_ $!"for@ARGV;
  find sub{$h{lc,}.=Cwd'cwd."/$_\n"if-f},@ARGV;
  print grep/\n./,values%h
Here is Eric's runner-up solution:
  use File::Find;
  die"Usage:$0 dir...\n"if!map{-d||die"$! $_"}@ARGV;
  find sub{-f&&push@{$a{lc$_}},Cwd::cwd."/$_\n"},@ARGV;
  $#$_&&print@$_ for%a
Alas, I have lost the original problem specification, but I
remember it was a real-world program requested by our Windows
SysAdmin to find all files on the disk with the same name.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About