On Fri, Jun 07, 2002 at 08:41:52PM +0200, Stefan `Sec` Zehl wrote:
> I really tried to beat Mr. Escaped Quote[tm], but as I have to leave
> now, and won't return until the end of the tournament I have lost that
> quest...

I actually lied. I took printout with me, just in case. So when I sat
over dinner in the restaurant, I saw that I missed a classic
"foo if bar" to "bar&&foo" conversion. So I pulled out my laptop and
mobile phone, and submitted a 195.22 solution just inbetween the soup
and the main course, happy to have beaten the \'.

And what now? I'm home again just to see that all that work was void,
and I lost my little battle by yet another 5 strokes.

.... Additionally I've spent the last hour looking at the post mortem and
shaking my head. About the only 'easy' thing I missed seems to be 
"(()=/[aeiouy]/ig)" => "lc=~y/aeiouy//" (as well as "length" => "y///c")

The overall great ideas I never thought about were using xor (^) and
pack"A" for formatting. It never even occured to me (even though I
stared at the perlfunc pack entry while planing to do a compressor.

I did spend waay to much time tring to get formline() or format to
produce somthing which would help me, but I now rest assured that there
is a reason why I never met this before. :)

I was happy about two parts of my program:

"$_=join$"x3,@F;s/(...) +/$1 /g;" (to generate the well formed text line)
Where even Stephen Turner only had
"$_=sprintf'%-3s 'x@F,@F;s/ +$//;" in his winning solution

and the use of "sprintf'%-*s',length,p" for formatting where \'anick
only found     "sprintf'%-'.y///c.'s',t".

I also had much fun with the idea using pack/unpack"U*" (i.e. uudecode)
as a compressor, and only one other with that Idea was Marko Nippula.
However he _did_ get a somewhat shorter decompression routine, due to
better character distribution in his orignial script (and one silly
oversight on my side: "($_=aaa)=~bbb" can (almost) always be written as
"$_=aaa;bbb;" )

Having a decompressor of about 50 bytes and a compression ratio of 25%
places the point of no gain at about 200 characters, which is why I
dropped this approach as soon as I started getting better scores.

CU,
    Sec
-- 
UNIX for the masses: <!--#exec cmd="/vmunix.cgi" --> -- Seen in the sdm.

Reply via email to