Hacker News new | ask | show | jobs
by DonHopkins 1343 days ago
A couple years before you could order burritos with Adobe's Fax enabled PostScript printers, I made PizzaTool use Sun's NeWS based "NeWSPrint" PostScript=>FAX gateway to order pizza from Tony and Alba's, and Sun Microsystems shipped PizzaTool with Solaris Unix SVR4. PizzaTool would actually fax a picture of the pizza with all its toppings, and let you preview it in color on the screen! As long as you're FAXing PostScript, why just use text, why not draw it on the screen in an interactive round spinning window too? (Try doing that in Display PostScript or Vim!)

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-...

FAXed order with PostScript pizza visualization:

https://miro.medium.com/max/720/1*EvKv1m2UbxuPJ1Mg9oGUqQ.png

NeWS PostScript Source Code:

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

Manual Entry:

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

  % Fork a process to sprinkle a topping on the pizza in the background.
  %
  /StartSprinkle { % topping => -
    { % fork:
      gsave
       /PaintSetup self send
       /ClipCrust self send
       { % send to topping:
         clear /paint self send
       } exch send
       Sprinklers currentprocess undef
      grestore
    } fork
    Sprinklers exch dup put pop
  } def

  % Kill all the processes sprinkling toppings.
  %
  /StopSprinklers { % - => -
    [Sprinklers {pop} forall] {killprocess} forall
    Sprinklers cleanoutdict
  } def

  % Start spinning the pizza, to cook it.
  %
  /StartSpin { % - => -
    /StopSpin self send
    /SpinProcess { % fork:
      clear
      /PaintSetup self send
      /ClipCrust self send
      initmatrix
      { % loop:
        SpinPause { pause } repeat
        /Spin self send
      } loop
      SpinProcess currentprocess eq { % if:
        /SpinProcess unpromote
      } if
    } fork promote
  } def

  % Stop spinning the pizza, before eating it.
  %
  /StopSpin { % - => -
    SpinProcess null ne { % if:
      SpinProcess killprocess
      /SpinProcess unpromote
    } if
  } def

  % Spin the pizza around a bit.
  %
  /Spin { % - => -
    gsave
      /size self send         % w h
      2 div exch 2 div exch   % w/2 h/2
      2 copy translate
      SpinAngle random add rotate
      neg exch neg exch translate  %
      self imagecanvas
     grestore
  } def
1 comments

> Solaris Unix SVR4

IIRC, PizzaTool was also available for OpenWindows on SunOS 4.1.1 or so, on `sun4c`.

PizzaTool was probably what inspired me to make the (much lesser) LunchTool, which was an XView UI to a database of lunch places near my employer. It printed snazzy formal invitation signs (using PostScript), for wherever the amorphous lunch group would be going that day.

(Learning PS by displaying on OpenWindows was much easier than huffing from a laser printer, and the Adobe blue and red PS books that Sun bundled were great.)