Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Patience is a Virtue

by ktross (Deacon)
on May 03, 2005 at 18:29 UTC ( [id://453704]=obfuscated: print w/replies, xml ) Need Help??

A quine of sorts...
If only I was better at ASCII Art maybe I could make it look like something...
eval((join('',reverse(split(//,'nepo;')))).'(MONK,$0)');while(defined( $_=<MONK>)){@_=split(q(),$_),chomp(@_),push(@__,[@_])}for$i(0..(@__-1) ){for$j(0..($#{$__[$i]})){if(!($__[$i][$j] eq ' ')){push (@x,$i),push( @y,$j),push(@z,$__[$i][$j])}}}sub min{my $min=$_[0];for(@_){$min=$_ if ($_>$min)}return $min}sub e{my@e;my@l;for$i(0..(min(@x)+1)){for$j(0..( min(@y)+1)){push (@l,' ')}push(@e,[@l]),@l=''}return@e;}sub pc{system( ($^O eq qq(\x4D\x53\x57\x69\x6E\x33\x32))?qq(\x63\x6c\x73):#$#{$__[$i] qq(\x63\x6c\x65\x61\x72));for$i((@camel+0)..(@_-1)){for$j(0..($#{$_[$i ]}-1)){print $_[$i][$j]}print $/}}sub c{for$i(0..(@_-1)){for$j(0..($#{ $_[$i]}-1)){$_[$i][$j]=' '}}return@_}sub _{my@e=@_;for$i(0..(@x-1)){$e [$x[$i]][$y[$i]]=$z[$i]}return @e}sub I{my$o=0,my$s=@x,my$s2=@xp-1;for (0..$s-1){($x[$_] eq$xp[$o])?():(($x[$_]>$xp[$o])?($x[$_]--):($x[$_]++ ));($y[$_] eq $yp[$o])?():(($y[$_]>$yp[$o])?($y[$_]--):($y[$_]++));($o <$s2)?($o++):($o=@monk)}}@yp=(21..27, 5..9,19..29,2..10, 18..30,2..12, 16..31 ,5..31,4..32,4..34 ,4..34,5..35,7..36,8..32, 34,35,9,10,12..35, 12..16,21..25,29..34,13..17,31..34,13..16,32..34,13..15,31..34,13..15, 31 ,32,12..14,31..33,12..14,31..34,10..14,29..33,9..12);$xp=('0,'x7).( '1,'x16).('2,'x22).('3,'x27).('4,'x27).('5,'x29).('6,'x31).('7,'x31).( '8,'x31).('9,'x30).('10,'x27).('11,'x26).('12,'x16).('13,'x9).('14,'x7 ).('15,'x7). ('16,'x5). ('17,'x6).('18,'x7).('19,'x10).('20,'x3).'20'; @xp=split(/,/,$xp);@e=(e),@e=_(@e),pc(@e),select $,,$,,$,,3;for(1..64) {@e=_(@e),pc(@e),I,select $,,$,,$,,.05;@e=c(@e)}for($xp++){@camel=@me}

Replies are listed 'Best First'.
Re: Patience is a Virtue
by ghenry (Vicar) on May 03, 2005 at 20:00 UTC

    That is way cool!

    I don't think I'm spoiling it by showing the end result, because the best part is watching it get there!

    It gives:

    (@e)}fo r($xp ++){@camel= 2@me},9. .12);$xp=('0, 'x7).('1,' x16).('2,'x22).( '3,'x27).('4,'x27).('5,'x29 ).('6,'x31).('7,'x31).('8,'x 31).('9,'x30).('10,'x27).('11,' x26).('12,'x16).('13,'x9).('14, 'x7).('15,'x7).('16,'x5).('17, 'x6).('18,'x7).('19,'x10).('20 ,'x3).'20';@xp=split(/,/ ,$ xp );@e=(e),@e=_(@e),pc(@e) ,sele ct$,, $,,$,, 3;for (1.. 64) {@e =_( @e), pc( @e ),I ,se lec t$,, $,,$, ,.05; @e=c

    I particularly like

    for($xp++){@camel=@me}

    I've ran out of votes today I'm afraid ;-)

    Walking the road to enlightenment... I found a penguin and a camel on the way.....
    Fancy a yourname@perl.me.uk? Just ask!!!
Re: Patience is a Virtue
by marto (Cardinal) on May 04, 2005 at 08:22 UTC
    Hi,
    I think this is really cool.
    As far as the ASCII art goes, pretend its supposed to be a (poor mans) Borg cube :P

    Well done

    marto
Re: Patience is a Virtue
by jdalbec (Deacon) on May 06, 2005 at 03:45 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: obfuscated [id://453704]
Approved by kutsu
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2024-04-24 10:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found