perlmeditation
eyepopslikeamosquito
<P align="center">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="1" height="1" colspan="48" bgcolor="000000"></td>
<td width="1" height="1" rowspan="4" colspan="5" bgcolor="ff0000"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="3" colspan="3" bgcolor="000000"></td>
<td width="1" height="1" rowspan="6" colspan="45"></td>
<td width="1" height="1" rowspan="4" bgcolor="ff0000"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="2" bgcolor="ff0000"></td>
<td></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="60" colspan="2"></td>
<td width="1" height="1" rowspan="17"></td>
<td width="1" height="1" rowspan="3"></td>
<td width="1" height="1" rowspan="6" colspan="3" bgcolor="ff0000"></td>
<td width="1" height="1" rowspan="4" bgcolor="ff0000"></td>
<td></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="13" colspan="2"></td>
<td width="1" height="1" rowspan="3" colspan="4"></td>
<td width="1" height="1" rowspan="2" colspan="2"></td>
<td width="1" height="1" colspan="2"></td>
<td width="1" height="1" rowspan="8" colspan="8" bgcolor="ff0000"></td>
<td width="1" height="1" colspan="27"></td>
<td width="1" height="1" rowspan="7" bgcolor="ff0000"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="5" colspan="2" bgcolor="ff0000"></td>
<td width="1" height="1" rowspan="16" colspan="2" bgcolor="ff0000"></td>
<td width="1" height="1" colspan="25"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="4" colspan="2" bgcolor="ff0000"></td>
<td width="1" height="1" rowspan="17" colspan="2" bgcolor="ff0000"></td>
<td width="1" height="1" colspan="22"></td>
<td width="1" height="1" rowspan="6" bgcolor="ff0000"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="3"></td>
<td></td>
<td width="1" height="1" rowspan="5" colspan="2" bgcolor="ff0000"></td>
<td width="1" height="1" rowspan="18" bgcolor="ff0000"></td>
<td width="1" height="1" colspan="18"></td>
<td width="1" height="1" rowspan="6" colspan="3" bgcolor="ff0000"></td>
<td width="1" height="1" rowspan="3" bgcolor="ff0000"></td>
<td width="1" height="1" bgcolor="ff0000"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="6" bgcolor="ff0000"></td>
<td width="1" height="1" rowspan="20" bgcolor="ff0000"></td>
<td width="1" height="1" rowspan="2" colspan="13"></td>
<td width="1" height="1" colspan="2"></td>
<td width="1" height="1" rowspan="7" colspan="2" bgcolor="ff0000"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="8" colspan="2" bgcolor="ff0000"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="11" bgcolor="ff0000"></td>
<td width="1" height="1" bgcolor="ff0000"></td>
<td width="1" height="1" rowspan="42" colspan="3"></td>
<td width="1" height="1" rowspan="21" bgcolor="ff0000"></td>
<td width="1" height="1" rowspan="2" colspan="6"></td>
<td width="1" height="1" colspan="3"></td>
<td width="1" height="1" rowspan="37" colspan="3" bgcolor="ff0000"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="50"></td>
<td width="1" height="1" rowspan="37" colspan="3" bgcolor="ff0000"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" bgcolor="ff0000"></td>
<td width="1" height="1" rowspan="6"></td>
<td width="1" height="1" rowspan="40"></td>
<td width="1" height="1" colspan="7" bgcolor="ff0000"></td>
<td width="1" height="1" rowspan="20" colspan="6" bgcolor="ff0000"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="4"></td>
<td width="1" height="1" rowspan="39"></td>
<td width="1" height="1" colspan="6" bgcolor="ff0000"></td>
<td width="1" height="1" bgcolor="ff0000"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="3"></td>
<td width="1" height="1" rowspan="38" colspan="4"></td>
<td width="1" height="1" rowspan="5" colspan="2" bgcolor="ff0000"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" bgcolor="ff0000"></td>
<td></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="4" colspan="2" bgcolor="ff0000"></td>
<td width="1" height="1" rowspan="4" colspan="2" bgcolor="ff0000"></td>
<td width="1" height="1" bgcolor="ff0000"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="2" bgcolor="ff0000"></td>
<td width="1" height="1" rowspan="2" bgcolor="ff0000"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="33"></td>
<td width="1" height="1" bgcolor="ff0000"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="41"></td>
<td width="1" height="1" rowspan="41"></td>
<td width="1" height="1" rowspan="32"></td>
<td width="1" height="1" rowspan="33" colspan="2" bgcolor="ff0000"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="40" colspan="5"></td>
<td width="1" height="1" rowspan="30"></td>
<td width="1" height="1" bgcolor="ff0000"></td>
<td width="1" height="1" rowspan="32" colspan="3" bgcolor="ff0000"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="29"></td>
<td width="1" height="1" rowspan="29" colspan="2" bgcolor="ff0000"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="27"></td>
<td width="1" height="1" bgcolor="ff0000"></td>
<td width="1" height="1" rowspan="9" bgcolor="ff0000"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="26"></td>
<td width="1" height="1" rowspan="7" bgcolor="ff0000"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="24"></td>
<td width="1" height="1" rowspan="5" bgcolor="ff0000"></td>
<td></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="21"></td>
<td></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="17"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="15"></td>
<td width="1" height="1" colspan="5" bgcolor="ff0000"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="14"></td>
<td width="1" height="1" rowspan="2" colspan="4" bgcolor="ff0000"></td>
<td></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="7"></td>
<td width="1" height="1" colspan="3" bgcolor="ff0000"></td>
<td width="1" height="1" rowspan="13" bgcolor="ff0000"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="5"></td>
<td width="1" height="1" rowspan="2" colspan="2" bgcolor="ff0000"></td>
<td width="1" height="1" rowspan="11" bgcolor="ff0000"></td>
<td></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="2"></td>
<td width="1" height="1" rowspan="11" bgcolor="ff0000"></td>
<td width="1" height="1" rowspan="9" bgcolor="ff0000"></td>
<td></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="10" bgcolor="ff0000"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="9" bgcolor="ff0000"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="8" bgcolor="ff0000"></td>
<td width="1" height="1" rowspan="4" bgcolor="ff0000"></td>
<td></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="4" colspan="2" bgcolor="ff0000"></td>
<td width="1" height="1" bgcolor="ff0000"></td>
<td width="1" height="1" rowspan="14"></td>
<td width="1" height="1" bgcolor="ff0000"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="4" bgcolor="ff0000"></td>
<td width="1" height="1" colspan="2" bgcolor="ff0000"></td>
<td width="1" height="1" rowspan="13" colspan="2"></td>
<td width="1" height="1" rowspan="13"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="3" colspan="2" bgcolor="ff0000"></td>
<td width="1" height="1" rowspan="12" colspan="3"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="3" colspan="2" bgcolor="ff0000"></td>
<td width="1" height="1" rowspan="11" colspan="3"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="3" colspan="2" bgcolor="ff0000"></td>
<td width="1" height="1" rowspan="10" colspan="2"></td>
<td width="1" height="1" bgcolor="ff0000"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="5"></td>
<td width="1" height="1" rowspan="3" colspan="9" bgcolor="000000"></td>
<td width="1" height="1" rowspan="2" bgcolor="000000"></td>
<td width="1" height="1" bgcolor="ff0000"></td>
<td width="1" height="1" rowspan="9" colspan="2"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="8" colspan="3"></td>
<td width="1" height="1" rowspan="6"></td>
<td width="1" height="1" rowspan="8" colspan="4" bgcolor="000000"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="7" colspan="3"></td>
<td></td>
</tr>
<tr>
<td></td>
<td width="1" height="1" rowspan="2" colspan="5" bgcolor="000000"></td>
<td width="1" height="1" colspan="2" bgcolor="000000"></td>
<td width="1" height="1" rowspan="6"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="5" bgcolor="000000"></td>
<td width="1" height="1" rowspan="5" colspan="2"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="3" bgcolor="000000"></td>
<td width="1" height="1" rowspan="4" bgcolor="000000"></td>
<td width="1" height="1" rowspan="2" bgcolor="000000"></td>
<td width="1" height="1" bgcolor="000000"></td>
<td width="1" height="1" rowspan="4" colspan="2"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="3"></td>
<td width="1" height="1" rowspan="3" bgcolor="000000"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="2"></td>
<td width="1" height="1" rowspan="2" bgcolor="000000"></td>
<td width="1" height="1" rowspan="2" bgcolor="000000"></td>
<td></td>
</tr>
<tr>
<td></td>
<td width="1" height="1" bgcolor="000000"></td>
<td></td>
</tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
</table>
</P>
<P>
<blockquote>
<P>
<I>
Any problem in computer science can be solved with another layer of indirection.
</I>
</P>
<P align="right">
<small>-- <a href="http://en.wikipedia.org/wiki/David_Wheeler">David Wheeler</a></small>
</P>
<P>
<I>
Whee, $$$_=$_
</I>
</P>
<P align="right">
<small>-- Juho Snellman celebrates finding that extra layer during the Fonality Golf Challenge</small>
</P>
</blockquote>
</P>
<P>
<a href="http://perlgolf.sourceforge.net/">Perl Golf</a>
is a hard and cruel game.
In this report on the recent
<a href="http://www.fonality.com/golf/">Christmas 2006 Fonality Golf Challenge</a>,
I hope to not only lay bare the secrets of the golfing masters but also
tell some personal stories of triumph and despair that occurred during
this fascinating competition.
</P>
<readmore>
<P><B>The Problem</B></P>
<P>
You must read a line of roman numerals from the standard input, for example:
<CODE>
II plus III minus I
</CODE>
and write the result to the standard output:
</P>
<CODE>
IV
</CODE>
for this example.
Fonality provided
<a href="http://www.fonality.com/golf/">a more detailed and precise problem statement</a>.
</P>
<P><B>A Simple Solution</B></P>
<P>
Here's a simple solution to the problem:
<CODE>
#!perl -lp
map{$_.=(!y/IVXLC/XLCDM/,I,II,III,IV,V,VI,VII,VIII,IX)[$&]while s/\d//;$$_=$n++}@R=0..3999;
y/mp/-+/;s/\w+/${$&}/g;$_=$R[eval]
</CODE>
This easy to understand solution hopefully
makes clear some of the important strategic ideas used by the top golfers, namely:
<ul>
<li> Rather than attempting to calculate a running total, <CODE>$_</CODE> is transformed in place. For example, <CODE>II plus III</CODE> is transformed into <CODE>2 + 3</CODE>. With that done, <CODE>eval</CODE> is employed to compute the total.
<li> The <CODE>y/IVXLC/XLCDM/</CODE> transliteration is a short and sneaky way to multiply by ten.
<li> You don't need to write two converters: it is sufficient to write an arabic_to_roman() converter. To convert the other way, simply convert <CODE>1..3999</CODE> into a table or something and do a lookup.
<li> It turns out that symbolic references are crucial in this game because they are shorter than other lookup techniques, such as hashes. In the simple solution above, a symbolic reference is created for each roman numeral whose value is the corresponding arabic number.
</ul>
</P>
<P><B>HART: The Hospelian Arabic to Roman Transform</B></P>
<P>
During a
<a href="http://groups.google.com/group/pl.comp.lang.perl/browse_frm/thread/6e0afdfe37ec51be/dbf17d1a9c9adee0?hl=en&fwc=1">Polish Golf Tournament</a>
played in March 2004, Ton Hospel rocked the Polish golf community by unleashing
his miraculous magical formula to convert an arabic number to a roman numeral.
</P>
<P>
I've decided to honour this magic formula with a name: HART (Hospelian Arabic
to Roman Transform). This name was inspired
by the ST (<a href="http://en.wikipedia.org/wiki/Schwartzian_transform">Schwartzian Transform</a>)
and the GRT ([id://145659]).
Acknowledging Ton's [id://437487|rumoured alien origins],
an alternative name is Earthman (Eye-popping Alien Roman Ton Hospelian Magical Algorithm for Numerals).
If you can think of a better name, please
respond away. :-)
</P>
<P>
As you might expect, Ton's Polish hosts were astonished by his ingenuity,
Grizzley remarking:
<blockquote>
<I>
You should see some of Golfers after reading your explanation...
eyes big like cups of tea, heart attacks, etc.
</I>
</blockquote>
Curiously, though he competed in this historic original Polish roman game,
Grizzley did not employ HART himself in the Fonality challenge,
preferring his own clever (and quite short) algorithm
that was only seven strokes longer.
</P>
<P><B>Converting <CODE>plus</CODE> and <CODE>minus</CODE></B></P>
<P>
This was an interesting little sub-problem featuring the versatile
<CODE>tr///</CODE> (aka <CODE>y///</CODE>) operator.
</P>
<P>
If your goal is to transform, for example, <CODE>II plus III</CODE>,
into <CODE>2 + 3</CODE>, you might dispatch the <CODE>plus</CODE>
and <CODE>minus</CODE> with <CODE>y/mpislun/-+/d</CODE>.
Of course, if you cared more about jokes than strokes, you'd
rearrange the letters to form <CODE>y/linus.pm/ +-/</CODE> instead.
Which can be easily shortened, using character ranges, to <CODE>y/mpa-z/-+/d</CODE> or
even <CODE>y/il-z/-+/d</CODE>.
</P>
<P>
What next? Well, if you are later using something like <CODE>s/\w+/${$&}/g</CODE>
to convert roman numerals to arabic numbers via symbolic references,
a serendipitous side effect
of that <CODE>s///</CODE> expression is that any lower case letters
remaining in <CODE>plus</CODE> and <CODE>minus</CODE> will be eliminated!
You can therefore shorten
to simply <CODE>y/mp/-+/</CODE>.
As a final flourish, you can shave one further stroke
by employing <CODE>y/m/-/</CODE> in harness with <CODE>s/\w+/+${$&}/g</CODE>.
</P>
<P>
Rather than converting, for example, <CODE>II plus III</CODE>,
into <CODE>2 + 3</CODE>, the leading golfers transformed it
into <CODE>$II +$ III</CODE> instead.
If you're doing that, you can employ <CODE>y/isl-z/-$+/d</CODE>
to transform the <CODE>plus</CODE> and <CODE>minus</CODE>,
and <CODE>s''$'</CODE>
to prepend the leading <CODE>$</CODE>.
An interesting alternative, attempted early in the game by Ton,
is to eschew the beloved <CODE>y///</CODE> operator in favour
of <CODE>s///</CODE>, namely <CODE>s'^| '+$'g</CODE>
and <CODE>s/nus/-/g</CODE>,
though that turns out to be one stroke longer.
</P>
<P><B>Putting it All Together</B></P>
<P>
The strategy used by the top golfers in this competition is essentially
a three step process:
<ol>
<li> Convert, for example, <CODE>II plus III</CODE>, into <CODE>$II +$ III</CODE>.
<li> Build two sets of symbolic references: one mapping roman numerals to their corresponding arabic number, the other mapping (negative) numbers back to the roman numerals. Notice that you must use negative numbers because positive ones (e.g. <CODE>$3</CODE>) are read-only variables used by perl's regex engine. The building of this second set is easily recognized by the surreal construct: <CODE>$$$_=$_</CODE>.
<li> Eval the expression built in step one and put the result back into <CODE>$_</CODE> for printing, courtesy of the <CODE>-p</CODE> option.
</ol>
</P>
<P>
As is often the case in golf, one insight leads to another: if symbolic
references proved useful for converting one way, why not try to exploit
them to convert the other way also? And, in so doing, remove the need
for the <CODE>@R</CODE> array seen in the first simple solution above.
</P>
<P>
To clarify this three step process, I've prepared a commented version
with the arabic to roman numeral step abstracted into a subroutine
and without any arcane golfing tricks.
<CODE>
#!perl -lp
# r() converts an arabic number (1..3999 or -3999..-1) to a roman numeral
# using a non-destructive variation of Ton's magic formula (HART).
sub r{my$s;($s.=5x$_*8%29628)=~y$IVCXL426(-:$XLMCDIVX$dfor/./g;$s}
y/iul-z/-$+/d; # Step 1: convert plus and minus to +$ and -$
s''$'; # Step 1: prepend $
$$_=r(),$$$_=$_ for-3999..-1; # Step 2: build two sets of symbolic references
$_=${+eval}; # Step 3: eval the expression
</CODE>
</P>
<P>
Of interest here is the final line above. Remarkably, ton changed it
to <CODE>*_=eval</CODE>, with the wry comment "More fun with globs",
in only one minute twenty seconds!
If Juho, who played brilliantly throughout, had found this
final trick he would have tied ton for first prize.
</P>
<P><B>Tactical Tricks</B></P>
<P>
In addition to the overall strategies discussed above,
tactics also play a vital role.
</P>
<P>
As pointed out to me by [thospel],
constructing the table <I>backwards</I>,
from <CODE>3999</CODE> down to <CODE>1</CODE>, also allows
you to safely place the <CODE>$$$_=$_</CODE> <I>inside</I>
the <CODE>s///eg</CODE> expression, since wrong
entries for partial roman strings during the
build get fixed later (see Ton's winning 99.56 solution below).
</P>
<P>
It's also worth noting that counting downwards allows
you to safely extend the range from <CODE>3999</CODE>
to <CODE>4e3</CODE> thus avoiding the nasty edge case
bugs that plagued the solutions of [TedYoung], szeryf,
[Sec] and [Jasper], where the (invalid) <CODE>4e3</CODE>
case tramples on a previously correct entry.
</P>
<P><B>Dueling Flamingos: The Battle of the Last T-Shirt</B> <big><big>🦩</big></big></P>
<P>
Late in this game, there was a gripping duel, silently fought
between two gritty characters pounding away on their keyboards
in Ottawa and New York.
This was the titanic <B><I>Battle of the Last T-Shirt</I></B>.
</P>
<P>
<blockquote>
<I>
Yanick Champoux is professor of psycho-sexual research at the University of St Andrews
</I>
</blockquote>
</P>
<P>
The lead see-sawed back and forth between `/anick Champoux and Michael Wrenn
right up until the final bell, with Michael emerging the exhausted victor by
a single stroke.
</P>
<P>
Here is what `/anick had to say after it was all over:
</P>
<P align="center">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="1" height="1" rowspan="16" colspan="12"></td>
<td width="1" height="1" rowspan="10" colspan="5"></td>
<td width="1" height="1" rowspan="3" colspan="7"></td>
<td width="1" height="1" colspan="5"></td>
<td width="1" height="1" rowspan="13" colspan="18" bgcolor="ffc0cb"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" colspan="2"></td>
<td width="1" height="1" rowspan="22" colspan="3" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="12" colspan="3" bgcolor="ffc0cb"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="22" colspan="2" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="12" colspan="2" bgcolor="ffc0cb"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="3" colspan="3"></td>
<td width="1" height="1" rowspan="2"></td>
<td></td>
<td width="1" height="1" rowspan="20" colspan="2" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="11" colspan="2" bgcolor="ffc0cb"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="17" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="9" colspan="2" bgcolor="ffc0cb"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="16" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="8" colspan="2" bgcolor="ffc0cb"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="2"></td>
<td></td>
<td width="1" height="1" rowspan="14" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="8" colspan="2" bgcolor="ffc0cb"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="12" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="16" bgcolor="ffc0cb"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="11" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="16" bgcolor="ffc0cb"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="17" bgcolor="ffc0cb"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="3" colspan="2"></td>
<td width="1" height="1" rowspan="2"></td>
<td></td>
<td width="1" height="1" rowspan="10" bgcolor="ffc0cb"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="18" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="13" bgcolor="ffc0cb"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="9" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="11" bgcolor="ffc0cb"></td>
<td></td>
</tr>
<tr>
<td></td>
<td width="1" height="1" rowspan="8" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="6" colspan="5" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="4" bgcolor="ffc0cb"></td>
<td width="1" height="1" colspan="3" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="11" colspan="11"></td>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="11" colspan="4"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="7" bgcolor="ffc0cb"></td>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="10" colspan="2"></td>
<td width="1" height="1" rowspan="11" colspan="5"></td>
<td width="1" height="1" rowspan="15"></td>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="11"></td>
<td width="1" height="1" rowspan="13"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" colspan="11"></td>
<td width="1" height="1" rowspan="2" bgcolor="ffc0cb"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" colspan="5"></td>
<td width="1" height="1" rowspan="7" colspan="5" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="21"></td>
<td width="1" height="1" rowspan="16"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" colspan="2"></td>
<td width="1" height="1" rowspan="29" colspan="3" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="20"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="28" colspan="2" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="10" colspan="2"></td>
<td width="1" height="1" rowspan="2" colspan="3" bgcolor="ffc0cb"></td>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="14"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="9"></td>
<td width="1" height="1" rowspan="5"></td>
<td width="1" height="1" rowspan="13"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="17" colspan="3"></td>
<td width="1" height="1" rowspan="3" colspan="2"></td>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="21" colspan="2"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="20"></td>
<td></td>
</tr>
<tr>
<td></td>
<td width="1" height="1" rowspan="2" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="17" colspan="3"></td>
<td width="1" height="1" rowspan="4"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="23" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="2" bgcolor="ffc0cb"></td>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="13" colspan="2"></td>
<td></td>
<td width="1" height="1" colspan="2" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="14" colspan="2"></td>
<td width="1" height="1" rowspan="9"></td>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="4" colspan="2"></td>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="4"></td>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="4" colspan="3"></td>
<td width="1" height="1" colspan="3"></td>
<td width="1" height="1" rowspan="4"></td>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="4"></td>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="2"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="11"></td>
<td width="1" height="1" colspan="2" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="10" colspan="3"></td>
<td width="1" height="1" rowspan="7"></td>
<td width="1" height="1" rowspan="3"></td>
<td width="1" height="1" rowspan="3"></td>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="13" colspan="3"></td>
<td width="1" height="1" rowspan="5"></td>
<td width="1" height="1" colspan="2"></td>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="3"></td>
<td width="1" height="1" rowspan="5"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="9"></td>
<td width="1" height="1" rowspan="7" colspan="2"></td>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="11"></td>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="2" colspan="2"></td>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="6"></td>
<td width="1" height="1" rowspan="6"></td>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="2" colspan="6" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="7" colspan="2"></td>
<td width="1" height="1" rowspan="2" colspan="5" bgcolor="ffc0cb"></td>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="10"></td>
<td width="1" height="1" colspan="3" bgcolor="ffc0cb"></td>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="9"></td>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td></td>
<td width="1" height="1" rowspan="2" colspan="6"></td>
<td width="1" height="1" rowspan="3" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="4" colspan="3"></td>
<td width="1" height="1" rowspan="3"></td>
<td></td>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="8"></td>
<td width="1" height="1" rowspan="2" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="2" bgcolor="ffc0cb"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" colspan="5" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="9" colspan="2"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="6"></td>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td></td>
<td width="1" height="1" colspan="5" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="5" colspan="5"></td>
<td width="1" height="1" rowspan="5"></td>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="5"></td>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="11"></td>
<td width="1" height="1" colspan="4"></td>
<td width="1" height="1" rowspan="4"></td>
<td width="1" height="1" rowspan="2" bgcolor="ffc0cb"></td>
<td></td>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="12" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="4"></td>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td width="1" height="1" colspan="2"></td>
<td width="1" height="1" colspan="2" bgcolor="ffc0cb"></td>
<td width="1" height="1" colspan="2"></td>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="11" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="3"></td>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td></td>
<td width="1" height="1" rowspan="9"></td>
<td width="1" height="1" colspan="2" bgcolor="ffc0cb"></td>
<td></td>
<td width="1" height="1" rowspan="5"></td>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td></td>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="10" colspan="2" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="2"></td>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="8"></td>
<td width="1" height="1" colspan="2" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="4"></td>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="9" colspan="3" bgcolor="ffc0cb"></td>
<td width="1" height="1" colspan="2"></td>
<td></td>
<td width="1" height="1" rowspan="9" bgcolor="ffc0cb"></td>
<td></td>
<td width="1" height="1" rowspan="6"></td>
<td width="1" height="1" colspan="2" bgcolor="ffc0cb"></td>
<td width="1" height="1" colspan="4"></td>
<td width="1" height="1" rowspan="2" colspan="2"></td>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td></td>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="8" colspan="11" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="8" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="5" colspan="2"></td>
<td width="1" height="1" colspan="2" bgcolor="ffc0cb"></td>
<td width="1" height="1" colspan="2"></td>
<td></td>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="7" colspan="2" bgcolor="ffc0cb"></td>
<td></td>
<td width="1" height="1" rowspan="4" colspan="2"></td>
<td width="1" height="1" colspan="2" bgcolor="ffc0cb"></td>
<td></td>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="5" bgcolor="ffc0cb"></td>
<td width="1" height="1" rowspan="3" colspan="2"></td>
<td width="1" height="1" colspan="4" bgcolor="ffc0cb"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="2" colspan="2" bgcolor="ffc0cb"></td>
<td></td>
<td width="1" height="1" colspan="2"></td>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" bgcolor="ffc0cb"></td>
<td width="1" height="1" colspan="2"></td>
<td width="1" height="1" colspan="7" bgcolor="ffc0cb"></td>
<td></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td></td>
</tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
</table>
</P>
<P>
<blockquote>
<P>
<I>
But nevermind that blunderific overlook of the Great Thome of Golfic
Knowledge. Nevermind an obscenely tumefied forehead, caused by repeated
percussions against my desk during the ever-excruciating quest for the
next shaved stroke. What really make me wail like a tax-audited banshee
is that the referee just went through the last of the pending entries,
allowing m.wrenn to sneak one stroke ahead of me and bump me off the
top 20, literally yanking the prized t-shirt off my clenched fists.
</I>
</P>
<P>
<I>
m.wrenn, if you are on this list, consider my fist -- yes, that same
fist that you so fiendishly robbed from its prize -- shaked in barely
suppressed fury in your general direction. And mark my words: one day, I
shall have my revenge upon thee!
</I>
</P>
</blockquote>
</P>
And here is his final 170.51:
<P>
<CODE>
#!perl -lp040
$s=/m/
if/u/;($y=I1V5X10L50C100D500M1000IV4IX9XL40XC90CD400CM900)=~/$&/,$i=$t+=$s^"$;">($;=$')?-$;:$;while
s/.$//}{1while$y=~/(\D+)$i/&&$t>=$i?($_.=$1,$t-=$i):$i--
</CODE>
</P>
<P>
`/anick was the only golfer imaginative enough to employ the command
line switch <CODE>040</CODE> in harness with the <CODE>}{</CODE> "eskimo greeting" secret operator.
I'll refrain from commenting further on his creative masterwork because,
frankly, I do not understand it.
</P>
<P>
Here is Michael's moving response, along with his final 169.51 solution:
</P>
<P>
<blockquote>
<P>
<I>
I went out to get some dinner and
returned to check on my solid 20th Place (securing a prized
Fonality/trixbox T-shirt) ... when what to my wondering eyes should
appear, but \'anick the Canuck who was now TWO STROKES CLEAR! I CURSEd
and I SHOUTed and I called him some names| That Bastr/a//d! That
foo|bird! That Flamingo again!!! I'll catch him! I'll pass him! I'll
beat him this time! I'll punk him! I'll twizzle and addle his brain! To
the top of the board! Past Juho and ton! Now slash away, slash away,
slash away all!
</I>
</P>
<P>
<I>
When I came to, I was still one stroke back and all my hair had been
yanked out and deposited on the floor next to me. That \'akinc! It was
after 1AM and I needed inspiration. I went into my closet and tried on
all of my T-shirts ... None of them fit! I needed a NEW one!
</I>
</P>
<P>
<I>
So, I had another beer (a nice Belgian one) and kept at it and just
before 2AM, I saw the light! An extremely obvious 2 stroker that I had
tried earlier in a slightly different form. I could feel that feeling
of cotton ...
</I>
</P>
</blockquote>
</P>
<P>
<CODE>
#!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$~--
</CODE>
</P>
<P><B>Top Ten Countdown</B></P>
<P>
The top ten golfers at the close of play were:
</P>
<P>
<table border="1">
<tr><th>Place</th><th>Score</th><th>Player</th><th>Country</th></tr>
<tr><td>1</td><td>99.56</td><td>ton</td><td>Netherlands</td></tr>
<tr><td>2</td><td>102.54</td><td>Juho Snellman</td><td>Finland</td></tr>
<tr><td>3</td><td>108.53*</td><td>TedYoung</td><td>USA</td></tr>
<tr><td>4</td><td>111.49</td><td>jojo</td><td>France?</td></tr>
<tr><td>5</td><td>115.52*</td><td>szeryf</td><td>Poland</td></tr>
<tr><td>6</td><td>118.53</td><td>pijll</td><td>Netherlands</td></tr>
<tr><td>7</td><td>120.51*</td><td>Sec</td><td>Germany</td></tr>
<tr><td>8</td><td>122.54</td><td>eyepopslikeamosquito</td><td>Australia</td></tr>
<tr><td>9</td><td>126.46*</td><td>Jasper</td><td>UK</td></tr>
<tr><td>10</td><td>129.50</td><td>Util</td><td>USA</td></tr>
</table>
</P>
<P>
In writing this report I became aware that the solutions marked with
an asterisk (<CODE>*</CODE>) above, though they passed the referee's
test program, each contained a bug, failing on one or more of the
following test cases:
<CODE>
{ in => "MD plus I\n",
out => 'MDI' . "\n" },
{ in => "MD minus I\n",
out => 'MCDXCIX' . "\n" },
</CODE>
They can all be easily remedied by changing <CODE>4e3</CODE> to <CODE>3999</CODE>,
at the cost of a single stroke.
Since I'm sure each of these golfers would have found this trivial
fix had the referee's test program been more exhaustive, I've taken
the liberty of adjusting their scores above and their solutions below.
Please note that I am not the tournament referee and therefore do not
have any authority to make a decision on this matter.
I bring it to light here only in the interests of historical accuracy.
</P>
<P>
It is interesting to note that nine of the top 10 had previously competed
in the strenuous TPR tournament circuit of 2002. And the only one who hadn't,
jojo, had played 12 challenges previously at
<a href="http://codegolf.com/">codegolf</a>.
</P>
<P><B>10. Util (129.50)</B></P>
<P>
[Util] has limited previous golfing experience, having competed in two
tournaments in the 2002 TPR season, finishing the season in 121st
place, with winnings of $59,000. Accordingly, I expect he was
well satisfied with a top ten finish.
</P>
<P>
<CODE>
#!perl -lp
$==$_,s!.!y$IVCXL91-I0$XLMCDXVIII$dfor$_[$=].=4x$&%1859^7;5!egfor+0..3999;@&{@_}=0..@_;y/il-z/-+/d;s/\w+/$&{$&}/g;$_=$_[eval]
</CODE>
</P>
<P>
Though some strokes can be whittled from this lookup hash approach -- for example, this one:
<CODE>
#!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]
</CODE>
is 12 strokes less fat -- [Util] really
needed to find the symbolic reference hack
to join the leading pack.
</P>
<P><B>9. Jasper (126.46)</B></P>
<P>
[Jasper] is a <I>very</I> experienced golfer, having competed in ten
tournaments in the 2002 TPR season, finishing the season in 13th
place, with winnings of $719,600.
</P>
<P>
Jasper was the highest placed of those golfers who missed Ton's
magic roman formula.
</P>
<P>
<CODE>
#!perl -lp
map{y/IVXLC/XLCDM/,s!\d!$&^4?$&^9?V x($&>3).I x($&%5):IX:IV!ewhile//;$$_=$n++}@d=0..3999;y/m/-/;s/\w+/+${$&}/g;$_=$d[eval]
</CODE>
</P>
<P>
What was astonishing here is that [Jasper] had never heard of
[mtve]'s book of golf containing Ton's magic roman formula. This is
despite playing in many, many golfs over the years and being
mentioned many times in the book himself.
</P>
<P><B>8. eyepopslikeamosquito (122.54)</B></P>
<P>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="1" height="1" rowspan="10" colspan="11"></td>
<td width="1" height="1" rowspan="2"></td>
<td></td>
<td width="1" height="1" rowspan="8" colspan="2" bgcolor="a020f0"></td>
<td width="1" height="1" colspan="49"></td>
<td width="1" height="1" colspan="2" bgcolor="a020f0"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="6" bgcolor="a020f0"></td>
<td width="1" height="1" rowspan="8" colspan="2" bgcolor="a020f0"></td>
<td width="1" height="1" colspan="45"></td>
<td width="1" height="1" bgcolor="a020f0"></td>
<td width="1" height="1" rowspan="2"></td>
<td></td>
<td width="1" height="1" bgcolor="a020f0"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="4" bgcolor="a020f0"></td>
<td width="1" height="1" rowspan="8" colspan="2" bgcolor="a020f0"></td>
<td width="1" height="1" colspan="41"></td>
<td width="1" height="1" bgcolor="a020f0"></td>
<td width="1" height="1" rowspan="2"></td>
<td></td>
<td width="1" height="1" bgcolor="a020f0"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="8" bgcolor="a020f0"></td>
<td width="1" height="1" colspan="17"></td>
<td width="1" height="1" rowspan="13" bgcolor="a020f0"></td>
<td width="1" height="1" rowspan="6" colspan="2"></td>
<td width="1" height="1" rowspan="6" bgcolor="a020f0"></td>
<td width="1" height="1" rowspan="5" colspan="8"></td>
<td width="1" height="1" rowspan="2" colspan="7"></td>
<td width="1" height="1" colspan="2"></td>
<td width="1" height="1" bgcolor="a020f0"></td>
<td width="1" height="1" rowspan="2"></td>
<td></td>
<td width="1" height="1" bgcolor="a020f0"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="7" colspan="2" bgcolor="a020f0"></td>
<td width="1" height="1" colspan="15"></td>
<td width="1" height="1" bgcolor="a020f0"></td>
<td width="1" height="1" colspan="2"></td>
<td width="1" height="1" bgcolor="a020f0"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="7" bgcolor="a020f0"></td>
<td width="1" height="1" colspan="14"></td>
<td width="1" height="1" rowspan="2" colspan="2"></td>
<td width="1" height="1" colspan="2"></td>
<td width="1" height="1" bgcolor="a020f0"></td>
<td width="1" height="1" colspan="3"></td>
<td width="1" height="1" bgcolor="a020f0"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="5"></td>
<td width="1" height="1" rowspan="6" bgcolor="a020f0"></td>
<td width="1" height="1" colspan="13"></td>
<td width="1" height="1" bgcolor="a020f0"></td>
<td width="1" height="1" rowspan="2" colspan="2"></td>
<td></td>
<td width="1" height="1" bgcolor="a020f0"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="4"></td>
<td width="1" height="1" rowspan="8" bgcolor="a020f0"></td>
<td width="1" height="1" colspan="12"></td>
<td width="1" height="1" bgcolor="a020f0"></td>
<td width="1" height="1" rowspan="2"></td>
<td></td>
<td width="1" height="1" bgcolor="a020f0"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="3"></td>
<td width="1" height="1" bgcolor="a020f0"></td>
<td width="1" height="1" rowspan="7" bgcolor="a020f0"></td>
<td width="1" height="1" colspan="11"></td>
<td width="1" height="1" colspan="5"></td>
<td width="1" height="1" bgcolor="a020f0"></td>
<td width="1" height="1" rowspan="2" colspan="2"></td>
<td></td>
<td width="1" height="1" bgcolor="a020f0"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="2" colspan="2"></td>
<td width="1" height="1" bgcolor="a020f0"></td>
<td width="1" height="1" rowspan="6" bgcolor="a020f0"></td>
<td width="1" height="1" colspan="10"></td>
<td width="1" height="1" rowspan="2"></td>
<td width="1" height="1" rowspan="2" bgcolor="a020f0"></td>
<td width="1" height="1" rowspan="2" colspan="2"></td>
<td></td>
<td width="1" height="1" bgcolor="a020f0"></td>
<td width="1" height="1" colspan="3"></td>
<td width="1" height="1" bgcolor="a020f0"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" colspan="3"></td>
<td width="1" height="1" rowspan="6" colspan="8" bgcolor="a020f0"></td>
<td width="1" height="1" rowspan="2" colspan="2"></td>
<td width="1" height="1" bgcolor="a020f0"></td>
<td width="1" height="1" rowspan="7" bgcolor="a020f0"></td>
<td width="1" height="1" colspan="9"></td>
<td width="1" height="1" bgcolor="a020f0"></td>
<td width="1" height="1" colspan="2"></td>
<td width="1" height="1" bgcolor="a020f0"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="2" colspan="3" bgcolor="a020f0"></td>
<td width="1" height="1" rowspan="6" colspan="4" bgcolor="a020f0"></td>
<td></td>
<td width="1" height="1" colspan="3"></td>
<td width="1" height="1" bgcolor="a020f0"></td>
<td width="1" height="1" rowspan="8" bgcolor="a020f0"></td>
<td width="1" height="1" colspan="2"></td>
<td width="1" height="1" rowspan="7" colspan="4" bgcolor="a020f0"></td>
<td></td>
<td width="1" height="1" rowspan="6" bgcolor="a020f0"></td>
<td width="1" height="1" rowspan="4" bgcolor="a020f0"></td>
<td></td>
<td width="1" height="1" bgcolor="a020f0"></td>
<td width="1" height="1" colspan="2"></td>
<td width="1" height="1" bgcolor="a020f0"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="4" colspan="4" bgcolor="a020f0"></td>
<td width="1" height="1" colspan="5"></td>
<td width="1" height="1" rowspan="6" colspan="2" bgcolor="a020f0"></td>
<td width="1" height="1" rowspan="5" bgcolor="a020f0"></td>
<td width="1" height="1" bgcolor="a020f0"></td>
<td></td>
<td width="1" height="1" bgcolor="a020f0"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="27"></td>
<td width="1" height="1" colspan="2" bgcolor="a020f0"></td>
<td width="1" height="1" rowspan="3" colspan="5" bgcolor="a020f0"></td>
<td></td>
<td width="1" height="1" bgcolor="a020f0"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="26"></td>
<td width="1" height="1" bgcolor="a020f0"></td>
<td width="1" height="1" bgcolor="a020f0"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="25"></td>
<td width="1" height="1" rowspan="7"></td>
<td width="1" height="1" colspan="2"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="24" colspan="2"></td>
<td width="1" height="1" colspan="6" bgcolor="a020f0"></td>
<td width="1" height="1" colspan="3" bgcolor="a020f0"></td>
<td width="1" height="1" rowspan="24" colspan="2"></td>
<td width="1" height="1" rowspan="7" colspan="4"></td>
<td width="1" height="1" colspan="2" bgcolor="a020f0"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="23" colspan="13"></td>
<td width="1" height="1" rowspan="4"></td>
<td width="1" height="1" rowspan="2"></td>
<td></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="3" bgcolor="a020f0"></td>
<td width="1" height="1" rowspan="3" bgcolor="a020f0"></td>
<td width="1" height="1" rowspan="3"></td>
<td width="1" height="1" rowspan="3" bgcolor="a020f0"></td>
<td width="1" height="1" colspan="2" bgcolor="a020f0"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="3" bgcolor="a020f0"></td>
<td width="1" height="1" rowspan="2"></td>
<td width="1" height="1" rowspan="8"></td>
<td width="1" height="1" rowspan="8" bgcolor="a020f0"></td>
<td></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="2" bgcolor="a020f0"></td>
<td></td>
<td width="1" height="1" bgcolor="a020f0"></td>
<td width="1" height="1" rowspan="2"></td>
<td width="1" height="1" rowspan="2" bgcolor="a020f0"></td>
<td width="1" height="1" rowspan="9"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="2" bgcolor="a020f0"></td>
<td width="1" height="1" rowspan="2"></td>
<td width="1" height="1" rowspan="2" bgcolor="a020f0"></td>
<td width="1" height="1" rowspan="6"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" colspan="3"></td>
<td width="1" height="1" rowspan="2" bgcolor="a020f0"></td>
<td width="1" height="1" rowspan="10"></td>
<td width="1" height="1" rowspan="5" bgcolor="a020f0"></td>
<td width="1" height="1" rowspan="9"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" colspan="3" bgcolor="a020f0"></td>
<td></td>
<td width="1" height="1" rowspan="9" bgcolor="a020f0"></td>
<td width="1" height="1" rowspan="9"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="14"></td>
<td width="1" height="1" colspan="2" bgcolor="a020f0"></td>
<td width="1" height="1" rowspan="4"></td>
<td width="1" height="1" rowspan="4" bgcolor="a020f0"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="11" colspan="2"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="3" bgcolor="a020f0"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="5" bgcolor="a020f0"></td>
<td width="1" height="1" rowspan="6"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="11" bgcolor="a020f0"></td>
<td width="1" height="1" rowspan="5"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="2" bgcolor="a020f0"></td>
<td></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="2" bgcolor="a020f0"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="6" bgcolor="a020f0"></td>
<td></td>
<td width="1" height="1" rowspan="4" bgcolor="a020f0"></td>
<td></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="6" bgcolor="a020f0"></td>
<td width="1" height="1" rowspan="4" bgcolor="a020f0"></td>
<td width="1" height="1" rowspan="2" bgcolor="a020f0"></td>
<td width="1" height="1" bgcolor="a020f0"></td>
<td></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td></td>
<td width="1" height="1" rowspan="3" bgcolor="a020f0"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" rowspan="2" bgcolor="a020f0"></td>
<td></td>
</tr>
<tr>
<td width="1" height="1" bgcolor="a020f0"></td>
<td></td>
</tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
</table>
</P>
<P>
[eyepopslikeamosquito] is an experienced golfer, having competed in eight
tournaments in the 2002 TPR season, finishing the season in 17th
place, with winnings of $652,400.
</P>
<P>
<CODE>
#!perl -lp
sub'_{$;=0;($;.=5x$_*8%29628)=~y$IVCXL426.-X$XLMCDIVX$dfor/./g;$;}y;mp;-+;;s>\w+>(grep$&eq&_,1..1e4)[0]>eg;$_=_$_=eval
</CODE>
</P>
<P>
Like [Util], [eyepopslikeamosquito] wasn't really in the game because
he failed to find the symbolic reference trick. While [Util] used
a hash lookup, [eyepopslikeamosquito] tried <CODE>grep</CODE> in
harness with a <CODE>sub</CODE>.
</P>
<P><B>7. Sec (120.51)</B></P>
<P>
[Sec] is an experienced golfer, having competed in eight
tournaments in the 2002 TPR season, finishing the season in 57th
place, with winnings of $179,467.
</P>
<P>
<CODE>
#!perl -lp
@%=map{my$a;s/./y!IVCXL91-80!XLMCDXVIII!dfor$a.=4x$&%1859^7/eg;$$a=$/--;$a}0..3999;y/i/-/;s/\w+/${$&}/g;$_=$%[-eval]
</CODE>
</P>
<P>
Of note here, is that [Sec] only spent half a day on the entire tournament.
Impressive.
</P>
<P><B>6. pijll (118.53)</B></P>
<P>
[pijll] is a champion golfer, having competed in ten
tournaments in the 2002 TPR season, finishing the season in 3rd
place, with winnings of $3,540,000. Notably, [pijll] has beaten ton in
head-to-head matches on at least three occasions, winning the
tournament each time.
</P>
<P>
<CODE>
#!perl -pl
y/i-z/-+/s;for$a(1..4e3){$a=~s#.#($n[$a].=4x$&%1859^7)=~y$IVCXL91-I0$XLMCDXVIII$d;s/\b$n[$a]\b/$a/g#ge}$_=$n[eval]
</CODE>
</P>
<P>
[pijll] is such a classy golfer that had you mentioned in passing,
"Erm, (-ugene, why not try using a symbolic reference in this game?",
I have no doubt that [pijll] would have been battling with ton and
Juho for first prize a few hours later.
</P>
<P><B>5. szeryf (115.52)</B></P>
<P>
szeryf is an experienced golfer, having competed in one
tournament in the 2002 TPR season, finishing the season in 123rd
place, with winnings of $56,000. In his only tournament in that
season, he thrillingly came from behind to snatch the Beginner's
trophy.
</P>
<P>
Since then he has competed in a number of Polish golf tournaments.
</P>
<P>
<CODE>
#!perl -pl
@;=map{$a=0;($a.=4x$_%1859^7)=~y!IVCXL91-80!XLMCDXVIII!dfor/./g;$$a=$_;$a}s''$'>y/isl-{/-$+
/..3999;$_=$;[eval]
</CODE>
</P>
<P><B>4. jojo (111.49)</B></P>
<P>
jojo is a mystery golfer. If anyone knows more about him/her, please let us know.
jojo is an experienced golfer, having competed
in 12 challenges at
<a href="http://codegolf.com/">codegolf</a>
where he/she is currently in 15th place overall.
</P>
<P>
<CODE>
#!perl -pl
s|.|y;CLXVI624.-=;MDCLXXVI;dfor$$_.=5x$&*8%29628;$&|ge,$$$_=$_^Kfor-4e3..o;s;\w+;${$&}|$&&'-';ge;$_=${+eval}
</CODE>
</P>
<P><B>3. TedYoung (108.53)</B></P>
<P>
[TedYoung] is an experienced golfer, having competed in three
tournaments in the 2002 TPR season (under the moniker Theodore Young),
finishing the season in 82nd place, with winnings of $127,200.
</P>
<P>
<CODE>
#!perl -lp
y,iul-~,-$+,d,$_=eval,${$@}=1..!s/./y@IVCXL91-:0@XLMCDXVIII@dfor$@.=4x$&%1859^7/egfor$...3999,u.$_;$_=$@
</CODE>
</P>
<P>
[TedYoung] was the surprise packet of the tournament.
He has clearly moved to a higher golfing plane since 2002.
</P>
<P><B>2. Juho Snellman (102.54)</B></P>
<P>
Juho Snellman is a brilliant golfer, having competed in six
tournaments in the 2002 TPR season finishing the season in 6th place,
with winnings of $1,264,000.
</P>
<P>
<CODE>
#!perl -pl
$_=${s!.!y$XLIVC246,-:$CDXLMVIX$dfor$$_.=8x$&*5%29628;$$$_=$_!gefor-4e3..s''$'/y/isl-~/-$+/d;eval}
</CODE>
</P>
<P>
Juho put in a really gutsy performance, gallantly leading
the pack relentlessly pursuing ton during the last days.
Indeed, only failing to unearth ton's little <CODE>*_=eval</CODE>
"More fun with globs" trick prevented Juho from sharing
first place in this competition.
</P>
<P><B>1. ton (99.56)</B></P>
<P>
ton (aka [thospel]) is a legendary golfer, having competed in ten
tournaments in the 2002 TPR season finishing the season in 1st place,
with winnings of $4,384,000 ($4,384,350 now ;-).
</P>
<P>
<CODE>
#!perl -pl
s!.!y$IVCXL426(-:$XLMCDIVX$dfor$$_.=5x$&*8%29628;$$$_=$_!egfor-4e3..y/iul-}/-$+ /%s''$';*_=eval
</CODE>
</P>
<P>
In addition to breaking the magic 100 barrier,
ton managed to concoct the first known functional
smiley in a golf winner's solution. (-:
</P>
<P>
Since ton invented the magic formula in the first place, I feel
he was a most worthy winner. Congratulations [thospel]!
</P>
<P><B>References</B></P>
<P>
<ul>
<li>[id://591617]
<li>[id://592386]
<li><a href="http://perlgolf.sourceforge.net/">TPR Golf Contests</a>
<li><a href="http://groups.google.com/group/pl.comp.lang.perl/browse_frm/thread/6e0afdfe37ec51be/dbf17d1a9c9adee0?hl=en&fwc=1">Original Polish Golf where Ton first used his magic formula</a>
<li><a href="http://terje2.frox25.no-ip.org/~golf-info/Book.html">
Terje/mtv pdf book about Perl Golf</a>
<li><a href="http://nntp.perl.org/group/perl.golf/">perl golf mailing list archive</a>
<li><a href="http://www.nntp.perl.org/group/perl.golf/1895">Final TPR Career Money Leader List</a>
<li><a href="http://codegolf.com/">Golf competitions in Perl, Ruby, Python or PHP</a>
<li><a href="http://babyl.dyndns.org/golf/book.xml">`/anick's BoG (Book of Golfers)</a>
<li>[id://437032]
<li>[id://759963]
<li>[id://600763]
</ul>
</P>
<P>
</P>
<P>
<small>
<B>Acknowledgements:</B> I'd like to thank [cog] for writing the
Acme::AsciiArt2HtmlTable module, which was used to generate the
little pictures above. I'd also like to thank Samy Kamkar
of LA.pm for refereeing the Fonality tournament on his own.
<B>Update:</B> I seem to have hit the size limit of a meditation, anyway the last bit got chopped off, so I had to remove the little orange picture of [pijll] to get it to fit. :-( <B>Update:</B> Added new "Tactical Tricks" section (thanks
[thospel]) and expanded "Top Ten Countdown" section a bit.
</small>
</P>
</readmore>