logoalt Hacker News

Running Adobe's 1991 PostScript Interpreter in the Browser

141 pointsby ingveyesterday at 11:58 AM31 commentsview on HN

Comments

leocyesterday at 9:43 PM

For anyone who wants to type or paste into the Code textarea:

* https://webdocs.cs.ualberta.ca/~hayward/papers/BLUEBOOK.pdf The PostScript Language Tutorial and Cookbook (the "Blue Book") (principally) by Linda Gass and John Deubert, 1986 (ISBN 0-201-10179-3)

* https://www.adobe.com/jp/print/postscript/pdfs/PLRM.pdf The PostScript Language Reference (third ed.—a later edition of the "Red Book") (principally) by Ed Taft, Steve Chernicoff and Caroline Rose, 1999 (ISBN 0-201-27922-8)

* https://connor.zip/resources/pdfs/adobe-green-book.pdf PostScript Language Program Design (the "Green Book") by (principally) by Glenn Reid, 1988 (ISBN 0-201-14396-8). A zipfile with Green Book code files: https://web.archive.org/web/20110613223722/http://partners.a...

(At first my retro-ps tab got itself into a state in which it would not run any code entered into the Code textarea, instead timing out and returning an error; and since page reload is soft-disabled you'll have to either force a reload or open a new tab. Also, since the Abobe sample code uses indentation extensively—for example the Blue Book's official "hello world" program is

  newpath
    144 72 moveto
    144 432 lineto
  stroke
  showpage
—it would be nice if the Code textarea handled Tab keyboard inputs. )
0x0yesterday at 5:29 PM

Such a shame that macOS lost all its built-in postscript support including Preview.app in recent versions :(

show 2 replies
1f60cyesterday at 12:11 PM

> 502 Bad Gateway

People must really love PostScript!

show 3 replies
nticompassyesterday at 5:03 PM

I didn't have a PostScript file, so I had to find one. I downloaded the test files from here: http://users.fred.net/tds/lab/postscript.html

Minus the colors, they worked and look pretty good.

sgtyesterday at 1:34 PM

Dropped a .ps in there, it's just stuck "rendering".

tnelsond4yesterday at 1:12 PM

This is pretty sweet. I wonder if this is better than running pdf.js.

I just recently needed jbig2 image support in my web app and using pdf.js wasn't gonna work and be too slow and the wrong interface anyway, so I took the source code for the jbig2 decoder and vibe coded a converter that outputs 1 bit pngs. After some manual culling of code I got the wasm module down to 27kb with no glue.

gnerd00yesterday at 1:13 PM

postscript hacks are fun! the encryption on Type 1 fonts in 1987 was broken by Harvey Grosser, an ex-IBM System 360 coder, in Palo Alto. NeWS was bad NeWS to many, with a minuscule user base at its peak. Meanwhile, every print publication in existence was faced with "do or die" in digital production. Many ended with the latter, many years later.

panick21_yesterday at 12:56 PM

Sun NeWS in the browser would be cool as well.

show 1 reply
dsecurity49yesterday at 2:35 PM

[dead]

DonHopkinstoday at 8:46 AM

[dead]

stuaxoyesterday at 1:22 PM

Wonderful.

jeffrallenyesterday at 2:44 PM

But does it say "PC LOAD LETTER"?

thomasflyesterday at 1:14 PM

How much does a subscription for this website costs per month? After all it says Adobe in the title.