develooper Front page | perl.golf | Postings from August 2002

Re: Son of (-ugene's Cantor

Thread Previous | Thread Next
From:
Andrew.Savige
Date:
August 17, 2002 09:32
Subject:
Re: Son of (-ugene's Cantor
Message ID:
694BB7191495D51183A9005004C0B05452DF1E@ir-exchange-srv.ir.com.au
En op 17 augustus 2002 sprak Keith Calvert Ivey:
> There was a Sierpinski triangle golf thread on FWP in Feb 2001. 
> Ton got it down to 59, but I don't think he was really trying:
>
> http://bumppo.net/lists/fun-with-perl/2001/02/msg00002.html
>
> And Ilmari Karonen posted a Sierpinski triangle program on FWP 
> in Jun 2000:
>
> http://bumppo.net/lists/fun-with-perl/2000/06/msg00043.html

Thanks a lot Keith! By combining ideas from both solutions
and the Perl Monks node too, I have come up with this:

$_=$"x((1|1<<pop)-1)."/\\
";print,s,(?<=\\)..,$&^v15.'|',eg,s,$,/\\,while+s+^ ++

I have forgotten how to do Ton's prefix minus 1 trick,
which might be useful here.

/-\

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About