Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

TorgoX (1933)


"Il est beau comme la retractilité des serres des oiseaux rapaces [...] et surtout, comme la rencontre fortuite sur une table de dissection d'une machine à coudre et d'un parapluie !" -- Lautréamont

Journal of TorgoX (1933)

Tuesday February 01, 2005
08:19 PM


[ #22974 ]
Dear Log,

I've been getting over this cold for about a week now. Ugh. In this bleary state, I can't just sit still and read or watch the television-mo-tron; but I don't trust myself to do anything substantive like work on Perl code. So I noodle around with the ultimate harmless no-consequences environment: PostScript.

And I've been thinking: At the abstract level there's no great difference between "hello world!" in Perl, in PostScript, or in HTML. But even with that in mind, I've recently taken a liking to the idea of a PostScript document that is different each time you print it.

Now, in theory, this is not greatly different from just running Unix "fortune", or in hitting a web page that uses JavaScript to throw a random saying at the screen. But fortune and a fortune-JavaScript both have a problem: they're far too fast, so the payoff is too quick, and it's just some little thing on the screen. There's no "reveal".

But send this (PostScript, one page, about 10KB) to a printer, and metal parts heat up, chemicals swirl, there's a distant-sounding muffled "foooeee" sound, and then finally motors slooooowly slide out a PRINTED PAGE. Special. Just for you.

(Yes, you can preview in GhostView or whatever, but you know that's just peeking.)

It does everything short of playing a music sting sound-effect. TADAAAAAAAAA.

PS: I've thought of making a PS file that, when printed, just spits out a page of freshly generated pseudorandom digits, handy in many technical tasks. But I don't trust the pseudorandom generators in PostScript implementations to something as important as technical tasks of unknown importance. For that, it's better to just hardcopy a page of numbers from