commit 9022f6fda995c6ec3e31ec26e99687864ba92c02
parent befd7be51afbdceface7a46a4622478f2d0032dc
Author: Eamon Caddigan <eamon.caddigan@gmail.com>
Date: Thu, 9 Nov 2023 20:56:35 -0800
Minor edits
Diffstat:
1 file changed, 20 insertions(+), 18 deletions(-)
diff --git a/content/posts/postscript-graph-paper/index.md b/content/posts/postscript-graph-paper/index.md
@@ -8,37 +8,36 @@ categories:
---
I needed a few pages of graph paper, and it seemed easier and more
-economical to print some at home than to buy a whole pad of it. There are
-plenty of websites offering PDF files with grids on them, but I didn't like
-what I found[^pdfs] and decided to make my own. I thought that the process
-was fun enough that I have since made a few different kinds:
+economical[^scrap] to print some at home than to buy a whole pad of it.
+There are plenty of websites offering PDF files with grids on them, but I
+didn't like what I found[^pdfs] and decided to make my own. I thought that
+the process was fun enough that I have since made a few different kinds:
* [5 mm × 5 mm grid (pdf)](grid.pdf) ([postscript](grid.ps))
* [5 mm × 5 mm dot grid (pdf)](dotgrid.pdf) ([postscript](dotgrid.ps))
* [1 inch width hex grid (pdf)](hexgrid.pdf) ([postscript](hexgrid.ps))
-All files are meant for US Letter paper but could easily be adapted to other
-dimensions. They are also "full bleed" because I decided to allow my printer
-to impose its own margins; just be sure that you turn off any "autoscale" or
-"fit to page" option before printing these.
+These files are meant for US Letter paper but could easily be adapted to
+other dimensions. They are also "full bleed" because I decided to allow my
+printer to impose its own margins; just be sure that you turn off any
+"autoscale" or "fit to page" option before printing these.
## Why PostScript?
Drawing a grid is not difficult to do with a computer. I considered writing
-code to programmatically generate an SVG file, but then I recalled that
-PostScript, the precursor to the PDF format, is a bona fide programming
-language! It only took an afternoon of familiarizing myself with the
-language to make the grid, and I kept going from there.
+code to programmatically generate an SVG file, but then I recalled learning
+that PostScript, the precursor to the PDF format, is itself a bona fide
+programming language. It only took an afternoon of familiarizing myself with
+the language to make the grid, and I kept going from there.
It turns out that PostScript is a stack-based ("concatenative") language,
like Forth or [UXNTAL](https://wiki.xxiivv.com/site/uxntal.html). I was
playing with the latter last fall[^uxntal], so I have some familiarity with
-this type of language. Stack programming seems strange when you're used to
+this type of programming. Stack languages seem strange when you're used to
other paradigms, but once you get started you may find it easy to shift into
the right mindset for structuring programs this way.
-
-The complete PostScript program, which produced the 5 mm × 5 mm grid linked
+A complete PostScript program, which produced the 5 mm × 5 mm grid linked
above, follows:
```PostScript
@@ -101,9 +100,9 @@ relevant [quote from Peter Norvig](http://www.norvig.com/21-days.html):
> also for programming. Insist on a language with an interactive mode and
> use it.
-Interest in PostScript peaked during an era where books were the easily the
-best way to learn about a computing technology[^books]; I've seen the
-following recommended and found them fairly easily online:
+Interest in PostScript peaked during an era when books were easily the best
+way to learn about a computing technology[^books]; I've seen the following
+recommended and found them fairly easily online:
* _Thinking in PostScript_ by Glenn Reid
* _PostScript Language Tutorial & Cookbook_ ("the Blue Book") by Adobe
@@ -113,6 +112,9 @@ following recommended and found them fairly easily online:
* _PostScript Language Reference_ ("the Red Book") by Adobe Systems
Incorporated
+[^scrap]: I actually printed on the back of scrap paper because I'm that
+ ~~cheap~~ eco-conscious.
+
[^pdfs]: For starters, these sites all branded their downloads—which is
certainly their right, but I didn't want an advertisement on my paper.