Just a basic programmer living in California

  • 3 Posts
  • 119 Comments
Joined 1 year ago
cake
Cake day: February 23rd, 2024

help-circle


  • Yes; first pull the black plastic piece out of the end of the refill. I read that there needs to be a little airflow into the refill for ink to flow, and when the back of the refill is jammed into the pen that can cut off airflow so you might cut a little notch in the end of the refill where the black plastic piece was. I also sometimes trim about 4mm off the end of the refill, or put a tiny bit of wadded paper in the pen for spacing. But I do this a little differently every time I put a new refill in.


  • Pilot Hi-Tec-C is a gel pen with refills that happen to fit in the Space Pen. It puts down a crisp, fine line.

    The problem with the stock Space Pen is that it’s a messy ballpoint. I might be getting worse-than-typical results due to being left handed, but in general I find ballpoints don’t write crisp lines, and the ink smudges on my hand much more than gel pens do. But with the gel swap I do lose the feature of being able to write upside-down.



  • I’ve been using nushell as my shell for a long while. Completions are not as polished as zsh - both the published completions for each program, and the UX for accepting completions. But you get some nice things in exchange.

    I LOVE using nushell for scripting! CLI option parsing and autocompletions are nicely built into the function syntax. You don’t have to use the shell for this: you can write standalone scripts, and I do that sometimes. But if you don’t use it as your shell you don’t get the automatic completions.

    Circling back to my first point, writing your own completions is very easy if you don’t like the options that are out there. You write a function with the same name as the program you want completions for, use the built-in completions feature, and it’s done.






  • 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.