[0]: https://groups.google.com/d/msg/rec.arts.int-fiction/HNtntxC...
PostScript is a real programming language and can be used for many things (especially graphics). I also wrote a JSON parser in PostScript (see message <[email protected]> on comp.lang.postscript), and then someone else post their JSON parser in PostScript too.
I think PostScript isn't such a good protocol or document format, but it is good as a programming language. It is what I might use if I want to make a diagram (but unfortunately Ghostscript cannot produce SVG output; it can output PDF though, as well as many raster formats).
Someone was unsure how useful would be the JSON parser I wrote in PostScript, but if you want to print some diagram based on data in JSON format, then it can be helpful.
(I could implement Z-machine in Forth too if I wanted to do, but I have not done so yet because I have other things to do; I don't know if I might do so in future or not. I could implement Z-machine in any programming language with byte arrays, including assembly language (I started but haven't finished one in 6502).)
is a fractal fern. This is page description, but not in the normal way that it's used. Compare the output in a PS or PDF viewer with the source code which is under 1.5K.
But I think maybe you meant in the sense of "in the real world", and I can't think of any examples. Prefixing some postscript to a document to manipulate that file is something it can be suited for, rather than using an external language to do so.
So, for instance, let's elicit an error using Ghostscript, a freely available and efficient PostScript interpreter:
At the "GS>" prompt, I now define "f" via: Note that "f" refers to "g", which is not yet defined.Therefore, when I then invoke "f" via:
I get an error: And importantly, the stack is retained, so I can inspect it at this point, interactively, using for example "pstack": This shows that /hello is still on the stack. From there, we can resume in various ways, for example by clearing the stack (with "clear"), by redefining and reinvoking "f" etc.