------------------------------------------------------------ The Making of CompuCow ------------------------------------------------------------ It is just this side of possible that my latest opus, "CompuCow Speaks!" is not quite significant enough to warrant a "Making of ..." chronicle. But I'm not going to let that stop me. It all began about a week ago, when I was browsing the quux.org gopher server. Now quux, sadly, these days ain't entirely what it used to be, with many of its links broken, etc. But there's still some good stuff there. Specifically, I was poking around /Humor and Fun/Fortune Databases and selected option [4], "Random Quote: Computers". Unfortunately, it did not return the random quote I was expecting but rather the text of the following shell script: #!/bin/sh echo "Random fortune from Computers database" echo "--------------------------------------------------" exec /usr/games/fortune computers However, a close examination of the script led me to exclaim, "Holy smokes! It looks like it's possible to scope the venerable 'fortune' utility to specific topics! Who knew?" But when I tried it on my local system it came up bupkis. Apparently the "computers" fortune database isn't installed by default on ubuntu 20.04. But then I noticed option [1] on quux, namely "Fortune Database: Computers". Following a quick download and some fiddling about with strfile(*) I was in business. And it was then I remembered the old chestnut, "You must be the change you wish to see in the universe." Which in this case I guess approximates to "You must be the random quote about computers you wish to see in gopherspace." Was it possible the quux script might live again, in my humble gopherhole on SDF? Turned out it was easier than I thought, as the "computers" fortune database is, of course, already installed on SDF. I had never set up a gopher cgi before, but the SDF documentation was helpful in this regard (**). Turns out setting up fortune as a gopher cgi was even one of the example programs in the SDF docs. To make my version even more original, I decided to pipe the fortune output to cowsay, which I'm sure has never been done before (***). The only slightly complicating factor was that the script would not run as long as I was linking to it on gopher.club; I had to use the sdf.org domain instead. I'm sure there is a very good reason why this is so. The result pleases me; I think it looks like something a first year comp sci student might have thought was clever back in 1992. You can see it in action, it's item 5 on the top-level gophermap for this gopherhole. Notes ----- (*) strfile -c % computers computers.dat (**) https://sdf.org/?tutorials/gopher (***) Yes, this is a joke References ---------- gopher.quux.org:70/1/Humor and Fun/Fortune Databases Posted: Sun Jun 9 21:25:46 PDT 2024 Minor updates: Sun Jun 30 10:13:53 PDT 2024