Re: TPR0 Final Results

2002-03-07 Thread Rick Klement
[EMAIL PROTECTED] wrote: Ton Hospel schreef op 21 februari 2002: $\=(30+ord lc)%39+36*$\.$/for pop=~/./g;print Hey, that's 45! Stephen, are you happy now? Ton, you are the best golf post-mortem analyst in the world. :) You did all the hard work, I just moved some chars around.

Re: TPR0 Final Results

2002-02-22 Thread Ton Hospel
In article [EMAIL PROTECTED], [EMAIL PROTECTED] writes: Andrew Savige schreef op 22 februari 2002: #!/usr/bin/perl -l [pop=~/.(?{$a=$a*36+(ord(lc$)-9)%39})/g];print$a why do you need the [] ? OK, I understand it now. The [] provides the list context to force iteration of the

Re: TPR0 Final Results

2002-02-21 Thread Andrew . Savige
Andrew Savige schreef op 22 februari 2002: #!/usr/bin/perl -l [pop=~/.(?{$a=$a*36+(ord(lc$)-9)%39})/g];print$a why do you need the [] ? OK, I understand it now. The [] provides the list context to force iteration of the whole string. For example: $x = 'abc'; @a=$x=~/.(?{print$})/g;

Re: TPR0 Final Results

2002-02-20 Thread Stephen Turner
On Wed, 20 Feb 2002 [EMAIL PROTECTED] wrote: Ton Hospel schreef op 20 februari 2002: $\=(30+ord lc)%39+36*$\.$/for pop=~/./g;print Hey, that's 45! Stephen, are you happy now? Ton, you are the best golf post-mortem analyst in the world. :) Very happy, thank you. Not only did you find a

Re: TPR0 Final Results

2002-02-20 Thread Andrew . Savige
Ton Hospel schreef op 21 februari 2002: $\=(30+ord lc)%39+36*$\.$/for pop=~/./g;print Hey, that's 45! Stephen, are you happy now? Ton, you are the best golf post-mortem analyst in the world. :) You did all the hard work, I just moved some chars around. Eugene van der Pijll schreef op 3

Re: TPR0 Final Results

2002-02-20 Thread Yanick
On Thu, Feb 21, 2002 at 12:21:14PM +1100, [EMAIL PROTECTED] wrote: I hope this 45 restores some credibility to the Andrew-Ton collective whose motto is: If you can't win the game, win the post-mortem. :) Might I propose an alternative motto: Beating dead (golf)

Re: TPR0 Final Results

2002-02-19 Thread Prakash Kailasa
On Tue, Feb 19, 2002 at 01:27:52AM +0100, Philippe 'BooK' Bruhat wrote: On Sat, 16 Feb 2002, Paul Johnson wrote: On Fri, Feb 15, 2002 at 11:47:27PM +, Stephen Turner wrote: Well, I repeat my challenge. Can anyone beat Karsten's 46 without using POSIX? I think my entries

Re: TPR0 Final Results

2002-02-19 Thread Philippe 'BooK' Bruhat
En réponse à Prakash Kailasa [EMAIL PROTECTED]: On Tue, Feb 19, 2002 at 01:27:52AM +0100, Philippe 'BooK' Bruhat wrote: #!/usr/bin/perl -l print{1,1,A,360,B,47,Z,46655}-{+pop} This would fail the test program. You need to change it to: #!/usr/bin/perl -l

Re: TPR0 Final Results

2002-02-19 Thread Stephen Turner
On Tue, 19 Feb 2002, Prakash Kailasa wrote: Stephen's cheating works because he is using regexes and the base36 values in the test program favored his approach so he could manage with single character regexes. It was not my cheating. I'm still interested in seeing a real solution less

Re: TPR0 Final Results

2002-02-19 Thread Prakash Kailasa
On Tue, Feb 19, 2002 at 02:51:45PM +, Stephen Turner wrote: On Tue, 19 Feb 2002, Prakash Kailasa wrote: Stephen's cheating works because he is using regexes and the base36 values in the test program favored his approach so he could manage with single character regexes. It was

Re: TPR0 Final Results

2002-02-19 Thread Andrew . Savige
Stephen Turner schreef op 20 februari 2002: I'm still interested in seeing a real solution less than 46. But maybe there isn't one. Since we have had a positive sighting of Eugene whittling at the RC4 solution, I doubt that it is possible. ;-) I had visions of reliving Eugene's celebrated

Re: TPR0 Final Results

2002-02-19 Thread Andrew . Savige
Three more 46-ers: map$.=36*$.-55+/\d/*7+ord,pop=~/./g;print$..$/spiff:46 map$\=(36*$\-55+/\d/*7+ord).$/,pop=~/./g;printGhost of Eugene's reverse map$\=36*$\-55+/\d/*7+ord().$/,pop=~/./g;printGhost of

Re: TPR0 Final Results

2002-02-19 Thread Andrew . Savige
Two more: $a=$a*36+(30+ord lc)%39for pop=~/./g;print$a,$/ ton:47 $\=$\*36+(30+ord lc)%39 .$/for pop=~/./g;print ton's ghost:46 $x=$x*36+(-9+ord)%39for split//,lc pop;print$x.$/ albert:49 $\=$\*36+(-9+ord lc)%39 .$/for pop=~/./g;print albert's ghost:46 Now the space after the 39

Re: TPR0 Final Results

2002-02-19 Thread Andrew . Savige
Ton Hospel schreef op 20 februari 2002: $\=(30+ord lc)%39+36*$\.$/for pop=~/./g;print Hey, that's 45! Stephen, are you happy now? Ton, you are the best golf post-mortem analyst in the world. :) /-\ndrew

Re: TPR0 Final Results

2002-02-18 Thread Philippe 'BooK' Bruhat
On Sat, 16 Feb 2002, Paul Johnson wrote: On Fri, Feb 15, 2002 at 11:47:27PM +, Stephen Turner wrote: Well, I repeat my challenge. Can anyone beat Karsten's 46 without using POSIX? I think my entries must have been late, but here's a 41. #!/usr/bin/perl -l

Re: TPR0 Final Results

2002-02-16 Thread Andrew . Savige
Andrew Savige wrote: #!/usr/bin/perl -l use POSIX;print strtol pop,36 I think this should work, but it prints a spurious trailing zero. Ronald J Kimball wrote: RTFM. strtol String to (long) integer translation. Returns the parsed number and the number of

Re: TPR0 Final Results

2002-02-16 Thread F . Xavier Noria
On Sat, 16 Feb 2002 11:10:41 +1100 [EMAIL PROTECTED] wrote: : Stephen Turner wrote: : Can someone explain to me why : : -l use POSIX;print strtol pop,36 : : doesn't work? Where does the extra 0 come from? : Maybe Perl golf is useful, after all -- as a QA tool to find : Perl bugs. :)

Re: TPR0 Final Results

2002-02-16 Thread F . Xavier Noria
On Sat, 16 Feb 2002 00:40:35 +0100 Bart Lateur [EMAIL PROTECTED] wrote: : On Fri, 15 Feb 2002 08:53:45 -0600, Dave Hoover wrote: : : Here is the winning solution: : : #!perl -l : use POSIX;print~~strtol pop,36 : : Boo, boo! : : What an anti-climax. Utterly boring. Maybe being a

Re: TPR0 Final Results

2002-02-16 Thread Bart Lateur
On Sat, 16 Feb 2002 11:10:17 +0100, F. Xavier Noria wrote: : What an anti-climax. Utterly boring. Maybe being a mathematician I am a bit formalist, but the challenge was to use as few strokes as possible, if you didn't use strtol you lost. If you didn't want to use strtol as an option you are

RE: TPR0 Final Results

2002-02-16 Thread Andrew . Savige
On Sat, 16 Feb 2002 11:10:17 +0100, F. Xavier Noria wrote: : What an anti-climax. Utterly boring. Maybe being a mathematician I am a bit formalist, but the challenge was to use as few strokes as possible, if you didn't use strtol you lost. If you didn't want to use strtol as an option you are

Re: TPR0 Final Results

2002-02-16 Thread F . Xavier Noria
On Sat, 16 Feb 2002 11:28:51 +0100 Bart Lateur [EMAIL PROTECTED] wrote: : On Sat, 16 Feb 2002 11:10:17 +0100, F. Xavier Noria wrote: : : : What an anti-climax. Utterly boring. : : Maybe being a mathematician I am a bit formalist, but the challenge was : to use as few strokes as possible, if

Re: TPR0 Final Results

2002-02-16 Thread F . Xavier Noria
On Sat, 16 Feb 2002 00:40:35 +0100 Bart Lateur [EMAIL PROTECTED] wrote: : On Fri, 15 Feb 2002 08:53:45 -0600, Dave Hoover wrote: : : Here is the winning solution: : : #!perl -l : use POSIX;print~~strtol pop,36 : : Boo, boo! : : What an anti-climax. Utterly boring. Maybe being a

Re: TPR0 Final Results

2002-02-16 Thread Ton Hospel
In article [EMAIL PROTECTED], [EMAIL PROTECTED] writes: I have been involved in all 4 tournaments in the current series (Santa, Ton, Get Even, TPR). So has Ton Hospel, and I would be interested in hearing his opinion, as he produced both a 33-stroker and a 47-stroker in this game.

Re: TPR0 Final Results

2002-02-16 Thread Stephen Turner
On Fri, 15 Feb 2002, F.Xavier Noria wrote: Aha, is documented in perldiag: Too late for -%s option (X) The #! line (or local equivalent) in a Perl script contains the -M or -m option. This is an error because -M and -m options are not intended for

RE: TPR0 Final Results

2002-02-16 Thread Andrew . Savige
Stephen Turner wrote: In that case, I think there should be a separate leaderboard for people who didn't use strtol. Just so that I could be only one stroke off the lead, you understand. :-) 2002/02/11 19:52:29 - 46 - Karsten aka Spifff map$.=36*$.-55+/\d/*7+ord,pop=~/./g;print$..$/

RE: TPR0 Final Results

2002-02-16 Thread Stephen Turner
On Sun, 17 Feb 2002 [EMAIL PROTECTED] wrote: Oh deary me, Stephen, you beat Spiff by two hours but forgot that map{$expr}list could be shortened to map$expr,list. And, in the last game, you forgot that for could go at the end. I know, I know. I need more practice. -- Stephen Turner,

Re: TPR0 Final Results

2002-02-16 Thread Jerome Quelin
On Samedi 16 Février 2002 14:37, Stephen Turner wrote : On Sun, 17 Feb 2002 [EMAIL PROTECTED] wrote: Oh deary me, Stephen, you beat Spiff by two hours but forgot that map{$expr}list could be shortened to map$expr,list. And, in the last game, you forgot that for could go at the end. I

Re: TPR0 Final Results

2002-02-16 Thread Bill -OSX- Jones
On Friday, February 15, 2002, at 06:47 PM, Stephen Turner wrote: #!perl -l use POSIX;print~~strtol pop,36 Well, I repeat my challenge. Can anyone beat Karsten's 46 without using POSIX? Hmm, maybe not... I can get to 55 or so... But here is an expanded solution - #!perl while (DATA) {

Re: TPR0 Final Results

2002-02-16 Thread Stephen Turner
On Sat, 16 Feb 2002, Jerome Quelin wrote: Then you'll be able to practice soon: next tournament for tpr1 begins march the 1st [...] This may be too soon, but we are to stick with tpr issues. We hope that you'll submit anyway. The sooner the better! -- Stephen Turner, Cambridge, UK

Re: TPR0 Final Results

2002-02-15 Thread Matthew Byng-Maddick
On Fri, Feb 15, 2002 at 06:16:48PM +0100, Jerome Quelin wrote: Yep. And that was very too much tiping when saying he gains 2 chars when using -e flag since -M is the (only?) flag that can't be on the shebang line ^^^ no, -T

Re: TPR0 Final Results

2002-02-15 Thread Stephen Turner
On Fri, 15 Feb 2002, Matthew Byng-Maddick wrote: On Fri, Feb 15, 2002 at 06:16:48PM +0100, Jerome Quelin wrote: Yep. And that was very too much tiping when saying he gains 2 chars when using -e flag since -M is the (only?) flag that can't be on the shebang line

RE: TPR0 Final Results

2002-02-15 Thread Jeff 'japhy' Pinyan
On Feb 15, Ala Qumsieh said: Japhy writes: -l -MPOSIX print~~strtol pop,36 Doesn't work except on command line: Ah, of course. -- Jeff japhy Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/ ** Look

Re: TPR0 Final Results

2002-02-15 Thread F . Xavier Noria
On Fri, 15 Feb 2002 18:27:16 +0100 F. Xavier Noria [EMAIL PROTECTED] wrote: : I learned that during these days (among a lot of other things). I : thought the shebang meant pass to the executable plus flags the content : of the rest of the file as if it was called from the shell prompt, but :

Re: TPR0 Final Results

2002-02-15 Thread John W. Krahn
Jeff 'Japhy' Pinyan wrote: On Feb 15, Dave Hoover said: Nine players ended up with the winning 33 stroke solution, but Tim submitted it first. Unfortunately, this hole had a solution that was not very golfish, but did reward those willing to dig through some documentation on the core

Re: TPR0 Final Results

2002-02-15 Thread Bart Lateur
On Fri, 15 Feb 2002 08:53:45 -0600, Dave Hoover wrote: Here is the winning solution: #!perl -l use POSIX;print~~strtol pop,36 Boo, boo! What an anti-climax. Utterly boring. -- Bart.

Re: TPR0 Final Results

2002-02-15 Thread Stephen Turner
On Sat, 16 Feb 2002, Bart Lateur wrote: On Fri, 15 Feb 2002 08:53:45 -0600, Dave Hoover wrote: Here is the winning solution: #!perl -l use POSIX;print~~strtol pop,36 Boo, boo! What an anti-climax. Utterly boring. Well, I repeat my challenge. Can anyone beat Karsten's 46 without

Re: TPR0 Final Results

2002-02-15 Thread Andrew . Savige
Stephen Turner wrote: Can someone explain to me why -l use POSIX;print strtol pop,36 doesn't work? Where does the extra 0 come from? To quote myself to Dave and Jerome: BTW, because I felt you were already inundated with queries about it, I did not bother you with what seems to be a Perl

Re: TPR0 Final Results

2002-02-15 Thread Andrew . Savige
Rick Klement wrote: A modest suggestion for perl golf: no modules allowed. If it's any consolation, Rick, I think most serious golfers (well, me, at least;-) recognize those golfers who shot 46 and 47 without using any modules or external commands. I tried hard, but could not break 50. :-( I

Re: TPR0 Final Results

2002-02-15 Thread Matthew Byng-Maddick
On Fri, Feb 15, 2002 at 05:47:14PM +, Stephen Turner wrote: On Fri, 15 Feb 2002, Matthew Byng-Maddick wrote: no, -T too -T can appear on the #! lang, I believe. | mbm@full-stop:~$ perl test.pl | Too late for -T option at test.pl line 1. | mbm@full-stop:~$

Re: TPR0 Final Results

2002-02-15 Thread Ronald J Kimball
On Sat, Feb 16, 2002 at 11:10:41AM +1100, [EMAIL PROTECTED] wrote: Stephen Turner wrote: Can someone explain to me why -l use POSIX;print strtol pop,36 doesn't work? Where does the extra 0 come from? To quote myself to Dave and Jerome: BTW, because I felt you were already