this post was submitted on 01 Jan 2026
383 points (97.5% liked)

memes

22323 readers
1788 users here now

Community rules

1. Be civilNo trolling, bigotry or other insulting / annoying behaviour

2. No politicsThis is non-politics community. For political memes please go to !politicalmemes@lemmy.world

3. No recent repostsCheck for reposts when posting a meme, you can only repost after 1 month

4. No botsNo bots without the express approval of the mods or the admins

5. No Spam/Ads/AI SlopNo advertisements or spam. This is an instance rule and the only way to live. We also consider AI slop to be spam in this community and is subject to removal.

A collection of some classic Lemmy memes for your enjoyment

Sister communities

founded 3 years ago
MODERATORS
383
submitted 7 months ago* (last edited 7 months ago) by qaz@lemmy.world to c/memes@lemmy.world
 

Permanently Deleted

top 50 comments
sorted by: hot top controversial new old
[–] deegeese@sopuli.xyz 62 points 7 months ago

Hardcoded blacklists are never a good idea.

That shit belongs in a config file.

[–] darkevilmac@lemmy.zip 61 points 7 months ago (2 children)

Jesus that's a lot of spaghetti code, and why are they hardcoding a bunch of terms? Is this just for a public facing site, or does every deployed instance effectively filter these out?

[–] qaz@lemmy.world 78 points 7 months ago* (last edited 7 months ago) (4 children)

It's hardcoded in the PieFed source code, so every instance does this by default unless you patch it like I did.

The combined swearwords + excluded communities list seems to appear at least 3 times in the codebase (not referenced, copied verbatim).

Let's just say that it wouldn't pass my code review if I saw this at work

EDIT: It has been removed from 2/3 places in the codebase.

[–] SatansMaggotyCumFart@piefed.world 11 points 7 months ago (4 children)

The piefed.world instance has some of these edited out but I don’t think they all are.

load more comments (4 replies)
load more comments (3 replies)
[–] BruisedMoose@piefed.social 12 points 7 months ago (1 children)

Yeah. The list should be in the site config. Go ahead and include those as defaults to block, but allow sites to override that.

OP, are you saying that the federation is blocked on the OUTGOING side? Because then that just seems bass ackwards.

load more comments (1 replies)
[–] NotSteve_@piefed.ca 55 points 7 months ago* (last edited 7 months ago) (5 children)

What, why 196? Actually why any of these? I get 4chan and greentext sort of(?) but even ignoring the terrible programming practices here, this is really stupid.

Edit: actually almost makes me regret switching to Piefed

[–] lethargicpuppy14@sh.itjust.works 25 points 7 months ago (2 children)

They just removed it from the list 15 minutes ago

[–] NotSteve_@piefed.ca 31 points 7 months ago (3 children)

Ah, that's good to hear. I'm still sketched out by the hardcoded blacklist of terms though. I'm very much a person against the sort of free speech that hinders other's freedom to live without discrimination but the filter still seems so arbitrary and entirely the response to the dev's own vandettas and that just gives me bad vibes.

On top of that, hardcoding English language terms to block is bad programming on a number of levels. Why isn't it a configurable list? The hardcoded values don't contain any other language variants so you can still have those communities if you speak something other than English (or just add an extra couple characters or anything really)

load more comments (3 replies)
load more comments (1 replies)
load more comments (4 replies)
[–] thomasdouwes@sopuli.xyz 48 points 7 months ago

Sir a second hardcoded blacklist hit the fediverse

[–] Unleaded8163@fedia.io 39 points 7 months ago

Never meet your heroes Never read the code of a project you respect

That is some nasty code.

[–] OpenStars@piefed.social 32 points 7 months ago* (last edited 7 months ago) (11 children)

If you dont like it, fork it. Stop bothering us about it

-devs of PieFed

Oh wait no, that's the devs of Lemmy when asked the same request. (edit: 'asking' to 'asked')

Hopefully Rimu will be more accommodating when you ask him? (codeberg issue creation prefered)

It might be time to move this away from a hard-coded list now, if the expectations that someone installing an instance is going to read through the code is lower now than previously.

[–] mr_satan@lemmy.zip 10 points 7 months ago (1 children)

What a shit show of a discussion on that issue… Not only is hard coding bad design in general[^1], but doing so for constantly evolving and highly context dependent word list is even worse. Reading the discussion I see their decision as extremely short sighted and arrogant if not just stupid.


[^1]: Having hard coded configurations has it's uses, but it's a strong red flag that might complicate maintenance down the road, and should be used with caution.

load more comments (1 replies)
load more comments (10 replies)
[–] cronenthal@discuss.tchncs.de 28 points 7 months ago (1 children)

Dear God, that code! Why is it all in one file? The more I read it the worse it becomes!

[–] boogiebored@lemmy.world 15 points 7 months ago (1 children)

Holy crud, you were not kidding. I got through a bit and was just like, “nah I ain’t reading this shit”.

Very glad I never got deeper into PieFed. Great post.

load more comments (1 replies)
[–] freamon@lemmy.world 27 points 7 months ago* (last edited 7 months ago) (4 children)

The code that OP has linked to is part of a convenience function for admins to add content to their new instances. It can query individual remote instances (e.g. lemmy.world), or it can query lemmyverse.net, and fetch communities that look to be popular and active.

It's completely unrelated to routine federation, and doesn't prevent anyone subscribing to communities that may have those words in their names.

The admin function could potentially be used to fetch hundreds of communities. It runs as a background process, so you don't know what they were until after they'd been followed. The "bad words" list acts as a safeguard against bringing in things you might not want or expect. One reason is that you may want to curate the first impression you give new visitors, as there as some that will be put off by the "fuck this" and "shitpost that" reddit-isms. Another is that you don't typically want communities that are disproportionately popular than others (e.g. if you bring in the default 25 communities, and one of is 196, then it completely dominate your front page).

If there's a particular community that you are interested in (e.g. because you moderate it), using this function isn't an efficient way to add it. In addition to the "bad words" filters, it will also exclude communities that are NSFW, or below thresholds for popularity and activity. Rather than fetching a bunch of communities at the same time, and hoping that the one you want is included, it's better to just add it manually (via a ! link or by using the "Add remote community" link) in much the same way as you would on any other platform.

load more comments (4 replies)
[–] Hond@piefed.social 23 points 7 months ago

Huh, so thats why i havent seen greentexts in quite some time.

[–] mushroomman_toad@lemmy.dbzer0.com 22 points 7 months ago* (last edited 7 months ago) (2 children)
[–] JackbyDev@programming.dev 25 points 7 months ago (2 children)

If they have DB access they already can.

[–] Fiery@lemmy.dbzer0.com 11 points 7 months ago

But this makes it as easy as surfing to a url

load more comments (1 replies)
[–] nublug@piefed.blahaj.zone 10 points 7 months ago* (last edited 7 months ago)

this is also a capability in a nextcloud app so an admin can more easily replicate a users bug report and see for themselves what's going wrong. that said i struggle to see how you could implement that in such a way as to avoid abuse, but isn't that true of any admin powers? this isn't encrypted cloud storage, it's a public forum. i'd imagine the process is at the very least heavily logged so other admins and maybe even federates to other instance admins or even mods too so impersonation actions are clearly visible as such. but i don't know enough about code to read thru and see if it does in either app.

[–] Endymion_Mallorn@kbin.melroy.org 19 points 7 months ago (6 children)

Well, like the Lemmy devs, I guess the PieFed devs have decided to plant a flag instead of making a neutral platform for federated communication.

[–] VeganCheesecake@lemmy.blahaj.zone 21 points 7 months ago (3 children)

The Lemmy devs don't seem to hardcode those opinions into Lemmys source code.

[–] rainwall@piefed.social 18 points 7 months ago (1 children)

They had one for a while, but removed it on pushback.

load more comments (1 replies)
load more comments (2 replies)
load more comments (5 replies)
[–] gravitas_deficiency@sh.itjust.works 15 points 7 months ago (4 children)

Side note: lmfao wtf is this Mickey Mouse block-quote-but-not-really bullshit?

load more comments (4 replies)
[–] slazer2au@lemmy.world 13 points 7 months ago (1 children)

That's interesting. I understand not wanting to fed some of those communities.

[–] qaz@lemmy.world 19 points 7 months ago (4 children)

I definitely understand wanting to filter out obscenities, but I think the filtered communities should be a seperate configurable list.

[–] grue@lemmy.world 29 points 7 months ago (1 children)

As a mod of !fuckcars@lemmy.world, I'm kinda upset about the "filter out obscenities" part.

load more comments (1 replies)
load more comments (3 replies)
load more comments
view more: next ›