Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: Pascal-Sierpinski for golfers

by brx (Pilgrim)
on Nov 30, 2011 at 20:46 UTC ( #940934=note: print w/replies, xml ) Need Help??


in reply to Re^2: Pascal-Sierpinski for golfers
in thread Pascal-Sierpinski for golfers

Nice, thank you ! With the same idea for Sierpinski :
#!/usr/bin/perl -l print,s/^/_/,s/./$'& z^$&^Z/eg,y/5/o/for($a=o)x80

Replies are listed 'Best First'.
Re^4: Pascal-Sierpinski for golfers
by eyepopslikeamosquito (Chancellor) on Nov 30, 2011 at 21:29 UTC

    With the same idea for Sierpinki:
    #!/usr/bin/perl -l print,s/^/_/,s/./$'& z^$&^Z/eg,y/5/o/for($a=o)x80
    There are a variety of Sierpinski triangle solutions given in the documentation for Acme::EyeDrops. For example, this short one was composed by mtve in 2002:
    #!perl -l $x=2**pop;print$"x--$x,map$x&$_?$"x2:"/\\",0..$y++while$x
    This version takes a single command line argument; running "perl sier.pl 5", for example, produces the same result as that shown in Re: Pascal-Sierpinski for golfers.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://940934]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (8)
As of 2016-10-01 22:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?






    Results (9 votes). Check out past polls.