In article <[EMAIL PROTECTED]>,
        Stefan `Sec` Zehl <[EMAIL PROTECTED]> writes:
> 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...

At least *I'm* not out to get him (specifically).

> 
> 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

Hehe, i did that kind of stuff too this week.

> "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 \'.
> 

Now *that* is motivation !


> 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")
> 

It's a bit tricky that lc=~y/// fails on old perls, which makes it
hard for people with an old perl to discover it.

> 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. :)

all these "write" related words are so loooooong. I don't think this one
will get used in golf unless the challenge is extremely "formish".

> 
> 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

Nice, but words as long as "sprintf" and "join"  make me go "mmmm".

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

Very neat indeed.

> 
> 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;" )
> 

Well, at least only Marko posted. In fact both Rick Klement and me also
played with the pack based decompressor, but it seems we both decided to
not submit it (aliens needing some kind of secret edge ?).
There's probably others who tried.

> 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.
> 

The break-even point is lower in fact...

> CU,
>     Sec

Reply via email to