http://qs1969.pair.com?node_id=485556

This will need an xterm window ... and it's addicting to watch!


#!/usr/bin/perl
sub        sub{rand 39 /
999                 }sub O123
{                          printf
""                              ."\e[".
"%d"                                 . ";%d"
 .""                                      ."H%s"
  ,@_}                                       sub l234
   {O123                                          $|=1,1,
    "\e[J"                                          }while
       (1){                                              $c or
         do {                                               l234;
           $ u=&                                              sub;$
              v = &                                              sub
                ;$ c=                                            3999
                  ;$b=qw                                          /39
                     9 1 /[                                       int
                        rand 3]                                     };
                            O123 11*                              sin
                               ($v*$c)+                         13,
                                    39*cos($                u*$c)
                                         +41,qw+J A P H+[$c%4]
                                              ;($a++%$b)or$
                                                 c -- ;} 

Replies are listed 'Best First'.
Re: Spiro Japh
by blahblah (Friar) on Aug 22, 2005 at 17:57 UTC
    very enjoyable :) a readable version exposes a mathematician and Knowledgeable monk:
    #!/usr/local/bin/perl sub sub { rand 39 / 999 } sub O123 { printf "" . "\e[" . "%d" . ";%d" . "" . "H%s",@_ } sub l234 { O123 $|=1,1, "\e[J" } while (1) { $c or do { l234; $u=⊂ $v=⊂ $c=3999; $b=qw/39 9 1/[int rand 3]; }; O123 11*sin($v*$c)+13, 39*cos($u*$c)+41, qw+J A P H+[$c%4]; ($a++%$b) or $c--; }
    Acolyte? Not for long...
Re: Spiro Japh
by danmcb (Monk) on Aug 23, 2005 at 10:10 UTC

    brilliant! I'm impressed. Thank you!

    By the way if you run it on 5.005 or thereabouts, you get an error :

    Can't use subscript on split at ./obf.pl line 18, near "3]"<br> (Might be a runaway multi-line // string starting on line 16)<br> Can't use subscript on split at ./obf.pl line 22, near "4]"<br>

    It's fine on 5.8.5 though

Re: Spiro Japh
by chester (Hermit) on Aug 25, 2005 at 04:41 UTC
    I finally mentally parsed the Perl, but the math is still beyond me. I'm really impressed. Excellently done.
Re: Spiro Japh
by ikegami (Patriarch) on Sep 02, 2005 at 18:45 UTC
    It works in Windows if use Win32::Console::ANSI; is added. Pretty cool!
      Thanks so much for the info, ikegami. That's the first I'd ever heard of that module -- works like a charm!  I created a color version which runs under Linux -and- Windows.