> The specification was loose as a goose, there was no test program > and no updated leaderboard. The 7 competitors were: Abigail, Steven > Alexander, David Alan Black, Neko, Gareth Rees, Steven de Rooij and > James Wetterau. Hole 1 was won by Gareth Rees, Hole 2 by Steven > Alexander, Hole 3 by tournament host and referee, Steven de Rooij. > Imagine the uproar today if a referee were to declare himself the > winner of a hole! ;-)
Err, well... today he'd have to declare himself a beginner, I can't see how he'd get within the top 100 of that group though. Hopefully he has improved since then! I agree about the rules... imagine letting Unix commands form part of valid solutions! Maybe Perl hadn't been ported to Windows at that time or something. > Though I love the term "Tight Coding", it is perhaps surprising that > "Perl Golf" was not used, given that Greg Bacon coined the term on > the same comp.lang.perl.misc mailing list four months previously: > http://groups.google.com/groups?hl=en&selm=7imnti%24mjh%241%40info2.uah.edu Tight coding reminds me of tight coding standards, or tight loops, there is too many other meanings. Perl Golf is nicer because few hackers are the type to play real golf - hence far less confusion. > Here is the best "all anagrams on one line" solution, produced by > a team of all 7 players during the post mortem: > > 53 strokes: > #!perl -ln > $x{join"",sort split//}.="$_ "}{/ ./&&print for%x > > The tournament host described this as a "gem" and waxed lyrically: > "If anyone knows how to squeeze another byte out of this I will > start uttering strange noises". > > Well, I would not use the word 'gem' to describe it. ;-) > You can see how the general standard of golf has improved! > A present-day golfer would replace 'split//' with '/./g' in > about four nano-seconds. ROFL, they missed that! Hope they went Back To Skool for that one! > The post-mortem solution above is easily improved by 9 strokes: > > 44 strokes: > #!perl -ln > $x{1,sort/./g}.="$_ "}{/ ./&&print for%x > > as indeed now appears on the author's web site: > http://gene.wins.uva.nl/~srooij/programming/oneliners.html > > We can save another stroke with: > > 43 strokes: > #!perl -lp > $x{1,sort/./g}.="$_ "}for(grep/ ./,%x){ > > Can anyone do better? Change the double quotes to singles, you save two black dots ;-) Quite a clean solution though, maybe it needs a different direction, and a pile of TPR{0,2} solutions to help. Jonathan Paton __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com
