rokicki@neon.Stanford.EDU (Tomas G. Rokicki) (05/06/91)
\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
jwz@lucid.com (Jamie Zawinski) (05/06/91)
Tomas Rokicki posted some good ideas about test suites and PS preprocessors. But I'd just like to point out that Adobe doesn't really need to have anything to do with this. I mean, if someone were to write the code you mentioned and make it public domain, it would get distributed, and used. I think the problems are more rooted in ignorance than in lack of legislation. (That applies to a lot of things, doesn't it? :-)) -- Jamie
nelson@sun.soe.clarkson.edu (Russ Nelson) (05/06/91)
In article <1991May5.214431.27894@neon.Stanford.EDU> rokicki@neon.Stanford.EDU (Tomas G. Rokicki) writes:
Properly dealing with \.{bind} requires running the simple \.{bindtest}
script I posted earlier over scripts, and cleaning up any misuses found.
I ran it on one of my prologs, and I don't know how to interpret the
results. Could you rewrite it so that it says "You shouldn't do *this*
in your PostScript prolog. Instead, do *that*."
--
--russ <nelson@clutx.clarkson.edu> I'm proud to be a humble Quaker.
It's better to get mugged than to live a life of fear -- Freeman Dyson
I joined the League for Programming Freedom, and I hope you'll join too.
richard@pegasus.com (Richard Foulk) (05/13/91)
>Tomas Rokicki posted some good ideas about test suites and PS preprocessors. >But I'd just like to point out that Adobe doesn't really need to have anything >to do with this. I mean, if someone were to write the code you mentioned and >make it public domain, it would get distributed, and used. I think the >problems are more rooted in ignorance than in lack of legislation. (That >applies to a lot of things, doesn't it? :-)) I don't buy this. Yes, ignorance is one of the big problems. But what if you buy a PostScript-producing program and it doesn't work right? If you were to verify that it doesn't pass Adobe's own tests, I'd think that that would be better grounds than just about anything else for demanding that they fix things. I think Tom has the right idea. -- Richard Foulk richard@pegasus.com