DonHopkins
8 years ago
0
0
You could do a whole lot more window manipulation, user interface customization, event handling, object oriented programming, debugging, multithreaded programming and networking with the NeWS window system than with Display PostScript.

At Sun in 1991, we wrote a NeWS window manager that not only supported advanced features implemented in PostScript, like tabbed windows and pie menus [1], panning across a large virtual desktop, switching between different rooms, plugging together all kinds of other extensions and gui toolkit customizations that could be applied to all NeWS applications (like globally replacing all linear menus with pie menus, or melting the screen [2], or watching your cursor with round eyeballs [3]), and framing arbitrarily shaped windows [4], but it could also wrap and manage all of your X11 windows, too.

Plus it performed much better than any X11 window manager could, because it was running in the same address space as the window system, so didn't have to send asynchronous messages to the window manager, lock the input queue until it received a response from the wm, send asynchronous messages to the wm over the network, and switch context back and forth between the window server and the wm, as all X11 window managers must unfortunately do. [5]

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.

Here's another example that was written 100% in NeWS PostScript, of the kind of thing that you just couldn't do in Display PostScript:

The Shape of PSIBER Space: PostScript Interactive Bug Eradication Routines - October 1989 [6]

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.

Sun sold a PostScript printer called NeWSPrint, which used a sandboxed version of the NeWS server running on a Sun workstation as a rendering engine, sandboxed so you didn't have access to the file and networking operators. But I figured out a way to cause and catch an error with "stopped" that left some privileged code on the operand stack (PostScript is homoiconic, so code is data, like an executable array of operators), from which I was able to fish out a reference to the 'file' operator that could open sockets as well. So I made a small PostScript file you could print, which connected to the local "finger" daemon, and printed out a list of everyone who was logged in to the print server.

[1] https://www.youtube.com/watch?v=tMcmQk-q0k4

[2] http://www.donhopkins.com/home/archive/news-tape/fun/melt/me...

[3] http://www.donhopkins.com/home/archive/news-tape/fun/eye/eye...

[4] http://www.donhopkins.com/home/catalog/images/pizzatool.gif

[5] http://www.art.net/~hopkins/Don/unix-haters/x-windows/disast...

[6] http://www.donhopkins.com/drupal/node/97