sam

joined 3 weeks ago
 

(I'm very much still learning German, so please ignore any grammatical or lexical issues you see below.... Corrections are welcome!)

Ich lern gerade Deutsch, und mochte mir anfangen technische Inhalte auf YouTube zu schauen -- vor allem zu Themen wie Mathematik, Programmierung, und Linux/FOSS. Zum Beispiel: Tsoding, Acerola, Sebastian Lague, Mental Outlaw, Stand-up Maths, ThePrimeagen und dergleichen. Irgendwelche Vorschlage?

81
submitted 2 days ago* (last edited 2 days ago) by sam@r1b.it to c/linuxmemes@lemmy.world
[–] sam@r1b.it 9 points 3 days ago

Language is used to communicate. If you get so caught up in the "logically correct" word to use that people don't know what you mean, you're defeating the purpose. The "right" word is the one that people understand regardless of how messy it's history is

[–] sam@r1b.it 1 points 1 week ago

Arguably the best combination

[–] sam@r1b.it 4 points 1 week ago (2 children)
[–] sam@r1b.it 2 points 1 week ago

South Carolina has been BOOMING recently. I can't complain

[–] sam@r1b.it 1 points 1 week ago

Maybe one day corporate stuff. You just need to write one file to copy-paste and identical system to dozens of your employees' issued devices

[–] sam@r1b.it 3 points 1 week ago* (last edited 1 week ago)

I know it's a feature -- that's what I meant by "most of it is a result of completely intentional behavior". However, I then went on to say that it is still detrimental to my users' browsing experience if they want to "daily drive" r1b.it. Like I said in another comment, I'm not replicating the entire fediverse -- that's why I didn't opt for a relay. I'm only replicating what my users want to see

Edit: I also want to make it clear that this optimization is actually super beneficial for most instance. However, for us little guys that are just getting off the ground with only a handful of users, it can be hard to deal with

[–] sam@r1b.it 3 points 1 week ago

I looked into relays a bit, but I don't think they're what I want for my tiny little instance. Relays are a firehose; they ingest everything from every instance connected to the same relay, which can quickly take up storage on my low-end setup. My little Python script is more precise. It only targets individual communities that my users are actually interested in.

That's all assuming I'm actually understanding how relays work. If I'm missing something, please let me know, and I can change gears without a hitch

20
submitted 1 week ago* (last edited 1 week ago) by sam@r1b.it to c/fediverse@lemmy.world
 

cross-posted from: https://r1b.it/post/12935

As I have browsed the Fediverse through r1b.it, I've noticed lots of missing content from remote communities. Some of that has to do with actual federation problems (which I have been in talks with other instance owners to fix), but most of it is a result of completely intentional behavior. Regardless of that, though, I feel as if missing content detracts from the r1b.it user experience. So, I decided to flex my programming muscles a bit and devised a solution.

For the more technically inclined bunch, you can keep reading to see how it works. For everyone else, you can just be happy to hear that you should now be getting all new content from your subscribed communities! If you have any further federation issues, please let me know. You can always @ me in !croak :)

The nerd stuffLemmy relies on an event-driven feed, meaning it doesn't always automatically pull posts from remote servers unless someone is actively browsing or querying them. So, if a r1b.it user doesn't actively interact with a community, the content won't get pulled. If no new content is getting pulled, no one will interact with the community. To break this cycle, I've set up a lightweight Python script to automatically sync every subscribed community in the background. This script is set up as a cron job that runs every 6 hours.

This script first queries r1b.it's local PostgreSQL database to gather a unique list of every remote community local users are subscribed to. For each community it finds, the script targets Lemmy's resolve_object API endpoint using the community's full actor URL to refresh its metadata and maintain connection health.

To keep this script from turning into a DDOS as r1b.it grows, it shuffles the community list to spread instances out and has a polite randomized pause between each request. Additionally, I plan to remove this script entirely if r1b.it ever gets big enough to federate itself naturally.

#!/usr/bin/env python3
import subprocess
import urllib.parse
import urllib.request
import time
import random

LOCAL_DOMAIN = "https://r1b.it/"
DB_CONTAINER = "REDACTED"
DB_USER = "REDACTED"
DB_NAME = "REDACTED"

SQL_QUERY = """
SELECT DISTINCT c.actor_id 
FROM community_follower cf
JOIN person p ON cf.person_id = p.id
JOIN community c ON cf.community_id = c.id
WHERE p.local = true 
  AND c.local = false;
"""

def get_subscriptions():
    cmd = [
        "docker", "exec", "-i", DB_CONTAINER,
        "psql", "-U", DB_USER, "-d", DB_NAME, "-t", "-A", "-c", SQL_QUERY
    ]
    try:
        res = subprocess.run(cmd, capture_output=True, text=True, check=True)
        return [line.strip() for line in res.stdout.splitlines() if line.strip()]
    except Exception:
        return []

def resolve_community(actor_id):
    encoded = urllib.parse.quote(actor_id, safe="")
    api_url = f"{LOCAL_DOMAIN}/api/v3/resolve_object?q={encoded}"
    req = urllib.request.Request(
        api_url, 
        headers={"Accept": "application/json", "User-Agent": "LemmyAutoSync/1.0"}
    )
    try:
        with urllib.request.urlopen(req, timeout=10) as resp:
            return resp.status
    except urllib.error.HTTPError as e:
        return e.code
    except Exception:
        return 500

def main():
    communities = get_subscriptions()
    if not communities:
        return

    print(f"Found {len(communities)} unique remote subscriptions")
    
    random.shuffle(communities)

    for actor_id in communities:
        status = resolve_community(actor_id)
        if status == 200:
            print(f"{actor_id} FEDERATED")
        elif status == 400:
            print(f"{actor_id} ALREADY FEDERATED")
        else:
            print(f"{actor_id} FAILED ({status)")
        
        # Polite randomized pause
        time.sleep(random.uniform(1, 5))

    print("Sync complete.")

if __name__ == "__main__":
    main()

[–] sam@r1b.it 1 points 1 week ago

Thanks for the nomination :) I do really love these guys

[–] sam@r1b.it 1 points 2 weeks ago

I appreciate you being as kind as you are in response to a half thought-out thought posted sporadically onto the internet. You're giving me too much care, lol

[–] sam@r1b.it 2 points 2 weeks ago* (last edited 2 weeks ago)

I agree with pretty much everything people are saying, at least that which is kind. I think I probably just overcorrected when trying to account for the fact that Lemmy tends to bring in the techy type. My thought process was flawed. I don't have much to say beyond that and an updoot, which I've been giving to most

Also, the edit to the post was intended as a mass reply. A lot of people are saying the same thing, so I didn't want to reply to each individual one, nor did I want to come off as argumentative. Like I said, I agree with what most are saying

 

To help bring more awareness to marine conservation, overlooked aquatic organisms, and ecosystem engineers (ex. kelp and mangroves, deep-sea bacteria, and keystone species), I’m starting a monthly "Species of the Month" spotlight over on !marine@r1b.it!

The idea is simple: every month, we highlight a marine or aquatic species, dive into its ecological role, and share research/appreciation around why it matters to its ecosystem.

I know I'm a little late to get the ball rolling, but I'm opening nominations for October now! If you have a favorite aquatic species, an endangered marine animal, or an underappreciated ecosystem worker you'd like to see featured, come drop a nomination! Perhaps even one with a spoookkyy twist? You can see more information about how to do so in the original post on r1b.it.

Since this community of course isn't dedicated to my little series, it will be far easier to keep track of nominations if they are kept within !marine@r1b.it. Though, I don't want to force you all out of your bubble (or force my community upon you), so 'll be sure to keep tabs on !tidalpunk if you want to explicitly specify that you're making a nomination :)

Looking forward to seeing what species get put forward!

66
submitted 2 weeks ago* (last edited 2 weeks ago) by sam@r1b.it to c/fediverse@lemmy.world
 

Is it just up-front cost? I understand that for larger instances because they'd have to setup heftier systems, but even micro-instances seem to rent cloud compute when they could probably get by with port-forwarding to an old laptop.

Edit: I understand that self-hosting is a skill that takes years to learn, and I'm aware that the vast majority of people on Earth choose to spend their time and energy investing into completely different topics. However, Lemmy tends to attract the techy type, so I suppose I just assumed the ratio of self-hosters-to-not would be higher. I'm not saying it's trivial, just that I presume more Lemmings know how to do it than, say, Redditors (taking total users into account ofc)

[–] sam@r1b.it 5 points 2 weeks ago

Working the TLD into the name of the site itself is a recent trend I've seen. I did it with my instance, and so did the hosting service I use, elest.io

[–] sam@r1b.it 6 points 2 weeks ago (3 children)

Your logo looks identical to Photon's logo, and the UI seems very Photon-y. Inspiration or coincidence?

 

I have absolutely no idea how this gap has existed in Lemmy for so long, but !marine@r1b.it is here to fill it! I've been a Lemming for many years, and I've never seen a marine community pop up.

So, whether you’re a marine biologist, tide-pool explorer, scuba diver, aquarium hobbyist, or just someone who loves ocean photography and marine conservation, this community is open to you!

Edit: I was a little over zealous when I wrote "I've never seen a marine community pop up". From my conversation with JohnnyEnzyme@piefed.social in the comments:

"But you’re absolutely right – I completely forgot about !ocean when writing this post. I shouldn’t have said I’ve “never seen a marine community”. Though, it is fairly inactive like you said. And this is the Fediverse! A little decentralization never hurt anyone ;) I perfectly happy to run alongside and support “competing” communities"

 

cross-posted from: https://r1b.it/post/4805

I like anemones just because they're so fascinating. Clownfish are beautiful and omg hermit crabs are adorable

50
submitted 2 weeks ago* (last edited 2 weeks ago) by sam@r1b.it to c/fediverse@lemmy.world
 

Content? Politics? Community? A cool integration you're looking for? Maybe even a cool domain name? I'm not looking for tips as an instance owner, lol; I'm just curious.

Edit: I've gotten a lot of push factors, what about pull factors?

 

With mander.xyz being down for the past couple months, a huge gap has been left in the Fediverse for herpetology enthusiasts, reptile keepers, and field herpers.

To help reconnect our community, I’ve launched !herps@r1b.it, a quiet, nature-focused space dedicated to cold-blooded creatures of all kinds!

Whether you’re looking to share field observations, show off bioactive enclosures, post photos of native frogs and snakes, or discuss care advice, you’re very welcome here.

⚠️ IMPORTANT! If/when mander comes back online, I fully encourage you all to go back to it -- it's an absolutely wonderful instance. I'd love it if some people used both, but I don't expect everyone to.

 

With mander.xyz being down for the past couple months, a huge gap has been left in the Fediverse for herpetology enthusiasts, reptile keepers, and field herpers.

To help reconnect our community, I’ve launched !herps@r1b.it, a quiet, nature-focused space dedicated to cold-blooded creatures of all kinds!

Whether you’re looking to share field observations, show off bioactive enclosures, post photos of native frogs and snakes, or discuss care advice, you’re very welcome here.

⚠️ IMPORTANT! If/when mander comes back online, I fully encourage you all to go back to it -- it's an absolutely wonderful instance. I'd love it if some people used both, but I don't expect everyone to.

 

cross-posted from: https://r1b.it/post/2555

two tree frogs sitting together on a plant stem

 

Hey! I’ve just spun up a fresh micro-instance (r1b.it) built around a slower, more human-centric pace, and I'm launching its first main community: croak.

It's a cozy, low-pressure corner meant for general musings, unhurried chats, and sharing whatever is on your mind. It's basically a staging ground for r1b.it's culture as the userbase grows. I don't really have a plan for r1b.it, so if you feel like the Fediverse is missing something, I'd be happy to host it here (just come tell me about it in !croak). The server can go in whatever direction and fill whatever niches the people want :)

So, whether you want a quiet place to hang out, test out federation across a new node, or just drop by to say hello, I'd love to see you there.

🔗 Universal Link: !croak@r1b.it

view more: next ›