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."

7 of 265 comments (clear)

  1. wow by Kipper+the+Llama · · Score: 5, Funny

    Sad memories of being a nine year old loser are flooding my brain at the mere mention of "The Game of Life".

  2. Much cooler PS hack by ocelotbob · · Score: 5, Informative

    PS-HTTPD - a webserver in PostScript.

    --

    Marxism is the opiate of dumbasses

  3. 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.
  4. Re:Webserver by Xonea · · Score: 5, Informative

    Yes, it can be found here

    It must be used with inetd though, because postscript doesn't support sockets...

  5. 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

  6. stupid postscript tricks by Anonymous Coward · · Score: 5, Funny
    My own personal contribution to the world of stupid postscript tricks wasn't nearly as productive as this one. But I promise you it was funnier!

    I wrote a program that substitutes occurances of one string with another one. You send it to the printer than laugh as everyone else's pages mysteriously have the word "this" replaced with "that". One time I loaded it on just before a friend printed his source code. He couldn't figure out for the life of him where his semicolons had gone! Ah... youth.

    The best part is, the code stays resident until the printer is power cycled. This enables slightly more sinster uses for this sort of thing. One of my professors used to joke about using as program like this to change the numbers on his paycheck when it was being printed!

    The code is still on my website near the bottom. It's called PSReplace.

  7. 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".