Skip to content

Piero Bosio Social Web Site Personale Logo Fediverso

Social Forum federato con il resto del mondo. Non contano le istanze, contano le persone

What if we had a P4 for ActivityPub?

Technical Discussion
2 2 1

Gli ultimi otto messaggi ricevuti dalla Federazione
  • If we're going to be publishing activities regarding resolvable context collections then it may be time to introduce a new object type.

    It would be backwards compatible with f228 OrderedCollections... using the new type would signify support for the various activity types perhaps...?

    Edit: if this is what you were proposing with client managed collections, then my apologies 😅 the naming threw me off

    read more

  • Another solution: introduce a new object class, client-managed collections. These collections should have a property that differentiates them from server-managed collections, e.g. isClientManaged: true. And they shouldn't be paginated.

    I think this would be compatible with client-side signing.

    But companion object solution seems to be cleaner.

    read more

  • @julian that might be it, yeah. languages outside of javascript generally don't make a distinction between null and undefined, and even in javascript these are used inconsistently. for example localStorage.getItem will return null for a missing key. practically speaking, the "intentionally" distinction is a distinction without a difference in most processing contexts.

    read more

  • trwnh@mastodon.social undefined and perhaps that's why we're disagreeing on our interpretations of how these values should be handled.

    null in JavaScript is very explicitly a declaration that there is no value or "intentionally empty".

    null and undefined are two separate things here at least.

    read more

  • @julian what does js return instead? in most cases i'm familiar with, programming languages use null or nil or None for anything that doesn't have a value, or any reference which doesn't point anywhere. hence a null pointer exception when you try to dereference a null. if you try to get a value for a key that isn't in the dictionary, you get null by default because there is no value for a missing key. how would you consume a null value? if you have nothing to say, why say anything?

    read more

  • trwnh@mastodon.social I'm coding in js, which has all sorts of footguns, but even that won't return null when I attempt to access the non-existent property of an object... 😛

    read more

  • @julian this wouldn't be your AP lib, it would be your programming language itself

    read more

  • trwnh@mastodon.social as someone working on the consuming side, that is not correct.

    If my AP lib automatically assumed null when requesting an object property that didn't exist I'd consider that a bug.

    read more
Post suggeriti
  • 0 Votes
    7 Posts
    1 Views
    If we're going to be publishing activities regarding resolvable context collections then it may be time to introduce a new object type. It would be backwards compatible with f228 OrderedCollections... using the new type would signify support for the various activity types perhaps...? Edit: if this is what you were proposing with client managed collections, then my apologies 😅 the naming threw me off
  • @silverpill

    Technical Discussion
    1
    0 Votes
    1 Posts
    3 Views
    @silverpill Thank you - I wasn't aware of Mitra supporting conversation containers and nomadic identity, happy to learn.I have some questions about Mitra, I will ask them in a separate thread. @osma
  • Server-sent Events for the ActivityPub API

    Technical Discussion
    6
    0 Votes
    6 Posts
    6 Views
    The problem for us is that we actually did take advantage of the bi-directional data flow available with web sockets. However, probably > 90% of our websocket calls were simple data requests, so we dropped back to bog-standard GET and POST. Why re-invent the wheel? It's that other half where you want to communicate events in real-time, where SSE makes sense.
  • Thanks for the comment.

    Technical Discussion
    2
    0 Votes
    2 Posts
    3 Views
    @helge ActivityPub requires application/ld+json; profile="https://www.w3.org/ns/activitystreams"https://www.w3.org/TR/activitypub/#retrieving-objectsThe shorter form application/activity+json is nicer, but media type is one of the things about which specification is not ambiguous, so I always use the required one.application/activity+json is (or was) used by Mastodon, so of course everyone copy-pasted it into their projects.