Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Mandelbrot set

by Anonymous Monk
on Nov 26, 2007 at 17:24 UTC ( #653110=obfuscated: print w/replies, xml ) Need Help??

#!/usr/bin/perl $_=' lx)L %j-%h-%k-% s-%y-%x(:gns%x)X ,04//05(zgns%y)1//6 8(zqshou#]dZ#-%j\'04 ?6>0;1-# :2#-%j$6-#l/#:gns)%h<% j<%s<1:%k<%s+%s,%h+%h,3*%y.34-%h <3+%s+%h*%x.01-%k+REKCAHX%k*%h+%h= 00\'JUST\'ANOTHER%jPERL**=000:%s <%k(zqs houHACKER##:|||qshou# ]dZ1l#:';s/\s{1,}//gm; s/[\x41-\x58]//gm; s/(.)/chr(ord($1) ^0x1)/ge; eval ;qaa
Requirements: about 80x30 terminal

Replies are listed 'Best First'.
Re: Mandelbrot set
by benizi (Hermit) on Dec 02, 2007 at 00:47 UTC

    Changing a single character (the '/' three lines up from PERL) to '"' (double-quote) makes it look much better on light-background terminals. Changing two characters makes it look the same regardless of the terminal's background:

    9c9 < ?6>0;1-# :2#-%j$6-#l/#:gns)%h<% --- > ?6>0;1-# :5#-%j$6-#l!#:gns)%h<%

    Yielding:

    #!/usr/bin/perl $_=' lx)L %j-%h-%k-% s-%y-%x(:gns%x)X ,04//05(zgns%y)1//6 8(zqshou#]dZ#-%j\'04 ?6>0;1-# :5#-%j$6-#l!#:gns)%h<% j<%s<1:%k<%s+%s,%h+%h,3*%y.34-%h <3+%s+%h*%x.01-%k+REKCAHX%k*%h+%h= 00\'JUST\'ANOTHER%jPERL**=000:%s <%k(zqs houHACKER##:|||qshou# ]dZ1l#:';s/\s{1,}//gm; s/[\x41-\x58]//gm; s/(.)/chr(ord($1) ^0x1)/ge; eval ;qaa

    Or, if your terminal's using UTF-8, Happy Mandelbrot:

    #!/usr/bin/perl $_=' dw`m !#cholned!]y z42|]yz45|]yz55|]yz 5g|]yz44|]yz45|-&;tug9& #:lx)L%j-%h-%k-%s-%y-%x(:g ns%x)X, 04//05(zgns%y)1//68(zqshou# ]dZ#-%j\'04?6 >0;1-#:2#- %j$6-#l]yz372`|#: gns)%h<%j<%s<1:%k<%s+%s,%h+%h,3*%y.34-%h<3+%s+%h* %x.01-%k+REKCAHX%k*%hJUST+%h=00\'ANOTHER\' %jPERL* *=000:%s<%k(zqshouHACKER##: |||qshou#]dZ1l#:';s<\s+> <>gme;y/\101-\130//d; s/(.)/chr(ord($1 )^0x1)/ge; eval ;qaa

      Happy Mandel didn't look sufficiently Mandelbrot-esque. (Looked better in my terminal than in whatever font Firefox is using.) Here's another attempt:

      #!/usr/bin/perl $_=' dw`m!# cholned! ]yz42|]yz45|]yz 55 |]yz5g|]yz44|]yz45|- &;tug9&#:lx)L%j-%h-%k- %s-%y-%x(:gns%x)X,04//05(zgns%y) 1//68(zqshou#]dZ#-%j\'04?6 >0;1 -#:2#- %j$6-#l]yz372`|#:gns)%h<%j< %s<1:%k<%s+%s,%h+%h,3*%y.34-%h<3+%s+%h* %x.01-%k+REKCAHX%kJUST*%ANOTHERh+% h=00\'\'%jPERL**=0HACKER00:%s<% k(zqshou##:|||qshou#]dZ1l#';s/\s +//gmx;y/\101-\130//d; s/(.)/chr(ord($1)^1) /ge;eval;q:c>'0 m+ `i*ra8zp 89|3&x ge*:
Re: Mandelbrot set
by KurtSchwind (Chaplain) on Nov 27, 2007 at 20:19 UTC

    Good job!

    I wish I had read the 'requirements' line before running it. I was like : wtf? And I kept playing with my screen resolution. 80x31 on black background worked best for me. Really pretty.

    --
    I used to drive a Heisenbergmobile, but every time I looked at the speedometer, I got lost.
Re: Mandelbrot set
by goibhniu (Hermit) on Nov 27, 2007 at 14:18 UTC

    I haven't de-obfuscated it yet (or even de-parsed it), but it's result is attractive enough to be appreciated as is. To me the cool thing was seeing "JUST ANOTHER PERL HACKER" in plaintext in the code, but then being pleasantly surprised by the output.

    FYI I ran it in Windows (with no ANSI support) and it was garbled. I ran it in cygwin and - gorgeous!


    I humbly seek wisdom.
      FYI I ran it in Windows (with no ANSI support) and it was garbled. I ran it in cygwin and - gorgeous!

      I personally believe it was not "garbled", simply your terminal didn't interpret ANSI escapes. I used Win32::Console::ANSI, and it runs like a charm.

      --
      If you can't understand the incipit, then please check the IPB Campaign.

        yes. exactly. I spent about 3 minutes trying to turn on Ansi support and then went to cygwin


        I humbly seek wisdom.
Re: Mandelbrot set
by Argel (Prior) on Nov 27, 2007 at 15:29 UTC
    ++ Wow, very nice output!!!

    FYI, for optimal output run it in an ANSI terminal set to 80x31 characters with a black background (at least that's what worked for me).

    Again, very, very nice!

Re: Mandelbrot set
by wulvrine (Friar) on Nov 29, 2007 at 07:00 UTC
    Great job! I'd give you a ++ but your anonymous!

    s&&VALKYRIE &&& print $_^q|!4 =+;' *|
Re: Mandelbrot set
by pmonk4ever (Friar) on Dec 03, 2007 at 19:16 UTC
    Well, all I got were error messages!!! I have Perl 5.6.1 on an SGI...Not pretty at all...

    On the windoze box, I got a bunch of Object code [0;30m. ... [0;36m. then an error "Can't locate object method "qaa" via package "my($k,$i ...'

    UPDATE:

    Error Messages On the SGI:

    Number found where operator expected at (eval 1) line 1, near "y($k,$i,$j,$r,$x,$y);for$y(-15..14)(for$x(0..79){print"\e[",$k&15>7?1:0,";3"

    String found where operator expected at (eval 1) line 1, near "3",$k%7,""

    <---><--->(missing operator before ",$k%7,"?)

    Number found where operator expected at (eval 1) line 1, near "",$k%7,"0"

    <---><--->(missing operator before 0?)

    Backslash found where operator expected at (eval 1) line 1, near "0\"

    <---><--->(missing operator before \?)

    Bareword found where operator expected at (eval 1) line 1, near "236a"

    <---><--->(missing operator before a?)

    Thank you for any HELP you can provide, as I have NO clue where these items came from...

    I really would like to see this run, as I have a Unix shell window set to the correct dimensions with the black background.

    Cheers!

    UPDATE 2: Copied these to my Linux platform, Fedora Core 6, and it ran correctly, although, as advertised, you need a dark color background and a 80x31 terminal to appreciate it!

    Thanks, Anno Monk...whoever you are, cool display...Cheers! :-D

    ki6jux

    "No trees were harmed in the creation of this node. However, a rather large number of electrons were somewhat inconvenienced."

      On the PC, I got a bunch of Object code [0;30m. ... [0;36m. then an error "Can't locate object method "qaa" via package "my($k,$i ...'

      I personally believe that it is not PC to use "PC" to mean "Windows box". (cit.)

      --
      If you can't understand the incipit, then please check the IPB Campaign.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (1)
As of 2022-10-04 01:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred way to holiday/vacation is:











    Results (15 votes). Check out past polls.

    Notices?