Dabblings in PostScript

PostScript is a very interesting and versatile language. Here I've posted some of my experiments with the language. Send these directly to any PostScript-capable printer and watch it do its magic.

Note that some of these may run in infinite loops, so if you don't really have a PostScript printer, your computer's printer driver may or may not simply lock up. On a real PostScript printer, you will need to cancel the job or shut the printer off to stop these.

Read the PostScript code for more information about each script. Feel free to distribute them and use them how you please, so long as you don't make any money off of them and don't remove the copyright text.

Prime Number Calculator (sample output)
Put your printer to work calculating prime numbers!
MIPS calculator (sample output)
Ever wonder how much number-crunching power your printer has? This little ditty calculates and tells you how fast your printer's PostScript intepreter is, along with some product and version info. My DEClaser 5100 gets around 32 KIPS, while GhostScript on a 900MHz Duron clocks in at a whopping 28 MIPS!
a PostScript quine (sample output)
The greatest thing about PostScript quines is that it doesn't matter whether you send the quine itself or the text of the quine to the printer, you get the same output! (more on quines)
Another quine
Possibly the shortest quine in existence. Note this doesn't print anything to paper; use an interpreter (such as GhostScript) to view its output.
BrainF*** compiler (sample output from triangle.bf, sample output from 99botles.bf)
Believe it or not, this program actually compiles BF code into PostScript, and then executes it. Can be used by simply concatenating the BF file onto the end of the PS file. Output is echoed to paper. (more on BrainF***)
Hunt the Wumpus
The classic game, Hunt the Wumpus. Run in an interpreter (no paper output).

That's all for now.

quit