29 comments

[ 4.0 ms ] story [ 79.2 ms ] thread
The Computer History Museum has just announced the release of the source code of the original version of Adobe PostScript (https://info.computerhistory.org/aoc-postscript). It is not open source under the OSI definition, however; there is a license agreement that must be signed to get access to the code, and (among other stipulations) the license only allows non-commercial use, and I don't believe it can be re-uploaded to another site such as GitHub.
I wrote a PostScript interpreter in Javascript four years ago :) Write a program and see it rendered: https://www.ivank.net/veci/pdfi/
Impressive! (Your Github ressource is gone, can you provide it again, everybody wants to learn)
PostScript is such a beautiful language! I used to study the PostScript reference manual for hours at a time, in awe of its elegance and perfection:

https://www.adobe.com/jp/print/postscript/pdfs/PLRM.pdf

How interesting a web would be with embeddable PostScript figures! Yes it's Turing-complete and all, and yes that's no problem: Interpret these figures with a timeout, make the interpretation interruptible, use a sandbox or different threads for rendering etc. HTML+CSS+user interaction is Turing complete as well, and we can still browse the web despite this.

Thank you a lot for PostScript!

Can anyone suggest elegant PS code for reading?

Manuals are nice, but there's elegant and concise practice to enjoy as well. For instance, graphics state as first-class objects to be passed around an retained in multiplicity, in painfully stark contrast to the impoverishing scarcity of HTML canvas's graphics contexts.

It's going to be tough to find something, since most Postscript is generated (badly) rather than hand written. I had a nice hand-written logo we used to use to check if our printer queues were working back in the 1990s but I have lost it now.

The following link looks OK to my eyes though: http://paulbourke.net/dataformats/postscript/

Don Lancaster's newsletters are all hand coded in PS with his own support routines. Poke around the site and you'll find links to the source along with their PDFs.

https://www.tinaja.com/

The Story of Sun Microsystems PizzaTool: How I accidentally ordered my first pizza over the internet.

https://donhopkins.medium.com/the-story-of-sun-microsystems-...

PizzaTool source code:

https://www.donhopkins.com/home/archive/NeWS/pizzatool.txt

PostScript metacircular interpreter (PostScript implemented in PostScript):

https://www.donhopkins.com/home/archive/NeWS/ps.ps

Glenn Reid's Distillery (PostScript optimizer written in PostScript):

https://www.donhopkins.com/home/archive/NeWS/news-tape/utili...

https://www.donhopkins.com/home/archive/postscript/newerstil...

Pie Menus for The NeWS Toolkit:

https://www.donhopkins.com/home/archive/NeWS/win/pie.ps

Tab Windows for The NeWS Toolkit:

https://www.donhopkins.com/home/archive/NeWS/win/tab.ps

PostScript terminal emulator:

https://www.donhopkins.com/home/archive/NeWS/tnterm.ps

Mousee (visual mouse input display):

https://www.donhopkins.com/home/code/NeWS/demo/mousee

UniPress Emacs NeWS Display Driver:

https://www.donhopkins.com/home/archive/emacs/emacs.ps

Gnu Emacs 18 NeWS Display Driver:

https://www.donhopkins.com/home/code/emacs18/src/tnt.ps

Heap Sort by Owen Densmore:

https://www.donhopkins.com/home/code/heapsort.ps.txt

Bubble Sort by Sam "Bobo" Leffler:

https://www.donhopkins.com/home/code/bubblesort.ps.txt

QuickSort by Don Woods:

https://www.donhopkins.com/home/code/quicksort.ps.txt

Big Brother -- Jeremy Huxtable's Round NeWS Eyeball Windows (the original inspiration for the crude X-Windows knock-off-in-a-rectangular-window "XEyes"):

https://www.donhopkins.com/home/archive/NeWS/news-tape/fun/e...

https://www.x.org/rel...

This talks about a presentation that was given where the details of font hinting were disclosed. Does anyone know if there is a video available of that?
Warnock gave the American Philosophical Society's Goldstine Lecture in 2010, titled "Simple Ideas That Changed Printing and Publishing". A video can be found here: https://diglib.amphilsoc.org/islandora/video/simple-ideas-ch...

In a paper that accompanied the video, Warnock outlined the methods Adobe used, describing them as '[type] hints and erosion [that] produced high-quality raster representations of the letters at medium and high resolution." Paper linked here: https://www.researchgate.net/publication/298409252_Simple_Id...

This didn't mention display postscript, which was used on the NeXT systems (and later on MacOS?)

https://en.wikipedia.org/wiki/Display_PostScript

Display Postscript was only used in Rhapsody, the very first releases of what later became OS X, but not in Classic MacOS (up to System 9).

Apple removed Display Postscript for OS X - it was insecure by default, e.g. allowing remote file access, when using the remote display feature on NeXT/OpenStep. I guess Apple also wanted to avoid the Adobe licensing fees....

I'm not sure how you could fail to mention that Apple cleverly avoided Adobe's licensing fees by moving from Display PostScript to Display PDF.[1] PDF was free under GPLv2, and if I'm not mistaken, still is, so Apple shouldn't mind still using it... as long as it doesn't change to GPLv3.

[1] https://en.wikipedia.org/wiki/PDF#Native_display_model

Thanks for adding this - I considered to include it, but couldn't find a source stating that the technology was officially called DisplayPDF.

I think Apple's official term for the OS X graphics layer is "Quartz" and there's a short discussion about the use of PDF in Quartz on Wikipedia which states "Quartz's internal imaging model correlates well with the PDF object graph, making it easy to output PDF to multiple devices":

https://en.wikipedia.org/wiki/Quartz_(graphics_layer)#Use_of...

This arstechnica article linked on the Wikipedia page gives some more details, but it was written in 2000, so many things might have changed since then:

https://arstechnica.com/gadgets/2000/05/mac-os-x-dp4/4/

I think it's reasonable to assume that Apple's Quartz code in OS X no longer includes any actual Adobe code, so this might have been sufficient to avoid the licensing fees.

No, Adobe didn't follow through on providing a free license for Display PostScript as promised --- this killed a lot of software companies which had NeXT/OPENstep software ready to go --- of course, Adobe didn't care (they couldn't even bother to keep track of the source code for Glenn Reid's TouchType.app) and were glad to kill off competition such as PasteUp.app

Mike Paquette and the rest of his team spent a decade re-creating Display PostScript as Quartz, née DisplayPDF.

Too bad most printers today are not capable of interpreting PostScript directly, like they used to back in the day. (Curiously, the microprocessors built into such printers were more powerful than those found in personal computers at the time.)
Yes, that was the big hope back then, that we would no longer need printer drivers. You could just just plug in any printer, or give an IP-address of a printer and it would immediately work.

Instead it got much worse. Now when you buy a new printer you have to check which operating systems is supported. My CUPS server has 2064 drivers just for HP printers.

Even though my printers actually do have postscript interpreters I can still not just plug them in to an USB port on any computer and print a document. It is crazy.

Actually AirPrint is this, it’s kind of surprising Microsoft didn’t choose to implement it in Windows.
Some header files seem to be missing from the published code: except.h, framebuf.h, gray.h, reducer.h

In additon, the code is (as expected) written in K&R C, so it won't compile out of the box on a modern system.

Code in TeX, Asciidoc, and/or Markdown, and then create page-layout formats (ePubs, PDFs, and/or PS) and layoutless media like txt, man (groff), and html.

IIRC, the HP LJ4 had to have a special option to print PS directly.

You could get a plug-in PostScript cartridge as far back as the LJII.
Postscript is one of my favorite languages, Something about stack based languages with simple consistent syntax. I suspect if I had picked up forth before PS it would occupy the same fond spot in my head. but I did not and now I find forths typing awkward, and it lacks the killer feature of postscript, you get to draw pictures.

I love making hand written artisanal postscript. The neatest thing I ever made was a sort of box model, the idea being the main advantage(there are many, but go with me here) of putting your document in html over PS is that html justifies and flows your text. So it was a library where you could specify a box(or a set of linked boxes) for your text area and postscript would auto fold the contained text. The idea was to have all sorts of functions to make it easy to write documents in postscript directly, no one but me actually wants to do this, so it remains a perpetual prototype.

edit: found it, the code is in a sorry state, like I said perpetual prototype, but here is how I did a box model(ish) in PS

https://nl1.outband.net/fossil/misc/file?name=dtp.ps&ci=tip

Very nice! I did something similar in the dim and distant past - I used it to create a script for the YAM email client on the Amiga, for pretty-printing emails[1] using Ghostscript. (By default YAM just spews unformatted ASCII at the printer port.)

One my fondest early internet memories was the Email I received in slightly mangled English from someone who said he couldn't really see the point of the scripts until he tried them, and went on to describe the results as "f*ing damn better"!

[1]http://aminet.net/package/comm/mail/PSMail

You can play Zork with an interpreter written in postscript.

http://zzo38computer.org/zmachine/interp/zmachine.ps

http://microheaven.com/ozmoo/games/calypso/calypso.z3

    gs -- zmachine.ps calypso.z3
/Troll (Sword) with kill

https://donhopkins.medium.com/the-shape-of-psiber-space-octo...

>The Shape of PSIBER Space: PostScript Interactive Bug Eradication Routines — October 1989

>Abstract The PSIBER Space Deck is an interactive visual user interface to a graphical programming environment, the NeWS window system. It lets you display, manipulate, and navigate the data structures, programs, and processes living in the virtual memory space of NeWS. It is useful as a debugging tool, and as a hands on way to learn about programming in PostScript and NeWS.

>Figure 10 shows two views of a map of Adventure.

Owen Densmore worked closely with Bill Atkinson at Apple on the PostScript printing system, and with John Warnock at Adobe on the LaserWriter, and at Sun with James Gosling and I and others on the NeWS window system and user interface toolkit.

During his demo of MacPaint, Bill Atkinson called out Owen for writing the printing routines:

https://www.youtube.com/watch?v=mqQJ-VnJ2uc&t=10m45s

https://news.ycombinator.com/item?id=29295116

>Owen is a brilliant programmer and "User Interface Flower Child", who led the "Print Shop" group at Apple that created the printing architecture for Apple's Lisa and Macintosh hardware, working closely with John Warnock and other Adobe engineers on the LaserWriter.

https://en.wikipedia.org/wiki/NeWS

>NeWS was architecturally similar to what is now called AJAX, except that NeWS coherently:

>used PostScript code instead of JavaScript for programming.

>used PostScript graphics instead of DHTML and CSS for rendering.

>used PostScript data instead of XML and JSON for data representation.

https://news.ycombinator.com/item?id=22456710

DonHopkins on March 1, 2020 | parent | context | favorite | on: Sun's NeWS was a mistake, as are all toolkit-in-se...

Owen Densmore recounted John Warnock's idea that PostScript was actually a "linguistic motherboard". (This was part of a discussion with Owen about NeFS, which was a proposal for the next version of NFS to run a PostScript interpreter in the kernel. More about that here:)

https://news.ycombinator.com/item?id=17077721

Owen Densmore's discussion of John Warnock's "Linguistic Motherboard" idea for PostScript:

https://donhopkins.com/home/archive/NeWS/linguistic-motherbo...

    Date: Tue, 20 Feb 90 15:20:52 PST
    From: owen@Sun.COM (Owen Densmore)
    To: don@cs.UMD.EDU
    Subject: Re:  NeFS

    > They changed the meaning of some of the standard PostScript operators,
    > like read and write, which I don't think was a good idea, for several
    > reasons... They should have used different names, or at least made ..

    Agreed.  And I DO see reasons for the old operators.  They could
    be optimized as a local cache for NeFS to use in its own calcs.

    > Basically, NeFS is a *particular* application of an abstraction of
    > NeWS. The abstract idea is that of having a server with a dynamically
    > extensible interpreter as an interface to whatever library or resource
    > you want to make available over the network (let's call it a generic
    > Ne* server).

    Very true.  This has been particularly difficult for me to get across
    to others here at Sun.  I recently wrote it up for Steve MacKay and
    include it at the end of the message.

    > It's not clear to me if NeFS supports multiple light weight PostScript
    > processes like NeWS.

    I asked Brent about this, and he agreed that it's an issue.  Brent
    has been talking to a guy here who's interested in re-writing the
    NeWS interpreter to be much easier to program and debug.  I'd love
    to see them come up with a NeWS Core that could be used as a generic
    NetWare core.

    I think you should send  your comments off to nfs3 & see what happens!
    I agree with most of your points.

    Owen

    ...
> His mentioning using PostScript for a file server is particularly interesting: Sun's next version of NFS is going to use PostScript with file extentions as the client-server protocol! This paper explores NeWS in this light: as a Programmable Network Facility, a major part of Sun's future networking strategy.

I seem to remember people writing Postscript that when printed turns your printer into a file server, so in a way that idea came true!

To me it seems like the attempt here is to make Postscript into what Javascript became. Although Postscript is a beautiful language it’s probably too unapproachable for the average person so it didn’t work out (for that) where Javascript did.