I take my shitposts very seriously.

  • 5 Posts
  • 423 Comments
Joined 3 years ago
cake
Cake day: June 24th, 2023

help-circle
  • let you build faster like Python

    I have to write so much boilerplate code to make sure my objects are of the correct type and have the required attributes! Every time I write an extension for Blender that uses context access, I have to make sure that the context is correct, that the context has the proper accessor attributes (which may not be present in some contexts), that the active datablock is not None, that the active datablock’s data type (with respect to Blender, not Python) is correct, that the active datablock’s data is not None… either all that or let the exception fall through the stack and catch it at the last moment with a bare except and a generic error message.

    I used to think that static typing was an obstacle. Now I’m burning in the isinstance/hasattr/getattr/setattr hell.




  • Enums and nested blocks. I understand the importance of Option and Result, but it’s fucking infuriating when I have to check and destructure the result of every function call and either bubble the result up the stack from six levels of nested if let blocks or risk Cloudflaring my program by using .unwrap(). And while I like being able to extract a return value from an if...else expression, the structure gets really convoluted when multiple if and match blocks are nested (of course each one returning a value), and it gets completely fucked once closures are introduced.

    I like Rust, but calling it pretty is delusional.





  • The problem is that syncing between devices is not implemented in KeePass itself but through an external tool (Nextcloud, Syncthing, or whatever else). The sync client will only see the ciphertext and won’t be able to tell which records have been changed, only that two different binary files have a common ancestor and are in conflict.

    The most obvious solution is to lock and close the database when it’s not in use (which is a good practice from a security perspective too), and to sync immediately when it is changed.





  • Uh… kinda? Powershell has many POSIX aliases to cmdlets (equivalent to shell built-ins) of allegedly the same functionality. rmdir and rm are both aliases of Remove-Item, ls is Get-ChildItem, cd is Set-Location, cat is Get-Content, and so on.

    Of particular note is curl. Windows supplies the real CURL executable (System32/curl.exe), but in a Powershell 5 session, which is still the default on Windows 11 25H2, the curl alias shadows it. curl is an alias of the Invoke-WebRequest cmdlet, which is functionally a headless front-end for Internet Explorer unless the -UseBasicParsing switch is specified. But since IE is dead, if -UseBasicParsing is not specified, the cmdlet will always throw an error. Fucking genius, Microsoft.




  • rtxn@lemmy.worldtoSelfhosted@lemmy.worldAnubis is awesome and I want to talk about it
    link
    fedilink
    English
    arrow-up
    19
    arrow-down
    4
    ·
    edit-2
    1 month ago

    POW is a far higher cost on your actual users than the bots.

    That sentence tells me that you either don’t understand or consciously ignore the purpose of Anubis. It’s not to punish the scrapers, or to block access to the website’s content. It is to reduce the load on the web server when it is flooded by scraper requests. Bots running headless Chrome can easily solve the challenge, but every second a client is working on the challenge is a second that the web server doesn’t have to waste CPU cycles on serving clankers.

    POW is an inconvenience to users. The flood of scrapers is an existential threat to independent websites. And there is a simple fact that you conveniently ignored: it fucking works.






  • You can host the open-source ID and Relay servers for simple remote access at no cost. The pro subscription is mainly about account and device management.

    compose.yaml
    services:
      hbbs:
        container_name: hbbs
        image: rustdesk/rustdesk-server:latest
        command: hbbs
        volumes:
          - ./data:/root
        network_mode: "host"
        depends_on:
          - hbbr
        restart: always
    
      hbbr:
        container_name: hbbr
        image: rustdesk/rustdesk-server:latest
        command: hbbr
        volumes:
          - ./data:/root
        network_mode: "host"
        restart: always