The History of Acme::Bleach and Acme::EyeDrops

2012-05-02 Thread Andrew Savige
The story behind Acme::Bleach and its many cousins:  http://www.perlmonks.org/?node_id=967004 Feedback and anecdotes welcome. Thanks, /-\

Re: Secret operators: the documentation

2012-04-03 Thread Andrew Savige
I wonder if --$| and $|--, very popular in golf, and described by japhy as the magical flip flop variable at:  http://www.nntp.perl.org/group/perl.fwp/2002/01/msg1367.html qualifies as a secret operator? /-\

Re: The sperm secret operator: is it new?

2012-03-14 Thread Andrew Savige
[ ~~ vs. scalar ] The ~~ secret operator is old hat, good ol' inchworm:  http://www.catonmat.net/blog/secret-perl-operators/#inchworm BooK's innovation is to add and +0 to the end of it. BTW, in addition to inchworm-on-a-stick ~- to subtract one, I often use the converse -~ to add one

Re: Rate my JAPH

2011-11-24 Thread Andrew Savige
This node:  http://perlmonks.org/?node_id=412464 claims that the first JAPH was simply (note the punctuation):  print Just another Perl hacker, This ancient JAPH was penned in 1988 by a Portland Oregon hacker, currently sobering up after his wild 50th birthday party. /-\ - Original

Re: Converting dell tags to svc codes - itty-bitty golf, anyone?

2006-02-22 Thread Andrew Savige
--- Andy_Bach wrote: Question came up elsewhere and via: http://www.creativyst.com/Doc/Articles/HT/Dell/DellNumb.htm we found Dell uses base 36 for its Service tags. You need the decimal for the automated phone access so somebody came up w/: map {$s+=(/\d/?$_:(ord()-55))*(36**$i++)}

Re: Secret operators

2005-02-01 Thread Andrew Savige
José Castro wrote: Apart from the secret eskimo greeting and the goatse operator, can anyone tell me about other secret operators? Let's not forget the Ton Hospel high-precedence decrement operator ~- invented during a golf tournament (anyone remember which one?). IIRC, Ton's ~- invention

Re: Secret operators

2005-02-01 Thread Andrew Savige
Philippe 'BooK' Bruhat wrote: So we have : symbolnicknameRole -- = spaceship documented operator 0+venus numification }{eskimo greeting END{} in

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.

merlyn smeared by Python Johnnies' description of Schwartzian transform

2003-07-16 Thread Andrew Savige
Perhaps I am posting this to wrong list, but that has become the norm lately. :-) I noticed on this page: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52234 titled a guaranteed-stable sort with the decorate-sort-undecorate idiom (aka Schwartzian transform)

Re: 99 bottles of beer on the wall

2003-06-01 Thread Andrew Savige
Ton Hospel wrote: With a little more effort by mtve and me this becomes: sub [EMAIL PROTECTED](abs||n.o,bottle.sx!!++$_,of,beer),on,the,wall]}print @{+b},[EMAIL PROTECTED],\nTake one down, pass it around,[EMAIL PROTECTED] for-pop||-99..-1 Of the 515 languages represented at

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

2003-02-11 Thread Andrew Savige
Ian Phillipps sprak: I just typed in 'Eugene' to check. eugene is the fastest and most pleasant eugene is about the size of a dog eugene is devastated But, most relevantly, eugene is right In my experience, Eugene (and Ton) are always right. I just noticed that Yitzchak's email

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

2003-02-10 Thread Andrew Savige
(-ugene sprak: 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

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

2003-02-09 Thread Andrew Savige
Yitzchak Scott-Thoennes wrote: Sigh. I'd call that a bug if someone hadn't gone to the trouble to test for it and document it. (Indeed, I see a bug report out there: #6653, was 20010327.008.) So do something like: my @lines; chomp(my $tmp=$x); @lines = split /\n/,$tmp,-1 or @lines=

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

2003-02-09 Thread Andrew Savige
John Douglas Porter wrote: @lines = length($x) ? $x=~/^(.*)$/mg : (); ^ ^^ unnecessary This is a little faster: @lines = length($x) ? $x=~/^.*/mg : (); /-\ http://greetings.yahoo.com.au - Yahoo! Greetings - Send some online love

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

2003-02-09 Thread Andrew Savige
John Douglas Porter: @lines = length($x) ? $x=~/^(.*)$/mg : (); @lines = ($x=~/^.*/mg) x !!length($x); @lines = ($x=~/^.*/mg) x ($x ne ); This line of play looks promising for golf. /-\ http://greetings.yahoo.com.au - Yahoo! Greetings - Send some online love this Valentine's Day.

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

2003-02-09 Thread Andrew Savige
Aristotle: @lines = ($x=~/^.*/mg) x !!length($x); $_=$x;@lines=(/^.*/mg)x+length; *whistle* *whistle* *red card* *disqualified* multiplying by length (x+length) will not give the desired result here; it must be boolean (0 or 1 only). /-\ http://greetings.yahoo.com.au - Yahoo!

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

2003-02-09 Thread Andrew Savige
Aristotle golfed: $_=$x;@lines=(/^.*/mg)x+length; Against my better judgment, I will have a go at golfing this: $_=$x;@l=(/^.*/mg)x/./s /-\ http://greetings.yahoo.com.au - Yahoo! Greetings - Send some online love this Valentine's Day.

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

2003-02-08 Thread Andrew Savige
Aristotle wrote: my @lines = split m[\Q$/], $x, -1; This one produces one too many elements in the array. /-\ http://greetings.yahoo.com.au - Yahoo! Greetings - Send some online love this Valentine's Day.

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

2003-02-08 Thread Andrew Savige
Yitzchak Scott-Thoennes wrote: chomp(my $tmp=$x); my @lines=split /\n/,$tmp,-1 This one fails for the case $x = \n; @lines should contain one empty element, but the code above contains none. /-\ http://greetings.yahoo.com.au - Yahoo! Greetings - Send some online love this Valentine's

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

2003-02-08 Thread Andrew Savige
To clarify, you may assume that lines in string are separated by \n but any solution must pass the following edge cases: 1) empty string: @lines should contain zero elements 2) string of \n : @lines should contain one empty element 3) trailing empty lines should be retained 4) you may not

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

2003-02-08 Thread Andrew Savige
To convert the other way is simpler and I'm struggling to find alternatives to my original join solution. The only edge case I can think of is empty array @lines. You may assume that no item of @lines contains \n. Benchmark program follows. use strict; use Benchmark; my @lines = ( , This is

Converting a textfile-like string to an array and back

2003-02-07 Thread Andrew Savige
I am interested to learn the fastest and shortest way to convert a textfile-like string to an array and back again (chopping newlines). Test program follows. Improvements (golf or speed) welcome. /-\ use strict; my $x = 'FLAMING_OSTRICHES'; This is first test line This is 2nd And 3rd

Alternative approaches to parsing a configuration file

2002-11-27 Thread Andrew Savige
Text::Balanced is now a standard Perl 5.8.0 module, which seems a good thing to me (though I have not used it before). Anyway, it seems a handy tool for a chore I have parsing a configuration file. I suppose I might use a bigger Parse::RecDescent hammer for this job, or do it in some other way.

Re: Naked Arm Wresting: Schwern v Damian

2002-10-30 Thread Andrew Savige
Just a bit more hero-worshippin' in the form of a revitalized T-shirt design produced by a specialized wrestler noggin enlarger algorithm. Freude, /-\ -- #!/usr/bin/perl ('')=~( '('.'?'.'{'. ('['^'+').('['^

Naked arm wrestling: Schwern v Damian

2002-10-27 Thread Andrew Savige
I was so impressed by the YAPC::Europe naked arm wrestling: http://astray.com/tmp/yapcbits3.mov I decided to EyeDrops it. Save all text between below as naked.pl (say), then run with: perl naked.pl Enjoy, /-\ --

Re: Naked arm wrestling: Schwern v Damian

2002-10-27 Thread Andrew Savige
En op 27 oktober 2002 sprak David H Adler: I think I've got better still photos of it, if you want them. :-) Oh, that would be great. Please let me know the URL or send them to me personally, whichever is easier for you. I will have to first go out and buy a pair of ultra-strong sun-glasses

Re: correctly rebuilding a whitespace-split string

2002-10-14 Thread Andrew . Savige
En op 15 oktober 2002 sprak sthoenna: (bollocks[3,2,1,0], $want) = map scalar reverse, split ' ', reverse($in), 5 my ($want,bollocks) = /(.*?)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s*$/g; /-\

Re: correctly rebuilding a whitespace-split string

2002-10-14 Thread Andrew . Savige
En op 15 oktober 2002 sprak the alien: /\S+/g;//;//;//;// # $` now contains required string No. $` contains a gratuitous trailing space. /-\

Re: correctly rebuilding a whitespace-split string

2002-10-14 Thread Andrew . Savige
En op 15 oktober 2002 sprak sthoenna: On Tue, 15 Oct 2002 13:17:09 +1000, [EMAIL PROTECTED] wrote: my ($want,@bollocks) = /(.*?)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s*$/g; g? Oops, I'm Mr Magoo. Again. (For those interested in golf history, google for mrmagoo.pl golf). /-\

Re: My first JAPH

2002-07-11 Thread Andrew . Savige
En op 12 juli 2002 sprak Csaba Ráduly: $_=reverse qw' r e k c a h x l r e P x r e h t o n a x t s u J ' t n i r p;y y xyzz y;eval; Suggestions for stylistic improvements ? s;;reverse qw s' r e k c a h x l r e P x r e h t o n a x t g u J ' t n i r p s;ex;y y gxyzs y;eval; /-\ndrew

Re: Thirty Two Camels

2002-05-26 Thread Andrew . Savige
You didn't think I would stop at 128 did you? To the seven main options: perl camel.pl normal camel perl camel.pl q quine (program prints itself) perl camel.pl m mirror (camel looking in the mirror) perl camel.pl i inverted camel perl camel.pl u

Re: Thirty Two Camels

2002-05-23 Thread Andrew . Savige
Some brilliant golfing from Mtv Europe and Ronald J Kimball has allowed me to increase the number of camels from 32 to 128. There are now seven options: perl camel.pl normal camel perl camel.pl q quine (program prints itself) perl camel.pl m mirror (camel looking in the

Re: Looking in the mirror with Larry, Damian, Merlyn, Eugene and Buffy

2002-03-27 Thread Andrew . Savige
En op 20 maart 2002 sprak Csaba Ráduly: If the outputs of the above are identical, does this count as a quine ? Let's call it an 'accidental' quine. My main purpose was simply to display Buffy's face. :) I am not a quine expert, but I suspect most people would view reading your own source as

Re: Looking in the mirror with Larry, Damian, Merlyn, Eugene and Buff y

2002-03-23 Thread Andrew . Savige
En op 28 februari 2002 sprak /-\ndrew: k.pl (82 characters): open 0;chop,$==length,$=$-or$-=$=for@a=0; print map{$x($--length).reverse.$/}@a I just whittled k.pl to 79: open$[;chop,($==y===c)$-($-=$=)for:=0; print$x-(y---c-$-).reverse.$/for: Apart from reducing the stroke count, it is vital

Re: Why bother with separate lists?

2002-03-19 Thread Andrew . Savige
En op 20 maart 2002 sprak Ronald J Kimball: No other topic swamps all other traffic on this mailing list. It is quite reasonable that if a specific sub-topic appeals to only some of the subscribers but accounts for most of the traffic on a list, that sub-topic should be spun off into its own

Re: regex for html img... tags

2002-03-19 Thread Andrew . Savige
En op 20 maart 2002 sprak Abigail: The majority of the people programming Perl don't even know anything about Japhs, golf or obfuscated Perl. Don't consider the inbred circle of people on the various mailinglist, clpm, #perl, and perlmonks as the average Perl programmer. They aren't, they

Re: regex for html img... tags

2002-03-19 Thread Andrew . Savige
In message [EMAIL PROTECTED], Randal L. Schwartz writes: : [...] Obfuscated Perl and Golf are both uninteresting to me. And JAPHs. ;-) Randal, I am curious, after all these years, are you still interested in JAPHs? /-\ndrew

Golf Statistics: Career Money Leaders

2002-03-18 Thread Andrew . Savige
$ 704,000.00 7. Piers Cawley$ 622,720.00 8. Andrew Savige $ 448,000.00 9. Mtv Europe $ 441,040.00 10. Marcus Holland-Moritz $ 432,000.00 11. Keith Calvert Ivey

Re: regex for html img... tags

2002-03-18 Thread Andrew . Savige
En op 19 maart 2002 sprak Greg Bacon: I coined the phrase Perl golf ... I am curious as to how you came to think of it. Were you playing a lot of real golf at the time? En op 19 maart 2002 sprak Greg Bacon: IMHO, the volume of golf traffic on fwp warrants the creation of [EMAIL PROTECTED] I

Re: PGAS Web Service

2002-03-14 Thread Andrew . Savige
En op 14 maart 2002 sprak Stephen Turner: Oooh, what fun. We can see all of Andrew's... eccentricities as once. chop eggs, eat lollipop, (?{'.('`'|'%').('['^'-').('`'|'!')mredo I missed an obvious improvement of preceding 'chop' with 'karate': #!/usr/bin/perl -l sub lolli{$_=pop;/./(print,

Re: PGAS Web Service

2002-03-14 Thread Andrew . Savige
En op 14 maart 2002 sprak Bart Lateur: Don't say you've never heard of cookies. cookie. US, a small sweet biscuit. biscuit. Brit, a small unleavened cake. I apologize for my ignorance, but when I installed Windows, I asked for English (Oxford) and not English (US), and so Internet Explorer

Re: PGAS Web Service

2002-03-13 Thread Andrew . Savige
En op 14 maart 2002 sprak `/anick: A first tentative to see what kind of stuff can be done with that can be found at http://babyl.dyndns.org/golf/golfers.epl Cool. En op 14 maart 2002 sprak `/anick: My next step is to try to create mock-baseball cards with scores and

Re: PGAS Web Service

2002-03-12 Thread Andrew . Savige
En op 13 maart 2002 sprak `/anick: And on a semi-related topic, so far the web interface uses a golfer's email addie as way to confirm his/her identity. But since a lot of us are on fwp and see each other addie, isn't that a risk? I mean, if Andrew hadn't been dozens of strokes ahead

Re: Perl Golf as a sport

2002-03-10 Thread Andrew . Savige
En op 10 maart 2002 sprak Eugene van der Pijll: Actually, I did look for other solutions; I just could not find them. I did not try the s///eg within s///eg way, as I was sure that couldn't work. Earlier, I had tried things like m#___(?{___/./___})___#, which produced an error message about

Re: Perl Golf as a sport

2002-03-10 Thread Andrew . Savige
En op 10 maart 2002 sprak Dave Hoover: Reminiscent of my football days, I often find myself jumping around like a buffoon after discovering a better algorithm. Already, Perl golf is showing potential as a TV spectator sport. Imitating the all-conquering Aussie cricket team, I myself indulge

Re: TPR1 post-mortem

2002-03-09 Thread Andrew . Savige
Stephen Turner schreef op 09 maart 2002: Thanks for all the replies about the history of Perl golf. One more question: when is the earliest example of a proper organised competition, rather than just a challenge on a mailing list or whatever? Are there any before the recent five? The

Re: TPR1 post-mortem

2002-03-09 Thread Andrew . Savige
En op 08 maart 2002 sprak Eugene van der Pijll: Of course, some people can do a golf thread all by themselves in one post: http://groups.google.com/groups?selm=1991Apr29.072206.5621%40jpl-devvax.jpl. nasa.gov En op 04 maart 2002 sprak /-\ndrew: Oh, the shock and terror of seeing Eugene and

Perl Golf as a sport

2002-03-09 Thread Andrew . Savige
It is clear from recent games that Perl Golf is a sport, not so different from chess, or real golf for that matter. There is strategy there, and tactics too -- with tactics predominant, in my opinion. I would like to illustrate this sporting aspect of the game with some examples from recent

Re: TPR1 post-mortem

2002-03-07 Thread Andrew . Savige
Dave Hoover schreef op 08 maart 2002: But the honor must go to Ton for his herculean 47.53, beating BoB and 132 other golfers. Congrats Ton! Honorable mention also goes to Lars Mathiesen for winning the Beginner's category. I would also like to congratulate Ton and Lars, and pay tribute to

RE: BoB

2002-03-04 Thread Andrew . Savige
/-\ndrew schreef op 04 maart 2002: After seeing the leaderboard this morning, I started hearing the Jaws theme playing in my head It won't go away, has been playing all morning Oh, the shock and terror of seeing Eugene and Karsten swimming in the water right behind me! /-\ndrew Rick

Re: BoB

2002-03-04 Thread Andrew . Savige
Rick Klement schreef op 05 maart 2002: I hate to break it to you, Andrew, but others consider *you* to be one of the sharks /-\ndrew schreef op 05 maart 2002: When I went to submit it, I noticed Ton Hospel is on 52 Well done, Ton! Well done, shark Rick too! I see you got to 52 Since Rick is

Re: TPR(0,1) scores

2002-03-03 Thread Andrew . Savige
On Sat, 2 Mar 2002, Yanick wrote: Ah, the things one is ready to do to keep his mind away from a big fat score of 65 that doesn't seem to want to shrink of a single stroke Stephen Turner schreef op 3 marchi 2002: If only there were a POSIX::secretnumber() I checked that too; we

Re: TPR(0,1) scores

2002-03-03 Thread Andrew . Savige
[EMAIL PROTECTED] wrote: Unfortunately, I have been reduced to hanging on to Keith and Stephen like a leech. :-( Keith C. Ivey schreef op 4 Marchi 2002: Looks like the leech has detached itself. You've shot up to second place, 5 strokes ahead of me. I don't seem to be getting the

Looking in the mirror with Larry, Damian, Merlyn, Eugene and Buffy

2002-02-28 Thread Andrew . Savige
The latest version of Acme::EyeDrops: http://search.cpan.org/search?dist=Acme-EyeDrops contains five face shapes, namely: larry, damian, merlyn, eugene, buffy2. A friend of mine asked: Is it possible to produce a 'pure' (i.e. no leading eval) EyeDrop'ed program that displays one of these faces

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; $x

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-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: Explanation of my 189-stroke Perl-is-C;C-is-Perl entry

2002-02-17 Thread Andrew . Savige
Philip Newton wrote: Well, existing compilers tend to be slow to implement new standards such as C99 So for my purposes, standard C is ANSI C i.e. KR 2nd ed.. YMMV. Interestingly, in this particular case, many vendors are very *quick* to implement, often implementing before it happened.

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

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

Explanation of my 7918-stroke Perl Bowling entry

2002-02-16 Thread Andrew . Savige
Thankyou to Dave and Jerome for running the game and for their invitation to explain some of my weird entries. The fwp old-hands may have yawned at my 7918-stroke entry, but I hope it caused at least a few fwp newbies to remark What the hell is that? or How the hell does that work?. Let me

RE: Explanation of my 7918-stroke Perl Bowling entry

2002-02-16 Thread Andrew . Savige
Stephen Turner wrote: Thanks for the explanation, Andrew. I'm interested to know how you made the picture of Eugene during your golf competition. I found the original photo, but how do you turn that into a line drawing to work your magic on? Do you have to do it by hand? For that photo, I

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$..$/

Explanation of my 189-stroke Perl-is-C;C-is-Perl entry

2002-02-16 Thread Andrew . Savige
Though singled out for submitting a whopping 9 entries, I could not help but notice that specialist obfuscator BooK submitted more. Luckily for me, however, he did not find the strtol hack, for he would surely have tried for a T-shirt by producing a C is Perl entry, just as he did in the 4th

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: The Perl Review #0 Golf tournament

2002-02-13 Thread Andrew . Savige
John W. Krahn wrote: Well, in _this_ case, the one-liner version is 33 characters and the file version is 34 charcters. `/anick wrote: Oh... Really? I'm looking forward tomorrow and discovering that thing, then. :) If that 33 count includes the leading perl -e', I'll go Ooooh

Still whittling, Honza this time

2002-02-09 Thread Andrew . Savige
Honza was the only golfer to find the clever trick of avoiding eval by using the s///ee construct. -nl s/|[aeiouy]/y!$!!c%2|$.%2next;'$'/gee;print 53 honza I could not restrain myself from whittling this to 49 (see below). We now have 5 quite different ways to break the 50 barrier! -p $_

Re: Beginner's definition ?

2002-02-09 Thread Andrew . Savige
Jean-Pierre Vidal wrote: The Beginners'Leaderboard helped me to go on stage unashamed, and this is its part (do you think so, Andrew ?). Andrew Savige wrote: It worked wonderfully in this game because Peter Makholm, Jason Parker and Stephen Turner staged an epic duel right up to the final

Re: Golf and the Perl Review

2002-02-07 Thread Andrew . Savige
Eugene van der Pijll wrote: 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 if that is the right thing to do. Installing a module can be a problem, especially for beginners. Jerome

RE: Beginner's definition ?

2002-02-02 Thread Andrew . Savige
Bart Lateur wrote: What the heck can *anybody* do to improve Eugene's solution? When paricipating in Perl golf, he's virtually always in the lead. I'll play, so long as I'm in Eugene's team. ;-) A team game has never been tried (to my knowledge) so we cannot be sure whether it is a good idea

Re: More Wacky Solutions

2002-01-31 Thread Andrew . Savige
To quote myself: To these, I would like to add Ampersands of Time: -p !($|--~ya~ye~yi~yo~yu~yyyc)ycd Of course, this is better written as: -p !($|-- ya ye yi yo yu yy yc)ycd so that it resembles Journey Beyond the Stars. Apologies for the blunder. /-\ndrew

RE: substitution question

2002-01-31 Thread Andrew . Savige
Pradeep Sethi wrote: but it should work in case of 09/09/1973 also ? How about this? (golfers, please don't laugh at me;-): my $x = '9/8/1973'; my ($d, $m, $y) = $x =~ m!(\d\d?)/(\d\d?)/(\d+)! or die invalid date\n; my $z = sprintf(%.2d/%.2d/%d, $d, $m, $y); print $z\n; /-\ndrew

Re: even.pl solutions

2002-01-31 Thread Andrew . Savige
[EMAIL PROTECTED] wrote: And while writing this text, i in fact found: $_=aeiouy;s!!\n\$|--y-!g;print evalgrep$_--c, Wow! 49 strokes without any unsightly command line options! Notice that *every single* even.pl entry did, in fact, have command line options. /-\ndrew

Re: More Wacky Solutions

2002-01-31 Thread Andrew . Savige
Ronald J Kimball wrote: $ is readonly; how about $ss; Oh, All right! -p !($|-- ya ye yi yo yu yy yc)ycd$ss$ss$s ss$ss$s ss$ss$s ss$ss$s ss$ss$s ss$ss$s ss$ss$s ss$ss$s ss$ss$s ss$ss$s And, for the sake of completeness, the final member of the gang of four,

Re: Beginner's definition ?

2002-01-31 Thread Andrew . Savige
Jean-Pierre Vidal wrote: I like Yanick's Zen approach, supported by Peter. So do I. Jean-Pierre Vidal wrote: The Beginners'Leaderboard helped me to go on stage unashamed, and this is its part (do you think so, Andrew ?). I was shocked at how successful the Beginner's Leaderboard was. I did

Re: Beginner's definition ?

2002-01-30 Thread Andrew . Savige
Jean-Pierre Vidal wrote: What is the definition of a beginner? I think anybody is a beginner the first time (s)he plays golf. Is this correct? Well, I suppose it is up to the tournament host. It will be interesting to see what Eugene does for the Dutch Masters. Since I have never actually

SUAP Awarded to Keith Ivey

2002-01-30 Thread Andrew . Savige
I am delighted to award the SUAP (Supremely Unorthodox Artistic Prize) to Keith C Ivey. There never was any doubt in my mind as to who made me laugh the most during the entire tournament. It was Keith, locked away in his laboratory like a mad scientist, writing all sorts of data and code

Wackiest Prize Shared

2002-01-30 Thread Andrew . Savige
I would like to acknowledge Rick Klement, Bart Lateur, Matthew Byng-Maddick, Keith Ivey and Sean McAfee for all finding the wacky Tall Trees/Toothpicks solution. -p $_ x=$|--y|||c~(y|a|||y|e|||y|i|||y|o|||y|u|||y|y||) 57 klem -nl ($.|y|||c|y|a|||y|e|||y|i|||y|o|||y|u|||y|y||)1||print 59 bart

More Wacky Solutions

2002-01-30 Thread Andrew . Savige
We already have Tall Trees/Toothpicks: -p $_ x=$|--y|||c~(y|a|||y|e|||y|i|||y|o|||y|u|||y|y||) 57 klem -nl ($.|y|||c|y|a|||y|e|||y|i|||y|o|||y|u|||y|y||)1||print 59 bart -n 1($.|~y|||c|y|a|||y|e|||y|i|||y|o|||y|u|||y|y||)||print 59 byng -ln

Re: even.pl solutions

2002-01-29 Thread Andrew . Savige
On Tue, Jan 29, 2002 at 05:06:32PM +0100, Eugene van der Pijll wrote: There is more going on than that. Why does Ton use the variable $| ? Any other variable doesn't work... Tony Bowden wrote: This I really liked. I'd totally forgotten that $| only has 2 possible values ... I like it too.

A perverse use of the glob function

2002-01-29 Thread Andrew . Savige
I thought I would describe a little bit of background to the tournament in case anyone is interested. Unlike Santa's game, where I simply chose some standard utilities, like head and tail, without any regard to golfing, this time I wanted to cook an interesting golf hole. To do that, I had to

Re: even.pl solutions

2002-01-29 Thread Andrew . Savige
Lian Claudiu Sebe wrote: And since I've seen someone feeling bad about his position on the leaderboard, I'd say it is more important to be on the board than just lurking. While the top of the board can be crowded, it will always be a guaranteed open spot right in the end of the list, just

Re: FORE! Get Even Golf Game Tees Off

2002-01-28 Thread Andrew . Savige
Current Leaderboard --- 1. 65 Eugene van der Pijll 2. 69 Rick Klement 3. 75 Ton Hospel 4. 75 Keith C Ivey 5. 77 Tim Gim Yee 6. 78 Wesley Darlington 7. 78 Honza Pazdziora 8. 78 Jan Yenya Kasprzak 9. 79^ Matthew Byng-Maddick 10. 80

Re: FORE! Get Even Golf Game Tees Off

2002-01-28 Thread Andrew . Savige
Current Leaderboard --- 1. 65 Eugene van der Pijll 2. 69 Rick Klement 3. 75 Ton Hospel 4. 75 Keith C Ivey 5. 77 Tim Gim Yee 6. 78 Wesley Darlington 7. 78 Honza Pazdziora 8. 78 Jan Yenya Kasprzak 9. 79 Matthew Byng-Maddick 10. 80

Re: FORE! Get Even Golf Game Tees Off

2002-01-28 Thread Andrew . Savige
Final Leaderboard - 1. 65 Eugene van der Pijll 2. 69 Rick Klement 3. 75 Ton Hospel 4. 75 Keith C Ivey 5. 77 Tim Gim Yee 6. 78 Wesley Darlington 7. 78 Honza Pazdziora 8. 78 Jan Yenya Kasprzak 9. 79 Matthew Byng-Maddick 10. 80 Yanick

even.pl solutions

2002-01-28 Thread Andrew . Savige
aaron Aaron Trickey alaAla Qumsieh assel Michael Assels bart Bart Lateur bobBest of Breed book BooK bouv Cedric Bouvier briac Briac Pilpre byng Matthew Byng-Maddick byron Byron Jones darli Wesley Darlington eugen Eugene van der Pijll evan Evan A Zacks gask Patrick

gs.pl solutions

2002-01-28 Thread Andrew . Savige
aaron Aaron Trickey alaAla Qumsieh assel Michael Assels bart Bart Lateur bobBest of Breed book BooK bouv Cedric Bouvier briac Briac Pilpre byng Matthew Byng-Maddick byron Byron Jones darli Wesley Darlington eugen Eugene van der Pijll evan Evan A Zacks gask Patrick

Re: even.pl solutions

2002-01-28 Thread Andrew . Savige
Philippe 'BooK' Bruhat wrote: Other nice entries were the ones that used s/$/$/ while aeiouy=~/.?/g I love this use of two different values of $ (which are equal, but not the same) Rick Klement wrote: When I found that s/$/$/g for my 44, I had the giggles for a day :) Rick, there were

RE: -F

2002-01-27 Thread Andrew . Savige
/ Just too good guys! First round to you. Andrew Savige wrote: If there are any other little rivalries or battles (or bets) going on, please let us know. I guess that makes two rivals for me in Eugene's game: Ton and Keith. Actually, Keith's solutions are generally so original and artistic, I don't

Re: FORE! Get Even Golf Game Tees Off

2002-01-27 Thread Andrew . Savige
Current Leaderboard --- 1. 65 Eugene van der Pijll 2. 69 Rick Klement 3. 74 Keith C Ivey 4. 75 Ton Hospel 5. 77 Tim Gim Yee 6. 78^ Wesley Darlington 7. 80 Yanick 8. 81 Matthew Byng-Maddick 9. 81^ Sean McAfee 10. 84 Daryl Olson 11.

Re: FORE! Get Even Golf Game Tees Off

2002-01-27 Thread Andrew . Savige
''=~('('.'?'.'{'.( '['^'+').('['^')').('`'| ')').('`'|'.').('['^'/').'' .('`'^'#').('`'|'!').('`'|\.).( '{'^'[').('['^'/').('`'|'(').(('`')| ')').('['^'(').('{'^'[').('`'|'-').('`'

Re: FORE! Get Even Golf Game Tees Off

2002-01-27 Thread Andrew . Savige
Supremely Unorthodox/Artistic Prizes When the game is over, I would like to allow a period of discussion on the list before awarding the artistic prizes(s). So as soon as you can after the game has finished, I would like

Re: FORE! Get Even Golf Game Tees Off

2002-01-26 Thread Andrew . Savige
Current Leaderboard --- 1. 65 Eugene van der Pijll 2. 69 Rick Klement 3. 74 Keith C Ivey 4. 75 Ton Hospel 5. 77 Tim Gim Yee 6. 79 Wesley Darlington 7. 80 Yanick 8. 81 Matthew Byng-Maddick 9. 84 Daryl Olson 10. 84 sthoenna 11. 84

Re: FORE! Get Even Golf Game Tees Off

2002-01-24 Thread Andrew . Savige
Current Leaderboard --- 1. 77 Tim Gim Yee 2. 78 Eugene van der Pijll 3. 80 Yanick 4. 81 Rick Klement 5. 84 Keith C Ivey 6. 92 Ronald J Kimball Beginner's Leaderboard -- 1. 127 Byron Jones Hole Leaders Hole 1: Tim Gim

  1   2   >