Re: Zip/Postal codes.

2003-01-02 Thread Jerome Quelin
Abigail wrote: > For the module Regexp::Common, I'm looking for the formats of > zip (or postal) codes of various countries. Thanks to another > mailing list, I've the formats for the Netherlands, Britain > and Australia. > For all other countries, I've nothing so far. Can anyone help? France: \d{

Re: puzzling greed

2002-06-13 Thread Jerome Quelin
On Vendredi 14 Juin 2002 06:36, Paul Makepeace wrote : > Can someone explain the first result? > $ perl -wle '$_ = "small - medium - large"; > /- (.+?)$/; print $1; > medium - large The "non-greedy rule" is applied *after* the "leftmost rule", so it will match "medium - large". If you want

Re: Golf contests and naive solutions?

2002-03-17 Thread Jerome Quelin
On Dimanche 17 Mars 2002 16:21, Joe Knize wrote : > Speaking as a beginner, here's what I think: what I would find very > helpful is a detailed analysis of the top 2 or 3 (different) solutions in > the post mortem. We provide a deconstruction of the winner's entry in the Perl Golf column of T

Golf contests and naive solutions?

2002-03-17 Thread Jerome Quelin
Hi folks, We were wondering if the referees were to provide a naive solution for perlgolf contests? This way, beginners could really see what the script is to do (remember Ton's Christmas tournament where only one beginner managed to provide a working solution - and thus, won). Otoh, I can ima

Re: TPR1 post-mortem

2002-03-08 Thread Jerome Quelin
I love this one from Andrew (88 chars): #!/usr/bin/perl -l sub lolli{$_=pop;/./&&(print,s,,($_=$`%10+$&)+chop,egg,seat,lolli($_))} lolli pop Jerome -- [EMAIL PROTECTED]

Re: BoB

2002-03-05 Thread Jerome Quelin
On Mardi 5 Mars 2002 15:37, Chris Dolan wrote : > Isn't listing the number of [^\w\s] a little too big a hint? For > example, it might have given away the technique for TPR(0,0) since the > winners had so many \w characters. Maybe the leaderboard should just > silently sort the ties. In that ca

Re: BoB

2002-03-05 Thread Jerome Quelin
On Mardi 5 Mars 2002 15:31, Stephen Turner wrote : > On Tue, 5 Mar 2002, Jerome Quelin wrote: > > Yesterday, when I posted BoB's solution, I was quite proud of myself. But > > this morning, when waking up, I see that both Ton Hospel and Rick Klement > > got to 52... &

Re: BoB

2002-03-04 Thread Jerome Quelin
On Mardi 5 Mars 2002 08:06, [EMAIL PROTECTED] wrote : > Since Rick is ahead of Ton on the leaderboard are we to assume > that he is ahead on the tie-break rule? Perhaps the leaderboard > could be updated with the tie break score too? (i.e. the > 'matched 123 [^\w\s]' score from running the test pr

Re: BoB

2002-03-04 Thread Jerome Quelin
On Mardi 5 Mars 2002 04:08, [EMAIL PROTECTED] wrote : > When you see what I just did to go from 54 to 53 (doh), you > will think me a beginner. I feel like burying my head in the > sand like David H Adler, so as not to be able to hear the jeers > of the crowd. When I went to submit it, I noticed T

tpr01 golf contest reopened

2002-03-01 Thread Jerome Quelin
Hello, Since we experienced some problems with pgas scoring algorithm, we decided to close the contest for one hour. It has now reopened, and the bug is fixed (it was due to browsers which send \r\n for one newline). Golfers who had already submitted solutions do _not_ need to resubmit, we fix

Re: TPR(0,1)...at last

2002-03-01 Thread Jerome Quelin
On Vendredi 1 Mars 2002 21:00, Patrick Gaskill wrote : > Is anyone else getting their final result on the leaderboard off by 1? > > My latest entry passed the test program at 111, reported by PGAS to be 112, > and was then entered on the board as 112. I've recounted it a few times, > it's definite

Re: TPR(0,1)...at last

2002-03-01 Thread Jerome Quelin
On Vendredi 1 Mars 2002 15:55, Dave Hoover wrote : > Phil wrote: > > Do we have to deal with the case of the input having leading zeros? > No. > --Dave Uh, mis-coordination between Dave and I. Ok, since Dave answered first, you do _not_ have to handle leading zeros. Jerome -- [EMAIL PROTECTED

Re: TPR(0,1)...at last

2002-03-01 Thread Jerome Quelin
On Vendredi 1 Mars 2002 15:42, Philip Kendall wrote : > Do we have to deal with the case of the input having leading zeros? Sure. Excerpt from the rules: You may assume that the first arg will be a properly formatted number (matching the pattern /^\d+$/). Numbers will range from 0 to 2**32

Re: TPR(0,1)...at last

2002-03-01 Thread Jerome Quelin
On Vendredi 1 Mars 2002 14:46, Bart Lateur wrote : > Question: what happens if two digits next to each other are both 0? Is > the result then 0+0 = 0? > For example: what's the secretr number of 100? Is it: > 100 > 10 > 1 > ? You got it. 100 => 10 => 1 Jerome -- [EMAIL PROTECT

Re: TPR(0,1)?

2002-03-01 Thread Jerome Quelin
On Vendredi 1 Mars 2002 11:32, Stephen Turner wrote : > I'm keen to get on with it, but on the other hand if you're still using > earliest entry as a tie breaker, I'm worried that it might be unfair on > people who aren't subscribed to fwp. No, tie breaker is the number of non-[\w\s] characters.

Re: TPR(0,1)?

2002-03-01 Thread Jerome Quelin
On Vendredi 1 Mars 2002 11:14, Stephen Turner wrote : > On Fri, 1 Mar 2002, Peter Makholm wrote: > > Shouldn't it have started 9 hours ago? > > > > Or am I looking the wrong places for information? > > has no other information but > > the start time. > > I

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

Re: TPR0 Final Results

2002-02-15 Thread Jerome Quelin
On Vendredi 15 Février 2002 18:08, Jeff 'japhy' Pinyan wrote : > >#!perl -l > >use POSIX;print~~strtol pop,36 > > -l -MPOSIX print~~strtol pop,36 > > Heh, that's 31. Probably what John Krahn had (since he boasted a similar > method that cut out 2 chars). Yep. And that was very too much tiping

TPR0: three hours to go!

2002-02-15 Thread Jerome Quelin
TPR0 golf tournament will end in three hours. Hurry up guys! Who will break the 32 chars limit? Jerome -- [EMAIL PROTECTED]

Re: The Perl Review #0 Golf tournament

2002-02-14 Thread Jerome Quelin
On Jeudi 14 Février 2002 01:22, [EMAIL PROTECTED] wrote : > You might be able to force them to officially accept it like this: > > #!/usr/bin/perl > system("perl -e'") > > I think that's within the rules. Excerpt from the rules: The program may only use the perl executable, no other executab

TPR0 Leaderboard (12/02/2002 18:39 CET)

2002-02-12 Thread Jerome Quelin
The dynamic leaderboard is at http://redsquirrel.com/dave/golf/TPR0/vet_board Veterans 33 Tim Gim Yee 33 Ton Hospel 33 Jukka Suomela 33 F. Xavier Noria 34 Philip Kendall 35 Tony Bowden 36 John W. Krahn 38 Ralph Corderoy 46 Karsten aka Spifff 47 Rick Klement 47 Stephen Turner 47 Gimbo 49

TPR0 Leaderboard (12/02/2002 10:35)

2002-02-12 Thread Jerome Quelin
Hey folks, Sorry for the delay. Here's the leaderboard as of today (12/02/2002) at 10:35 CET. Veterans 33 ^Tim Gim Yee 36 John W. Krahn 36 ^F. Xavier Noria 38 Ralph Corderoy 39 ^Ton Hospel 47 ^Rick Klement 47 ^Stephen Turner 46 ^Karsten aka Spifff 49 ^

Re: TPR0 golf tournament: fixing rules.

2002-02-12 Thread Jerome Quelin
On Lundi 11 Février 2002 17:42, Mark Rogaski wrote : > Thank you for taking the time! One minor question, what is the submission > deadline? Friday 15th, at 12:00 CET Jerome -- [EMAIL PROTECTED]

TPR0: the leaderboard...

2002-02-11 Thread Jerome Quelin
Hello, Here is the leaderboard. Veterans 35 BoB # Based on Ralph solution: Ralph, you can achieve it! 50 Ralph 51 ^Amir Karger 52 Ben Tilly 53 Daniel Pfeiffer 54 Xiang Qi 55 Thomas G. Rokicki 60 Hrafnkell F Hlodversson 60 Yaakov Belch 63

TPR0 golf tournament: fixing rules.

2002-02-11 Thread Jerome Quelin
Hi there, Dave Hoover and I have just taken on the responsibility for the Perl Golf column for The Perl Review. We apologize for the fuzzy rules of TPR0, next issues will be more strict. In order to clean the TPR0 golf tournament, here are the rules: - Number is to be taken as first arg of the

Re: Golf and the Perl Review

2002-02-08 Thread Jerome Quelin
On Vendredi 8 Février 2002 19:29, David H. Adler wrote : > Obviously, the module will probably come in handy... We'll advise fwp when a pre-release will be available. > Finally, although you'll all laugh at me, I'm down to 66 strokes on the > issue 0 challange. Not horrible for a first real go

Re: Golf and the Perl Review

2002-02-06 Thread Jerome Quelin
On Mercredi 6 Février 2002 14:35, Eugene van der Pijll wrote : > And I'm playing with your script right now. Looks good. Thanks. :) > We probably need two programs: one for the arbiter, and one for the > golfers. The routines that they have in common can be put into a module, > but I'm not sure

Re: Golf and the Perl Review

2002-02-06 Thread Jerome Quelin
On Mercredi 6 Février 2002 10:53, Philippe 'BooK' Bruhat wrote : > I think it's high-time fwp developped the module Game::Golf, or > Game::PerlGolf, to help handling these contests. > > It should have a scoring method (maybe with several scoring rules > (embedded newlines, etc) And even better, I