đŸ Archived View for tilde.pink âș ~ssb22 âș gopher.gmi captured on 2021-12-03 at 14:04:38. Gemini links have been rewritten to link to archived content
âĄïž Next capture (2023-01-29)
-=-=-=-=-=-=-
As a partially-sighted computer scientist, Iâm sometimes asked for an opinion on little-known technologies that might seem to make things easier for blind or partially-sighted people.âGopher was an early-1990s alternative to the then-emerging World Wide Web, and some enthusiasts think it must be better because it is text-based.âAlthough Gopher can deliver graphics and other files, itâs usually used for plain-text files and separate lists of links.âBut there are problems:
1. Gopher is less likely to properly display non-English languages that are not written in ASCII;
2. Gopher pages seem more likely to use âASCII artâ, which confuses screen readers and cannot even be skipped like HTML images can;
3. Gopher pages are typically not designed to be reflowed to less than 70 columns for giant-print and small-device situations, nor to be displayed in a proportional font (the size-changing versions of my low-vision stylesheets tell Firefoxâs âOverbiteFFâ Gopher plug-in to use a proportional font, which helps on many Gopher pages but does break some).
After I wrote the above, some Gopher enthusiasts developed a new protocol called Gemini which largely addresses these things.âGemini is UTF-8 compatible and wraps text to the window width.âIt can also set language tags to help speech synthesisers select the correct pronunciation, although all languages used on the page are listed in the protocol header rather than in the markup, so the synthesiser still has to work out where the use of each language begins and ends (unless they start using Unicode 3.1âs deprecated U+E0001 âlanguage tagâ for this).âGeminiâs âpreformattedâ regions can still contain ASCII art, but clients like Ariane/Seren can collapse these regions by default.â
Enthusiasts of the *original* Gopher protocol sometimes point to its being more âlightweightâ than Gemini and the Webâs HTTP, because Gopher is âheaderlessâ whereas Gemini carries uncompressed TLS overhead and HTTP adds headers to each transaction.âThe rest of this page discusses Gopherâs claim of being lightweight.â
It may be surprising that adding *more* headers can *save* traffic, but it can.âConsider, HTTP/1.0 and HTTP/1.1 has:
So the actual traffic-saving advantage of headerless protocols exists only for a *one-off* access to a *single* and *very small* file.â
If you do need one-off access to a single very small file and would genuinely benefit from a headerless response, this can also be obtained using:
1. the original âHTTP/0.9â, which pre-dates Gopher and costs just 4 extra bytesâless if Gopherâs oft-omitted terminating full-stop line is counted against it
2. Dedicated TCP ports that return small responses, like daytime (port 13) and qotd (port 17), often run from inetd or similar.âThese can require *no request at all*, which means:
If youâre typing into a Telnet client by hand on a mobile phone that charges you for every byte, then itâs likely that each keystroke will end up in a separate TCP packet (not to mention the echo), in which case youâd probably be better off either using an off-the-shelf HTTP browser to send the request all at once, or else using a custom port that doesnât require a request at all (if you donât mind the information also being available to anyone who runs a port probe, and you donât need to make *too* many different types of information available in this way).â
A âwhat is my IP address?â service on port 2 (the Python script has to be written without spaces if you want to inline it into /etc/inetd.conf):
2 stream tcp nowait nobody /usr/bin/python2 python2 -c i=__import__;a=i('sys');b=i('socket');s=b.fromfd(a.stdin.fileno(),b.AF_INET,b.SOCK_STREAM);s.sendall(s.getpeername()[0]+'\n')
Report uptime and system load on port 3:
3 stream tcp nowait nobody /usr/bin/uptime uptime
Serve a small text file on port 4:
4 stream tcp nowait nobody /bin/cat cat /weather.txt
I wonât go into silly nationalistic squabbles about the Web being invented by a Brit working in Europe whereas Gopher was Americanâif anyone feels tempted to use Gopherâs general inability to display non-English languages as an anti-American joke, please remember that quite a few Americans were involved in designing Unicode and other multilingual standards, so theyâre not *all* ignorant.âThere are also potential political points about Gopher having had stricter licensing in its early years, but America isnât the only place with plenty of lawyers and they did *eventually* GPL it.âBut it does seem that the Gopher protocol would fall on technical points alone, and that its enthusiasts would be better off promoting low-bandwidth and âtext-friendlyâ websites, or perhaps using Gemini if they want the thrill of building something simpler than the Web.
All material © Silas S. Brown unless otherwise stated. Firefox is a registered trademark of The Mozilla Foundation. Python is a trademark of the Python Software Foundation. Unicode is a registered trademark of Unicode, Inc. in the United States and other countries. Any other trademarks I mentioned without realising are trademarks of their respective holders.