Article View: comp.lang.postscript
Article #5575Diatribe, revisited
From: Tomas G. Rokicki
Date: Sun, 05 May 1991 21:44
Date: Sun, 05 May 1991 21:44
76 lines
4760 bytes
4760 bytes
\title{If I was king of the world, tell you what I'd do.}
This posting is in response to some of the mail I've gotten concerning my
recent long diatribe against PostScript.
First, let me state that it is unquestionable that PostScript has done much
more good, by far, than its few flaws have done damage. Dealing with any
system of this complexity, especially in a competitive capitalistic
environment, requires compromises and concessions to reality. Adobe has
done an admirable job in many respects.
Secondly, let me apologize to all of those whom I've offended, no matter
how slightly; all of the many people who have contributed to PostScript,
through its design, implementation, or use, are heros in my book.
But there remain problems to be solved, and if we can manage to overcome
the handicap of Level 2, we might even be able to solve them. For each
problem, there is a solution. Here are a few simple ones.
The rendering issues are not so much a problem as a design decision---and,
I think, a good one. Applications programmers should simply be a bit more
critical of their output and investigate methods of improving it. And
let's face it---choosing zero as a line width for hairlines is an outright
bug---applications programs simply should not allow this, at least not
without a large red flag warning.
Most of the problems with the language are things that can be overcome with
an awareness of the difficulties and with proper use of the existing
facilities. The static limits are unfortunate, but some implementations
are starting to lift them and a bit of care will suffice for the rest.
Properly dealing with \.{bind} requires running the simple \.{bindtest}
script I posted earlier over scripts, and cleaning up any misuses found.
Adobe should have a set of similar PostScript test scripts that can be used
to check various other difficulties.
The problems with the structuring conventions are not quite as easy to
solve, but neither are they that difficult. Adobe should write and make
available a simple C routine that properly reads and parses a properly
formed PostScript file, passing resource requirements up to the next higher
level and performing any other relevant operations. (Of course, this C
routine will also properly handle PostScript files that they themselves
contain graphics files.) This source should be made fully public domain, so
the GNU people can use it, commercial people can use it, and government
people can use it.
Adobe should also provide a test suite that checks whether a document fits
the structuring conventions. It can check the `prolog' portion, that it
does not modify the dictionary stack, operand stack, save level, graphics
state, or any thing else it must not modify. It can check the setup
section for other problems. It can check the individual pages for stack
consistency, and it can enclose each page in save/restore to make sure they
are not retaining information for subsequent pages. And the like. Such a
test suite would take a few weeks to write, and another few weeks to debug,
but once written, it would save lives.
Heck, I can envision a single tool---a C program with a few prolog
files---that would take example output from an application and test it in
all of the above ways, and print out an analysis of the PostScript and
suggestions for improvements. With such a tool widely available, there
would be no excuse for faulty PostScript.
As a matter of fact, if I were truly king of the world, I'd have Adobe
create a position called `PostScript Pope'. This fellow would be
responsible for building the tools mentioned above that test the validity
of a PostScript file. He would---on a full-time basis---evangelize the
moral code of PostScript and its benefits. He would consult with sinners
and help them back to the path of salvation. But most of all, he would be
visible and accessible---on the various networks, in free newsletters, and
by phone---to anyone thinking of using PostScript. If Adobe is going to
make the rules, they should provide the means to check and enforce them.
I'll go away now. As a good friend of mine once said, `Tom, you should
learn to talk with your mouth closed. Whenever you open it, you embarrass
yourself.'
-tom
Technical Details
Message-ID:
<1991May5.214431.27894@neon.Stanford.EDU>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!apple!decwrl!stanford.edu!neon.Stanford.EDU!rokickiShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!apple!decwrl!stanford.edu!neon.Stanford.EDU!rokicki From: rokicki@neon.Stanford.EDU (Tomas G. Rokicki) Newsgroups: comp.lang.postscript Subject: Diatribe, revisited Message-ID: <1991May5.214431.27894@neon.Stanford.EDU> Date: 5 May 91 21:44:31 GMT Organization: Computer Science Department, Stanford University, Ca , USA Lines: 76