💾 Archived View for gmi.bacardi55.io › gemlog › 2022 › 02 › 27 › my-take-on-gemlog-replies captured on 2023-05-24 at 17:46:16. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-01-29)

-=-=-=-=-=-=-

My take on gemlog responses

Posted on 2022-02-27

Brace yourself, it is a very long post, you might need to prepare a drink first :).

State of responses in Gemini

The Gemini community is globally very nice and I've really been enjoying the different interaction I had with fellow geminauts over station¹, tinylogs², gemlog entries or via email (keep emails coming!).

I really like those interactions, but I feel like interacting with each other over gemlog entries remains difficult. At least to ensure the author see all the responses to their posts.

It's very common to see a gemlog entry being a response to another author entry, but we don't have yet a simple way to notify each other.

The problem is, of course, how to contact the author of a given post to tell them we wrote a response? A "simple" solution would be going to the capsule, find the contact of the author and send an email… But not every capsule has a contact page and the process is very manual, requiring to use another tool and protocol to communicate.

This is clearly a "topic" and it seems to be the "raison d'être" of awesome tools like Cosmos³ and Antenna⁴!

But what about capsules not yet parsed by Cosmos? Or if the author doesn't push new posts to Antenna? Or if the original author miss the response on these tools because he was offline for a few weeks?

This problem has been discussed previously by different people. I'm leaving here a few of them.

Paulsnar did a great summary job in the first link below.

Paulsnar's take on gemmention

More thoughts on gemmention

gemini://carcosa.net/journal/20200529-some-replies.gmi

gemini://tilde.pink/~maria/backlinks.gmi

But I don't think we yet have a "community validated" approach. The main issue I have with Paulsnar proposal is that I don't like having multiple arguments sent in the query. That reminds me too much of the web and what can be done with it.

I believe it brings a layer of complexity too big for Gemini, or at least that's my feeling. That would mean that someone that doesn't want to script pinging responses to a user will have to encode the URLs by themself.

If a Gemini server can be developed in a day, it feels like a solution for mentions should be doable in less than half a day for a basic version!

The goal of this post is to propose a solution, as well as technical implementations to "showcase" how it could work, hopping other will embrace the idea :). The 2 implementations are simple but should work easily. I prefer releasing early tools and this draft proposal and see how much time I need to spend on upgrading them later.

The goal of Gemini Mentions if to interact with other. If the community doesn't like this proposal (which is totally fine, it is just a proposal), then at least the "wasted time" would be minimal (I'm putting quotes because I don't feel it would be entirely wasted anyway).

If on the opposite the idea is accepted by others then I'll be pleased to spend more time on them :).

I do know that asking capsule owners to deploy a script will be the biggest concern here, but I guess there is always a "price to pay".

I'm not saying this proposal is the best, on the contrary, but it could be a starting point that we could improve collectively :).

That's why I'm also publishing the content of the proposal and tools on a git repository to potentially collaborate!

Gemini Mention RFC git repo (HTTPS)

Side note about "centralization"

I've said in a previous post⁵ that while the gemini space is healthy and growing and the mentioned tools are awesome, it seems that we are more and more relying on "centralized" services.

On one hand it is a great thing, because it helps geminauts discover easily new content (eg: Antenna, Cosmos, Kennedy⁶, TLGS⁷) or interact with each other (eg: Station).

On the other hand, it does make the gemini space rely on a few volunteers and awesome persons. Any services, as on the web, could disappear at any time and that may be even more the case in our very small space.

We have been experiencing it lately with gemini.circumlunar.space being down for a few days (it is back now) (Thanks to the Kennedy search engine, cached version was still available :)).

Having said that, not everything is easily decentralized and this post is only about finding an possible solution to the "reply problem" between capsule owners.

The basic concepts

A few rules I imposed myself:

Ok, let's see the idea:

1/ When writing a response, you need to indicate in your page a "mention link" which is basically a link to the original post and where the <user friendly link name> starts with "RE:". This will allow a script to easily retrieve the concerned page and would avoid needing 2 arguments in the url when submitting a mention. It will also ensure that the person really linked that page to yours.

An example if you want to respond to this content in one of your post, you would need to have the following line in your page (anywhere):

RE: a response to Bacardi55

2/ Authors wishing to receive mentions must implement a script for receiving mentions at a defined and standardize endpoint: "/.well-known/mention". This endpoint receive the URL of the response as an % encoded argument.

3/ The server side script could do a lot, but at minimum it must check that the linked page exists and look for a mention link in it. Optionally, it could verify that the link mentioned actually exists on the current capsule.

The author of the response needs to notify the original author.

Either an author can go to the original author capsule and to /.well-known/mention and submit the link (in this case I strongly suggest authors to add a link to the mention page at the bottom of each posts).

Or automate it while deploying your capsule. Eg, parsing the latest post for a mention link and then send a request to the author mention endpoint to avoid the manual task.

I believe that even the "manual way" is still faster than sending an email. The automated way might be more fun to code, but is fully optional :). I created a very small bash script that does it, but it does it poorly at this stage so be careful…

Displaying or not these mentions on the original author page is the responsibility of the capsule owner and thus is not part of this proposal.

What authors do with received mentioned is not of our concern here, only the "how" the authors are contacted is described.

But the server side script could be used to update the capsule by adding automatically the mention at the bottom of the page. But again, this is fully optional. Personally, I don't think I want to do that.

Bellow on this page there is an example of a bash script that follow the proposal (detailed in the next paragraph). The script has less than 100 lines of code (with comments and spacing, without a good knowledge of bash) so it fit my "must be easy to implement" rule. There is also a tool wrote in golang that I prefer to use (also available below).

The detailed version and different scripts have been pushed to a git repository for easier collaboration and sharing:

Gemini Mention RFC git repo (includes the bash script example) (HTTPS)

The golang implementation is already running on this capsule, so you can send me a response:

Send me a response :)

For more details, keep reading :)

Detailed version

Gemini mentions are a way to indicate to another capsule owner that you wrote a response to one of their content on your own capsule.

To be alerted of mentions, a capsule owner MUST implement a basic endpoint: `/.well-known/mention`.

This endpoint MUST require 1 argument containing the URL of the response.

The URL MUST be % encoded.

The endpoint MUST check for the validity of the page received.

The endpoint MUST check that the response contains a `mention link` (see below).

A `mention link` is a gemini link in a particular format indicating the original post the current author is responding too.

A `mention link` MUST be present in the response page linking to the capsule concern by the response.

A gemini page MAY contains multiple mention links for the same or different users.

The first found mention link for the current capsule found MUST be notified to the capsule owner.

The optional other mention link MAY be notified to the capsule owner.

Capsule owner MAY decide for the limit they want to impose for their capsule.

The format MUST follow the formatting rules:

=>[<whitespace>]<URL><whitespace>RE:<whitespace><USER-FRIENDLY LINK NAME>

Example:

=> gemini://pn.id.lv/20220218.gmi RE: A More Concrete Proposal of Gemmention

The latest version will always be found here:

Gemini Mention RFC git repo (HTTPS)

Implementation?

The simple solution

Let's start with the most basic implementation in bash I could think of.

Disclaimer: I don't like bash and I am not very good writing optimized bash scripts. So take this as a very light example :).

The script does depends on 2 important software:

Disclaimer 2: I don't run this script on my capsule (but I have tested it many times). This was meant as a proof of concept that it can be achieve in a strict way with a small to medium bash script. I prefer running GoGeminiMentions (GGM), a golang implementation of gemini mention server side, see next paragraph for more details.

Example mention script in bash.

A golang alternative

As said before, I don't like bash too much so the idea of maintaining and improving a bash scripts over time gives my chills… So I decided to write a golang alternative too… It might be a bit bold to announce this spec and at the same time provide 2 implementations, but I had the feeling that some users would not want to install golang or even a use my binary on their system… And I wanted to make sure that a simple bash script was indeed doable to follow my first rule.

At the moment, this golang program, called GGM (Go Gemini Mention), is actually running on my capsule and thus providing the /.well-known/mention endpoint so you can send me some! I've also added a link at the bottom of all gemlog entries.

The idea of the algorithm of GGM is essentially the same as the bash script shown above for now, but as I'm planning to add more, I'll feel more comfortable coding in golang than bash :).

GGM repo (HTTPS)

Conclusion

First, thank you so much and congratulations for reading until this!

I don't know where this is going, might never be used and be forgotten in the next weeks or so… Or maybe used… I don't know :)

But it was fun thinking about it and doing a bit of coding to actually test the theory 🤷.

Stay safe!

1: Station

2: Tinylog

3: Cosmos

4: Antenna

5: 1 year of gemini

6: Kennedy search engine

7: TLGS search engine

8: Gemget

9: Msmtp

/gemlog/

Send me a gemini mention

send me an email!