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

NodeBB <> Lemmy federation issue (re: nullable image/icon)

Technical Discussion
26 4 20

Gli ultimi otto messaggi ricevuti dalla Federazione
  • @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

  • @julian there's no difference on the consuming side (and in many programming languages you can check for truthiness with something like `if x.get("totalItems")` which defaults to returning null if missing anyway)

    functionally, you either have the information, or you don't

    read more

  • trwnh@mastodon.social not sent due to implementation differences, rather.

    read more
Post suggeriti
  • 0 Votes
    1 Posts
    4 Views
    This is an extension of the discussion from Topic removal from a category/community. In it, rimu@piefed.social shared the Lemmy federation primer which details that Delete(Object) is federated whenever a post is removed from a community. I needed a way to communicate when a topic/context (not the top-level post) is removed from a category/audience, but is not deleted. You might ask — how is removing a context different from deleting it? In this case, a removed context still exists and is still resolvable. A context can removed from an audience in NodeBB. Note that Lemmy and Piefed don't have a concept of an audience-less context, so if a context is removed from an audience, it would simply be deleted. No additional logic required. Anyhow — when a topic is moved into Uncategorized (which is a catch-all bucket for... you guessed it, uncategorized content), NodeBB will federate a Remove. It looks something like this: { id: '#activity/remove/', type: 'Remove', actor: '', to: [], cc: [, object: '', origin: '', } This is live on activitypub.space already. This goes hand-in-hand with topic moving, which would follow similar mechanisms, except it'd be a Move instead of a Remove. I will likely write an FEP with technical details for both Remove and Move, and will include existing behaviours (Delete(Object)) as well.
  • People are Starter Packs

    Technical Discussion activitypub fediverse
    3
    0 Votes
    3 Posts
    9 Views
    Thank you, @julian.One thing I am concerned about is how that affects forums and communities.But then I think, so what if a NodeBB forum or PieFed community wanted to highlight people because those people represented the values of that community (even if they were not necessarily a part of it)?This is something that no forum software that I am aware of does because we always think of forums as only something we join into.And it is so amazing to me that the FediVerse and the social web movement could provide a forum or group the opportunity to grow in the opposite direction—sending people outwards for new shared experiences.
  • 1 Votes
    30 Posts
    28 Views
    If I used an object observer for a topic/context, and proceeded to delete that context, the object observer would go away too. That is, unless you're inferring that I take steps to preserve the object observer for some period of time (if not forever?)
  • 1 Votes
    1 Posts
    8 Views
    RE: https://mastodon.social/@MastodonEngineering/115337952873418574Uy... 👀 Interesante...> Change the identifiers used in ActivityPub to numeric IDs (instead of their username) for new users. This is a first step towards allowing account renaming. — Github PR #32724 (by ClearlyClaire)#mastodon #activitypub #fediverso #fedi #fediverse