Well, this one was too long (951 bytes) for category 4 The Old Standby,
but was rated The Best Ever by the judges... (I did submit it for Inner Beauty, but hey)
The Perl part need an ANSI term for it use some escape codes for highlighting,
and the PostScript part need ghostscript or you friendly neighborhood PS printer.
Please note that whitespace actually holds information. And yes, it is actually PostScript: it ends with showpage...
/;{}def/#{def}def/$_={/Times-Bold exch selectfont}#/_{rmoveto}#/"{dup}
+#/*/!/$
;/q{exch}#/x ; {/J q #}#/.{/T q #}#{stringwidth}#{}#{}# 14 string dup
+dup dup
260 40 moveto 90 rotate ; %/}};$0='"\e[7m \e[0m"';@ARGV=split//,revers
+e
q(ThePerl). q(Journal) x 220 ; q ; 0 T putinterval exch 7 J putinterva
+l ;
; $_= q /m$ pop T($*!$"=!$ " )pop " * true% ? $ " $!" " !! !! % !"
+!" !
! charpath {!"""}pop $ pop{""!}pop ! neg{!#}pop 220 ! neg _{!!}pop J f
+alse %T
charpath clip " pop 0 " moveto 6{!!}pop $_= 105{!!}pop {$ ! $ " ! #!
+ ##}
pop{dup dup $ ! " pop pop q{"}pop 22{dup show}repeat {"}pop q 22 mul{$
+ "} pop
neg{!#! $ "}pop ! 8 .65 mul{$ # # $}pop ! neg{"}pop _ pop{"}pop } rep
+eat pop
" { $ " ! ! ! $ " ! !" "#" #"!"""""! #" " # "m/;@ARGV=(@ARGV[-14..-1
+])x50;q}
0 "%};s/m[ou]|[-\dA-ln-z.\n_{}]|\$_=//gx;s/(.)(?{$*=''})/('$*.='.(++$
+#
%2?'':"$0;").'pop;')x(ord($1)-31).'$*'/gee;s/((.(\e\[.m)*|.){77})/$1\n
+/g;print
; sub showpage {}
Excerpt from the SOLUTION file:
This program has a lot to tell. Though Perl and PostScript are very different
in appearance (one if infixed, the other postfixed, one works with lists,
the other with dictionaries...), in this case they performed quite hand in
hand. I must add that PostScript is very well suited for obfuscation even for
novices, thanks to the def operator.
If you look closer at the output of these two programs, you will notice that
the highlighted part, the one that is missing in the output of the Perl
program, is exactly (your screen/eyes/printer resolution may vary) the one
that is printed by the PostScript file. Isn't this some complementarity?
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, 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, 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.
|
|