Gemini

I stumbled upon the gemini:// protocol the other day, and went down that particular rabbit hole over the weekend so you wouldn’t have to (although I might actually recommend it).

If you’ve never heard of it, it’s meant to be a modern middle-ground between gopher and HTTP, and uses a space-centric, whimsical terminology: sites are “capsules”, there’s a nice aggregator called Antenna, and many related tools, software packages and the like borrow from familiar space exploration terms.

The Good Bits

  • It uses an extremely simple TLS-wrapped protocol on (unprivileged) port 1965 (which is when the first Gemini mission went to space) that essentially only supports fetching a piece of content at a time.
  • It relies on a very simplified Markdown-esque text format instead of HTML.
  • There is no Javascript. No CSS, nothing beyond the raw markup. No cookies, either.
  • The experience is really good in polished clients like Lagrange, and there are plenty of terminal-based clients (which are a natural fit).

Overall, I like the experience of reading unfettered markup that is not part of the noisy, ad-ridden, mainstream Internet, and I’ve found a few aggregators, search engines and reverse proxies that make it easy to find interesting content even if a lot of it has an idealistic “undernet” feel to it.

For someone like me who mostly consumes news via RSS feeds and uses Reader Mode to declutter news sites whenever possible, it is quite pleasant to wander through Gemini sites.

As usual, there are lists of all kinds of resources. But Lagrange, in particular, makes it very pleasant to read Gemini sites on my iPad mini, and is a fully cross-platform app for handling gemini:// URLs that I would recommend as a starting point.

From a server perspective, you can serve Gemini in around 170 lines of , which is quite remarkable and makes me want to take a stab at writing a server myself (although I don’t relish the notion of having to deal with TLS, and you can forget about CDNs and DDoS protection).

The Annoying Bits

  • Sessions and authentication are largely MIA (you can use cllient certificates, but that isn’t all that flexible), with some clever hacks in some servers and clients.
  • text/gemini markup is very limited from an authorship perspective. It does not support inline links or any text emphasis/formatting whatsoever (up to and including tables), which I don’t think is ideal for either long form or documentation. Nor is there any provision for frontmatter, everyone seems to be serving raw static files without much in the way of organization.
  • There are no inline images or any sort of rich media besides links. Some browsers do render media inline (upon clicking), so you can sort of work around it, but in the end it feels just… Too cut down.
  • There is essentially zero page content metadata (no Last-Modified, nothing you can use for caching, even), which feels like a lost opportunity to make some things (like blogs) a lot easier.
  • The protocol does not have the concept of byte ranges or pipelining (i.e., getting specific byte indexes out of the content or issuing multiple requests over the same socket connection), which makes it very slow (TCP handshake + TLS handshake for each page). OK, fine, most capsules are likely hosted in tiny machines and you don’t have inline media and hence no sub-requests, but…

Overall, I think they’ve gone too far in simplifying the protocol.

The absence of a Content-Length header, for instance, is just asking for trouble (Gemini’s sister protocol, Titan, hacks that into URLs), plus I’d like to have some pre-fetching for tackling slow networks, and the provision for zipped bundles of content as “books” isn’t exactly it.

Since I’m currently around halfway through converting all of this site’s content from Textile to Markdown (which means I’ve yet to slog through around 4500 pages), I am particularly attuned to the idea of simpler, “lesser” formatting for the sake of maintainability and readability (and this site’s design is already pretty minimalist), but I wish they’d trimmed less things down.

Otherwise I might even adopt it and put up a test server, if only for the thought experiment (although it would be a massive step back now that I’ve migrated to a static site hosted off Azure storage).

But it is certainly intriguing, and I will be keeping an eye on it.

This page is referenced in: