Perl: the Markov chain saw PerlMonks

### Sparkling Japh

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

Try running this in an xterm window!

```
#!/usr/bin/perl -w
sub d(\$){defined(\$        _[             0])}sub p(        \$){print    @_}sub r
(\$\$)            {int            \$_[0]+rand(\$_     [1]-\$_[0    ]+1)}\$|=
016;            my\$a            =2;sub c{p"\e"    ."[H";;p    "\e[J";}
open           (Y,\$0)            ;my(    @y,\$y)     ;for        (;;)
{&d(          \$y=(<Y>)           ) or    last;;     push        @y ,
\$y.(         ' '   x80           )} \$SIG{INT}=      sub{c;exit};c;my
\$b=0        ;;;    for(;         ;){my(\$r,\$c)       =(r(1,@y),r(1,80
));;       my\$k=(substr(\$        y[\$r-              1],\$        c-1,
1));;   ;;;;      printf"\e[%d;".        "%d".              "H".        "\e"
."[1"   .";"     ."7;"       ."%s"       ."m".              "%s"        ."".
"\e[0m",\$r,    \$c,r(30,    37),\$k if   \$k ne" ";          }return;   ;__END__;
__Just_    _Another_    PerlHacker  by_John_C          _Norton_   8/17/2005
```

```#!/usr/bin/perl -w
sub d(\$){defined(\$        _[             0])}sub p(        \$){print
+ @_}sub r
(\$\$)            {int            \$_[0]+rand(\$_     [1]-\$_[0
+ ]+1)}\$|=
016;            my\$a            =2;sub c{p"\e"    ."[H";;p
+ "\e[J";}
open           (Y,\$0)            ;my(    @y,\$y)     ;for
+   (;;)
{&d(          \$y=(<Y>)           ) or    last;;     push
+   @y ,
\$y.(         ' '   x80           )} \$SIG{INT}=      sub{c;exi
+t};c;my
\$b=0        ;;;    for(;         ;){my(\$r,\$c)       =(r(1,@y)
+,r(1,80
));;       my\$k=(substr(\$        y[\$r-              1],\$
+   c-1,
1));;   ;;;;      printf"\e[%d;".        "%d".              "H".
+   "\e"
."[1"   .";"     ."7;"       ."%s"       ."m".              "%s"
+   ."".
"\e[0m",\$r,    \$c,r(30,    37),\$k if   \$k ne" ";          }return;
+;__END__;
__Just_    _Another_    PerlHacker  by_John_C          _Norton_
+8/17/2005

Replies are listed 'Best First'.
Re: Sparkling JAPH
by sparkyichi (Deacon) on Aug 17, 2005 at 22:22 UTC
I love it, very nice!

Sparky
FMTEYEWTK
I wanted to tell you "thanks!" for your kind feedback. It was exciting for me to submit my first program, and have someone reply so quickly with such great encouragement; really made my day!
Re: Sparkling JAPH
by Tanalis (Curate) on Aug 18, 2005 at 06:34 UTC
Re: Sparkling JAPH
by jbrugger (Parson) on Aug 19, 2005 at 08:20 UTC
```#line 2:
0];)}sub p(
# should be:
0])}sub p(

#line 3:
\$_[0];+rand(\$_     [1];-\$_[0    ];+1)}\$|=
\$_[0]+rand(\$_     [1]-\$_[0    ]+1)}\$|=

# and line 9:
1];,\$
1],\$

"We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise." - Larry Wall.
Thanks. Corrected.

holli, /regexed monk/
Re: Sparkling JAPH
by zentara (Archbishop) on Aug 18, 2005 at 12:57 UTC

I'm not really a human, but I play one on earth. flash japh
I didn't see any "download code" links on any of the other obfuscated Perl submissions, so I didn't realize I needed one. Was there a problem with cut-and-pasting it?
There is most always code tags around them. As a matter of fact, the other obfuscated submission today IP addresses? has them. But no, no problem cut'n'pating. :-) However, there could be if there was some sort of "space sensitive code". When I cut'n'paste with a mouse, I usually have to do a white-space-elimination to get rid of skewing text.

P.S. Well I guess there are usually code tags only when viewed as a frontpage node, not when viewed from the Obfu section.

I'm not really a human, but I play one on earth. flash japh
Re: Sparkling Japh
by ambrus (Abbot) on Dec 24, 2010 at 11:39 UTC

This is a bit fast for today's computers, so I have to pipe it through perl -we 'use Time::HiRes "sleep"; \$/=\100; while(<>){ print; sleep 1e-4; }' to slow it down. I'm mentioning that because it works with some other obfus too. I can't easily edit the code to add a sleep statement in it, because that breaks the shape of letters.

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2023-03-30 15:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
Which type of climate do you prefer to live in?

Results (74 votes). Check out past polls.

Notices?