PostScript 1.0 – A Code Study
ztoz.blog
ztoz.blog
%!
/threshold 4 def
/Sierpinski {
dup threshold ge {
3 {dup 2 div Sierpinski dup 0 rmoveto 120 rotate} repeat
} {
3 {dup 0 rlineto 120 rotate} repeat closepath
} ifelse
pop
} bind def
50 50 moveto 512 Sierpinski fill
showpage
It actually can be simplified a bit more, and the explicit recursion can be removed entirely, since there's already a free operand stack.At the moment I'm just implementing the language. The core interpreter is done apart from error handling and a ton of operators. After that I'll decide whether to go on to the imaging.
[1] http://beefchicken.com/retro/laserwriter [2] https://github.com/mamedev/mame/blob/master/src/mame/apple/l...
The DoD DTIC service has a couple of reports that cover the Harbor Pilot Simulation, but I haven't found any reports written by E&S. The Computer History Museum has some records from Evans and Sutherland, but I don't think any of them cover the language.
Honestly, my first curiosity regards whether Chuck Moore and Forth get any mention or whether this is a true parallel development, possibly necessitated by the hardware at hand. My perception, based on zero evidence, was that Forth had some influence on the design of Postscript.
> The architecture suggested by John Gaffney was to be based on a fictitious stack machine (at that time we had no knowledge of a similar approach taken by the Forth language).
That is the only mention of "Forth".