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
  • 41 Comments
Joined 2 years ago
cake
Cake day: August 13th, 2024

help-circle
  • In most languages evals are, in a way, like gotos. You should aim to write your code with none at all, but they’re nice to have in a pinch if the project takes a turn and a rewrite might take time you don’t have. Just don’t put user-supplied strings through one and you’ll be fine. Probably.

    Also, in at least one language I can think of, there’s a variant of eval that works a lot like try in other languages. As such, I don’t think those should be considered the same thing.


  • LMDE (and previously regular Mint) here. 8% is way high. 0.8% maybe, at a push, if you’re unlucky. I can count on the fingers of a ninja turtle’s hand the number of times I’ve had it happen in … it might actually be a decade at this point.

    Or were you thinking of Windows, which seems like a breaking change happens every other week?


  • That I have a wetware problem.

    When I’m debugging, I usually forget the nature of a bug when it is fixed. The more trivial it is, the quicker I seem to forget.

    Something does trickle down to my unconscious because I would recognise getting the same error message over and over and that doesn’t seem to happen often, but I could not tell you a single bug in the last thing I wrote, even though I know there were plenty of them.

    What really makes this weird is that I sometimes become very upset - we’re talking wailing and gnashing of teeth here - when I can’t find a bug, and you’d think I’d remember those, yet once I do finally track it down and get over feeling angry and stupid, the nature of the bug still disappears from conscious memory.

    Now, maybe I am learning lessons because of the infrequent recurrence of the same mistakes, but I’d like to be able to think about them later, and I can’t do that.



  • Pre-calculation or calculation caching is about the best save you’re going to get, but each and every piece of software would need to be rewritten with that idea in mind - assuming it wasn’t already written that way in the first place - rather than it being something the system can impose.

    It’s plausible that someone could write or modify an OS that specifies to each program what they’re supposed to do, be that optimise for time, optimise for CPU, optimise for RAM, etc. etc., but the program itself still needs to provide the ability to do each and every one of those, which is time and effort that program writers may not be willing to put in.

    For a more concrete example, although still something of a toy, there’s a program in the bsdgames package called primes that’s ~80k in size.

    Clearly, at that size, it does not contain all prime numbers but it sure can generate more than 80k of them quickly. It is highly optimised code, if my efforts at beating it are anything to go by.

    If you, as a hypothetical prime number aficionado, wanted even less work on your CPU, you could store your database of prime numbers in RAM (or disk) and not generate them over and over with primes. primes does not do this. It is not written to do this. It could be, but then it would be a larger program to account for extra modes of operation, which is more work for the maintainers.




  • Firefox can view PDFs so I assume Chrome also has that ability, and you’re likely to already have one or the other if you’re already using your computer for web browsing.

    If you need something stand-alone, one of the Evince family might also suit your purpose. Evince = GNOME Document Viewer and XFCE is GTK-based, which seems like a good match. There’s also Atril which is a MATE fork and Xreader, which is a fork of Atril, from Linux Mint’s Xapps project.

    LibreOffice, as mentioned by another respondent, has the ability to modify PDFs if not outright edit them, i.e. ability to place text boxes on top of the document, so you could theoretically use it to digitally complete a form you’ve been sent as a PDF and save it out as one. That may be worth jumping through the hoops if that sounds like a feature you might want.


  • OP, was that your own computer/profile that you emptied the Deleted Items from?

    If tech support stories are to be believed, many users use that folder as a one-button-press archive and the idea that things might actually be deleted from there is both incomprehensible and then horrifying to them.

    It also might explain why the icon is an old one because Microsoft’s quality control teams probably use the feature this way and never once saw that icon, leading to it never being updated.


  • Everything is a package

    I mean, pretty much. Or rather, everything is in a package. Back in the old days they were called source distributions or .tar.gzs and you compiled everything yourself. Gentoo, for example, still does everything that way, but uses the name ‘package’ anyway.

    The coreutils package, or something like it, contains multiple commands that a bare bones, command-line-only system would need, but some things are built into the shells. e.g. cd is always shell-based. echo may or may not be. ls (dir) is in coreutils.

    There are also things like busybox that, in a single executable from a single package, contains a stripped-down version of everything in coreutils, a shell and a handful of other things too.


  • While the palindromic structure of that command is pleasing to mine eye, LMDE basically called me a frickin’ idiot for trying.

    I know it always asks Continue [Y/n] and there’s no yes | or echo | to force that, so I was reasonably sure I’d get away with it, but I don’t think I could argue with the sentiment had it actually said that.

    (Also, I have Timeshift, so that would have saved my bacon but for the inconvenience of having to go through a rollback.)

    Anyway, here’s what it said (scrolling may be required to see the last line which is clearly code for “you’re an idiot”):

    REMOVING:                       
      apt       apt-utils          mint-meta-cinnamon  mintsources  mintupdate       sudo
      apt-file  command-not-found  mint-meta-core      mintsystem   python3-repolib
    
    WARNING: The following essential packages will be removed.
    This should NOT be done unless you know exactly what you are doing!
      apt
    
    Summary:
      Upgrading: 0, Installing: 0, Removing: 12, Not Upgrading: 1
      Freed space: 52.3 MB
    
    Error: Removing essential system-critical packages is not permitted. This might break the system.
    



  • This is the “I want to be back at my own desk in two minutes / this shouldn’t take long” posture.

    Things are serious if the tech has to sit, and if you’re the tech and you sit right away, you’d better explain if you’re not expecting it to be serious, because users often pick up on the connection even if they don’t consciously realise it.


  • For that brief period in the mid-'90s I owned a PC with twin 3½" floppy drives. I never really used the second one, but I enjoyed the novelty and the fact that all my drive letters were in use. I also saw a handful of computers with both 3½" and 5¼" drives in some of the university PC labs. I don’t think I ever saw anyone use the 5¼" slot of any of them, but the 3½" floppy drives got a decent amount of use.

    Fun fact though: You could still use B: in DOS commands even if you only had an A: drive. The system would prompt you to switch disks as and when A: was about to pretend to be B: and then switch back afterwards.


  • You can do most if not all of this in Perl if you’re twisted enough. Some hoop jumping may be required*, but I can think of ways to do something that looks like each of these.

    *: The braces are especially tricky if warnings are turned on. I’d probably abuse the deprecated multidimensional syntax and tie a hash to the actual function.