Comment by 🚀 RubyMaelstrom

Re: "In for a penny, have setup a gopher daemon to dual host my…"

In: s/gopher

Shhhh, don't tell anyone, but I also just serve my .gmi files on my gopherhole. I did a little checking on the SDF gopherspace the other day, and it looks like a lot of people are being lazy like us. ;)

🚀 RubyMaelstrom

2025-06-10 · 11 months ago

5 Later Comments ↓

🌧️ candycanearter [✍️] · 2025-06-10 at 14:38:

is there a huge difference between gemini and gopher

🎵 jmcs · 2025-06-17 at 15:04:

hum, @RubyMaelstrom , I just did some quick test symlinking my gemlog inside public_gopher, and tweaking a gophermap. It works great. And since I'm browsing with offpunk, the relative links between pages work like a charm. Go figure... better than what bashblog was doing, of linking the .md's from the gophermap...

🚀 jsreed5 · 2025-07-03 at 21:53:

I thought about doing the same with my capsule, but there are so many Gemini-specific constructs in it that it would take more effort than I'm willing to put in. At this point lots of people serve Gemtext over Gopher. In the early days of Gemini, people went in the opposite direction and served their Gopher files over Gemini, hard-wrapped text and all. (I think Cosmic Voyage still does that, in fact!)

☀️ sbr [OP] · 2025-07-04 at 04:07:

No reason not to do a mix of txt/gmi. I only serve static files so it’s quite easy. I now quadra serve gemini/gopher/spartan/nex.

My site generator builds the three unique indexes (gemini/spartan use the same) and its all very easy.

— https://git.sr.ht/~sbr/gismo

I am now writing a single go server to also serve all four protocols. Its looking like of the four, a gopher server is the most complex

📻 Christopher · Mar 17 at 23:37:

@sbr

I am now writing a single go server to also serve all four protocols. Its looking like of the four, a gopher server is the most complex

Interesting. The Gopher protocol itself is dead simple so I would think it'd be the simplest—read a line of text and respond with the file named before the first tab, if one is present, or the whole line if not. If it names a directory, load an index file, or if there's no index file, generate a directory listing. If you don't want to support CGIs or any other dynamic content, that's really all you have to do, and some of those are actually optional (e.g., directory listings). Verisimilitude's hole is running on a server written in 5 (non-comment) lines of shell script, for example, that doesn't generate directory listings or even index files besides for the root.

— Verisimilitude's Gopher server shell script

I myself wrote a Gopher server with CGI support in less than 1000 lines of Go, so it can't be all that complicated. (Granted, my server doesn't handle any index files except index.txt and index.cgi, and it doesn't even generate directory listings itself—a CGI generates directory listings if needed. It also doesn't handle Gophermaps or other menu formats itself; a CGI can also handle those if needed.)

Nex is virtually identical to Gopher (you can retrieve Nex with a Gopher client). Spartan is similar to Gopher—use the second space-delimited field as the requested file name. Gemini has to parse/decode a URL in the request (rather than split on a tab byte) and has to handle certificates and TLS. Plus Gopher has only one error type (a type 3 menu item) which can include any human-readable text you want, like "Bad selector" or "You done messed up, A-a-ron!". Returning an index file or generating a listing when a directory is requested, if the server does those itself, are probably about the same complexity in any protocol.

Of course, all four protocols are but a drop in a bucket compared to HTTP, what with its optional headers, loose whitespace rules, various transfer encodings, etc. etc.

Original Post

🌒 s/gopher

☀️ sbr:

In for a penny, have setup a gopher daemon to dual host my small site on gemini/gopher. [gopher link] Have yet to learn all the idioms of gopherdom and its probably verboten to serve .gmi files but they are just text after all and lagrange renders them properly and its all readable via curl so why not. Need to find a more elegant way to work out internal links, may just remove as they aren’t strictly necessary.

💬 7 comments · 3 likes · 2025-06-09 · 11 months ago