Slashdot Mirror


Game of Life in Postscript

smashr writes "It never really occured to me that postscript could be used for something other than printing, until I came across this page. Evidently someone has written the classic 'Game of life' entirely in postscript. You can even send it to the printer and have it output every single iteration.. now that would be a fun prank."

3 of 265 comments (clear)

  1. Re:Duh by Captain+Lobotomy · · Score: 5, Interesting

    True. In fatc, it's a stack-oriented programming language (like Forth). When Apple released the original LaserWriter in the mid-80s, it was actually the most powerful *computer* they made at the time (next in line was the Mac Plus -- remember those?).

    --
    Time flies like an arrow. Fruit flies like a banana.
  2. Go Game in 5 lines of PostScript by _dl_ · · Score: 5, Interesting

    %!PS-Adobe-1.0 EPSF-10. % PS GoBan (c) 1996 by Laurent Demailly
    %%BoundingBox: 0 0 150 150 % *** http://www.demailly.com/~dl/go/ ***
    /D{def} def/d{dup}D/e{exch}D/s{stroke}D/l{lineto}D/M{mul}D /f{fill}D/S{setgray}D
    /R{grestore}D/m{moveto}D/z 9 D/c 15 D/x z c M D/p{42 sub d z mod 1 add e z idiv
    1 add gsave 1 index c M 1 index c M c .5 M 1 0 arc gsave f R .5 S s c M e c M e
    c .3 M 270 360 arc s R}D 0 0 x 2 M 1 0 arc .9 .7 .5 setrgbcolor f s 0 S c c x{d
    c m d x l d c e m x e l}for s(BeJR\\IHP>=6U){p}forall 1 S(?TS[QcGZFOC){p}forall

  3. Re:Wow. by mark-t · · Score: 5, Interesting
    Definitely a testament to the people who created postscript
    Person, actually. Postscript was invented by one man.

    Postscript has an interesting story, actually. The man who invented it had, previously, designed the "language" to be used by Xerox's new laser printers. This was not a real programming language, but was simply a control language. Xerox was nevertheless entirely delighted with it, and paid him a fair amount of money for it. After he had finished this task for Xerox, he then decided to start from scratch and try to build a printer language that was more suited to his vision of what one should be. When he finished, he decided to notify Xerox of his new development (hoping, perhaps, to get another large paycheque from them), but Xerox declined to use it, wanting to stick with his first printer language that they were already beginning to use. He teamed up with someone else and founded the company Adobe, and they called the language "Postscript".