(I have no GitHub account. But if the owner of that repository want to add, they can add what I have; I post this message (and all of my other messages on Hacker News) to public domain.)
Re:Show HN: A simple Unix cat implementation in various lang...
by rspivak on Sunday March 01, 2020 @08:03AM
(#22456695)
Thank you for the implementations! Do you have any suggestions how to test the postscript code on mac/linux? I tried on macos using ghostscript, but I get the following error:
Re:Show HN: A simple Unix cat implementation in various lang...
by zzo38computer on Sunday March 01, 2020 @12:30PM
(#22457918)
To give command-line arguments to a PostScript program in Ghostscript, you must prefix the name of the PostScript file with two minus signs, such as:
gs -dNODISPLAY -q -- cat.ps helloworld.txt
(The -dNODISPLAY and -q are not needed to get this PostScript program to work, but -dNODISPLAY disables graphical output, and -q avoids Ghostscript's messages getting mixed in with the PostScript program's output. You might also need -dNOSAFER; if you get a invalidaccess error, try that. As far as I know, ARGUMENTS and -- are a feature specific to Ghostscript.)
$ gs cat.ps helloworld.txt
Error: /undefined in ARGUMENTS ...
Thanks!