4 ms·
Thanks, that's going on my reading list. Question to the more educated among us: I read that Apple's UI was based on Display PostScript... how similar is it to
by sph 3y ago
Thanks, that's going on my reading list.
Question to the more educated among us: I read that Apple's UI was based on Display PostScript... how similar is it to original PostScript, and why was it abandoned?
- ks2048 3y agoThat’s interesting. I don’t know anything about it but maybe it means it was based on PS “drawing model” more than the actual PS language. (ie the basic primitives and how stroke, fill, etc work)
- jasonwatkinspdx 3y agoIt was used as the display language for NeXT and some unix workstations. Just googling real quick it was a direct dialect of PostScript with the main changes being related to using efficient 32 bit integer ids in place of strings and similar performance optimizations.
- mepian 3y agoApple's UI is based on Display PDF since macOS 10 (Mac OS X, using the old branding), this is the royalty-free replacement for Display PostScript of OPENSTEP and NeXTSTEP which became the foundation for post-9 macOS after Apple absorbed NeXT. @DonHopkins is the most knowledgeable person on this topic here since he worked on another PostScript-based graphics system NeWS for the competitor Sun Microsystems.
- runlaszlorun 3y agoNeWS is an interesting animal. I loved going through the original PDF manuals for it.
- jacquesm 3y agoI have pinged Don (though there is a fair chance he's already sleeping).
- DonHopkins 3y agoAt 1:30 am on a Monday morning? No way!
- jacquesm 3y agoHehe. Ok :) Good morning, Don.
- DonHopkins 3y agoThere's an important distinction between the PostScript programming language, and the PostScript imaging model. You can have one without the other. There are a lot of problems using a full blown programming language as a graphics model. PDF is like PostScript without the programming language, just the imaging model. (But with a lot of extra crap thrown in so haphazardly and indiscriminately that the Adobe PDF Viewer browser plugin traditionally requires downloading patches almost every day!) But you can "distill" (partially evaluate) a PostScript program into a PDF document by executing it, and recording the calls to the PostScript imaging model that it makes (and you can also optimize them too -- see Glenn Reid's and Acrobat's "Distillery"). Apple made a library called Quartz, that was like PDF for the screen, without the programming language part that Display PostScript of NeWS supported. And Quartz evolved into Core Graphics in Cocoa, which is used today. PostScript calls it the "Stencil / Paint Imaging Model". There are other libraries and APIs inspired by PostScript, like Quartz, Core Graphics, Keith Packard's Cairo graphics library, and the browser's Canvas API (often implemented on top of Cairo). I wrote up a comparison of Forth and PostScript, and some history and links about PostScript and the languages that inspired it (Brian Reid's retrospective he posted to laser-lovers is especially interesting and first-hand) here: https://news.ycombinator.com/item?id=21968175 https://news.ycombinator.com/item?id=21968175 >Kragen is right that PostScript is a lot more like Lisp or Smalltalk than Forth, especially when you use Owen Densmore's object oriented PostScript programming system (which NeWS was based on). PostScript is semantically very different and much higher level that Forth, and syntactically similar to Forth but uses totally different names (exch instead of swap, pop instead of drop, etc). >But its most obvious similarities with Forth are based on generic Computer Science concepts like stacks, which is not something particularly unique to Forth itself, so saying PostScript was influenced by Forth ignores other much more influential languages like Interpress, JaM, and Design System, which directly influenced PostScript and were designed by the same people. Also, PostScript is not threaded like Forth. But it's homoiconic, unlike Forth and [like] Lisp. [...] >Brian Reid wrote about page independence, comparing Interpress' and PostScript's different approaches. Adobe's later voluntary Document Structuring Conventions actually used PostScript comments to make declarations and delimit different parts of the file -- it wasn't actually a part of the PostScript language, while Interpress defined pages as independent so they couldn't possibly affect each other: https://groups.google.com/forum/#!topic/fa.laser-lovers/H3us4h8S3Kk https://groups.google.com/forum/#!topic/fa.laser-lovers/H3us... >By now you can probably see the fundamental philosophical difference between PostScript and Interpress. Interpress takes the stance that the language system must guarantee certain useful properties, while PostScript takes the stance that the language system must provide the user with the means to achieve those properties if he wants them. With very few exceptions, both languages provide the same facilities, but in Interpress the protection mechanisms are mandatory and in PostScript they are optional. Debates over the relative merits of mandatory and optional protection systems have raged for years not only in the programming language community but also among owners of motorcycle helmets. While the Interpress language mandates a particular organization, the PostScript language provides the tools (structuring conventions and SAVE/RESTORE) to duplicate that organization exactly, with all of the attendant benefits. However, the PostScript user need not employ those tools.