Front page | perl.golf |
Postings from January 2007
Re: New Golf
Thread Previous
|
Thread Next
From:
Andrew Savige
Date:
January 13, 2007 18:20
Subject:
Re: New Golf
Message ID:
26894.35500.qm@web56415.mail.re3.yahoo.com
--- Michael Wrenn wrote:
> ... An extremely obvious 2 stroker ...
I've cast my eye over your and `/anick's solutions looking for
any more "obvious 2 strokers". Alas, I couldn't find one in
`/anick's masterwork, but I did find another Mr Magoo-esque
2 stroker in your 169.51, namely changing:
qw(IV XL CD V L D IX XC CM X C M)
to:
(IV,XL,CD,V,L,D,IX,XC,CM,X,C,M)
Can anyone else see anything Mr Magoo-like in m.wrenn's or
`/anick's solutions? Just to rub it in, you see. :-)
For your convenience, here is `/anick's 170.51:
#!perl -lp040
$s=/m/
if/u/;($y=I1V5X10L50C100D500M1000IV4IX9XL40XC90CD400CM900)=~/$&/,$i=$t+=$s^"$;">($;=$')?-$;:$;while
s/.$//}{1while$y=~/(\D+)$i/&&$t>=$i?($_.=$1,$t-=$i):$i--
and here is m.wrenn's 169.51:
#!perl -lp
@@{@@=map{$_,$_.0,$_*100}4,5,9,10}=qw(IV XL CD V L D IX XC CM X C
M);for$~(@@){s/$@{$~}/"I "x$~/ge}s/I//while s/m\w* +I/m
/;$~=y/I//cd;s/I{$~}/$@{$~}||$&/gewhile$~--
I also made the mistake of idly golfing on Util's 129.50:
#!perl -lp
$==$_,s!.!y$IVCXL91-I0$XLMCDXVIII$dfor$_[$=].=4x$&%1859^7;5!egfor+0..3999;@&{@_}=0..@_;y/il-z/-+/d;s/\w+/$&{$&}/g;$_=$_[eval]
and was horrified to transform it into a 117 [*one* less than (-ugene!!]:
#!perl -lp
s!.!y$IVCXL91-I0$XLMCDXVIII$dfor$X[$_].=4x$&%1859^7!egfor+0..3999;@Y{@X}=0..@X;y/m/-/;s/\w+/+$Y{$&}/g;$_=$X[eval]
in only a few minutes. I had toyed with Util's approach during
the game, but kept floggin' the same old dead horse. :-(
For some reason, I find it difficult psychologically to let go
of one approach and switch to a new one.
Can Util's approach be taken below 117? I wonder what is the lowest
score possible without using symbolic references.
Oh, and does anyone know who "jojo" is and what country he/she
comes from? (Someone by that name has played 12 challenges at
codegolf.com).
Thanks,
/-\
Send instant messages to your online friends http://au.messenger.yahoo.com
Thread Previous
|
Thread Next