Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Spiro Japh

by liverpole (Monsignor)
on Aug 21, 2005 at 17:35 UTC ( [id://485556]=obfuscated: print w/replies, xml ) Need Help??

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

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]
                                                 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 ./ line 18, near "3]"<br> (Might be a runaway multi-line // string starting on line 16)<br> Can't use subscript on split at ./ 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.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: obfuscated [id://485556]
Approved by grinder
Front-paged by grinder
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-06-21 18:30 GMT
Find Nodes?
    Voting Booth?

    No recent polls found

    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.