Introducing New Fediverse Software, Goofed v0.0.1, Minimum Viable Shitpost Edition

https://scrapetacular.ydns.eu/activities/50114ac8-fd26-47cd-8fe0-ad97f0027c5e

That sounds pretty fun, I like your extremist take on things.

If you want to federate votes in an efficient way, consider doing them in batches, like this - https://codeberg.org/rimu/pyfedi/src/branch/main/docs/fep-4248.md. Sending batches means building up a queue, etc which is a pain in the ass so you might want to just receive batches and send individually.

You can do nested comments more efficiently by doing a single query for all the comments on a post and then constructing the comment tree in Go, rather than using multiple SQL queries. It’s a bit tricky to code but you can copy PieFed’s code - https://codeberg.org/rimu/pyfedi/src/commit/68d6799be5c321f9abf84d136cafef6de6e3aafb/app/post/util.py#L141

pyfedi/docs/fep-4248.md at main

pyfedi - Project background: https://join.piefed.social. Flagship instance: https://piefed.social

Codeberg.org

Whoa senpai noticed me. There actually is a recursive query format in the latest sqlite for this exact situation, Postgres may have something similar, I just thought a list is fine for the web UI. I’ll have to benchmaxx and pick a strategy for the API.

I actually read that FEP. In my code that is too shameful to release yet, I look for an Object, then look for its Type, then figure out how to deserialize the rest of the object, but this object doesn’t have one. Would it be possible to do something like this:

{ "object": { "type": "LikeCollection", "likes": [like1, like2, ..etc] } }

Or is that weird. Spare a thought for those in less dynamic languages :D

You’re right, to be more similar to the ActivityPub style of doing things the object should be a “type” of “Collection”, not just suddenly be an array instead of an object.
Shit, that went well, I was expecting pushback. Should I make an issue for discussion, or is there one already. I don’t know if the object also needs an ID

There is a discussion but it’s an email chain between myself, Lemmy, Mbin, NodeBB so not really out in the open.

I’m thinking of using the normal OrderedCollection structure that AP has - https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollection. An object of type ’OrderedCollection’ with an array of ‘items’.

Activity Vocabulary

I think so? I guess a Like has to happen before an Unlike, would the collection have multiple possible activity types in it?

While I have your ear, I don’t know how yet but I’d like it to be easier for devs to collaborate over AP for anything not involving security.

Yes theoretically you could have any type in there but votes are the biggest inefficiency in the system so I’ve only implemented it for them.

There are some nodebb forums that federate with us, which are intended for AP dev discussions - [email protected] for example. Not very active. Also some Matrix channels, again not exactly humming. Everyone is pretty focused on their own projects, really.

Thanks, subscribed to activitypub.space. I’ll probably make a post about the guest posting trial in the General Discussion channel at some point, since people are talking about barriers to first use.
How do you know if a random server implements a particular FEP?

There is a convention of putting a FEDERATION.md file in the root of your project (there is a FEP about it but I can’t remember what it is, heh) which lists the FEPs your project implements.

e.g. https://codeberg.org/rimu/pyfedi/src/branch/main/FEDERATION.md

There is no standardised API endpoint for discovering this info so basically you just need to lurk in all the dev spaces you can and watch what they’re talking about, stalk each other’s codeberg/github issue queues and PRs and just cope with the jank.

pyfedi/FEDERATION.md at main

pyfedi - Project background: https://join.piefed.social. Flagship instance: https://piefed.social

Codeberg.org
Excellent 👍