Some middle-aged guy on the Internet. Seen a lot of it, occasionally regurgitating it, trying to be amusing and informative.

Lurked Digg until v4. Commented on Reddit (same username) until it went full Musk.

Was on kbin.social (dying/dead) and kbin.run (mysteriously vanished). Now here on fedia.io.

Really hoping he hasn’t brought the jinx with him.

Other Adjectives: Neurodivergent; Nerd; Broken; British; Ally; Leftish

  • 0 Posts
  • 345 Comments
Joined 1 year ago
cake
Cake day: August 13th, 2024

help-circle





  • YSK/PSA: If you’re on Mint, Mint’s apt is not Debian’s apt and while they work similarly for common use cases, they diverge pretty quickly beyond that. Both are installed by default but Mint’s takes precedence.*

    Case in point: I was looking for which package - specifically one that was not yet installed - contains a certain command line tool and Mint’s apt search does not find it. Debian’s does. **

    On the other hand, Mint’s apt has way more subcommands than the default one, which have been useful on occasion.

    * Mint’s is at /usr/local/bin/apt and Debian’s is at /usr/bin/apt; The default user $PATH puts /usr/local/bin before /usr/bin.

    ** FWIW, the tool is/was sponge and it’s in the moreutils package.


  • Edit: It has come to my attention that it isn’t actually the people behind the Pi doing this. I really should read more rather than jumping to conclusions. There’s a few obvious rewrites I could make, but I think the prediction at the end is still valid even if the route I took wasn’t the right one.

    This would appear to indicate that someone in charge of product design at Pi HQ is a Gen X-er or Boomer desperate to relive computing history through their own products.

    Computer on a board. Bigger computer on a board. Computer entirely within a keyboard.

    And now a computer in a PC-like case.

    Prediction: The next step will be some kind of ARM-based cloud service.


  • Knee-leeks and spear-leeks. Delicious.

    Etymology time!
    1. Knee-leeks is basically what onions were called before we adopted (or were made to adopt) a version the French word

    2. the old English name for “spear” was “gar”*. “Garlic” is literally just a modern interpretation of “gar-leek”.

    What about regular leeks? They’re just, well, leeks.

    * Spear(wielding) Danes are mentioned as “Gardena” in the third word of the commonly seen image of the first page of Beowulf.





  • Let me save you a few characters: %Y-%m-%d can be shortened to %F

    For visualisation’s sake I also like to put a space before the %F so that the year and the file size are separated a little more, but that’s more of a taste thing than anything else.

    (Caveat: %F’s year is explicitly four digits in some libraries, whereas %Y is always the full year. If you’re planning for your code to last 8000 years you might want to consider that.)


  • Yeah. Right Control should be where Fn is for sure.

    And as an ISO keyboard user, I need my right Shift key, so that Control has to be a Shift instead. On ISO, left Shift is small and right is large. For that and other reasons I use the right one way more than the left. And if that’s not possible for deep technical reasons, hard-wire it to the left one bypassing all of the trouble. It wouldn’t be the first time a keyboard did something like that.

    … and what do you know, there’s a even little space there with no key where they could put the Fn key omitted by those changes.

    Everything else I could deal with. Even the otherwise US layout. It’s been a while since I used one, but occasionally there’s a hiccup and I’ll reach for double quote or at-sign in the opposite places, so that muscle memory is still there, maybe waiting for mangling into typing on something like this.



  • Oof. That must be a single core laptop from 2010 or something, which if true, that sucks.

    I have a 13 year old computer around here that had no problems with LMDE6 when last I fired it up. It was relatively high spec when new which takes some of the edge off, but I never had an input lag problem anywhere except maybe badly-written websites.

    Just how limited is your computer?


  • As it stands, it doesn’t look like there is one. It appears to be a recreational mathematical toy for the creator to learn things more than it is for others to play with. It’s kind of neat nonetheless.

    I think I might have made different choices for the reversal calculations, but I haven’t really thought about how I’d implement those choices, nor about nigh-insurmountable edge cases, and I’m only vaguely thinking about the “c = a OP b” case, not anything more extreme. The creator may have wanted to make the same choices but found themselves forced down a different path.

    Verbatim from the creator: “it is imperfect”.



  • alias name-here yields the line alias name-here='contents-of-alias-here' as output, and if you want just the part between the single quotes from that, sed, cut or, come to think of it, related shell tricks that do the same thing, would be needed to capture and convert it.

    ${BASH_ALIASES["name-here"]} is a name for what’s only between those single quotes.

    For example, I have a lot of preferences built into my alias for ‘ls’. Occasionally I want to run watch ls -l somefilespec to watch a directory listing for changes to a file. But commands fed to watch don’t go through the alias mechanism, leaving the output somewhat different to my preferences.

    It’s wordy, but watch ${BASH_ALIASES["ls"]} -l somefilespec mostly* achieves what I want.

    * Unfortunately, watch also causes the stripping of colour codes and I have --color=auto, not --color=force in my ls alias, so it’s by no means perfect - I have add the latter if I want colour - but I don’t have to type the rest of the preferences I have in there.

    FWIW, my ls alias is currently:

    alias ls='LC_ALL=C ls --color=auto --group-directories-first --time-style="+ %F %T"'
    

  • I have an alias called save_aliases that does alias > ~/.bash_aliases. alias on its own just dumps all the existing aliases to the terminal in a format that can be parsed by Bash.

    I felt especially clever when I came up with that and used it to save itself.

    Bonus fact: ${BASH_ALIASES["name-here"]} is a way to get at the contents of an alias without resorting sed or cut shenanigans on the output of the alias command.