• 0 Posts
  • 20 Comments
Joined 2 months ago
cake
Cake day: March 19th, 2025

help-circle










  • The Allure of the Fediverse and the Challenges of ActivityPub Implementation

    The fediverse—a decentralized social web powered by protocols like ActivityPub—is an exciting space to explore. If you’re considering building the next great federated app, connected to platforms like Mastodon, Lemmy, Pixelfed, and more, you might be tempted to implement ActivityPub from scratch. While this approach offers total control, it’s a daunting task due to the complexity of the standards involved.

    The Challenge: Data Modeling with ActivityStreams & JSON-LD

    At its core, ActivityPub relies on ActivityStreams 2.0 vocabulary and JSON-LD syntax. This combination introduces significant complexity:

    1. Understanding ActivityStreams Vocabulary:
      You need to model actions and objects (e.g., posts as Note or Article, profiles as Person or Organization, and actions like Create, Follow, Like, Announce) using the precise terms defined in the specification.

    2. JSON-LD Specifics:
      JSON-LD has unique rules that complicate direct JSON manipulation:

      • Missing vs. Empty Arrays: A property being absent is often semantically identical to it being present with an empty array.
        // No name property
        { "@context": "https://www.w3.org/ns/activitystreams", "type": "Note", "content": "…"}
        
        // Equivalent to:
        { "@context": "https://www.w3.org/ns/activitystreams", "type": "Note", "name": [], "content": "…"}
        
      • Single Value vs. Array: A property can hold a single value or an array.
        // Single value
        { "@context": "https://www.w3.org/ns/activitystreams", "type": "Note", "content": "Hello"}
        
        // Equivalent to:
        { "@context": "https://www.w3.org/ns/activitystreams", "type": "Note", "content": ["Hello"]}
        
      • Object References vs. Embedded Objects: Properties can contain either embedded objects or URI references.
        // Embedded object
        {
          "@context": "https://www.w3.org/ns/activitystreams",
          "type": "Announce",
          "actor": { "type": "Person", "id": "http://sally.example.org/", "name": "Sally" },
          "object": { "type": "Arrive", "id": "https://sally.example.com/arrive", /* ... */ }
        }
        
        // Equivalent to:
        {
          "@context": "https://www.w3.org/ns/activitystreams",
          "type": "Announce",
          "actor": "http://sally.example.org/",
          "object": "https://sally.example.com/arrive"
        }
        

    Fedify: Simplifying ActivityPub Development

    Fedify, a TypeScript framework, abstracts the complexity of ActivityPub development. It handles the heavy lifting, allowing you to focus on what makes your app unique.

    Example Code with Fedify

    Fedify simplifies federation logic:

    // Handle follow
    federation.on(Follow, async (ctx, follow) => {
      // Implement follow logic
    });
    
    // Handle post activity
    federation.on(Create, async (ctx, activity) => {
      // Implement post activity logic
    });
    

    Web Interface and Logs

    When running your app:

    Web interface available at: http://localhost:8000/
    

    Logs example:

    .lhr.life/r/2 | ╰─────────────────┴───────────────────────────────────────╯
    

    Conclusion

    Building a federated app with ActivityPub is challenging, but tools like Fedify make the process manageable. By abstracting away the complexity of JSON-LD and ActivityStreams, Fedify allows developers to focus on creating innovative applications for the fediverse.





  • If you know a little 3D modeling you can make a much better frame in terms of ergonomics as it’ll be a custom fit for your hands. Things like changing grip profile, adding a beaver tail, integrating a pedal, custom stippling, etc. Any number of things can be changed outside of rails width, where the trigger group sits and where the magazine interacts with the mag release and magwell.

    You can print AR Lower recievers, suppressors, binary triggers, on and on and on. There’s no stopping that.

    Gun control needs to focus on the manufacturing at the company level. There needs to be a licensure process with necessary training, liability insurance if you want to daily carry. These are where gun control can actually benefit society.

    Change gun culture not what the definition of a gun is. But that’s not going to happen in America anytime soon. The gun lobby and the fear mongering NRA are dead set against it. They want ghost gun legislation as it allows them to further profit off of fear and paranoia.




  • Yes, that’s great for me and mine, but not for others. I don’t like to support or platform/promote applications that require a subscription for any access at all.

    The problem is Plex aren’t Netflix in my usecase. I’m sharing my library with my friends.

    Now if they’d like to charge for the content they host. Great more power to 'em, but I feel icky with a payment or subscription model that charges to deliver my collection to my friends and family.

    So, like I said. I’ll likely start migrating to jellyfin and start the conversation with people in how to get the jellyfin app on whatever device they have.



  • IMPORTANT NOTE FOR CURRENT PLEX PASS HOLDERS: For users who have an active Plex Pass subscription, remote playback will continue to be available to you without interruption from any Plex Media Server, after these changes go into effect. When running your own Plex Media Server as a subscriber, other users to whom you have granted access can also stream from the server (whether local or remote), without ANY additional charge—not even a mobile activation fee. More on that later in this update.

    I guess that’s something.

    Gonna be a long slow explanation to my family and friends how to switch to jellyfin. Hopefully there’s an app ecosystem there as well. I was lucky to get a lifetime pass way back in 2009 when I did some work for them. It’s very different now.