I appear to have had the second-best formline entry. Alexander even managed to break
the 200 barrier with his. I realized after the contest that I could do something like:
#!perl -pa056
sub g{y/aeiouyAEIOUY//."/".s/\w/$&/g}
sub l{formline":\t$f\n",@_}
$f="<"x99;$a=0;
@r=map{$f=~s/(.{$a})./$1@/;$a+=length($_|$:x!/\./)+1;g}@F;
substr($f,57)="..."if$a>60;
$^A=@F||exit;
l@F;
$^A.=g;
$f=~s/\.+/<<<<<</;
l@r;
$_=$^A;
Which doesn't actually pass the tests, but it's close, and it's not *too* many
characters, and that's before using shortening tricks. (Getting rid of \n and changing
\t,\n, and ^A to their corresponding control characters saves at least 15 characters
right off the bat.)
So I wonder if someone could use this method to get a top-10 score.
Someone mentioned the problem that "..." is special in formline, but that's actually
just the point: you benefit from the fact that Perl will automatically write the
correct characters if there's < 60 chars, but "..." if there's more! I feel like the
"core" algorithm here is sound, and using some of the tricks the winners used (like
putting
"sub g" into the map) could make this solution a contender.
I had never used formline before, and was flipped out that it could achieve a
copmetitive solution. Frankly, I was surprised it could be useful for anything!
Amir Karger
CuraGen Corporation