andrew_s

joined 1 year ago
[–] andrew_s@piefed.social 7 points 4 months ago

You should listen to the voice that's telling you not to add more spoons to this already heavily-stirred bowl of shit.

[–] andrew_s@piefed.social 2 points 4 months ago

Nah, I'm sure it'll be fine. It'll be like a Fediverse Brexit ...

[–] andrew_s@piefed.social 4 points 4 months ago (1 children)

Neat. I saw your name in the 'Users' list (Search -> Explore Instance -> Users).

The API needs a DB upgrade, and so right now I'm in a queue behind 'Feeds', which is a feature that will add some new tables. I don't yet know what kind of upgrade it needs to be, i.e. how much things can be fudged vs. implemented properly.

[–] andrew_s@piefed.social 5 points 4 months ago

'cos of the Online Safety Act - there's a post in that community from the lemmy.zip admin.

[–] andrew_s@piefed.social 3 points 4 months ago

Oh, right. Thanks. Sorry, I'm realising now that what I said was a bit of lazy assumption. I've just looked, and saw that Interstellar is also Flutter, so you're a lot more likely to know than me (I've very new to all this). I'll edit my post.

[–] andrew_s@piefed.social 3 points 4 months ago

Yeah, the API is very similar in lots of ways. Some fields have different names (e.g. post.title instead of post.name), the 'site' response is a lot smaller, and there's things like 'activity_alert' for subscribing to other people's posts/comments and unsubscribing to your own (aka turning off inbox replies). Some routes aren't covered, either because the app didn't call them, or because there's no back-end support (e.g. viewing Modlogs), or because I de-prioritized them for now (e.g. viewing Reports).

I've started doing an OpenAPI spec thing, which I'm finding tedious to create, but it should make everything clearer when it's published.

[–] andrew_s@piefed.social 2 points 4 months ago (2 children)

Maybe I've the wrong idea. This app is a fork of Thunder (for Lemmy), and Thunder is only available on f-droid via the IzzyOnDroid repo, so I was thinking that it contained some binary blobs from Google.

[–] andrew_s@piefed.social 6 points 4 months ago (1 children)

An app is available now, for testing: https://piefed.social/post/484755

[–] andrew_s@piefed.social 13 points 4 months ago

More so 'other Fediverse socials'.

Here's an example on PieFed, that's a PixelFed user tagging their photos with 'dailyphoto' and then sharing via a.gup.pe on Mastodon: https://piefed.social/tag/dailyphoto

[–] andrew_s@piefed.social 2 points 4 months ago (1 children)

Lemmy has mangled that script a bit.

Where it says '%24%7Bpage%7D', it should a dollar sign, an open curly bracket, the word 'page', then a close curly bracket.

It displays a bit better at the source (click the multi-coloured fedi-link thing).

[–] andrew_s@piefed.social 2 points 4 months ago (2 children)

The only way I can think of is to use the API to get all communities, and then filter out the ones without local subs. So a basic BASH script would be:

#!/bin/bash  

echo -n '' > /tmp/allcomms.txt  

page=1  
while true  
do  
  communities=$(curl --request GET --url "https://walledgarden.xyz/api/v3/community/list?type_=All&page=%24%7Bpage%7D&limit=50" --header 'accept: application/json' | jq .communities[])  
  if [ "${communities}" == "" ]  
  then  
    break  
  fi  
  jq -r '[.community.id, .counts.subscribers_local] | @sh' <<<$communities >> /tmp/allcomms.txt  
  page=$(( page + 1 ))  
  sleep .5  
done  

while read id count  
do  
  if [ $count -eq 0 ]  
  then  
    echo "$id has no local subs"  
  fi  
done < /tmp/allcomms.txt  

(It'll take a few minutes to run)

After that, how you purge the communities with those IDs I'm less sure of. My guess would be:

Get a login tokin:
JWT=$(curl --request POST --url https://walledgarden.xyz/api/v3/user/login --header 'accept: application/json' --header 'content-type: application/json' --data '{"username_or_email": "YOUR_USERNAME","password": "YOUR_PASSWORD"}' | jq -r .jwt)

Use Admin/Purge from the API:

curl --request POST --url https://walledgarden.xyz/api/v3/admin/purge/community --header "authorization: Bearer $JWT" --header 'content-type: application/json' --data "{"community_id": ${id}, "reason": "no local subs"}"  

As long as purge lets the community be recreated again (which it should do), then that should be okay.

Don't take my word for any of this for an in-production Lemmy server, though. Test first!

[–] andrew_s@piefed.social 25 points 4 months ago (1 children)

Whatever the views are about MBFC, Tesseract integrated it better than LW's bot. If you don't like MBFC, it's just an option in your user settings to turn it off for Tesseract, whereas the bot caused a bunch of problems that weren't even related to concerns about accuracy and bias. Drive-by bots can be annoying, because it leads people to believe there's legit content where there isn't, and not every client respected LW's bot use of spoiler Markdown, so they ended up with a massive comment from it that dominated the screen.

 

I don't understand French, but found this music video to be captivating nevertheless.

 

Helene was the second major hurricane (Cat 3 or higher) of the 2024 season. Record-setting Hurricane Beryl preceded it as the earliest-forming Category 5 hurricane in the Atlantic basin’s history. Beryl became a major hurricane in the month of June east of the Lesser Antilles, the first time that’s ever happened during the first month of hurricane season since record-keeping began in 1851.

While Beryl weakened before reaching the United States as a Category 1 hurricane, Helene intensified into a major hurricane and continued strengthening right up to landfall. That now puts 2020-2024 into the record books, tying the mark for the longest consecutive number of years (five) in which a major hurricane has made landfall in the United States.

For decades, I had felt in control. Not in control of the weather, of course. But in control of the message that, if my audience was prepared and well informed, I could confidently guide them through any weather threat, and we’d all make it through safely. Today as a result of so many compounding climate-driven factors, the warming world has forcibly shifted my manner from calm concern to agitated dismay.

 

The patterns of Earth’s high winds have surprisingly widespread effects on life on the ground. A recent study in the journal Nature shows that when the summer jet stream over Europe veers north or south of its usual path, it brings weather extremes that can exacerbate epidemics, ruin crop harvests, and feed wildfires.

“The jet stream has caused these extreme conditions for 700 years in the past without greenhouse gases,” said Ellie Broadman, a co-author of the study and a researcher at the University of Arizona. “To me, that’s a little scary, to think about the compound effects of simply adding more heat to the atmosphere and imagining how those extremes might get more extreme in the future.”

 

It's not just datacenters running AI that need their own energy sources. Taiwanese hardware manufacturer to the clouds Quanta has revealed the purchase of three sets of fuel cell microgrid systems to power one of its California plants, after purchasing two in April of this year.

Fuel cell microgrids, like those produced by Bloom Energy, generate electricity through an electrochemical process and are designed to operate independently from the power grid. They require natural gas, biogas, or hydrogen as fuel.

Datacenter operators across the world have voiced concern over their ability to source sufficient power for their operations – especially new infrastructure using power-hungry GPUs to run AI workloads. Many are turning to nuclear power. Indeed, Microsoft recently made a deal to reactivate a reactor at the famed Three Mile Island plant to get the juice it needs

17
submitted 1 year ago* (last edited 1 year ago) by andrew_s@piefed.social to c/star_wars@lemmy.world
 
 

There's more than one way to do this, of course. For group-based forums like piefed, I think the most promising way is to automatically create a local community for each person that someone wants to follow. Incoming activity is then put into the appropriate community, and so you have a consistent UI of UserA has posted to technology@wherever, and UserB has posted to [UserB's community]@piefed.social. This avoids the '2 websites in 1' look that can happen when a site wants to display both lemmy-like communities and mastodon-like microblogs.

I haven't done too much work on it, in case this idea gets shot down in flames. So far, what I've got is:

  1. A user searches for another remote user, e.g. @freamon@pixelfed.dk

  2. When they're found, the user is offered the opportunity to create a 'Follower Community' (for want of a better name. I've been using 'fan club', but that's maybe a bit naff)

  3. The community is created, formatted from the profile id, so [https://pixelfed.dk/users/freamon](https://pixelfed.dk/users/freamon) becomes [https://piefed.social/c/pixelfed_dk_users_freamon](https://piefed.social/c/pixelfed_dk_users_freamon)

  4. A follow request is sent to the remote user (from the user doing the search, or a dedicated bot account, maybe)

  5. Incoming activity will just be to activitystreams and followers, so there won't be any matches in 'to', 'cc' or 'audience'. In that case, 'attributedTo' is looked at, using the same conversion as above: so something from [https://pixelfed.dk/users/freamon](https://pixelfed.dk/users/freamon) will be sent to [https://piefed.social/c/pixelfed_dk_users_freamon](https://piefed.social/c/pixelfed_dk_users_freamon) if it already exists.

  6. The posts will show in the community like any other. Other users can then subscribe to the community in the normal way, and get updates whenever the remote actor publishes something for their followers.

  7. Posts from Mastodon would need another post-type to look their best (something that simulates how they look over there). Posts from Pixelfed already display well using Masonry:
    On pixelfed:

    On piefed:

  8. Post replies and upvotes (maybe) should make their way back to remote user, the same way they do if they'd actually made a post in a local community.

Random thoughts:
There would need to be an Undo Follow sent if the community was deleted.
A local community called c/pixelfed_dk_users_freamon looks a bit ungainly, but there's likely a way communities like this could be rendered as something like [SELF] in the homepage feed.
I realise pixelfed are planning to implement Groups, but that hasn't really worked out for mastodon, so we'll see how it goes. I think the ability to follow individuals will still be useful.
The remote user could be made a moderator for the local community, and it set to 'mod posts only' so it would only contain stuff from them.
This approach doesn't require any database changes.

I've just bashed this together for now - looking to get your thoughts before I continue ...

 

Lemmy's spoiler format is

VISIBLE
HIDDEN 1
HIDDEN 2

As described here

The regex I've come up with is :{3} spoiler\s+?(\S.+?\n)(.+?)\n:{3}

It won't do spoilers inside spoilers, but that's a pretty niche case.

The changed code is viewable on GitHub

Any thoughts or suggestions for the regex before I create the PR?

I'm assuming that if I create a PR, and if they accept it, they'll (eventually) release a version with it in, and the line in pyfedi's requirements.txt can get version bumped. This seems like the 'proper' way to do it, but it's a bit long-winded, so maybe there's a better way to do it.

 

I've been thinking about what to do about cross-posts (e.g. where the same link is uploaded to both fediverse@lemmy.world and fediverse@lemmy.ml).

In terms of them being annoying, I don't yet know what to do about that.

My progress so far, and what it requires:
The Community table has an extra field (xp_indicator), for the field which determines if something is a cross-post or not. It defaults to URL, but it could be the title for communities like AskLemmy.
The Post table has an extra field (cross_posts), which is an array of other post ids (Note: this would lock PieFed into using Postgresql)
New posts, for local and ActivityPub, are checked to see if they are a cross-post, and the relevant posts are updated. This also happens for local edits and AP Update. In the DB, the posts in the screenshot looks like:

-[ RECORD 1 ]----------------------------------------------------------
id          | 27
title       | Springtime Ministrone
url         | https://www.bbcgoodfood.com/recipes/springtime-minestrone
cross_posts | {28,29,30}
-[ RECORD 2 ]----------------------------------------------------------
id          | 28
title       | Springtime Ministrone
url         | https://www.bbcgoodfood.com/recipes/springtime-minestrone
cross_posts | {27,29,30}
-[ RECORD 3 ]----------------------------------------------------------
id          | 29
title       | Springtime Ministrone
url         | https://www.bbcgoodfood.com/recipes/springtime-minestrone
cross_posts | {27,28,30}
-[ RECORD 4 ]----------------------------------------------------------
id          | 30
title       | Springtime Ministrone
url         | https://www.bbcgoodfood.com/recipes/springtime-minestrone
cross_posts | {27,28,29}

In the UI, posts with cross-posts get an extra icon, which when clicked bring you to another screen (similar to 'other discussions' in Reddit)

In terms of hiding duplicate posts from the feed, I don't yet know. If it was up to the back-end, it would require some extra DB activity that might be unacceptable speed-wise. This update would mean though, that a future API could provide a response similar to Lemmy for posts, so apps/frontends could merge duplicates the same way some of them do for Lemmy. Likewise, if there was a 'Hide posts marked as read' feature, it could regard any post ids in the cross_posts field as also being Read.

I have to wait a few days until the quota on my ngrok account resets (something in the Fediverse went crazy, I'd guess), so I thought I'd share here in the meantime. Also, it means the PR doesn't come out of the blue, and it can be discussed beforehand.

(also: it turns out I can't spell 'minestrone')

view more: next ›