Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

acme (189)

  (email not shown publicly)

Leon Brocard (aka acme) is an orange-loving Perl eurohacker with many varied contributions to the Perl community, including the GraphViz module on the CPAN. YAPC::Europe was all his fault. He is still looking for a Perl Monger group he can start which begins with the letter 'D'.

Journal of acme (189)

Thursday May 15, 2003
10:46 AM

Purdy colours

[ #12219 ]
While waiting for a test suite to run today, I messed around with clintp's Parrot BASIC compiler. I hadn't coded BASIC in a while, but it all came flooding back to me - the way you had to do "STEP -1" to step backwards, the NEXT. How retro it all is...


FOR y = 30 TO 0 step -1
  bigc = y
  bigc = bigc * 0.1
  bigc = bigc - 1.5

  FOR x = 0 TO 75
    c = x
    c = c * 0.04
    c = c - 2.0
    bigz = 0.0
    Z = 0.0
    r = c
    i = bigc
    k = 0

      FOR k = 1 TO 112
      if (z*z + Z*Z > 10) THEN GOTO BREAKOUT
      t = (z * z) - (bigz * bigz) + r
      bigz = 2*z*bigz + i
      z = t
      next k

    c = k mod 16
    color c, c
    print " ";
  next x
next y


Cute, huh? What do you mean "But what does it do, acme?"? It draws a pretty Mandelbrot image using ANSI colours of course!

I'm still in denial about slides...

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.