Mike MacGirvin's "occasional reminder" about the ASCII table[1] has helped me a lot while writing Racket scripts. To generate classroom printouts I like to work with simple text files and I need something more than newlines. People warn against re-creating another markdown-like approach, but I want something simple: easy to read and easy to parse with minimal programming skills. I've wrestled with .csv files too so it helped me just to start thinking about different separators for records^^, groups^], and units ^_ .
A Racket script generates qrcode pngs, and a postscript page with some text to go along with the qr-codes. Working with different numbers of newlines becomes awkward. With the ASCII codes there is a flexibility for handling multi-line records: This is nice. So now I can have multi-line records with a file convention like this:
Hubzilla: does Everything: See example account on tiksi.net^^
BS2tb.png^^ [zrl=https://tiksi.net/channel/bsmall2]https://tiksi.net/channel/bsmall2[/zrl]
^]
Mastodon: for Free and Private Microblogging: mstdn.jp^^
BS2mstdn.png^^ https://mstdn.jp/@bsmall2^]
^]
Pixelfed: for Sharing Photos: account with chicken pictures^^
BS2pxl.png^^ https://pixelfed.social/bsmall2^]
^]
Write.as: Plain Blog, Learning Racket^^
BS2wlr.png^^
https://write.as/bs2facdev/
And produce a printable page like this:
End Notes
- [1]
ASCII Table Reminder Ctrl | ASCII | Dec | Hex | Meaning |
---|
^^ | RS | 030 | 1E | Record separator |
^] | GS | 029 | 1D | Group separator |
^_ | US | 031 | 1F | Unitseparator |
^| | FS | 028 | 1C | File separator |