• 23 Posts
  • 21 Comments
Joined 2 years ago
cake
Cake day: December 28th, 2023

help-circle



  • I once tried brushing my teeth with baking soda instead of toothpaste for a few weeks. From what I understand, they have about the same level of abrasiveness, so they should be about as good at scrubbing the gunk out of your teeth. The key difference is that toothpaste has fluoride in it. After a while I started having pain/irritation in my mouth and gums. It went away when I went back to toothpaste. So if anyone was looking for anecdotal evidence of fluoride being good for your teeth, there you go.







  • Partition management is the single most chaotic chore that you come across as a casual computer user, change my mind. Depending on the partition table and filesystem, each filesystem can have zero, one or two labels assigned to it. But there is no consensus about what to actually call these labels. I’ve seen “partlabel”, “label”, “partition label” and “name” with no obvious way to tell whether the tool is talking about the label stored in the partition table or the label stored in the filesystem.

    So just use UUIDs to refer to partitions instead of labels, right? Wrong! Each partition has both a UUID and a PartUUID which are not the same. It’s simple once you are aware of that fact, but if you are not, it can lead to hours of confused troubleshooting. I learned this the hard way.








  • Yeah apt tends to shit itself very often. I don’t like how it’s actually two different programs (dpkg and apt) glued together with perl and python. It all feels too fragile. A friend once tried updating a package, and it failed because… he was issuing the apt command from with a python virtual environment. Can’t say for pacman because I’ve never used arch, but xbps is just one set of self-contained binaries, which feels much more robust. Alpine’s APK fits that bill as well, lovely little package manager. Tho I guess apt predates both of those, so it’s not a fair comparison. Someone had to make those mistakes for the first time.

    I also really dislike the Debian/Ubuntu culture of fucking around with the sources file to add other people’s repositories on top of the distro-default ones (ubuntu calls this PPA). It’s a good idea in theory, but in practice those third party repos always fuck up in some way and brick your package manager. Just search for “apt Failed to fetch” in your favourite internet search engine, and you will see hundreds of people confused about it. You can do it with almost any package manager, but for some reason it’s mainly the debian/ubuntu people who like shooting themselves in the foot like this.



  • This is a good practice tho. The HTTP code describes the status of the HTTP operation. Did the server handle it? No? Was the url not found? Did it time out? Was the payload too large? And the JSON describes the result of the backend operation. So 200 OK with error: true means that your HTTP request was all good, but the actual operation bugged out for whatever reason. If you try to indicate errors in the backend with a HTTP error code, you quickly get confused about which codes can happen for what reason.








  • Huh, TIL

    ~ $ /bin/true --help
    Usage: /bin/true [ignored command line arguments]
      or:  /bin/true OPTION
    Exit with a status code indicating success.
    
          --help        display this help and exit
          --version     output version information and exit
    
    NOTE: your shell may have its own version of true, which usually supersedes
    the version described here.  Please refer to your shell's documentation
    for details about the options it supports.
    
    GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
    Full documentation <https://www.gnu.org/software/coreutils/true>
    or available locally via: info '(coreutils) true invocation'
    

    I honestly don’t know what I prefer more, the overengineered GNU true, or the true that shipped with some older system that was literally just an empty file with the executable bit set.