Today I learned about Sublinks (here), an open-source project that aims to be a drop-in replacement for the backend of Lemmy, a federated link aggregator and microblogging platform. Sublinks is designed to be initially API-compatible with Lemmy, allowing existing Lemmy clients, such as Lemmy-UI, to integrate seamlessly.

The project is written in Java, which may introduce some overhead but is chosen for its maintainability and familiarity among a wider pool of developers. The Sublinks team prioritizes a more inclusive and less toxic development environment, and the project has already attracted more developers than Lemmy.

While Sublinks is starting with 1:1 compatibility, future plans include implementing additional features that the Lemmy developers have not pursued. This could lead to a divergence in functionality between the two platforms as Sublinks evolves beyond its initial compatibility phase.


README

GitHub stars GitHub tag (latest SemVer) gradle workflow GitHub issues License

Sublinks

A decentralized, censorship-resistant, and privacy-preserving social network.

About

Sublinks, crafted using Java Spring Boot, stands as a state-of-the-art link aggregation and microblogging platform, reminiscent yet advanced compared to Lemmy & Kbin. It features a Lemmy compatible API, allowing for seamless integration and migration for existing Lemmy users. Unique to Sublinks are its enhanced moderation tools, tailored to provide a safe and manageable online community space. Embracing the fediverse, it supports the ActivityPub protocol, enabling interoperability with a wide range of social platforms. Sublinks is not just a platform; it’s a community-centric ecosystem, prioritizing user experience, content authenticity, and networked social interaction.

Features

  • Open source, MIT License.
  • Self hostable, easy to deploy.
  • Clean, mobile-friendly interface.
    • Only a minimum of a username and password is required to sign up!
    • User avatar support.
    • Live-updating Comment threads.
    • Full vote scores (+/-) like old Reddit.
    • Themes, including light, dark, and solarized.
    • Emojis with autocomplete support. Start typing :
    • User tagging using @, Community tagging using !.
    • Integrated image uploading in both posts and comments.
    • A post can consist of a title and any combination of self text, a URL, or nothing else.
    • Notifications, on comment replies and when you’re tagged.
      • Notifications can be sent via email.
      • Private messaging support.
    • i18n / internationalization support.
    • RSS / Atom feeds for All, Subscribed, Inbox, User, and Community.
  • Cross-posting support.
    • A similar post search when creating new posts. Great for question / answer communities.
  • Moderation abilities.
    • Public Moderation Logs.
    • Can sticky posts to the top of communities.
    • Both site admins, and community moderators, who can appoint other moderators.
    • Can lock, remove, and restore posts and comments.
    • Can ban and unban users from communities and the site.
    • Can transfer site and communities to others.
  • Can fully erase your data, replacing all posts and comments.
  • NSFW post / community support.
  • High performance.

Contact

Contributing

Support / Donate

Sublinks is free, open-source software, meaning no advertising, monetizing, or venture capital, ever. Your donations directly support full-time development of the project.

  • masterspace@lemmy.ca
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    2
    ·
    edit-2
    10 months ago

    You can write functions… A static function is not particularly different from a free function written in a namespace. You can even use a static import to allow yourself to call it without qualification.

    I’m referring to functional programming concepts like anonymous functions and functions as parameters. Java finally added support for this with Lambda expression in Java 8, but because it took them so long, most libraries and frameworks that wanted to support backwards compatibility didn’t use them and still forced everything into classes and objects, meaning that most Java code bases you find are purely object oriented.

    ______ProviderBuilderProvider

    idea what this is in reference to. I have a feeling your issue is more with the frameworks you’ve worked with than Java itself.

    It’s in reference to the fact that unlike basically every other modern programming language, Java doesn’t let you do stuff like have default parameters for functions, instead forcing you to overload them:

    In Javascript / C# you just have:

    function DoSomething(int  howManyTimes = 10){
        //something
    }
    

    In Java you have:

    function DoSomething() {
        int howManyTimes = 10;
        //something
    }
    function DoSomething(int howManyTimes) {
        //something
    }
    

    Which then leads you to recommendations of using the Builder Pattern, and now you’ve got the function / class you care about rewritten three times, plus a whole a builder class and a bunch of building specific functions, all of which are basically just a whole bunch of unnecessary verbose bullshit to approximate default parameters that are expressed more clearly with 2 additional characters in other languages.

    • Dark Arc@social.packetloss.gg
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      1
      ·
      edit-2
      10 months ago

      Sounds like you’re working with some bad libraries and writing some bad code IMO.

      Java 8 was released over a decade ago. Lambdas in Java are in great shape. Java’s streaming API makes heavy use of them.

      Builders should not be used all that much, certainly not in place of default arguments.

      The correct way to write that is simply:

      void doSomething() {
          int howManyTimes = 10;
          doSomething(howManyTimes);
      }
      void doSomething(int howManyTimes) {
          //something
      }
      

      Is it more lines that a default argument? Sure. It’s not that bad though. It also resolves some ABI complexity issues that come into play with default arguments. If you use default arguments in C++ anything calling that code needs to be rebuilt if the default argument is updated. In Java because it’s part of the definition of the function not the call site the default is updated by replacing the library. I don’t know how C# handles this, perhaps they create the overload implicitly. It’s not a problem for JavaScript or Python because they’re interpreted.

      Bonus points, you can use an interface to provide a default overload like that even if you’re dealing with something that’s abstract.

      I’m also mildly concerned by how you’re using JavaScript like function declarations in your examples with C# like naming scheme to demonstrate why Java is bad.

      As your own link the builder pattern is an alternative to the factory pattern. Neither of which Java or any other language requires you to use. Note there is not a single “Builder” in the entire sublinks Java codebase.

      Late edit: Also going to add in https://rust-unofficial.github.io/patterns/patterns/creational/builder.html

      • masterspace@lemmy.ca
        link
        fedilink
        English
        arrow-up
        2
        arrow-down
        2
        ·
        10 months ago

        Sounds like you’re working with some bad libraries and writing some bad code IMO.

        Yes, the Java language encourages it, as do popular frameworks like Spring / Boot.

        Is it more lines that a default argument? Sure. It’s not that bad though.

        Yes it is. You’re adding and entire new function block for every single optional parameter. Add three more optional params and you’ve got a page of text to express a single line in other languages.

        Bonus points, you can use an interface to provide a default overload like that even if you’re dealing with something that’s abstract.

        That’s great, you can in C# and Typescript too but you don’t have to.

        I’m also mildly concerned by how you’re using JavaScript like function declarations in your examples with C# like naming scheme to demonstrate why Java is bad.

        Lmao, I’m mildly concerned that you don’t understand the concept of pseudo code.

        Note there is not a single “Builder” in the entire sublinks Java codebase.

        That’s awesome, it will be the first Java project I’ve encountered where that’s the case.

        • Dark Arc@social.packetloss.gg
          link
          fedilink
          English
          arrow-up
          1
          ·
          10 months ago

          the Java language encourages it

          It really doesn’t. Perhaps your teachers and workplace do out of some dated design ideals though.

          Like everything else it was a fad and it’s got its time and place.

          Yes it is. You’re adding and entire new function block for every single optional parameter. Add three more optional params and you’ve got a page of text to express a single line in other languages.

          See my (late) edit (sorry things jump into my head sometimes … and forum software is inferior to chat software in adding that in a sensible way) about what the unobvious consequences of default arguments can be in some languages. Also, do you really write default arguments that often?

          If you’re writing functions with tons of arguments that are all defaulted that should also be a red flag there’s probably a refactor that needs done to bundle that data.

          Granted, the indirection that can cause in a language without value types (like Java) can be a burden in some very performance critical situations … but those are few and far between in practice.

          Lmao, I’m mildly concerned that you don’t understand the concept of pseudo code.

          Touche.

          That’s awesome, it will be the first Java project I’ve encountered where that’s the case.

          There are plenty of them out there… Maybe your code base too if you can figure out why you’re using so many of them. There’s really nothing profoundly unique about Java that predisposes it to needing large numbers of builders.