🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #6676

Obfuscated PostScript Contest Results [1 of 3] REPOST

#6676
From: Jonathan Monsarrat
Date: Fri, 05 Feb 1993 20:25
1353 lines
53005 bytes
The initial posting of this had a problem where it said

showpageEND_OF_FILE

This is a repost.

-Jon

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of shell archive."
# Contents:  KoreanSidewalk.ANSWER KoreanSidewalk.HINT
#   KoreanSidewalk.ps KoreanSidewalk.unobfs.ps PSILoveYou.ANSWER
#   PSILoveYou.HINT PSILoveYou.ps PSILoveYou.unobfs.ps README
#   Serrated_Serifs.ANSWER Serrated_Serifs.HINT Serrated_Serifs.ps
#   Serrated_Serifs.unobfs.ps Tiny_RayTracing.HINT Tiny_RayTracing.ps
#   WINNERS aak1.HINT aak1.ps aak1.unobfs.ps alan.ANSWER alan.HINT
#   alan.ps alan.unobfs.ps din_varg.ANSWER din_varg.HINT din_varg.ps
#   din_varg.unobfs.ps
# Wrapped by jgm@vegas on Fri Feb  5 15:07:44 1993
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'KoreanSidewalk.ANSWER' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'KoreanSidewalk.ANSWER'\"
else
echo shar: Extracting \"'KoreanSidewalk.ANSWER'\" \(340 characters\)
sed "s/^X//" >'KoreanSidewalk.ANSWER' <<'END_OF_FILE'
X> How is the pattern chosen so that all the lines meet up?
X
XTrick question! It's random.
X
X> What happens if you delete "1 setlinecap"? Is there a minimal fix for that?
X
XYou get little breaks in the circles.
X
X"1 setlinecap" is not really needed if I change the file
Xto "0 -1 moveto -1 -1 1   0  92 arc" and "0  1 moveto  1  1 1 178 272 arc"
END_OF_FILE
if test 340 -ne `wc -c <'KoreanSidewalk.ANSWER'`; then
    echo shar: \"'KoreanSidewalk.ANSWER'\" unpacked with wrong size!
fi
# end of 'KoreanSidewalk.ANSWER'
fi
if test -f 'KoreanSidewalk.HINT' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'KoreanSidewalk.HINT'\"
else
echo shar: Extracting \"'KoreanSidewalk.HINT'\" \(759 characters\)
sed "s/^X//" >'KoreanSidewalk.HINT' <<'END_OF_FILE'
XKoreanSidewalk.ps, by Tim Poston, won an honorable mention.
X
XTim Poston writes:
X
XUn-Documentation
X This draws the tile pattern you see in many Korean towns.
X Counting the %! and showpage lines it's 230 characters,
X without them (but including blanks) just 218.
X PostScript 1 only.
X 
X Some older displays and printers fail with it,
X because the '1 and' barfs on the large numbers rand puts on the stack;
X for such devices I add  '100000 idiv'  after  'rand'.
X But that's a kludge required by bad implementations,
X not really part of the code.
X 
X Probably not obscure enough, but I'm fond of it.
X
XHow is the pattern chosen so that all the lines meet up?
X
XWhat does "rand 1 and" mean?
X
XWhat happens if you delete "1 setlinecap"? Is there a minimal fix for that?
END_OF_FILE
if test 759 -ne `wc -c <'KoreanSidewalk.HINT'`; then
    echo shar: \"'KoreanSidewalk.HINT'\" unpacked with wrong size!
fi
# end of 'KoreanSidewalk.HINT'
fi
if test -f 'KoreanSidewalk.ps' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'KoreanSidewalk.ps'\"
else
echo shar: Extracting \"'KoreanSidewalk.ps'\" \(230 characters\)
sed "s/^X//" >'KoreanSidewalk.ps' <<'END_OF_FILE'
X%!
X10 10 scale 1 setlinecap .4 setlinewidth 0 2 83 {0 2 59 {gsave exch dup 3
X1 roll translate rand 1 and 1 eq {90 rotate} if newpath 0 -1 moveto -1 -1
X1 0 90 arc 0 1 moveto 1 1 1 180 270 arc stroke grestore} for pop} for
Xshowpage
END_OF_FILE
if test 230 -ne `wc -c <'KoreanSidewalk.ps'`; then
    echo shar: \"'KoreanSidewalk.ps'\" unpacked with wrong size!
fi
# end of 'KoreanSidewalk.ps'
fi
if test -f 'KoreanSidewalk.unobfs.ps' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'KoreanSidewalk.unobfs.ps'\"
else
echo shar: Extracting \"'KoreanSidewalk.unobfs.ps'\" \(764 characters\)
sed "s/^X//" >'KoreanSidewalk.unobfs.ps' <<'END_OF_FILE'
X%!
X10 10 scale
X%  1 setlinecap     % This line isn't really needed
X.4 setlinewidth
X0 2 83              % y         <---  what's on the stack 
X{
X   0 2 59           % y x       <---  what's on the stack 
X   {
X     gsave
X         exch       % x y       <---  what's on the stack 
X         dup        % x y y     <---  what's on the stack 
X         3 1 roll   % y x y     <---  what's on the stack 
X         translate  % y         <---  what's on the stack 
X         rand 1 and 1 eq {90 rotate} if       % A left or a right half-circle?
X         newpath 0 -1 moveto -1 -1 1   0  92 arc   % make the half-circle
X                 0  1 moveto  1  1 1 178 272 arc
X         stroke
X     grestore
X   } for
X   pop              % pops off the remaining y value
X} for
Xshowpage
END_OF_FILE
if test 764 -ne `wc -c <'KoreanSidewalk.unobfs.ps'`; then
    echo shar: \"'KoreanSidewalk.unobfs.ps'\" unpacked with wrong size!
fi
# end of 'KoreanSidewalk.unobfs.ps'
fi
if test -f 'PSILoveYou.ANSWER' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'PSILoveYou.ANSWER'\"
else
echo shar: Extracting \"'PSILoveYou.ANSWER'\" \(302 characters\)
sed "s/^X//" >'PSILoveYou.ANSWER' <<'END_OF_FILE'
XThe concat command is clever, because it combines scaling the
Xpage with translating the page to keep the heart in the center.
X
XThe transformation alluded to in the HINT is done with concat. It is:
X
Xx' = .9  x +  .03 y + 37
Xy' = .95 y + -.02 x + 17
X 
XYou can't get this effect with scale and translate.
END_OF_FILE
if test 302 -ne `wc -c <'PSILoveYou.ANSWER'`; then
    echo shar: \"'PSILoveYou.ANSWER'\" unpacked with wrong size!
fi
# end of 'PSILoveYou.ANSWER'
fi
if test -f 'PSILoveYou.HINT' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'PSILoveYou.HINT'\"
else
echo shar: Extracting \"'PSILoveYou.HINT'\" \(690 characters\)
sed "s/^X//" >'PSILoveYou.HINT' <<'END_OF_FILE'
XPSILoveYou.ps, by Tim Poston, won an honorable mention.
X
XTim Poston writes:
X
XUn-Documentation:
X The call for entries says "The people who read your program shouldn't
X be able to figure out how it does what it does."
X That depends who they are.
X They probably can, if they know a little linear algebra
X from a geometrical point of view.
X A lot of programming freaks don't.
X 
X So this won't be "most obscure".
X But it's at least passable art,
X very compact, PostScript 1,
X and useful in humanity's main activity
X (field tested, I promise).
X
XThe heart is one shape being redrawn after a transformation, which
Xis probably something like .9 .9 scale 10 0 translate. How does the
Xauthor do this?
END_OF_FILE
if test 690 -ne `wc -c <'PSILoveYou.HINT'`; then
    echo shar: \"'PSILoveYou.HINT'\" unpacked with wrong size!
fi
# end of 'PSILoveYou.HINT'
fi
if test -f 'PSILoveYou.ps' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'PSILoveYou.ps'\"
else
echo shar: Extracting \"'PSILoveYou.ps'\" \(167 characters\)
sed "s/^X//" >'PSILoveYou.ps' <<'END_OF_FILE'
X%!
Xnewpath 0 1 50{50 div sqrt setgray 170 120 moveto 270 300 -130 740 270 660
Xcurveto 670 900 470 250 170 120 curveto fill [.9 .03 -.02 .95 37 17]concat} for
Xshowpage
END_OF_FILE
if test 167 -ne `wc -c <'PSILoveYou.ps'`; then
    echo shar: \"'PSILoveYou.ps'\" unpacked with wrong size!
fi
# end of 'PSILoveYou.ps'
fi
if test -f 'PSILoveYou.unobfs.ps' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'PSILoveYou.unobfs.ps'\"
else
echo shar: Extracting \"'PSILoveYou.unobfs.ps'\" \(460 characters\)
sed "s/^X//" >'PSILoveYou.unobfs.ps' <<'END_OF_FILE'
X%! newpath    % this command is unnecessary.
X0 1 50   % stepping from 0 to 50
X{
X   50 div sqrt setgray    % stepping from 0 to 1 setgray
X
X   170 120 moveto                         % Draw the heart
X   270 300 -130 740 270 660 curveto       % Draw the heart
X   670 900 470 250 170 120 curveto        % Draw the heart
X   fill                                   % Draw the heart
X
X   [.9 .03 -.02 .95 37 17] concat         % Shrinks, re-centers page.
X} for
Xshowpage
END_OF_FILE
if test 460 -ne `wc -c <'PSILoveYou.unobfs.ps'`; then
    echo shar: \"'PSILoveYou.unobfs.ps'\" unpacked with wrong size!
fi
# end of 'PSILoveYou.unobfs.ps'
fi
if test -f 'README' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'README'\"
else
echo shar: Extracting \"'README'\" \(4795 characters\)
sed "s/^X//" >'README' <<'END_OF_FILE'
XABOUT THIS DIRECTORY:
X
X  This directory contains the results of the 1993 Obfuscated PostScript Contest.
X
X  The goal of this contest was to write inscrutable, devious code impossible
X  to decipher, yet beautiful, compact, and functional. 9 winners have
X  succeeded. 7 have earned honorable mentions.
X
X  You can ftp this from wilma.cs.brown.edu:pub/postscript/obfuscated1.shar, and
X  obfuscated2.shar and obfuscated3.shar. These three file contains all the files
X  you can find individually in wilma.cs.brown.edu:pub/postscript/obfsucated.
X  These results have been posted to comp.lang.postscript, fj.lang.postscript,
X  and alt.sources. The names of the winners alone were posted to comp.text.tex,
X  comp.fonts, comp.graphics, alt.hackers, misc.misc, comp.sources.d,
X  and comp.misc.
X
X  To obtain a free copy of this on Macintosh or IBM PC compatible disk, send
X  us a disk with a self-addressed stamped envelope large enough for the disk.
X  Please do not do this if you can get the information from email or USENET.
X
X  In this directory:
X
X  README        - This file. Describes the files in this directory.
X  WINNERS       - The file describing the winners of the contest.
X  rules.*       - The contest rules, in LaTeX, ASCII, and PostScript.
X
X  All the winners files are titled with some "title" in the following formats:
X
X  title.ps        - The winning contest entry.
X  title.HINT      - A short hint on the mystery, and usage instructions.
X  title.ANSWER    - A long description of the program, combining the comments
X                    of the judges and the contest entrants.
X  title.unobfs.ps - The best we could do at un-obfuscating the program.
X
X  Not all the files have answers and unobfuscated versions.
X
XHOW TO VIEW THE WINNING PROGRAMS:
X
X  Use GhostScript to view the files. GhostScript is a freely available
X  PostScript interpreter.  You may get it from anonymous ftp to
X  ftp.cs.wisc.edu:/pub/X/ghostscript-*2.5.2*.  Your system administrator
X  will be able to tell you how to use ftp. 
X
X  Also, you may in general use any PostScript previewer to view the entries.
X  A previewer is recommended because many of these programs take a long
X  time to display.
X
X  Many of these files can be sent directly to a PostScript printer.
X  Be patient when doing so. No contest entry used PostScript level 2 commands.
X
X
XIF YOU WERE AN ENTRANT:
X
X  If you like a description of why your program was chosen or not
X  chosen, write the judges at jgm@cs.brown.edu. We can also provide feedback
X  on the tricks you used.
X
X
XOBFUSCATED POSTSCRIPT CONTEST 1994:
X
X  There will be another Obfuscated PostScript Contest in November 1993.
X  Entries are closed until the rules are posted then. For more
X  information, write the judges at jgm@cs.brown.edu.
X
X
XOBFUSCATED C CONTEST 1993:
X
X                International Obfuscated C Code Contest
X 
X    Obfuscate:  tr.v.  -cated, -cating, -cates.  1. a.  To render obscure.
X                b.  To darken.  2. To confuse:  his emotions obfuscated his
X                judgment.  [LLat. obfuscare, to darken : ob(intensive) +
X                Lat. fuscare, to darken < fuscus, dark.] -obfuscation n.
X                obfuscatory adj.
X 
X    GOALS OF THE CONTEST:
X 
X        * To write the most Obscure/Obfuscated C program under the rules below.
X        * To show the importance of programming style, in an ironic way.
X        * To stress C compilers with unusual code.
X        * To illustrate some of the subtleties of the C language.
X        * To provide a safe forum for poor C code.  :-)
X 
X    The IOCCC is the grandfather of USENET programming contests.  Since
X    1984, this contest demonstrated that a program that mearly works
X    correctly is not sufficient.  The IOCCC has also done much to add
X    the arcane word 'obfuscated' back into the English language.
X    (see "The New Hacker's Dictionary" by Eric Raymond)
X 
X    You are strongly encouraged to read the new contest rules before
X    sending any entries.  The rules, and sometimes the contest Email
X    address itself, change over time.  A valid entry one year may
X    be rejected in a later year due to changes in the rules.  The typical
X    start date for contests is in early March.  Contest rules are normally not
X    finalized and posted until the beginning of the contest.  The typical 
X    closing date for contests are in early May.
X 
X    The contest rules are posted to comp.unix.wizards, comp.lang.c,
X    misc.misc, alt.sources and comp.sources.d.  If you do not have access 
X    to these groups, or if you missed the early March posting, you may 
X    request a copy from the judges, via Email, at;
X 
X        judges@toad.com   -or-   ...!{sun,uunet,utzoo,pyramid}!hoptoad!judges
X 
X    Previous contest winners are available via anonymous ftp from
X    ftp.uu.net under the directory /pub/ioccc.
END_OF_FILE
if test 4795 -ne `wc -c <'README'`; then
    echo shar: \"'README'\" unpacked with wrong size!
fi
# end of 'README'
fi
if test -f 'Serrated_Serifs.ANSWER' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Serrated_Serifs.ANSWER'\"
else
echo shar: Extracting \"'Serrated_Serifs.ANSWER'\" \(162 characters\)
sed "s/^X//" >'Serrated_Serifs.ANSWER' <<'END_OF_FILE'
XThe author uses dashed lines of differing cycles and setlinewidths
Xto make the triangle serrations around the outside of the character.
X
XNo pathforall is needed.
END_OF_FILE
if test 162 -ne `wc -c <'Serrated_Serifs.ANSWER'`; then
    echo shar: \"'Serrated_Serifs.ANSWER'\" unpacked with wrong size!
fi
# end of 'Serrated_Serifs.ANSWER'
fi
if test -f 'Serrated_Serifs.HINT' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Serrated_Serifs.HINT'\"
else
echo shar: Extracting \"'Serrated_Serifs.HINT'\" \(311 characters\)
sed "s/^X//" >'Serrated_Serifs.HINT' <<'END_OF_FILE'
XSerrated_Serifs.ps, by Fritz Lott, c/o W. R. Beamish Co., 220 Sunnyridge Lane,
XGolden Valley, MN 55422-5300, won an honorable mention.
X
XThe easy way to do this would be using pathforall.
X
XBut the method this author uses can work on any character set, even
Xprotected ones! pathforall fails for protected fonts.
X
END_OF_FILE
if test 311 -ne `wc -c <'Serrated_Serifs.HINT'`; then
    echo shar: \"'Serrated_Serifs.HINT'\" unpacked with wrong size!
fi
# end of 'Serrated_Serifs.HINT'
fi
if test -f 'Serrated_Serifs.ps' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Serrated_Serifs.ps'\"
else
echo shar: Extracting \"'Serrated_Serifs.ps'\" \(1512 characters\)
sed "s/^X//" >'Serrated_Serifs.ps' <<'END_OF_FILE'
X%%!PS-Adobe-2.0
X%%Title: Serrated Serifs
X%%Creator: Fritz Lott
X%%CreationDate: 07/11/90
X%%Copyright (C) 1990 W.R. Beamish Co. All Rights Reserved
X%%EndComments
X%%
X%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
X%
X%...Prefatory Definitions
X%
X/inch   {72 mul} def
X/inches {72 mul} def %...allow for correct spelling
X%
X/Start_Time usertime def
X%
X%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
X%
X/Title
X	{
X	0 setgray
X	2.30 inches 9.0 inches moveto
X	/Times-Roman findfont 48 scalefont setfont
X	(Serated Serifs) show
X	3.15 inches 8.4 inches moveto
X	/Times-Roman findfont 14 scalefont setfont
X	(The font at the cutting edge...) show
X	2.50 inches 8.0 inches moveto
X	(Available now for every PostScript) show
X		/Symbol findfont 9 scalefont setfont
X		1 3 rmoveto
X		(\322) show
X		0 -3 rmoveto
X	/Times-Roman findfont 14 scalefont setfont
X	( typeface) show
X	} def
X%
X%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
X%
X/Letter (&) def
X%
X/Outside
X	[
X	[ 9 [1 8]]
X	[ 8 [2 7]]
X	[ 7 [3 6]]
X	[ 6 [4 5]]
X	[ 5 [5 4]]
X	[ 4 [6 3]]
X	[ 3 [7 2]]
X	[ 2 [8 1]]
X	] def
X/Start
X	{
X	1.55 inches 2.0 inches moveto
X	} def
X%
XTitle
X%
X/Times-Roman findfont 500 scalefont setfont
X0 setgray
X%
XOutside
X	{
X	dup
X	0 get setlinewidth 
X	1 get 0 setdash
X	Start
X	Letter true charpath stroke
X	} forall
X%
XStart
XLetter true charpath fill
X%
X(Total Time ) print
Xusertime Start_Time sub 1000 div 10 string cvs print
X(\r) print
X%
X/#copies 1 def            % final copies (change as appropriate)  
Xshowpage
END_OF_FILE
if test 1512 -ne `wc -c <'Serrated_Serifs.ps'`; then
    echo shar: \"'Serrated_Serifs.ps'\" unpacked with wrong size!
fi
# end of 'Serrated_Serifs.ps'
fi
if test -f 'Serrated_Serifs.unobfs.ps' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Serrated_Serifs.unobfs.ps'\"
else
echo shar: Extracting \"'Serrated_Serifs.unobfs.ps'\" \(2867 characters\)
sed "s/^X//" >'Serrated_Serifs.unobfs.ps' <<'END_OF_FILE'
X%%!PS-Adobe-2.0
X%%Title: Serrated Serifs
X%%Creator: Fritz Lott
X%%CreationDate: 07/11/90
X%%Copyright (C) 1990 W.R. Beamish Co. All Rights Reserved
X%%EndComments
X%%
X%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
X%
X%...Prefatory Definitions
X
X/inch   {72 mul} def
X/inches {72 mul} def %...allow for correct spelling
X
X/Start_Time usertime def    % will be used later to calculate total print time
X
X%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
X
X/Title
X{
X   %  0 setgray                                   % unnecessary
X   2.30 inches 9.0 inches moveto                  % place text
X   /Times-Roman findfont 48 scalefont setfont     % set font
X   (Serated Serifs) show                          % write text
X   3.15 inches 8.4 inches moveto                  % place text
X   /Times-Roman findfont 14 scalefont setfont     % set font
X   (The font at the cutting edge...) show         % write text
X   2.50 inches 8.0 inches moveto                  % place text
X   (Available now for every PostScript) show      % write text
X      /Symbol findfont 9 scalefont setfont        % set font for copyright
X      1 3 rmoveto                                 % set position for copyright
X      (\322) show                                 % print copyright
X      0 -3 rmoveto
X   /Times-Roman findfont 14 scalefont setfont
X   ( typeface) show
X} def
X
X%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
X
X/Letter (&) def
X
X/Outside     % an array of [ linewidth [ dash values ] ]
X[
X   [ 9 [1 8] ]
X   [ 8 [2 7] ]
X   [ 7 [3 6] ]
X   [ 6 [4 5] ]
X   [ 5 [5 4] ]
X   [ 4 [6 3] ]
X   [ 3 [7 2] ]
X   [ 2 [8 1] ]
X] def
X
X% Set up position on the screen properly.
X/Start
X{
X   1.55 inches 2.0 inches moveto
X} def
X
XTitle     % print the title -- defined above.
X
X/Times-Roman findfont 500 scalefont setfont   % set font
X%  0 setgray                                  % unnecessary
X
X
X%%%%%%%%%%%   first, draw the outline of the character with triangles %%%%%
XOutside   % the magic array of increasing values.
X{
X   dup                            % draws the outline of the letter, but
X   0 get setlinewidth             % only with dashes! The dashes get placed
X   1 get 0 setdash                % one further "forward" while the linewidth
X   Start                          % increases, giving the triangles on the
X   Letter true charpath stroke    % serration.
X} forall
X
X
X%%%%%%%%%%%   now draw the character normally over what's been drawn %%%%
XStart
XLetter show     % make the outline of the character.
X
X(Total Time ) print     % print the time it took to do this. No purpose?
Xusertime Start_Time sub 1000 div 10 string cvs print
X(\r) print    % this keeps it from actually being printed, in GhostScript
X              % because it is overwritten by other information.
X
X% /#copies 1 def            % final copies (change as appropriate)  
Xshowpage
END_OF_FILE
if test 2867 -ne `wc -c <'Serrated_Serifs.unobfs.ps'`; then
    echo shar: \"'Serrated_Serifs.unobfs.ps'\" unpacked with wrong size!
fi
# end of 'Serrated_Serifs.unobfs.ps'
fi
if test -f 'Tiny_RayTracing.HINT' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Tiny_RayTracing.HINT'\"
else
echo shar: Extracting \"'Tiny_RayTracing.HINT'\" \(1532 characters\)
sed "s/^X//" >'Tiny_RayTracing.HINT' <<'END_OF_FILE'
XTiny_RayTracing.ps by Takashi Hayakawa (h-takasi@isea.is.titech.ac.jp)
Xis a ray tracing program in only 762 bytes (plus header)!
X
XBEST OBFUSCATED ARTWORK -- 1st prize
X  -- The 2nd most coveted prize. These combine obfuscation with great artwork.
X
XDon't send this one to a printer. It will take too long. Display it
Xon the screen and be ready to wait a while. The picture is well worth it.
X
XIf you want to print the picture much faster, use this version:
X
X%! Tiny RayTracing by HAYAKAWA,Takashi<h-takasi@isea.is.titech.ac.jp>
X/p/floor/S/add/A/copy/n/exch/i/index/J/ifelse/r/roll/e/sqrt/H{count 2 idiv exch
Xrepeat}def/q/gt/h/exp/t/and/C/neg/T/dup/Y/pop/d/mul/w/div/s/cvi/R/rlineto{load
Xdef}H/c(j1idj2id42rd)/G(140N7)/Q(31C85d4)/B(V0R0VRVC0R)/K(WCVW)/U(4C577d7)300
XT translate/I(3STinTinTinY)/l(993dC99Cc96raN)/k(X&E9!&1!J)/Z(blxC1SdC9n5dh)/j
X(43r)/O(Y43d9rE3IaN96r63rvx2dcaN)/z(&93r6IQO2Z4o3AQYaNlxS2w!)/N(3A3Axe1nwc)/W
X270 def/L(1i2A00053r45hNvQXz&vUX&UOvQXzFJ!FJ!J)/D(cjS5o32rS4oS3o)/v(6A)/b(7o)
X/F(&vGYx4oGbxSd0nq&3IGbxSGY4Ixwca3AlvvUkbQkdbGYx4ofwnw!&vlx2w13wSb8Z4wS!J!)/X
X(4I3Ax52r8Ia3A3Ax65rTdCS4iw5o5IxnwTTd32rCST0q&eCST0q&D1!&EYE0!J!&EYEY0!J0q)/V
X3 def/x(jd5o32rd4odSS)/a(1CD)/E(YYY)/o(1r)/f(nY9wn7wpSps1t1S){[n{( )T 0 4 3 r
Xput T(/)q{T(9)q{cvn}{s}J}{($)q{[}{]}J}J cvx}forall]cvx def}H K{K{L setgray
Xmoveto B fill}for Y}for showpage
X
XYou can change the "3" in "3 def/x" on line 10 to be 1 for more resolution
X(but a much slower print) or "6" for a faster print (your printer might
Xbe able to handle this) with less resolution.
END_OF_FILE
if test 1532 -ne `wc -c <'Tiny_RayTracing.HINT'`; then
    echo shar: \"'Tiny_RayTracing.HINT'\" unpacked with wrong size!
fi
# end of 'Tiny_RayTracing.HINT'
fi
if test -f 'Tiny_RayTracing.ps' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Tiny_RayTracing.ps'\"
else
echo shar: Extracting \"'Tiny_RayTracing.ps'\" \(831 characters\)
sed "s/^X//" >'Tiny_RayTracing.ps' <<'END_OF_FILE'
X%!OPS-1.0 %%Creator: HAYAKAWA,Takashi<h-takasi@isea.is.titech.ac.jp>
X/A/copy/p/floor/q/gt/S/add/n/exch/i/index/J/ifelse/r/roll/w/div/H{{loop}stopped
XY}def/t/and/C/neg/T/dup/h/exp/Y/pop/d/mul/s/cvi/e/sqrt/R/rlineto{load def}H 300
XT translate(V2L&1i2A00053r45hNvQXz&vUX&UOvQXzFJ!FJ!J!O&Y43d9rE3IaN96r63rvx2dcaN
XG&140N7!U&4C577d7!z&&93r6IQO2Z4o3AQYaNlxS2w!!f&nY9wn7wpSps1t1S!D&cjS5o32rS4oS3o
XZ&blxC1SdC9n5dh!I&3STinTinTinY!B&V0R0VRVC0R!N&3A3Axe1nwc!l&993dC99Cc96raN!a&1CD
XE&YYY!F&&vGYx4oGbxSd0nq&3IGbxSGY4Ixwca3AlvvUkbQkdbGYx4ofwnw!&vlx2w13wSb8Z4wS!J!
Xc&j1idj2id42rd!X&4I3Ax52r8Ia3A3Ax65rTdCS4iw5o5IxnwTTd32rCST0q&eCST0q&D1!&EYE0!J
X&EYEY0!J0q!x&jd5o32rd4odSS!K&WCVW!Q&31C85d4!k&X&E9!&1!J!v&6A!b&7o!o&1r!j&43r!W)
X{( )T 0 4 3 r put T(/)q{T(9)q{cvn}{s}J}{($)q{[}{]}J}J cvx}forall 270{def}H
XK{K{L setgray moveto B fill}for Y}for showpage
END_OF_FILE
if test 831 -ne `wc -c <'Tiny_RayTracing.ps'`; then
    echo shar: \"'Tiny_RayTracing.ps'\" unpacked with wrong size!
fi
# end of 'Tiny_RayTracing.ps'
fi
if test -f 'WINNERS' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'WINNERS'\"
else
echo shar: Extracting \"'WINNERS'\" \(4161 characters\)
sed "s/^X//" >'WINNERS' <<'END_OF_FILE'
X    * * *   Obfuscated PostScript Contest 1993 ---- Results! * * *
X
XABOUT THIS DOCUMENT:
X
X  This document lists the winners of the 1993 Obfuscated PostScript Contest.
X
X  The goal of this contest was to write inscrutable, devious code impossible
X  to decipher, yet beautiful, compact, and functional. 9 winners have
X  succeeded. 7 have earned honorable mentions.
X
X  You can ftp this from wilma.cs.brown.edu:pub/postscript/obfuscated1.shar, and
X  obfuscated2.shar and obfuscated3.shar. These three file contains all the files
X  you can find individually in wilma.cs.brown.edu:pub/postscript/obfsucated.
X  These results have been posted to comp.lang.postscript, fj.lang.postscript,
X  and alt.sources. The names of the winners alone were posted to comp.text.tex,
X  comp.fonts, comp.graphics, alt.hackers, misc.misc, comp.sources.d,
X  and comp.misc.
X
X  To obtain a free copy of this on Macintosh or IBM PC compatible disk, send
X  us a disk with a self-addressed stamped envelope large enough for the disk.
X  Please do not do this if you can get the information from email or USENET.
X
XWINNERS:
X
X  The following entrants have won the contest. Their code was the among
X  the "worst" PostScript coding we have ever seen. Congratulations! :)
X
X  To make their entries small and inscrutable, entrants used little-known
X  tricks to fool the judges. I hope you take the time to study these
X  programs; you will learn a lot (as we have). If you particularly
X  like a program or have questions, write the authors, and let them know
X  you admire their code hairballs.
X
X  OBFUSCATED POSTSCRIPT WINNER
X  -- The most coveted prize. The most maliciously tangled functional code.
X
X  1st prize  labyrinth.ps       David Bau       bau@cs.cornell.edu    
X  2nd prize  square-dance.ps    Ned Batchelder  batcheldern@hannah.enet.dec.com
X
X  BEST OBFUSCATED ARTWORK
X  -- The 2nd most coveted prize. These combine obfuscation with great artwork.
X
X  1st prize  Tiny_RayTracing.ps Takashi Hayakawa h-takasi@isea.is.titech.ac.jp
X  2nd prize  sird.ps            Stephen Peters   speters@us.oracle.com
X  3rd prize  literary.ps        David Dubin      dsdst3@lis.pitt.edu
X                                Michael Spring   spring+@pitt.edu
X
X  MOST COMPACT
X  -- The best program compaction, using secret PostScript tricks for shrinking.
X  1st prize  din_varg.ps        Peter da Silva   peter@ficc.ferranti.com
X
X  BEST INTERACTIVE
X  -- The best program intended to run interactively through a previewer.
X  1st prize  mm.ps              Allen Braunsdorf ab@mentor.cc.purdue.edu
X
X  MOST USEFUL
X  -- The most useful, yet complex and twisted, program.
X  1st prize  encode.ps          Allen Braunsdorf ab@mentor.cc.purdue.edu
X  2nd prize  alan.ps            Steve Hawley     hawley@mv.us.adobe.com
X
X  The judges decided not to award "Best Non-Graphics" and "Best Level 1
X  PostScript" prizes. Most programs had graphics, and all were Level 1.
X
X
XHONORABLE MENTIONS:
X
X  To choose winners, we had to search among the "worst" programs we have
X  ever seen. Some exceptional programs did not win awards, but we felt
X  by sheer chutzpah should be included in the contest results.
X  The following PostScript entries have won an honorable mention for
X  excellence in weird coding.
X
X  merz.ps              Thomas Merz   c/o R. Oldenbourg Verlag
X                                         Postfach 80 13 60
X                                         8000 Munchen 80, GERMANY
X
X  PSILoveYou.ps        Tim Poston        tim@iss.nus.sg
X  KoreanSidewalk.ps    Tim Poston        tim@iss.nus.sg
X  sig.ps               Allen Braunsdorf  ab@mentor.cc.purdue.edu
X  aak1.ps              Andy Kinsman      kinsman@ssd.Kodak.Com
X
X  pun.ps               David Dubin       dsdst3@lis.pitt.edu
X                       Michael Spring    spring+@pitt.edu
X
X  Serrated_Serifs.ps   Fritz Lott    c/o W. R. Beamish Co.
X                                         220 Sunnyridge Lane
X                                         Golden Valley, MN 55422-5300
X
XOTHER PROGRAMS:
X
X  Many amazing programs would have won prizes if this competition
X  stressed mathematics as highly as coding. The judges decided reluctantly
X  to leave many good programs out.
END_OF_FILE
if test 4161 -ne `wc -c <'WINNERS'`; then
    echo shar: \"'WINNERS'\" unpacked with wrong size!
fi
# end of 'WINNERS'
fi
if test -f 'aak1.HINT' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'aak1.HINT'\"
else
echo shar: Extracting \"'aak1.HINT'\" \(373 characters\)
sed "s/^X//" >'aak1.HINT' <<'END_OF_FILE'
Xaak1.ps, by Andy Kinsman, (kinsman@ssd.Kodak.Com), won an honorable mention.
X
XA pattern that I'm very fond of because it reminds me of many
Xlong canoe trips with my father.  He always purchased old wooden
Xcanoes with these nice seats, and we trashed them running white 
Xwater in downstate New York.  The new ABS canoes are certainly
Xmore resilient, but lack a decent seat!
END_OF_FILE
if test 373 -ne `wc -c <'aak1.HINT'`; then
    echo shar: \"'aak1.HINT'\" unpacked with wrong size!
fi
# end of 'aak1.HINT'
fi
if test -f 'aak1.ps' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'aak1.ps'\"
else
echo shar: Extracting \"'aak1.ps'\" \(1141 characters\)
sed "s/^X//" >'aak1.ps' <<'END_OF_FILE'
X%!
X% aak1.ps
X% (C) Copyright A. Kinsman  11/2/92
X% kinsman@pixel.kodak.com
X%
X/make-l { -.50 .355 moveto .50 .355 lineto stroke } def
X/make-short-l { -.50 .355 moveto 0 .355 lineto stroke } def
X/make-shorter-l { -.50 .355 moveto -.10 .355 lineto stroke } def
X/fancy-l { /lcolor 0 def .15 dup 20 div neg 0 { setlinewidth
Xlcolor setgray make-l lcolor .05 add /lcolor exch def } for } def
X/fancy-short-l { /lcolor 0 def .15 dup 20 div neg 0 { setlinewidth
Xlcolor setgray make-short-l lcolor .05 add /lcolor exch def } for } def
X/fancy-shorter-l { /lcolor 0 def .15 dup 20 div neg 0 { setlinewidth
Xlcolor setgray make-shorter-l lcolor .05 add /lcolor exch def } for } def
X/cell-outside { -.5 -.5 moveto 1.0 0 rlineto 0 1.0 rlineto -1.0 0 rlineto 
Xclosepath clip newpath 1 1 8 { fancy-l -45 rotate pop } for } def
X/cell-inside { fancy-short-l -45 rotate fancy-shorter-l } def
X/one-cell { cell-outside cell-inside } def
X/cell-row { 1 1 3 { gsave one-cell grestore 1 0 translate pop } for } def
X/cell-array { 1 1 3 { gsave cell-row grestore 0 1 translate pop } for } def
X600 2 div 500 3 div sub dup translate 500 3 div dup scale cell-array showpage
END_OF_FILE
if test 1141 -ne `wc -c <'aak1.ps'`; then
    echo shar: \"'aak1.ps'\" unpacked with wrong size!
fi
# end of 'aak1.ps'
fi
if test -f 'aak1.unobfs.ps' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'aak1.unobfs.ps'\"
else
echo shar: Extracting \"'aak1.unobfs.ps'\" \(2377 characters\)
sed "s/^X//" >'aak1.unobfs.ps' <<'END_OF_FILE'
X%!
X% seat caning pattern - By A. Kinsman  
X% 
X% A pattern that I'm very fond of because it reminds me of many
X% long canoe trips with my father.  He always purchased old wooden
X% canoes with these nice seats, and we trashed them running white 
X% water in downstate New York.  The new ABS canoes are certainly
X% more resilient, but lack a decent seat!
X%
X% kinsman@pixel.kodak.com
X%
X 
X% Three lengths of lines are needed for the pattern.
X/make-line { -.50 .355 moveto .50 .355 lineto stroke } def
X/make-short-line { -.50 .355 moveto 0 .355 lineto stroke } def
X/make-shorter-line { -.50 .355 moveto -.10 .355 lineto stroke } def
X 
X 
X% Each line is rendered many times, each time wider and lighter
X% to give a dimension to the weave.
X/fancy-line {
X    /lcolor 0 def
X    .15 dup 20 div neg 0 {          % 20 loops please
X            setlinewidth
X            lcolor setgray
X            make-line
X            lcolor .05 add /lcolor exch def
X            } for
X} def
X/fancy-short-line {
X    /lcolor 0 def
X    .15 dup 20 div neg 0 {          % 20 loops please
X            setlinewidth
X            lcolor setgray
X            make-short-line
X            lcolor .05 add /lcolor exch def
X            } for
X} def
X/fancy-shorter-line {
X    /lcolor 0 def
X    .15 dup 20 div neg 0 {          % 20 loops please
X            setlinewidth
X            lcolor setgray
X            make-shorter-line
X            lcolor .05 add /lcolor exch def
X            } for
X} def
X 
X% Make most of the initial lines needed for the caning pattern.
X/cell-outside {
X-.5 -.5 moveto 1.0 0 rlineto 0 1.0 rlineto -1.0 0 rlineto closepath clip newpath
X1 1 8 { fancy-line -45 rotate
X        pop
X      } for
X} def
X 
X% Fix up two of the lines so they appear as proper overlaps.
X/cell-inside {
X        fancy-short-line -45 rotate
X        fancy-shorter-line
X} def
X 
X% Render a single cell of the pattern.
X/one-cell {
X        cell-outside
X        cell-inside
X} def
X 
X% Render an entire row of cells.
X/cell-row {
X1 1 3 {
X         gsave
X         one-cell
X         grestore
X         1 0 translate
X         pop
X      } for
X} def
X 
X% Render a sequence of rows.
X/cell-array {
X1 1 3 {
X         gsave
X         cell-row
X         grestore
X         0 1 translate
X         pop
X      } for
X} def
X 
X 
X600 2 div         % center and scale up
X500 3 div sub dup translate
X500 3 div dup scale
X 
Xclippath fill     % make black background
Xcell-array
END_OF_FILE
if test 2377 -ne `wc -c <'aak1.unobfs.ps'`; then
    echo shar: \"'aak1.unobfs.ps'\" unpacked with wrong size!
fi
# end of 'aak1.unobfs.ps'
fi
if test -f 'alan.ANSWER' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'alan.ANSWER'\"
else
echo shar: Extracting \"'alan.ANSWER'\" \(4722 characters\)
sed "s/^X//" >'alan.ANSWER' <<'END_OF_FILE'
XSteve Hawley writes:
X
XThe program I sent is a fully programmable Turing Machine, hence the
Xname Alan.ps.  In spite of the bad reputation that PostScript has for speed
X(being an interpreted language), the programs running on this interpreter
Xrunning under the PostScript interpreter in a LaserWriter NT run at engine
Xspeed: the bottleneck is paper throughput, not laying glyphs on the page.
X
XThe variable /it is the input tape (see, I told you it was mnemonic) which
Xis simply a string which each character is a cell on the tape and each cell
Xcontains a member of the symbol set.
X
X/tm is the input machine.  It is a dictionary that consists of state key/value
Xpairs.  Each state is a dictionary that contains one key for every valid
Xmember of the symbol set that it understands.  The value of a state is a
Xprocedure that executes that state.
X
XThe supplied demonstatration program performs addition.  The input tape is
Xin the form:  <mark><a string of 1's><a string of 2's>
XThe output is a string of 3's whose cardinality is the sum of those of the
X1's and 2's.  This is typically the first assignment to CS theory students
Xafter introducing a Turing Machine.
X
XHere is the unobfuscated version of the demo machine:
X
X/inputtape (x1112222) def
X
X/machine 10 ddbegin % ddbegin: dict dup begin
X        % seek for the first 1 on the tape.
X        /findfirst1 3 ddbegin
X                % Read a 1? write an x, goto endseek
X                /1 { (x) writecell r /endseek setstate } def
X                % Read an x? Step to the right
X                /x { r } def
X                % Read a 3? We're done.
X                /3 { (done.) why halt } def
X                end def
X        % seek to end of tape
X        /endseek 5 ddbegin
X                % Read a 1? Step to the right
X                /1 { r } def
X                % Read a 2? Write a 3, step right. (converts all 2's to 3's)
X                /2 { (3) writecell r } def
X                % Read a 3? Step right
X                /3 { r } def
X                % Read a space? (first empty cell) Write a 3, change state.
X                ( ) cvn { (3) writecell /startseek0 setstate } def
X                end def
X        /startseek0 2 ddbegin
X                % Read an x (mark)? Back to start.
X                /x { /findfirst1 setstate } def
X                % Read a 1?  Step left
X                /1 { l } def
X                % Read a 3? Step left
X                /3 { l } def
X                end def
Xend def
X% define the start state.
X/startstate /findfirst1 def
X
XThe output is for each state a snapshot of the tap surrounding the tape
Xhead.
X
XYou can, of course, program you own Turing Machines.  Anyone who is taking
Xa CS theory course might find this a handy tool.
XI provide you with the following procedures (in obfuscated form):
X
Xl - step the head to the left
Xr - step the head to the right
Xwc - write the first char of the string on the top of the stack to the
X     current cell (ie, (3) writecell).
Xss - set the state to a new state for the next execution.
Xw - record a string as an "error" message.  (reason) w
Xht - halt execution and post the reason.
X
XAll error checking is done for you so that a step off the end of the tape
Xor an unknown symbol error will be caught.  The only real failing of this
Xprogram is that a Turing Machine is supposed to have an infinite tape.
XHere we have 5000 cells.  If you step past this limit, you will get an
Xinternal error.  The limit on PostScript strings is 32K, so you can up
Xthe ante by changing the appropriate constants in the code.
X
XWhich is all you need to run a Turing Machine.
X
XI'm proud of the core of the machine simulator itself, which is the paragon
Xof simplicity (in unobfuscated form):
X
X/runmachine {
X        % copy the input tape to the working machine tape
X        inputtape machinetape copy length /tapelen exch def
X        % boot the machine (!!)
X        startstate setstate
X        % show the initial tape
X        showtape
X        {
X                {
X                        onechar dup
X                        (overflowed machine tape) why
X                        machinetape headpos get % get next cell as an int
X                        0 exch put cvn % put in onechar and make into a name
X                        (unknown state) why
X                        machine currstate get % get the current state
X                        (unknown symbol) why
X                        exch get exec % get and run the proc from the state
X                        showtape      % show the tape
X                        halted { stop } if % halt flag set?
X                } loop
X        } stopped pop % we get here on an error (or completion).
X        showwhy       % tell us why.
X        showpage      % spit out the final page.
X} bind def
END_OF_FILE
if test 4722 -ne `wc -c <'alan.ANSWER'`; then
    echo shar: \"'alan.ANSWER'\" unpacked with wrong size!
fi
# end of 'alan.ANSWER'
fi
if test -f 'alan.HINT' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'alan.HINT'\"
else
echo shar: Extracting \"'alan.HINT'\" \(547 characters\)
sed "s/^X//" >'alan.HINT' <<'END_OF_FILE'
Xalan.ps, by Steve Hawley (hawley@mv.us.adobe.com), is a Turing Machine.
X
X  MOST USEFUL -- 2nd prize
X  -- The most useful, yet complex and twisted, program.
X
X/it is the input text (obvious name, huh?).  It must start with an x, be
Xfollowed by a series of 1's then a series of twos.  Change the number
Xof 1's and 2's and watch the output to see what happens.
X 
X/tm is also input, but the correlation between tm and it is not obvious,
Xbut when you understand it you will see that tm is also an obvious name
Xas well as the name of the program itself.
END_OF_FILE
if test 547 -ne `wc -c <'alan.HINT'`; then
    echo shar: \"'alan.HINT'\" unpacked with wrong size!
fi
# end of 'alan.HINT'
fi
if test -f 'alan.ps' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'alan.ps'\"
else
echo shar: Extracting \"'alan.ps'\" \(1889 characters\)
sed "s/^X//" >'alan.ps' <<'END_OF_FILE'
X%!
X% alan.ps
X200 dict begin gsave newpath/d{def}bind def/bd{bind d}bind d/ddb{dict dup begin}
Xbd/ed{end d}bd/X{exch} bd
X
X/it (x1112222) d
X/tm 10 ddb/ff1 3 ddb/1{(x)wc r/esk ss}bd/x{r}bd/3{(done.)w ht}bd ed/esk 4 ddb/1
X{r}bd/2{(3)wc r}bd/3{r}bd( )cvn{(3)wc/ssk ss }bd ed/ssk 3 ddb/x{/ff1 ss}bd/1{l}
Xbd/3{l}bd ed ed/SS /ff1 d
X
X/su {moveto}bd/us{rmoveto}bd/vs{rlineto}bd/sv{stroke}bd/so{closepath}bd/db{neg}
Xbd /hb {add} bd/bh{ dup}bd /qb{sub}bd/pq {mul}bd/qp{put}bd/fs 14 d/cs fs 6 hb d
X/Times-Bold  findfont fs scalefont setfont clippath pathbbox/L X cs qb d/B X cs
Xqb d/T X cs hb d/R X cs hb d/cw B R qb cs div cvi 1 qb d/oc( )d/iy{/y L cs qb d
X}bd iy/nl{y X qb/y X d y T le{showpage iy}if}d /hd{ bh stringwidth pop -2 div 0
Xus show}bd/dcb {cs 0 vs 0 cs vs cs db 0 vs 0 cs db vs so sv}bd/dh{su cs 0 vs cs
X-2 div bh db vs cs -2 div bh vs so sv cs 4 hb nl}bd/il{{x y su dcb bh tl lt{ MT
XX get oc X 0 X qp x cs 2 div hb y 3 hb su oc hd}{pop}ifelse/x x cs hb def}for x
X2 hb y su 0 cs vs cs 2 div bh db vs cs -2 div bh vs so sv cs 2 div 2 hb nl}d/st
X{/x R d hp cw 2 div cvi lt{0 1 cw il hp cs pq R hb y dh}{x 2 qb y su 0 cs vs cs
X-2 div bh vs cs 2 div  bh db vs so sv /os hp cw 2 div cvi qb d os 1 os cw hb il
Xhp os qb cs pq R hb y dh}ifelse}d/sw{R y su rs show fs 2 hb nl}d/ss{ /CS X d}bd
X/w{/rs X d}bd/ht{/htd true d}bd /wc{MT hp 3 -1 roll 0 get qp}d/l{ /hp hp 1 qb d
Xhp 0 lt {(off end.)w ht}if}bd/r{/hp hp 1 hb d hp 5000 ge {(internal error0)w ht
X}if hp tl eq{/tl tl 1 hb d( )wc}if}bd/MT 5000 string d/htd false d/hp 0 d/rm{it
XMT copy length /tl X d SS ss st { {  oc bh  (overflow.) w  MT hp get 0 X qp cvn
X(unknown0)w tm CS get (unknown1) w X get exec st htd{ stop}if }loop}stopped pop
Xsw showpage}bd rm grestore end
X%EOF
X"Did you know that a cow was *MURDERED* to make that jacket?"
X"Yes.    I didn't think there were any witnesses, so I guess I'll have to kill
X you too." -Jake Johansen
X
END_OF_FILE
if test 1889 -ne `wc -c <'alan.ps'`; then
    echo shar: \"'alan.ps'\" unpacked with wrong size!
fi
# end of 'alan.ps'
fi
if test -f 'alan.unobfs.ps' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'alan.unobfs.ps'\"
else
echo shar: Extracting \"'alan.unobfs.ps'\" \(4618 characters\)
sed "s/^X//" >'alan.unobfs.ps' <<'END_OF_FILE'
X%!
X
X/ddbegin { dict dup begin } def
X
X%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
X%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
X
X/inputtape (x1112222) def
X
X/giveup { (not accepted.) why halt } def
X/machine 10 ddbegin
X        /findfirst1 3 ddbegin
X                /1 { (x) writecell r /endseek setstate } def
X                /x { r } def
X                /3 { (done.) why halt } def
X                end def
X        /endseek 5 ddbegin
X                /1 { r } def
X                /2 { (3) writecell r } def
X                /3 { r } def
X                ( ) cvn { (3) writecell /startseek0 setstate } def
X                end def
X        /startseek0 2 ddbegin
X                /x { /findfirst1 setstate } def
X                /1 { l } def
X                /3 { l } def
X                end def
Xend def
X/startstate /findfirst1 def
X
X%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
X%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
X/fontsize 14 def
X/cellsize fontsize 6 add def
X/Times-Bold findfont fontsize scalefont setfont
X
Xclippath pathbbox /top exch cellsize sub def /right exch cellsize sub def
X/bottom exch cellsize add def /left exch cellsize add def
X/cellswide right left sub cellsize div cvi 1 sub def
X
X/onechar ( ) def
X
X/max {
X        2 copy lt { exch } if pop
X} bind def
X
X/inity { /y top cellsize sub def } def
Xinity
X
X/newline {
X        y exch sub /y exch def
X        y bottom le {
X                showpage
X                inity
X        } if
X} def
X
X/cshow { dup stringwidth pop -2 div 0 rmoveto show } bind def
X
X/drawcellbox {
X        cellsize 0 rlineto 0 cellsize rlineto cellsize neg 0 rlineto
X        0 cellsize neg rlineto closepath stroke
X} def
X
X/drawhead {
X        moveto cellsize 0 rlineto cellsize -2 div dup
X        neg rlineto cellsize -2 div dup rlineto closepath stroke
X        cellsize 4 add newline
X} def
X
X/innerloop {
X        {
X                x y moveto drawcellbox
X                dup tapelen lt {
X                        machinetape exch get onechar exch 0 exch put
X                        x cellsize 2 div add y 3 add moveto onechar cshow
X                } { pop } ifelse
X                /x x cellsize add def
X        } for
X        x 2 add y moveto 0 cellsize rlineto cellsize 2 div dup neg rlineto
X        cellsize -2 div dup rlineto closepath stroke
X        cellsize 2 div 2 add newline
X} def
X
X/showtape {
X        /x left def
X        headpos cellswide 2 div cvi lt {
X                0 1 cellswide  innerloop
X                headpos cellsize mul left add y drawhead
X        }
X        {
X                x 2 sub y moveto 0 cellsize rlineto cellsize -2 div dup rlineto
X                cellsize 2 div dup neg rlineto closepath stroke
X                /startcell headpos cellswide 2 div cvi sub def
X                startcell 1 startcell cellswide add innerloop
X
X                headpos startcell sub cellsize mul left add y drawhead
X        } ifelse
X} def
X
X/showwhy { left y moveto reason show fontsize 2 add newline } def
X
X%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
X%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
X
X/setstate {
X        /currstate exch def
X} def
X
X/why {
X        /reason exch def
X} def
X
X/halt {
X        /halted true def
X} def
X
X/writecell {
X        machinetape headpos 3 -1 roll 0 get put
X} def
X
X/l {
X        /headpos headpos 1 sub def
X        headpos 0 lt { (fell off end) why halt } if
X} bind def
X
X/r {
X        /headpos headpos 1 add def
X        headpos 5000 ge { (internal error0) why halt } if
X        headpos tapelen eq {
X                /tapelen tapelen 1 add def
X                ( ) writecell
X        } if
X} def
X
X
X/machinetape 5000 string def
X
X/halted false def
X
X/headpos 0 def
X
X/runmachine {
X        inputtape machinetape copy length /tapelen exch def
X        startstate setstate
X        showtape
X        {
X                {
X                        onechar dup
X                        (overflowed machine tape) why
X                        machinetape headpos get
X                        0 exch put cvn
X                        (unknown state) why
X                        machine currstate get
X                        (unknown symbol) why
X                        exch get exec
X                        showtape
X                        halted { stop } if
X                } loop
X        } stopped pop
X        showwhy
X        showpage
X} bind def
X
Xrunmachine
X"Did you know that a cow was *MURDERED* to make that jacket?"
X"Yes.    I didn't think there were any witnesses, so I guess I'll have to kill
X you too." -Jake Johansen
END_OF_FILE
if test 4618 -ne `wc -c <'alan.unobfs.ps'`; then
    echo shar: \"'alan.unobfs.ps'\" unpacked with wrong size!
fi
# end of 'alan.unobfs.ps'
fi
if test -f 'din_varg.ANSWER' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'din_varg.ANSWER'\"
else
echo shar: Extracting \"'din_varg.ANSWER'\" \(343 characters\)
sed "s/^X//" >'din_varg.ANSWER' <<'END_OF_FILE'
XEach character in the string contains either a space or a weird
Xcharacter.  These characters have 8 perfectly valid bits that can be
Xbroken up into two very simple x and y values. A space represents
Xtoggling between rlineto and rmoveto modes (this value is true or
Xfalse and is kept on the stack). The unobfuscated version show how
Xit's done.
END_OF_FILE
if test 343 -ne `wc -c <'din_varg.ANSWER'`; then
    echo shar: \"'din_varg.ANSWER'\" unpacked with wrong size!
fi
# end of 'din_varg.ANSWER'
fi
if test -f 'din_varg.HINT' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'din_varg.HINT'\"
else
echo shar: Extracting \"'din_varg.HINT'\" \(595 characters\)
sed "s/^X//" >'din_varg.HINT' <<'END_OF_FILE'
Xdin_varg.ps by Peter da Silva (peter@ficc.ferranti.com) is an extremely
Xshort icon-drawing program.
X
XMOST COMPACT -- 1st prize
X-- The best program compaction, using secret PostScript tricks for shrinking.
X
XThis program uses the characters of a string for currentpoint movement.
XHow can (x,y) be derived from the string?
X
XCan you tell how it decides between rmoveto and rlineto?
X
XNotice that the author makes his picture an *icon*. Thus, even though the
Xprogram uses a limited drawing tool, the resulting picture does not look
Xunderdrawn or too blocky. Icons are supposed to be sharp and blocky.
END_OF_FILE
if test 595 -ne `wc -c <'din_varg.HINT'`; then
    echo shar: \"'din_varg.HINT'\" unpacked with wrong size!
fi
# end of 'din_varg.HINT'
fi
if test -f 'din_varg.ps' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'din_varg.ps'\"
else
echo shar: Extracting \"'din_varg.ps'\" \(207 characters\)
sed "s/^X//" >'din_varg.ps' <<'END_OF_FILE'
Xtrue(<<VV$@\\$'&O 9$O%'$LT$&$"V6"$&$<4$?'&$ #I&&?$=$<<@)24 24 scale 3 21 moveto
X{dup 36 eq{pop not}{dup 7 and 4 sub exch 56 and 8 div 4 sub 2 index{rlineto}{
Xrmoveto}ifelse}ifelse}forall stroke pop showpage
END_OF_FILE
if test 207 -ne `wc -c <'din_varg.ps'`; then
    echo shar: \"'din_varg.ps'\" unpacked with wrong size!
fi
# end of 'din_varg.ps'
fi
if test -f 'din_varg.unobfs.ps' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'din_varg.unobfs.ps'\"
else
echo shar: Extracting \"'din_varg.unobfs.ps'\" \(1669 characters\)
sed "s/^X//" >'din_varg.unobfs.ps' <<'END_OF_FILE'
X%!
X% Rearranged a little for pedagogical purposes.
X% This interprets a small state machine program that either moves or draws
X% short line segments. Each byte encodes a line segment, or a move of 0,0
X% is interpreted as a command to toggle the pen state. The code is in the
X% low 6 bits of the byte: 3 bits for delta-x (-4..+3), 3 bits for delta-y
X% (-4..+3).
X 
X% scale and home to fit nicely on the page.
X24 24 scale                     %                           ( -- )
X3 21 moveto                     %                           ( -- )
X 
X% Keep pen state on the stack.
Xtrue                            %                           ( state )
X 
X% Interpreter code.
X(<<VV$@\\$'&O 9$O%'$LT$&$"V6"$&$<4$?'&$ #I&&?$=$<<@) %      ( state prog )
X 
X{                               % for each bytecode         ( state code )
X  dup 36 eq {                   %   if it's a <0,0> move    ( state code )
X    pop not                     %     toggle pen state      ( state )
X  } {                           %   else                    ( state code )
X    dup 7 and 4 sub             %     extract x             ( state code x )
X    exch 56 and 8 div 4 sub     %     extract y             ( state x y )
X    2 index                     %     snarf pen state       ( state x y state )
X    {rlineto} {rmoveto} ifelse  %     move or draw          ( state )
X  } ifelse                      %   endif                   ( state )
X} forall                        % endfor                    ( state )
X 
X% Throw away pen state.
Xpop                             %                           ( -- )
X 
X% Defined the path, show it.
Xstroke showpage                 %                           ( -- )
END_OF_FILE
if test 1669 -ne `wc -c <'din_varg.unobfs.ps'`; then
    echo shar: \"'din_varg.unobfs.ps'\" unpacked with wrong size!
fi
# end of 'din_varg.unobfs.ps'
fi
echo shar: End of shell archive.
exit 0
Technical Details
Message-ID: <JGM.93Feb5152508@vegas.cs.brown.edu>
Path: arc1-ca.pugleaf.net!wupost!howland.reston.ans.net!usc!cs.utexas.edu!qt.cs.utexas.edu!news.Brown.EDU!brunix!doorknob!jgm

Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.postscript,fj.lang.postscript,alt.sources
Path: arc1-ca.pugleaf.net!wupost!howland.reston.ans.net!usc!cs.utexas.edu!qt.cs.utexas.edu!news.Brown.EDU!brunix!doorknob!jgm
From: jgm@cs.brown.edu (Jonathan Monsarrat)
Subject: Obfuscated PostScript Contest Results [1 of 3] REPOST
Message-ID: <JGM.93Feb5152508@vegas.cs.brown.edu>
Sender: news@cs.brown.edu
Organization: Dept. of Computer Science, Brown University
Date: Fri, 5 Feb 1993 20:25:08 GMT
Lines: 1353