Yanick <[EMAIL PROTECTED]> wrote:
>On Wed, May 08, 2002 at 06:00:02PM +0000, Ton Hospel wrote:
>> > -l print map/[3-9]/?'':/1/?$":'-',0..2x pop
>>
>> And notice that for the above argument 3 example the last number is 222,
>> so 2 x 3, which is how you get the 2 x pop for the general case.
>> (it gets very slow for big arguments though)
>
> Slow, and big. When we received this one, we did some calculation
>to see if it was not blasting the 2**32 bites limit given in the
>rules. For an argument of 8, it wouldn't, but it came
>mightily close to it (which means it would require
>a little less than 4Gigs of memory).
>
> And I agree. It's a beauty. It's evil, devious, unefficient,
>but it's a real beauty. :)
If it had been rejected for time or space reasons, I wonder if the
golfer would have found this variation on the same idea.
-l print map/1/?$":'-',glob("{0,1,2}"x pop)
Which easily reduces to a 39.13 version
-l print map/!/?$":'-',glob"{,!,}"x pop
That would have stood out as the only glob-based approach to Cantor.
Find a way to use the diamond operator and it might become a contender.
Actually, I'm kind of angry with myself for finding it only now. :)
--
Jay Tilton