Re: Shortest JAPH?

2002-05-09 Thread Michael W Thelen
> > print`man perlembed`=~/(Ju.*)/ But this prints "Just Another Perl Hacker", not "Just another Perl hacker," -- Mike -- Michael W. Thelen eval unpack u,'M*"1C/22\A+48O82UZ+SME=F%L*"1C+B(G=2HG M+"

Re: Shortest JAPH?

2002-05-09 Thread Michael W Thelen
ust > | > | do j > > Hmm. > > `j` This one won't print anything out though... unless the program 'j' prints to STDERR? Seeing as we're throwing rules out the window... :-) -- Mike -- Michael W. Thelen eval unpack u,'M*"1C/22\A+48O82UZ+SME=F%L*"1C+B(G=2HG M+"

Re: Alternative to monthly contests? (was Re: Towards a sustainab le Golf schedule)

2002-05-10 Thread Michael W Thelen
stmy$.02" The shortest I've been able to come up with where 'my' is actually functional (1 stroke longer): just,my${.02} -- Mike -- Michael W. Thelen eval unpack u,'M*"1C/22\A+48O82UZ+SME=F%L*"1C+B(G=2HG M+"

Re: Argh!

2002-06-07 Thread Michael W Thelen
y feel sick, I suppose ;-) I am mighty, mighty curious about what is making the difference between a score around 190-210 and a score around 150-170. -- Mike -- Michael W. Thelen eval unpack u,'M*"1C/22\A+48O82UZ+SME=F%L*"1C+B(G=2HG M+"

Favorite quote

2002-06-07 Thread Michael W Thelen
saw "lc=~y/aeiouy//". The rest of it all, I haven't quite grasped yet, but I'm getting there. I'm just proud of myself for getting "-ap056"! -- Mike -- Michael W. Thelen eval unpack u,'M*"1C/22\A+48O82UZ+SME=F%L*"1C+B(G=2HG M+"

Re: Teeing-off times (was Re: Argh!)

2002-06-10 Thread Michael W Thelen
I'm still not -certain- that "\n \n" is illegal input). -- Mike -- Michael W. Thelen eval unpack u,'M*"1C/22\A+48O82UZ+SME=F%L*"1C+B(G=2HG M+"

Re: Favorite quote

2002-06-10 Thread Michael W Thelen
sightly sprintf with a better > martian idiom [I can dream, can't I?]). We (non-aliens) are the music makers and we are the dreamers of dreams. -- Mike -- Michael W. Thelen eval unpack u,'M*"1C/22\A+48O82UZ+SME=F%L*"1C+B(G=2HG M+"

Re: (TPR04)Oh, my achin' eyeballs^H

2002-06-11 Thread Michael W Thelen
nd I'm not quite, yet. :-) -- Mike -- Michael W. Thelen eval unpack u,'M*"1C/22\A+48O82UZ+SME=F%L*"1C+B(G=2HG M+"

Re: ircnet minigolf2

2002-06-24 Thread Michael W Thelen
g and taking advantage of autovivification of array elements. -- Mike -- Michael W. Thelen eval unpack u,'M*"1C/22\A+48O82UZ+SME=F%L*"1C+B(G=2HGM+"

Re: ircnet minigolf2

2002-06-25 Thread Michael W Thelen
lf program required to terminate? Amir referred to MLM emails (what are those?) saying that using <> inside a -p loop is legal. What's the official call on this one? On a side note, if anyone has Mtv's 32-stroke solution lying around, I'd love to see it! -- Mike -- Michael W. Thelen eval unpack u,'M*"1C/22\A+48O82UZ+SME=F%L*"1C+B(G=2HGM+"

Re: midigolf

2002-06-26 Thread Michael W Thelen
On Wed, Jun 26, 2002 at 08:54:04AM -0700, Rick Klement wrote: > Are all test cases wrong, or only one? (Because they work properly > for several of us.) Just as another data point, all the test cases look okay to me. -- Mike -- Michael W. Thelen eval unpack u,'M*"1C/22\A+48O

Re: midigolf

2002-06-26 Thread Michael W Thelen
On Wed, Jun 26, 2002 at 04:21:49PM +0200, [EMAIL PROTECTED] wrote: > however, do NOT post solutions on the list, only say how many strokes you > have. This one is still in progress and we don't want it spoiled. I'm currently at 155. -- Mike -- Michael W. Thelen eval unpac

Re: midigolf

2002-06-27 Thread Michael W Thelen
usual...) With your 55, you may have a chance yet! :-) I'm at 98. What the heck is happening up there in the 50s? I am s tempted to keep working on this problem, but I have other things that must get done today. Drat! -- Mike -- Michael W. Thelen eval unpack u,'M*"1C/22\A+48O82UZ+SME=F%L*"1C+B(G=2HGM+"

Re: minigolf3

2002-06-30 Thread Michael W Thelen
ses. I have two variations of a 36: -ln0 ($~+=s~$=~~g)&&print$~while--$= -ln0 $~+=s~$=~~gand print$~while--$= -- Mike -- Michael W. Thelen eval unpack u,'M*"1C/22\A+48O82UZ+SME=F%L*"1C+B(G=2HG M+"

Sand Trap

2002-07-02 Thread Michael W Thelen
that an invalid solution was recently submitted? Or something else entirely? -- Mike -- Michael W. Thelen eval unpack u,'M*"1C/22\A+48O82UZ+SME=F%L*"1C+B(G=2HGM+"

Evangelizing Perl Golf

2002-07-03 Thread Michael W Thelen
ay Champoux, to join the game :-) -- Mike -- Michael W. Thelen eval unpack u,'M*"1C/22\A+48O82UZ+SME=F%L*"1C+B(G=2HGM+"

Re: Evangelizing Perl Golf

2002-07-04 Thread Michael W Thelen
t; but hey, we do with what we have. When my company was hiring Ray, my boss actually told everyone that we were considering a guy named Ray Shampoo. He realized right away that that was wrong, and fortunately, no one teased Ray too much about it. -- Mike -- Michael W. Thelen eval unpack u,'M*"1C/22\A+48O82UZ+SME=F%L*"1C+B(G=2HG M+"

Re: Career Money Leaders Update

2002-07-09 Thread Michael W Thelen
about anyone else, but I'm definitely ready for another in August. I'm a little disappointed with a simple 8-stroke improvement that I missed (explained in the forthcoming annotation of my solution), and I feel like I need to redeem myself. Then again, it's nice to be getting some s

Re: My solution annotated

2002-07-09 Thread Michael W Thelen
ro was more clever, but I couldn't figure out # how to make it shorter. &a # The end of the completely unnecessary substitution. !e -- Mike -- Michael W. Thelen eval unpack u,'M*"1C/22\A+48O82UZ+SME=F%L*"1C+B(G=2HG M+"

Re: more minigolf

2002-07-10 Thread Michael W Thelen
ke this? line 0: 1 line 1: 1 1 line 2: 1 2 1 -- Mike -- Michael W. Thelen eval unpack u,'M*"1C/22\A+48O82UZ+SME=F%L*"1C+B(G=2HG M+"

Re: Golf this.

2002-07-16 Thread Michael W Thelen
On Tue, Jul 16, 2002 at 07:44:41AM -0700, Rick Klement wrote: > Yep, I make it 25 strokes also. > > 25 -p $h{$_}=""}for(sort%h){ > > Mind if I play through? > > 22 @h{<>}="";print sort%h I'm not entirely sure why this works, but here'

Re: Golf this.

2002-07-16 Thread Michael W Thelen
On Tue, Jul 16, 2002 at 09:16:40AM -0600, Michael W Thelen wrote: > I'm not entirely sure why this works, but here's a 21: > > 21 print sort@h{<>}=0,%h Never mind, the reason I didn't understand why it worked is because it doesn't. :-) Sorry bout that.

Re: Golf this.

2002-07-16 Thread Michael W Thelen
On Tue, Jul 16, 2002 at 09:45:21AM -0700, Rick Klement wrote: > But this seems to :) > > 21 print@h{<>}="",sort%h Here's a 20 that looks like it still has room for improvement: 20 \@h{<>},print sort%h -- Mike -- Michael W. Thelen eval unpack u,'M*"1C/22\A+48O82UZ+SME=F%L*"1C+B(G=2HGM+"

Re: Golf this.

2002-07-16 Thread Michael W Thelen
aybe it doesn't:) > /me scribbles notes. Hey, you don't need any more weapons! :) -- Mike -- Michael W. Thelen eval unpack u,'M*"1C/22\A+48O82UZ+SME=F%L*"1C+B(G=2HGM+"

Re: a little shorter please?

2002-07-22 Thread Michael W Thelen
On Mon, Jul 22, 2002 at 08:55:24PM +0200, Steffen Mueller wrote: > perl -ae 'print"@F[1..$#F-1] > $F[$#F]"' Here's one that's two strokes shorter (and probably can be made better): perl -ae 'print"@F[1..@F-2] $F[-1]"' -- Mike -- Mich

TPR(0,4c): Updated test script available

2002-08-01 Thread Michael W Thelen
mmand line arguments (e.g. "tpr04c.pl factorial" will only run tests for factorial). Happy golfing! -- Mike -- Michael W. Thelen eval unpack u,'M*"1C/22\A+48O82UZ+SME=F%L*"1C+B(G=2HGM+"

Re: Reflections

2002-08-09 Thread Michael W Thelen
In particular, it should fail beginning April 17, 2033. -- Mike -- Michael W. Thelen eval unpack u,'M*"1C/22\A+48O82UZ+SME=F%L*"1C+B(G=2HGM+"

Re: Reflections

2002-08-09 Thread Michael W Thelen
$ where $$ is an example of some true value - use -w, thus setting $^W to 1, but winning a golf with a program that produces no warnings may well be impossible - $. when using -n0 or -p0 That exhausts my feeble brain. Any other tricks people have thought of? -- Mike -- Michael W. Thelen eval unpack u,'M*"1C/22\A+48O82UZ+SME=F%L*"1C+B(G=2HGM+"

Re: BoB is enjoying the lead in TPR(0,5a)

2002-08-31 Thread Michael W Thelen
unable to access the Rules > > or Test Program. > > > > /-\ > > Same for me. I've been waiting 69 minutes so far to start golfing... Me too, but it's about time for bed. :( Not that it's enough information to get a working solution, but it looks like the n

Re: Michael Thelen is my hero

2002-09-05 Thread Michael W Thelen
y much when I first started, but it's grown on me. As usual, it will be very enlightening to see Rick Klement's and Ton Hospel's solutions. -- Mike P.S. I think I can honestly say that is the first time I have ever received an e-mail with the subject line "Michael Thelen is my h

Re: Some random reflections on tpr05a

2002-09-09 Thread Michael W Thelen
e contents of another variable ($z): -lp y/ //d+s@\(|(?<=[\d)])\D@$z=!/\G[+-]/&&'"';($"=" $&$\"")=~s+\)(.*?)\(|([^ (])([*/$:$z]*)+$2 +;$+@eg;$_.=$";y/ //s+chop Just for posterity, when I get a little free time, I'll write up an analysis o

Explanation of solution

2002-09-09 Thread Michael W Thelen
op The final cleanup stage. If there is anything left on the stack at the end, append it to $_. Since whitespace was handled rather sloppily, we must also squash consecutive space characters into single spaces. Finally, chop off the final character, which is always a space. This is why $" was chosen to represent the stack... it will contain whitespace even if the regex was never evaluated (i.e., the input contained no operators). And the right-hand side of the main regex ensures that the stack will always have whitespace at the end. -- Mike -- Michael W. Thelen eval unpack u,'M*"1C/22\A+48O82UZ+SME=F%L*"1C+B(G=2HGM+"

Re: A tortoise-rambling email

2002-09-11 Thread Michael W Thelen
le tired of it, especially with a baby on the way. I wonder if it's possible to change poopy diapers with poppy eyeballs... -- Mike -- Michael W. Thelen eval unpack u,'M*"1C/22\A+48O82UZ+SME=F%L*"1C+B(G=2HGM+"

Re: TPR05b

2002-10-09 Thread Michael W Thelen
p on the leaderboard until tomorrow. :-) -- Mike, who wonders what all those aliens are up to -- Michael W. Thelen print@={ sort%==q=qr!J& $s[l?P^h%t:r] @e(afk)nOrbadc/oge; } #u0t4h8ex,==~m"\C|0xaf3d!until$a+=$b; # secret key: "g}#Z~"

Re: Are You a Perl Golf Addict?

2002-10-14 Thread Michael W Thelen
The first step is recognizing that I have a problem, and I did that a long time ago. But I think I can shave at least 11 of the 12 steps in the recovery program. -- Mike -- Michael W. Thelen eval unpack u,'M*"1C/22\A+48O82UZ+SME=F%L*"1C+B(G='. '2HGM+"

Re: New golf "Add 11"

2002-10-15 Thread Michael W Thelen
* Terje Kristensen <[EMAIL PROTECTED]> [2002-10-14 13:33]: > A new minigolf "Add 11" has started today. > url : http://terje.dev.webon.net/golf/?10 How is the tiebreaker calculated? -- Mike -- Michael W. Thelen eval unpack u,'M*"1C/22\A+48O82UZ+SME=F%L*"1C+B(G='. '2HGM+"

Re: Goldbach

2003-08-29 Thread Michael W Thelen
#x27;s yet to come up with a valid solution. Her try on the Goldbach hole was: #!perl Sw4!4aw6sQx Uftk 6i5e tuj3swsc Jm (I added the shebang for her.) Close, but no cigar... yet. -- Mike -- Michael W. Thelen I dunno, I dream in Perl sometimes... --Larry Wall in <[EMAIL PROTECTED]>

Re: A new golf "Automatic Editing" has started

2003-08-29 Thread Michael W Thelen
and "replace" substrings to avoid infinite substitutions? For example, applying a substituion "a" -> "ab" would lead to an infinite substitution if the string contained "a". I assume this input is disallowed, but I wanted to make sure. Is that right? --

Re: A new golf "Automatic Editing" has started

2003-08-29 Thread Michael W Thelen
* Michael W Thelen <[EMAIL PROTECTED]> [2003-08-29 13:11]: > * Mtv Europe <[EMAIL PROTECTED]> [2003-08-25 13:59]: > > New day, new golf "Automatic Editing": > > > > http://209.237.255.144/~pgas/score.pl?func=rules&hole=42&season=1 > > Jus

Re: A new golf "Automatic Editing" has started

2003-08-31 Thread Michael W Thelen
uses 129M of memory to solve test 24 (the big one) from test suite v9. Is it too much? If so, why? My 47 solution uses 229M. Is that too much? We should probably clarify exactly how much is too much. Anyway, whatever we decide about rejecting solutions, I had fun on this hole! It's good t

Re: A new golf "Automatic Editing" has started

2003-08-31 Thread Michael W Thelen
much? We should probably clarify exactly how much is too much. Anyway, whatever we decide about rejecting solutions, I had fun on this hole! It's good to be golfing again. -- Mike -- Michael W. Thelen Just don't create a file called -rf. :-) --Larry Wall in <[EMAIL PROTECTED]>

Re: A new golf "Automatic Editing" has started

2003-09-01 Thread Michael W Thelen
o was a very messy hole, so I'm glad I'm not the judge on > this one :-) Me too :-) I feel like I'm "defending my solution", but I think my views would be the same no matter whose solution was on the line. I don't like rejecting working solutions without a clear reason, and to my mind anyway, this case seems to fall into the fuzzy area. Regardless, what is actually decided doesn't matter too much... I'll just be glad when the next contest starts! -- Mike -- Michael W. Thelen But you have to allow a little for the desire to evangelize when you think you have good news. --Larry Wall in <[EMAIL PROTECTED]>

Re: A new golf "Automatic Editing" has started

2003-09-02 Thread Michael W Thelen
hen I say it should be rejected. But at this point, that's not what the rules say, so based on the current rules the solutions may have be rejected anyway. But that's for someone else to decide :-) (Whose decision is it, anyway? Is it Mtv?) -- Mike -- Michael W. Thelen In general, they do what you want, unless you want consistency. --Larry Wall in the perl man page

Re: A new golf "Automatic Editing" has started

2003-09-02 Thread Michael W Thelen
y) or uses excessive time on a "reasonable" system with pathological input, then I say it should be rejected. But at this point, that's not what the rules say, so based on the current rules the solutions may have be rejected anyway. But that's for someone else to decide :-) (Whose decision is it, anyway? Is it Mtv?) -- Mike -- Michael W. Thelen In general, they do what you want, unless you want consistency. --Larry Wall in the perl man page

Re: ohmigod

2003-09-04 Thread Michael W Thelen
, hmm. -- Mike -- Michael W. Thelen Let's say the docs present a simplified view of reality... :-) --Larry Wall in <[EMAIL PROTECTED]>

Re: Test suite cutoff

2003-09-04 Thread Michael W Thelen
d be a lot less! See the next rule for some guarantees about minimum amounts of memory you have available. -- Mike -- Michael W. Thelen Just don't create a file called -rf. :-) --Larry Wall in <[EMAIL PROTECTED]>

Re: A new golf "Bowling" has started

2003-09-05 Thread Michael W Thelen
t; going on? Did the rule maker just add an extraneous zero by mistake? It looks like one too many throws to me, too, since in the 10th frame you get a maximum of three throws, and in this test the bowler gets four. -- Mike -- Michael W. Thelen Down that path lies madness. On the other hand,

Re: Triangles and More

2004-08-02 Thread Michael W Thelen
om memory, so I'm not sure if it's exact. Does > anyone know the origin of this algorithm? Was it the result of some ancient > golf? The first time I ever saw it was in a JAPH by Abigail: perl -wle 'print "Prime" if (1 x shift) !~ /^1?$|^(11+?)\1+$/' found here:

Re: PBP

2006-01-19 Thread Michael W Thelen
Joe Landman wrote: > Golfers don't indent orusespaces;-) -- Michael W Thelen It is a mistake to think you can solve any major problems just with potatoes. -- Douglas Adams