Pathologically Eclectic Rubbish Lister PerlMonks

### Spiro Japh

by liverpole (Monsignor)
 on Aug 21, 2005 at 17:35 UTC Need Help??

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--; } [download]```
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 (Pope) 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.

Create A New User
Node Status?
node history
Node Type: obfuscated [id://485556]
Approved by grinder
Front-paged by grinder
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2019-10-18 19:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
In 2019 the site I miss most is:

Results (45 votes). Check out past polls.

Notices?