10
thread your Philthy feature requests
(awful.systems)
this is FreeAssembly, a non-toxic design, programming, and art collective. post your share-alike (CC SA, GPL, BSD, or similar) projects here! collaboration is welcome, and mutual education is too.
in brief, this community is the awful.systems answer to Hacker News. read this article for a solid summary of why having a less toxic collaborative community is important from a technical standpoint in addition to a social one.
some posting guidelines apply in addition to the typical awful.systems stuff:
(logo credit, with modifications by @dgerard@awful.systems)
I believe it's this bit of code:
which gets
blocked_instances
filled in from the database anddomain
from the connecting instance. so it's just a case insensitive string match of everything in the block list against the exact hostname given by the connecting instance as given by ActivityPub -- presumably that layer takes care of ensuring the provided hostname is actually the instance's domain name. so in short I have to do a bunch of stupid shit to block an instance thoroughly, and good luck if I want to block a domain and all of its subdomainsreading that made me flinch
it's the exact same thinking I see from a lot of node devs ("just slap chained ops on it to express the logic! it'll be fine. won't ever need any complexity!")
you're gonna hate me but this style of code is usually my jam
however, the fact that it's a conditional whose true branch essentially crashes the task for something that happens frequently (this pattern is everwhere in lemmy, and it's why my logs are almost nothing but long stack traces) is truly godawful
oh I understand the appeal: it is rapid to express on the fly without breaking flow and enumerating through failure cases. and, for a bit of leeway, there is the upside that rust's rich return styles affords better actual expression/handling
but ime each site the pattern gets used for barely holds out at that approach over time (for all but the very simplest cases), and you always discover this far later, when the appropriate context has gotten paged out of all relevant peoples heads
(at one of my old clients, an :aa-gun: emoji was added exclusively because of my code reviews)