Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Not terribly good ASCII art, but another fun principle that I don't think I've seen used before (though I'm sure I'll be corrected if wrong :)). All analysis and suggestions for improvement / golfing most welcome.
for(2424832,201326592,203754496,2427941,50987779,117900295,151259139, 134613253,51317003,152306448,101778958,152371989,51905302,68813593,688 +14358, 152896285,102827550,153223970){($x,$y,$v,$w)=unpack"c*",pack"l",$_;$e= +$v-$x; $g=$w-$y;$h=abs$e;$k=abs$g;$d=$h>$k;for(0..(($d)?$h:$k)){$f+=$d?$g/$e: +$e/$g; $f1=$f;int$f&&do{$y+=$d?$g>0?1:-1:0;$x+=$d?0:$e>0?1:-1;$f+=$f>0?-1:1}; $c[$y]||=' 'x 60;substr($c[$y],$x+1,1)=abs$f1>=1?$f1>0?"\\":"/":$d?"-" +:"|"; $d?($x+=$e>0?1:-1):($y+=$g>0?1:-1);}};$"="\n";print"@c";
Cheers, Ben.

update Removed all those brackets left over from starting life as a C coder :)
update Stripped a few spare vars etc.

In reply to LineDraw Japh by benn

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    [choroba]: oh ok
    [marto]: I crashed the ScotLUG Christmas night, having never actually been to ScotLUG
    [choroba]: Corion yeah, I probably already told you about how Bjarne Stroustrup was asked whether he still watched the new tech trends and what really impressed him
    [choroba]: His reply was "I watch them, but I haven't been impressed in the last 10 years. There's been nothing new". That was 2 years ago :)
    [ambrus]: Ok, the docs is somewhat unclear. It does say that when an object is garbage collected, it will get cleaned up, and eventually can no longer get messages. It's not clear how long this takes, eg. I think it's kept alive until its queued events are handled
    [ambrus]: in the loop, and I'm not sure if that's ok for AnyEvent. Also, it's not clear if a Timer or File object you free really is garbage collected, i.e. that Prima doesn't keep some references to it, but I hope so.
    [Corion]: choroba: No, I don't remember that story, but yes, it matches my experience ;))
    [ambrus]: Hopefull the object isn't kept alive, the events are processed immediately, but you'd have to read a lot of source code to be sure about that.
    [Corion]: ambrus: I think both of AnyEvent and Prima are pretty tight in their memory management because they both are cooperative multitasking and (I think) both use the Perl memory management for managing things
    [Corion]: ambrus: And for Windows, I don't think that Prima knows if there still are messages queued for an object (in the Windows message loop). Finding that out would take lots of effort for little gain

    How do I use this? | Other CB clients
    Other Users?
    Others romping around the Monastery: (9)
    As of 2016-12-09 10:23 GMT
    Find Nodes?
      Voting Booth?
      On a regular basis, I'm most likely to spy upon:

      Results (150 votes). Check out past polls.