This JAPH uses console escape sequences to produce a simple animation. I don't expect it will work on all platforms. :)
After getting the code working, I concentrated on making it as compact as possible (I just got it down to six lines!),
rather than making it as obfuscated as possible.
Enjoy!
$|=@m=@n=($")x(@j=@k='Just another Perl hacker'=~/./g);sub d{$k[$_]ne$
+j[$_]or$w
[$_]=_}sub p{local$";print"\e[H\e[J@m\n@k\n@n\n";select$,,$,,$,,.05}@k
+[$_,$i]=@
k[$i=rand@k,$_]for@w=0..23;d,for@w;sub a{@_[1,0]=@_}sub w{($y,$z)=$s<$
+_?@_[1,0]
:@_;p@y=$y..$z-1;p,($m[$_],$n[$s])=@k[@_];p@k[@_]=($")x2;p a@m[$_+1,$_
+],a@n[$n=
$y+$z-$_,$n-1]for$s<$_?reverse@y:@y;@k[@_]=($n[$_],$m[$s]);$m[$s]=$n[$
+_]=$"}{($
_=$s[rand(@s=grep!/_/,@w)])^($s=$s[rand@s])&&w$_,$s;d,d$_=$s;"@j"ne"@k
+"?redo:p}
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.