Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Offuscamento Divino

by liverpole (Monsignor)
on Jun 04, 2007 at 03:03 UTC ( [id://619048]=obfuscated: print w/replies, xml ) Need Help??

Proporzione Divina, by fellow mathematician blazar, was the inspiration for this.  (In fact I mentioned here that I'd be doing an obfuscation, or "Offuscamento", based on the Golden Ratio; this is the fulfilment of that intent).

The original version (with recursive, inscribed golden rectangles) was fairly well "golfed" down, but wasn't visually stimulating enough, so I added the spirals.  They really spiced up the output, but significantly increased the total character count.  Oh, well...

The program needs Tk to work.  Ironically, one feature of the program was created by "accident" -- I forgot the Tk switch to createArc to change the arc's color, and guessed at -fill.  That wasn't it, but the resulting effect was quite pleasing, so I left it in.

$_='us!b{lJ$++$ ;= A8 1;0 P@(=(\x$0 =,)( \y $0=,)(\X$ 9=06,) (\ Y$$ =/X $ (=p .11 608 43) ) ;)H@( =, 0,0*2Y$2 ,$* , YX $0, 2, 627,33$,, XY$ 5,601,04$ ,,Y Y$8 ,37 3,3 1$,,Y63,7 67, 63 5, 93 7,3 6 3,726 ,67 4,3 37, 354 , 366,7 83,786,05 4,3 27,01 4,286,0 2 4,0 07,544, 507 ,024,08 6,4 34, 507 ,0 34,296 ,02 4)3 s} buR!r{na!d52}6us!b{rpsirtn"f%#20%x20%x20"xR, R,R ,u} es T!;kM$ n=w eM! iaW nniod;w ;lM $>- ere pta9(,9us{b fi0 (== f$+ +3% )2$ {&V$&-Vp>ca Fk roe g;t;lV$$ =-MC >na av(s w-, iX$- ,eh $,)Y >-a pkc$ }=u {$P$0[}](+{$ P$2[}]$-${[P ]0 )}$/;p V$ >-rca eeto Pylo g(nx$$,, yx$$ ,,Y X$$ ,,YX$$ ,,yf-, i)r $;-Mu> dpt a;e es el tc $(, aa$ $,, a2. ;){ $P$0[} ]$= ;uuphsP@s ,ih tfP @@; =Q$( %J)2 (?f -,i)r(:o-t uil enw,ihe t;)V$> -rc aee trA (cR @-, tsr a, tA $= -09 @,) Qhw li( e=0 $=% f61na@ d=R psi lec @(, H,0 )4} );) aMni oLp o';s* \s**xgs;s? !?$ "?xg#070603 ;;s&(.) (.) &$2$1&xg ;eval# liverpole

(Thanks to blazar for teaching me the Italian word for "obfuscation".)


s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/

Replies are listed 'Best First'.
Re: Offuscamento Divino
by Tux (Canon) on Jun 05, 2007 at 08:44 UTC

    I think it's beautiful, though I don't understand why it doesn't work. If I decompose it, it still doesn't work, but when I perltidy the soutce, it works. Weird

    e.g. thist does not work:

       # perl xx.pl

    whereas this does work:

       # perl -0 -MPerl::Tidy=perltidy -ne's/;eval//;eval;perltidy source=>\$_,destination=>\$y;eval$y' xx.pl

    update: this also works:

       # perl -0 -ne's/;eval//;eval;eval' xx.pl

    Enjoy, Have FUN! H.Merijn

      liverpole wanted to know the systems where I tried. So far all behave the same. All systems have perl-5.8.5, 5.8.7, or 5.8.8 all with defined-or. All are non-threaded. There is no diff between 64bitint or 64bitall.

      HP-UX 11iv2 example (64bitall)

      102 > perl xx.pl 103 > perl -0 -ne's/;eval//;eval;eval' xx.pl Unquoted string "white" may clash with future reserved word at (eval 3 +) line 1 (#1) (W reserved) You used a bareword that might someday be claimed as +a reserved word. It's best to put such a word in quotes, or capital +ize it somehow, or insert an underbar into it. You might also declare it + as a subroutine. 104 > perl -MV=Tk Tk /pro/lib/perl5/site_perl/5.8.7/IA64.ARCHREV_0-LP64/Tk.pm: 804. +027 105 >

      Enjoy, Have FUN! H.Merijn
Re: Offuscamento Divino
by zentara (Archbishop) on Jun 04, 2007 at 17:15 UTC

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-03-19 10:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found