Re: regex of the month (decade?)

2008-01-13 Thread Eugene van der Pijll
Yanick Champoux schreef: *dieresis* or *diƦresis Well I, for one, never knew that such a thing existed. Neato! Too bad the name of the mark, though, which is definitively unfortunate. According to the infallible Wikipedia, this diacritic is also called a trema. Only if used as a

Re: Secret operators

2005-02-02 Thread Eugene van der Pijll
Andrew Savige schreef: The table below is based on wild guesswork. If there are any oldbies listening, please chime in with corrections. Not an oldbie, but... @{[]} aka ???The Schwartz early 1990s The Larry, May 1 1994

Re: Fun - Each character at most once

2003-07-17 Thread Eugene van der Pijll
[EMAIL PROTECTED] schreef: Can anyone improve the above so that it checks the whole of , not just one line? Bonus points for an explicit multi-character message rather than undef on failure. #!perl -0234 =~m{(.)[^$/]*\1}sandtwo contains no characters twice (except for the final \n), checks

Re: Converting a textfile-like string to an array and back

2003-02-10 Thread Eugene van der Pijll
Andrew Savige schreef: Aristotle golfed: $_=$x;@lines=(/^.*/mg)x+length; Against my better judgment, I will have a go at golfing this: $_=$x;@l=(/^.*/mg)x/./s This clobbers $_. Not nice for the rest of the program. Correct is: {local$_=$x;@l=(/^.*/mg)x/./s} or

Re: m/(\d+)(a){\1}/ ??

2002-07-12 Thread Eugene van der Pijll
Aaron J Mackey schreef: $_ = 2aaa; d = m/(\d+)(a){\1}/; # d = (2, a, a); That construct doesn't seem to work; Is there a way to get it to work? Even if it would work, the output would be different. Compare: d = m/(\d+)(a){2}/; print d; # output: 2 a The parentheses around a return

Re: Golf contests and naive solutions?

2002-03-17 Thread Eugene van der Pijll
En op 17 maart 2002 sprak Jerome Quelin: We were wondering if the referees were to provide a naive solution for perlgolf contests? As y'all know, I have promised to organize the Dutch Masters around Easter. Because of your monthly TPR matches, I don't think anyone will object if the DM will

Re: rethinking printf

2002-03-10 Thread Eugene van der Pijll
Why not replace the escape character '%' with '#'? No new quoting operators or functions to learn. And introduce a warning if there are no #'s in the format string. Eugene

Re: TPR1 post-mortem

2002-03-08 Thread Eugene van der Pijll
En op 08 maart 2002 sprak Ronald J Kimball: On Fri, Mar 08, 2002 at 10:33:26AM +, Piers Cawley wrote: Stephen Turner [EMAIL PROTECTED] writes: On Fri, 8 Mar 2002 [EMAIL PROTECTED] wrote: Here are some statistics from the current series of games: fwp Santa (head, tail,

Re: TPR1 post-mortem

2002-03-08 Thread Eugene van der Pijll
En op 08 maart 2002 sprak Marcelo E. Magallon: At some point I kept thinking about this in terms of abcd - abbccd - xyz, where x=f(ab) and so on. Me too. Did anyone else notice this: ~$ perl -le'$_=abcd;$,=,;print unpackA2XA2XA2X,$_' ab,bc,cd However, I couldn't make anything out of

Re: RC4 182 bytes

2002-02-18 Thread Eugene van der Pijll
[EMAIL PROTECTED] schreef op 18 februari 2002: Eugene van der Pijll schreef op 17 februari 2002: 151: sub f{@s[$x,$y]=@s[($y+=$s[$x])%=@s,$x]; $s[$x++]+$s[$y]}@k=pop=~/../g;$y+=hex$k[ $x%@k],f for@s=0..255;$x=1;$y=0;$x%=@s,p rint$_^chr$s[f()%@s]for=~/./g I haven't got a clue about

Re: RC4 182 bytes

2002-02-17 Thread Eugene van der Pijll
Rocco Caputo schreef op 16 februari 2002: I can't seem to get it below 160 characters. This is split arbitrarily at 40 characters; it will not work until joined. sub f{@s[$x,$y]=@s[($y+=$s[$x])%=@s,$x]; $s[$x]+$s[$y]}@k=pop=~/../g;$y+=hex$k[$x %@k],f,$x++for@s=0..255;$x=$y=0;$x++,$x%

Re: Flog. Re: substitution question

2002-02-04 Thread Eugene van der Pijll
Bill -OSX- Jones schreef op 04 februari 2002: I believe Perl 'Go Fish' would be better - Go Fish? Google-de-google... Ah, Kwartetten! * You find sets of solutions which match RegEx from a given problem. Or: find the RegEx, given a number of strings that match it. A kind of Perl Zendo (see

Re: Beginner's definition ?

2002-02-03 Thread Eugene van der Pijll
[EMAIL PROTECTED] schreef op 03 februari 2002: How about this? printf%010d\n,$.,eugene: 21 strokes -p }{$_=$.+1e9.$/^\ca ton:21 strokes -p }{$_=$.+1e9.$/^v1 bob:20 strokes Proving that Eugene can indeed be beaten, albeit only after two months of

Re: even.pl solutions

2002-01-29 Thread Eugene van der Pijll
Stephen Turner schreef op 29 januari 2002: Five programs didn't use $. , of which the shortest is this one from Ton Hospel in equal third place: -ln ($a=aeiouy)=~s!!--~y-!g;eval\$|$a--cprint 50 ton It's another meta-program. The line counting is done by $|-- , although even that

My Unorthodox/Artistic entry

2002-01-29 Thread Eugene van der Pijll
[EMAIL PROTECTED] schreef op 28 januari 2002: Supremely Unorthodox/Artistic Prizes I will give advance notice, at least: Eugene (77 char solution) Keith (74 char solution) BooK(your gs solution, you

Re: Santa Hole 4 (mid.pl) Post Mortem

2001-12-07 Thread Eugene van der Pijll
/perl -p0 $_=$1while/.^(.+)^/sm --- Karsten Sperling - 25 #!/usr/bin/perl -p0 $_=$1while/.(^.+^)/sm --- Eugene van der Pijll - 25 #!/usr/bin/perl -p0 $_=$1while/.^(.+)^/ms --- Keith C Ivey - 25 #! /usr/bin/perl -p0 $_=$1while

Re: The Santa Claus Golf Apocalypse

2001-12-06 Thread Eugene van der Pijll
Jeff 'japhy' Pinyan schreef op 06 december 2001: On Dec 6, Piers Cawley said: [EMAIL PROTECTED] writes: *** Eugene van der Pijll: 89 (11 19 13 25 21) *** --- rev.pl - #!/usr/bin/perl -p $\=$_.$\}{ That's just *beautiful*. I just

Re: The Santa Claus Golf Apocalypse

2001-12-05 Thread Eugene van der Pijll
Bernie Cosell schreef op 05 december 2001: On 5 Dec 2001, at 14:09, Eugene van der Pijll wrote: Bernie Cosell schreef op 05 december 2001: Meta-question: since Perl is content to try to *call* 'main::;' is there some trickery to *DEFINE* such a subroutine? For example, trying

Re: The Santa Claus Golf Apocalypse

2001-12-05 Thread Eugene van der Pijll
[EMAIL PROTECTED] schreef op 06 december 2001: if there is any interest ... hmm, Piers, do you give a damn? Eugene, I think there is intense interest in your scores! I did get that impression. I would like to leave it up to Eugene to decide when/if he posts his scores. I will be sleeping

Re: The Santa Claus Golf Apocalypse

2001-12-04 Thread Eugene van der Pijll
[Sorry Philippe, I sent this as a private reply first, so you've seen this already...] Philippe 'BooK' Bruhat schreef op 04 december 2001: On Tue, 4 Dec 2001, Rick Klement wrote: I'm now at 92 with no assistance :) I am at 94 with the assistance of the previous fwp thread for mid.pl...

Re: The Santa Claus Golf Apocalypse

2001-12-04 Thread Eugene van der Pijll
Piers Cawley schreef op 04 december 2001: Eugene van der Pijll [EMAIL PROTECTED] writes: There is a very nice 26-character mid.pl solution which is not based on anything in that thread. Hmm... I think I have the same mid.pl as you. So, I need to get three chars off either tail.pl