I take my shitposts very seriously.

  • 0 Posts
  • 284 Comments
Joined 2 years ago
cake
Cake day: June 24th, 2023

help-circle
  • What sounds like gatekeeping is often a strongly worded emphasis on having the prerequisite knowledge to not just host your services, but do it in a way that is secure, resilient, and responsible. If you don’t know how to set up a network, set up a resilient storage, manage your backups, set up HTTPS and other encryption solutions, manage user authentication and privileges, and expose your services securely, you should not be self-hosting. You should be learning how to self-host responsibly. That applies to everything from Debian to Synology.

    Friends don’t let friends expose their networks like Nintendo advises.





  • If you have to import a directory structure, you should make each directory a module by creating an __init__.py file in them, and use relative import statements. I usually have one main.py as the entry point, which imports a lib module that contains all of the program logic.

    ├── lib
    │   ├── __init__.py
    │   ├── module_content.py
    │   └── submodule
    │       ├── __init__.py
    │       └── submodule_content.py
    └── main.py
    

    You can import the lib directory as a module:

    main.py:

    from lib import some_fn
    

    Within any module, though, you should use relative import statements to import from files and submodules, and regular import statements to import packages from the system or the venv:

    lib/__init__.py:

    from .module_content import some_fn # import from a file
    from .submodule import some_other_fn # import from a submodule directory
    from os.path import join # import from an installed package
    

    Items that you define in __init__.py or import into it will be available to import from the module: from .submodule import some_fn. Otherwise, you can import an item from a file by specifying the full path: from .submodule.submodule_content import some_fn.

    You can also import an item from a parent package using the .. prefix: from ..some_other_submodule import some_fn.














  • I finally got my ISP to enable bridge mode on my modem.

    I also learned that I didn’t lose port forwarding and related services because I had been moved behind CGNAT or transitioned to IPv6 – they simply no longer offer port forwarding to residential customers. Ruminate on the implications of that statement so I’m not the only one with blood pressure in the high hundreds.


  • Even in the open source community, the libre-ness of a product is just one of many factors. The fitness for a purpose, the initial difficulty of the setup, the continuous difficulty of operation and maintenance, the pace of development (if applicable), the professional or community support structure, the projected longevity of the product or service, and the general insanity of the people involved are all important factors that can, and often do outweigh the importance of open software.