Just a basic programmer living in California

  • 8 Posts
  • 79 Comments
Joined 11 months ago
cake
Cake day: February 23rd, 2024

help-circle



  • It would be great if there were a way to translate x86 binaries for ARM without emulation. Has Valve found some way to do that? From a bit of searching I see they’ve been testing games on ARM, and that testing involves a version of Proton/Wine that runs on ARM. But it looks to me like they’re testing with ARM binaries for those games?

    I’m as enthusiastic as anyone about more Linux usage, and I agree that Linux support for ARM is a good selling point. But the reason Linux works so well on ARM is that we use all this open-source software that anyone can compile for ARM. I don’t think it’s honest to point to closed-source software that we can’t recompile, and imply that it will work better on Linux because other software runs natively on ARM on Linux.




  • You can do tag-based file management on Linux. Linux filesystems support “extended attributes” or “xattr”. There is some software out there that uses xattr for tagging. I don’t know what the best options are right now for tag-based file management, but I think it exists.

    Looking at what’s out there I see there are also apps that each use their own out-of-band tagging schemes. There’s a CLI, tmsu, and a GUI, TagSpaces. I don’t think these interoperate with each other’s tags.

    Of course those supplement instead of replacing hierarchical organization.

    The talk of hypertext and “escaping paper” makes me think of Obsidian which embraces hyperlinking, tags, and mind mapping via its canvas feature.


  • If the return type of a function is NonEmpty the value returned is guaranteed to be non-empty because it is not possible to construct an empty NonEmpty value. That’s the “make illegal states unrepresentable” mantra in action.

    At runtime you might get a list from an API response or something, and it might be empty. At that point you have a regular list. Following the advice from the article you want to parse that data to transform it into the types representing your legal states. So if the list is not supposed to be empty then somewhere you have a function that takes the possibly-empty list, and returns a value of type NonEmpty. But if the list actually is empty that function will fail so it has to be able to return or throw an error. The article uses the Maybe type for that which is one of the Haskell types for functions that can fail.

    Once you have parsed the input list, and successfully gotten a NonEmpty value the rest of your code can safely access the first element of the list because a value of that type is guaranteed to have at least one value.





  • Docker Compose runs services, manages dependencies between services, isolates each service in a container, manages a private network. Out-of-the-box flakes don’t do any of that - except arguably running one service at a time. What flakes do is build software, which is the thing that Docker Compose doesn’t really do. (Or doesn’t do well.)

    I’d compare flakes to Makefiles with waaay more expressiveness and reproducibility. Or maybe a comparison could be to a Dockerfile, minus containerization, with waaay more expressiveness and reproducibility.

    There are tools you can add on to get Nix to do what Docker Compose does:

    Arion is a Nix frontend for Docker Compose. You’re still using Docker Compose, but it layers on the extra expressiveness and reproducibility of Nix flakes, or other kinds of Nix expressions.

    process compose flake is similar, but instead of Docker Compose it is a frontend for Process Compose. You get a similar result, but without containerization. That can potentially avoid the need to run in a VM on non-Linux systems that don’t natively support containers.









  • I lived in Grenada for a couple of years. It’s a chill, safe place. I had my family there and we always felt safe, as long as we kept an eye out for speeding buses when crossing the street. It certainly checks the boxes you specified. Night life is limited. I’m planning to go back for a vacation in February.

    As I recall there is a time of year that gets very windy. I think that’s in winter, but my memory is fuzzy. The internet says February is the windiest, and that matches some of my memories. In any case it’s always warm. I wouldn’t worry about rain. That’s tapered off by December. If it does rain it’s a warm rain, and it’s likely to come in short showers so I don’t think you’d be stuck inside all day.

    If you want to be in walking distance to amenities I’d recommend staying near Grand Anse. You can also get public buses there. (They are actually vans.) There are resorts close to the airport, but in those places you’d be dependent on taxis to get away from the resort - which might be fine if you want to be somewhere quieter.



  • When I researched this previously I concluded that there are two very good options for regular backups: Borg and Restic. These are especially efficient at backing up a diff of what has changed since the last backup. So you get snapshots of your filesystem state at each backup point without using a huge amount of space. You can mount any snapshot as a virtual directory. After the initial backup, incremental backups take a minute or two.

    I use Borg, and I back up to cloud storage on Borgbase. I use Vorta as a GUI for Borg. I have Vorta start automatically when I start my window manager, and I have it set up for daily backups. I set up the same thing on my kid’s computer.

    I back up my home directory. I have some excluded directories like ~/.cache, and Steam’s data directory. I use Baobab to find large directories that I don’t want backed up.

    I use the “exclude caches” option in the Borg “create archive” settings. That automatically excludes Rust target/ directories because they follow the Cache Directory Tagging Specification. Not all programming languages’ tooling follows that spec so I also use directory name pattern excludes. For example I have an exclude pattern for .*/node_modules/.*

    I use NixOS, and I keep my system config in a git repo so I don’t need backups for anything outside my home directory.