PSChess – A chess engine in PostScript(seriot.ch) |
PSChess – A chess engine in PostScript(seriot.ch) |
https://www.goodreads.com/book/show/3883749-postscript-langu...
and _Thinking in PostScript_ was made available from the author's site and is widely available as a PDF:
https://w3-o.cs.hm.edu/users/ruckert/public_html/compiler/Th...
For a more typical usage see:
https://personal.math.ubc.ca/~cass/graphics/manual/
(I used to do PostScript programming on my NeXT Cube for custom fills and strokes in Altsys Virtuoso)
I found PS pretty inscrutable, esp. the function-filled variant used in Virtuoso, but did manage to get dimension lines coded up (which promptly ran into precision problems which I eventually gave up on).
OpenSCAD is a lot more approachable, and METAPOST was easy to pick up and make use of:
http://ftp.tug.org/TUGboat/tb40-2/tb125adams-3d.pdf
Still working through this at:
https://willadams.gitbook.io/design-into-3d/3d-project
and mostly using visual tools (which arguably is limiting me) https://www.blockscad3d.com/editor/ and https://github.com/derkork/openscad-graph-editor and of course, had to throw: http://pythonscad.org/ into the mix. Still a bit miffed that Nodebox and Processing or maker.js weren't a good fit.
I've written neural network (ConvNet) in PostScript and this post has inspired me to finish it up and publish a blog post this week.
gs -dNOSAFER zmachine.ps -- game.z3
http://zzo38computer.org/zmachine/interp/zmachine.psThis is some mad scientist stuff. Great work.
[1] https://home.hccnet.nl/h.g.muller/max-src2.html
Why do you say that? It's a very simple and tiny language that you can learn in an afternoon. Far from the utter complexity of modern things. It's barely more complicated than a programmable calculator. Certainly simpler, cleaner, and arguably more powerful than svg graphics.
You don't even need to read any manual to guess what this example program does:
100 100 moveto
200 300 lineto
strokeAlthough it would, at times, go wrong there are very few things to this day that do impress me more than typing this (admire my "useless use of cat" btw):
... $ cat tiger.ps | netcat 192.168.0.78 9100
And see my HP LaserJet 4M+ (speaking PostScript natively) start printing.Yeah, yeah, yeah, I do have a SOHO and a modern printer/scanner at home and it can do more stuff.
But the elegance of netcat'ing a PostScript file to a printer and seeing it print without needing any driver nor any configuration whatsoever [1] was quite something.
It was simpler indeed and it was elegant and it did feel like magic.
Now it wasn't fun if you printed many pages and suddenly it started printing garbage but still...
[1] you had to configure the printer itself to get an IP, but that was done on the printer itself
Is there an implicit bounding box? How large is it? Does x or y go first in the parameters?
> Certainly simpler, cleaner, and arguably more powerful than svg graphics.
Much more powerful, I agree. Some might even say a bit too powerful for a graphics description language, halting problem and all.
Very cool stuff, but not what I do day to day, so it’s a bit intimidating at first.
I particularly like chapter 14 where you implement 3d shader in postscript.
I found PostScript to be one of those things where something "clicks" after a while, and I really started to appreciate the elegance and simplicity. The hardest part is the mental gymnastics required to track what's on the stack and in what order!