[sugar] Education?

Don Hopkins dhopkins
Tue Mar 13 18:00:23 EDT 2007


> Although I must admit, I hadn't realised Postscript was Turing complete.
>   
PostScript is a lot like Forth, but even more like Lisp, and NeWS had a 
nice dynamic object system like Smalltalk.

Here's a metacircular PostScript interpreter I wrote in PostScript. It 
has hooks you can use to draw a visual representation of the program 
state as it executes.
There's a tracing hook to draw a two dimensional plot of the operator 
stack depth along the x-axis, and the operand stack along the y-axis.
And there's also a tracing hook to execute PostScript code step by step 
in the visual PSIBER space deck display, so you can visually watch and 
interfere with the execution of your PostScript program.

http://www.donhopkins.com/home/archive/psiber/cyber/ps.ps

And of course here is Stan Switzer's PostScript Quine (a program that 
returns a copy of itself):

{{[ exch /dup load /exec load ] cvx} dup exec}


    -Don



More information about the Sugar-devel mailing list