reply with features and bug fixes you’d like to see in Philthy, the lemmy fork that runs on this instance. no guarantees I’ll get to any of them soon, but particularly low-hanging fruit and well-liked features can be prioritized.

    • @self@awful.systemsOPM
      link
      fedilink
      37 months ago

      I believe it’s this bit of code:

        if local_site_data
          .blocked_instances
          .iter()
          .any(|i| domain.to_lowercase().eq(&i.domain.to_lowercase()))
        {
          Err(LemmyErrorType::DomainBlocked(domain.clone()))?
        }
      

      which gets blocked_instances filled in from the database and domain 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 subdomains

      • @froztbyte@awful.systems
        link
        fedilink
        English
        47 months ago

        reading 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!”)

        • @self@awful.systemsOPM
          link
          fedilink
          37 months ago

          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

          • @froztbyte@awful.systems
            link
            fedilink
            English
            47 months ago

            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