Re: Phalanx top 100 CPAN modules golf

2003-08-25 Thread A. Pagaltzis
* Andrew Savige [EMAIL PROTECTED] [2003-08-24 04:27]: the Klement Transform? Or should that read Klementian or even Klementine Transform? :-) Well, it's not called the Guttman-Roslerian Transform (or Guttmanian-Roslerian?) either. Schwartzian is really a red herring. -- Regards, Aristotle

Re: Phalanx top 100 CPAN modules golf

2003-08-24 Thread Andrew Savige
#!perl -lp / /;$A{$'}.=$.$`}for(map{s}.}9-$}e;$_}sort map{9-$A{$_}=~y. ...sprintf %-10s:$A{$_},$_}keys%A){ Interesting sub-problem is shortest way to space-fill the CPAN ID: sprintf%-10s,$_ pack A10,$_ uc($_^$x10) The last works because CPAN IDs match /^[A-Z]{4,9}$/. Replacing the

Re: Phalanx top 100 CPAN modules golf

2003-08-24 Thread Andrew Savige
Rick Klement wrote: And replacing one map with a sort, taking advantage of the fact that in 5.8, sort is stable, saves 10 strokes: #!perl -lp / /;$a{pack A10,$'}.= $`}for(sort{$b-$a}map$a{$_}=~y/ //. $_:$a{$_},sort keys a){ Very nice. Hmm, if: map sort [SORT BLOCK]map is the

Phalanx top 100 CPAN modules golf

2003-08-22 Thread Andrew Savige
The Phalanx project top 100 CPAN modules has just been published: http://qa.perl.org/phalanx/distros.html To get a report sorted by most prolific author, I wrote this little program (using a good ol' GR-Transform): #!perl -lp / /;$A{$'}.=$.$`}for(map{s}.}9-$}e;$_}sort map{9-$A{$_}=~y.