approachabe & frugal & composable
Petite Abeille
petite.abeille at gmail.com
Tue Jun 2 02:14:39 BST 2020
As it stands, Gemini [1] -and especially Mercury [2]- is refreshingly approachable and frugal.
A -very minimal- one-liner Gemini client:
# openssl s_client -quiet -crlf -connect gemini.conman.org:1965 <<< gemini://gemini.conman.org/ 2>/dev/null
20 text/gemini
Welcome to Conman Laboraties Gemini Server!
And that is that. The whole Gemini protocol in 3 lines.
But what 3 lines!
A request is a single line containing a fully specified URL.
A successful response is a single line containing the numeric response code, a space, and a content-type.
The canonical content, text/gemini, consists of two core line types: text and link.
All UTF-8 encoded. Over TLS.
And that is that.
Quite spartan at first glance.
But also, possibly, quite universal.
Fancy jumping the shark over Zawinski's law [3] from the onset?
Combine RFC5092 [4] for the request and RFC2045 [5] for the response:
imap://minbari.example.org/gray-council/;uid=20 <imap://minbari.example.org/gray-council/;uid=20>
20 message/rfc822
Mime-Version: 1.0
...
Fancy supporting multiple protocols at once?
Look at conman's nifty sigil script [6], which supports HTTP, GEMINI, and GOPHER for good measure. From one CGI script.
In other words, because a Gemini request is a full-fledged URL, it can support any number of protocols, as long as such protocol can be expressed as an URL [7].
Ditto for the response, which can be any media type [8] a Gemini server cares to generate.
In short, a Gemini URL request combined with a Gemini media type response is quite universal indeed.
Ditto for the rather unassuming text/gemini content type.
While at its core it only sports 2 line types, the presence of the link line, which is an URL, open the door to infinite composition.
Fancy an atom feed? Add a feed URI [9] in your text/gemini:
=> feed://example.com/entries.atom
Would you like to anchor your text/gemini in a point in time? Perhaps the tag URI can help:
=> tag:example.com,2004-01-01:1234
Indicate a location? A geo URI may help:
=> geo:37.786971,-122.399677
etc, etc, the possibilities are endless.
Quite a lot of firepower for a two lines protocol, with a two line content type :)
--
PA
[1] https://portal.mozz.us/gemini/gemini.circumlunar.space/docs/spec-spec.txt <https://portal.mozz.us/gemini/gemini.circumlunar.space/docs/spec-spec.txt>
[2] https://portal.mozz.us/gemini/gemini.circumlunar.space/users/solderpunk/cornedbeef/the-mercury-protocol.gmi <https://portal.mozz.us/gemini/gemini.circumlunar.space/users/solderpunk/cornedbeef/the-mercury-protocol.gmi>
[3] https://en.wikipedia.org/wiki/Jamie_Zawinski <https://en.wikipedia.org/wiki/Jamie_Zawinski>
[4] https://tools.ietf.org/html/rfc5092 <https://tools.ietf.org/html/rfc5092>
[5] https://tools.ietf.org/html/rfc2045 <https://tools.ietf.org/html/rfc2045>
[6] https://portal.mozz.us/gemini/gemini.conman.org/sigil-cgi.lua <https://portal.mozz.us/gemini/gemini.conman.org/sigil-cgi.lua>
[7] https://en.wikipedia.org/wiki/List_of_URI_schemes <https://en.wikipedia.org/wiki/List_of_URI_schemes>
[8] https://en.wikipedia.org/wiki/Media_type <https://en.wikipedia.org/wiki/Media_type>
[9] https://en.wikipedia.org/wiki/Feed_URI_scheme <https://en.wikipedia.org/wiki/Feed_URI_scheme>
[10] https://en.wikipedia.org/wiki/Tag_URI_scheme <https://en.wikipedia.org/wiki/Tag_URI_scheme>
[11] https://en.wikipedia.org/wiki/Geo_URI_scheme <https://en.wikipedia.org/wiki/Geo_URI_scheme>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.orbitalfox.eu/archives/gemini/attachments/20200602/33926e11/attachment-0001.htm>
More information about the Gemini
mailing list