Running Down a Gopherhole 2016-02-15 My recent experiments with mutt and the command line continue. I've been trying newsbeuter[1] recently, and been getting some help from the current admins in their IRC Channel to make it work. Without going into detail, to make it work with newsblur, you need to explicitly set a cookie cache file in the configuration, and the cache filepath **must** be given in full, no `~/path`, and the cookie file **must** exist[^1]. When I mentioned the previous blogpost on my local friendly `#linux` channel, my friend Kevin Lyda mentioned a project he had embarked upon[2] to get the old VMS `BULLETIN` software working on Linux. Noodling around in his project, and in particular the arcane instructions to get VMS working in a virtual machine[3], reminded me forcefully of the days when I used a VAX terminal client, and that reminded me of Gopher. Gopher, for those who don't know, was briefly the future of computing. It was an application which was used to serve files over TCP/IP, like Telnet or FTP, but, unlike them, it was _strongly_ oriented to a menu/document design. For a vanishingly brief period in the early 1990s, it was thought to be the way that information was going to be shared between computers. Things didn't quite work out that way, however, as at just the same time that Mark McCahill at the University of Michigan was preparing Gopher for release to the World, over in Switzerland, Tim Berners Lee and Robert Caillou were working on their own, quite different hypertext protocol. Gopher was designed with an eye on providing a quick method of providing Campus-Wide Information in institutions of higher learning, and it quickly spread across American campuses. While it did have a menuing system, it was very much a text-based system, designed around the limitations of the aforementioned VAX client terminals and the like. It was very much a _curated_ system, in that every document had to have a defined format and type, and the user had to navigate through strictly defined hierarchical trees to get particular items of informaton. What made Gopher so appealing, however, was that once you had the location for a file, anywhere in gopherspace, you could **link** to that file from any other document in gopherspace. This was, for me at the time, an utter revelation; I'd been raised on the BBS system, where you had to go to a specific place to access a specific file, and often couldn't access the location due to the limited phone lines available. This was so different, with everything on gopherspace being accessible all the time. There was even a search engine for gopher, imaginatively called Veronica[^2], which was a database of all accessible gopher pages. The whole world suddenly opened to me in ways I had only dreamt of, or read of in sf like Neuromancer. All too soon (or so it seemed) the NCSA Mosaic browser came along which gave access to gopher sites on xwindows running on UNIX machines. This was a massive improvement over the terminal systems, as you could style your own defaults for the windows showing the text. More importantly, thanks to multitasking and floppy disks, you could **cough** _borrow_ **cough** content that you found for your own computer! Mosaic also gave access to this new HTML thing, but the markup was weird and bizarre. At about the same time, the University of Michigan, in what must be one of the most short-sighted moves ever, issued their infamous March 1993 Bulletin[4]. I didn't see that at the time (what with studying for finals and all) but when I got back to the college computers in late 1993, _everyone_[^3] knew that gophers were going to be subject to a licence fee, and maybe this Hypertext Markup isn't so hard after all. After all, we already knew Mosaic, which was going to be released for Windows any day now. That was, for me, the end of Gopherspace. I rewrote my personal bookmarks list in HTML[^4] and started adding new content from the 'Web'. I don't think I'd even thought about it much until I read kevin's Readme file on his project. Once I'd thought about it, however, I had to go read about it. I was amazed to find that there is still a Gopher community of sorts out there. Wikipedia informs me that as of 2012 there were **160** gopher servers indexed by Veronica-2. One **Hundred** and Sixty. I had links to more servers in my bookmarks file. The University of Michigan GPLd their server software in 2000, and now there are servers written in much more modern languages. After a few false starts, I settled on PyGopherd[5] which, while it hasn't seen any updates since 8 years ago, has the twin advantages of being stable and written in the one computing language I have any competency in. I managed to get the server installed fairly easily, but writing content was much harder. Put simply, I'd completely forgotten the server-file-client architecture and how to make my site appear as something more than just a bare directory of links. Unsuprisingly, documentation on this feature has vanished from the modern internet. The modern solution is to use a file called `gophermap`, which is respected by the main server software, including, luckily, PyGopherd. A gophermap allows you to provide links for your content, or indeed any content anywhere in gopherspace or the internet. The format is somewhat tricky, but the main gophermap for my site, and remember, these are all plain text files, is: .___ ___ __ _______ | | |__|.-----.--.--.--. | ___|.----.-----.--------. | | | || -__| | | | | ___|| _| _ | | .\_____/|__||_____|________| |___| |__| |_____|__|__|__| ._______ | _ |.-----.----.----.---.-.-----.--.--.-----. | ||__ --| __| _| _ | -__| | |__ --| |___|___||_____|____|__| |___._|_____|_____|_____|.org Hi, and welcome to my gopher phlog. All content can also be seen on the internet. 1Things Fall Apart /entries/things-fall-apart 1Cast Away /entries/cast-away A trained gopher user will see straight away that I'm cheating madly. I have each of my blog entries being served as a distinct gopher directory, not as a _file_ per se. In the directory for each blog entry, I am serving another `gophermap` file. The reason for this is very simple: links. A text file in gopherspace is just that - a text file without adornment. You can't have links in a text file, and, as any reader of this meandering thought experiment knows, I tend to use links for everything. Even within a gophermap, you can't _hotlink_ in the body text, a link is a separate line, with a specific syntax, with a declaration of filetype as the first character. The only workaround is to use the gophermap in the directory, collecting all the links at the end of the file. Browsing around the existing gopherspace, such as it exists, I noticed that most gopher sites, at least all the decent ones, tend to stick fairly closely to a 67-character line-length in some homage to the old terminal systems. To 'fit in' with the gopher people, I'd have to find some way of shortening my lines. I tried the venerable `fmt` command, but this is a fairly blunt instrument, chopping up words to fit the desired width. I looked around and found a quite wonderful, if utterly head-melting, little program caled `par`. The author of this program freely admits that his documentation skills are somewhat lacking [6], but after a lot of experimentation, I finally found an option to reformat my paragraphs to a width of 65 characters, preserving quote marks, reflowing quote marks over multiple lines, and, most importantly from my perspective, justifying the text[^5]. The results of this experimentation can be seen at gopher://ascraeus.org. To access that, you'll either have to use a gopher-aware browser, like the venerable still-maintained lynx [8], or use a gopher proxy, like this one[7]. I don't know how long I'll keep doing that, by the way, although I have managed to script an amount of the repetitive work. I'd recommend you to try getting lynx working on your own computer and accessing the gopherspace in its natural environment, the commandline, somehow it seems more honest to do it that way. ________References________________________________________________ [1] http://newsbeuter.org/ [2] https://github.com/lyda/bulletin [3] http://www.wherry.com/gadgets/retrocomputing/vax-simh.html [4] http://www.nic.funet.fi/pub/vms/networking/gopher/gopher-software-licensing-policy.ancient [5] https://github.com/jgoerzen/pygopherd [6] http://www.nicemice.net/par/ [7] http://gopher.floodgap.com/gopher/gw?a=gopher%3A%2F%2Fascraeus.org [8] http://lynx.invisible-island.net/ ________Feetneet__________________________________________________ [^1] I'll write all this up some other time [^2] Something to do with some apalling american newspaper comic [^3] Everyone who knew their way to the hidden computer lab, and knew how to figure out the commerce-students *default* passwords for their unused unix accounts! [^4] Most of the links were still gopher links. Scripting the change from the gopher `1Desc \titem\tserver\tport` to the new `gopher://server:port/item` was an education in itself [^5] ragged edges in text files drive me to distraction +++ENDS+++