On the Euphoria of Setting Up Activitypub With Gemini – Irony

Reading Time: 3 minutes

I have spent many hours, and got Gemini to hallucinate multiple times, through multiple chats, attempting to get my Eleventy blogging experiment to talk with Activitypub and the Fediverse with limited help.Setting p a webfinger was easy, but getting follows to be accepted, and for posts to show up has been a complex task.

The Gemini Limitation

While putting Gemini through its paces I noticed that Gemini loves to try A, then B, before trying C, and during the entire process it will tell me why the solution works. Ironically, it often doesn’t. We hear so much about vibe coding, but based on my experiences I’d say that vibe coding is deeply ingrained within the scope of plain dumb luck.

One of the problem with AI, that I notice on a task such as this, is that AI tokenises what should be kept as a whole. An eleventy.js file should be kept whole, or if not whole, then as individual functions. By breaking it up in the wrong place, every time you try something and it fails, the AI model grows exponentially in complexity. That’s why I close a chat, take the latest iteration and continue from there.

If I tried this with Euria, LeChat and other LLMs I’d run out of tokens way before I achieved my goal. That’s why I stick with Gemini.

Of Image Paths and Activitypub Experimentation

If you’re setting up an RSS feed for Eleventy, with Gemini’s help, then it’s fantastic, but if you’re dealing with paths to images, file conversion, and stepped processes, such as ingesting the photos to a site specific directory, converting them from jpg to webp, and then serving them, then Gemini will get confused and hours of iteration will take place. That’s why I speak of luck playing a part.

Another term for luck is perseverance.

The Activitypub Marathon

Two or three years ago, when I was experimenting with Activitypub integration with a wordpress blog the process took time, and iterations. I used many different sources to try to resolve why it wasn’t working, and I was using the RTFB model, rather than AI. Read the Fabulous Blog trying to understand if I had made a mistake and if I had done something wrong.

I seem to remember moving the well know webfinger to the site’s route directory and that worked eventually.

Over time the wordpress plugin was improved and now it is optimised, to work within minutes, rather than hours.

What Worked

Setting up Webfinger was simple, and getting Mastodon to see the profile was simple. It is the process of getting a static blog to be seen by Mastodon that is a challenge.

Bridgy Fed

Setting up Bridgy Fed was quite fast, and simple, but I forgot to modify the site’s domain so it’s pointing to the wrong one for now. It was relatively quick and intuitive to setup, so if you’re in a rush take the Brid.gy route. I found that Bluesky prefers it.

Seeing JSON Rather than HTML

One of the stumbling blocks with my attempt to add the static blog to the fediverse is that Eleventy was serving html rather than json. Outbox was serving HTML, so that had to be fixed in the layout, but also via htaccess, and the same was true of the post pages. Now they’re serving the html versions, as well as a fediverse friendly json version. With patience fediverse instances should notice and index the blog, as the five hundred posts are noticed and indexed, and as new posts are shared.

And Finally

Lack of Gemini Support

I’m puzzled by how many iterations it takes with Gemini to get something like Activitypub to work with Eleventy. I’d expect AI to have encyclopedic knowledge on a topic, and help to resolve an issue within seconds or minutes, rather than hours. I’d also expect it to ask for context and encourage identifying the environment, before blundering in, and assuming, rather than verifying first.

Lack of Contextual Memory

The single most exhausting thing about trying to problem solve with Gemini is that it has no contextual memory, and it hallucinates. Both of these lead to negative loops where you get stuck. The easiest way to end such a loop is to open a new chat, but in so doing you need to add the context back in.

The Case for Writing and Using Tutorials is Alive and Well

With a well researched, and written tutorial, by following clear and concise instructions, you can follow a list of steps methodically and achieve what you want with a fraction of the carbon footprint, and in a fraction of the time. Next time I will look for a tutorial.