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
  • 134 Comments
Joined 8 months ago
cake
Cake day: August 13th, 2024

help-circle


  • Perl was originally designed to carry on regardless, and that remains its blessing and curse, a bit like JavaScript which came later.

    Unlike JavaScript, if you really want it to throw a warning or even bail out completely at compiling such constructs (at least some of the time, like this one) it’s pretty easy to turn that on rather than resort to an entirely different language.

    use warnings; at the top of a program and it will punt a warning to STDERR as it carries merrily along.

    Make that use warnings FATAL => "syntax"; and things that are technically valid but semantically weird like this will throw the error early and also prevent the program from running in the first place.


  • Well, you see, Perl’s length is only for strings and if you want the length of an array, you use @arrayname itself in scalar context.

    Now, length happens to provide scalar context to its right hand side, so @arrayname already returns the required length. Unfortunately, at that point it hasn’t been processed by length yet, and length requires a string. And so, the length of the array is coerced to be a string and then the length of that string is returned.

    A case of “don’t order fries if your meal already comes with them or you’ll end up with too many fries”.


  • As a Perl fossil I recognise this syntax as equivalent to if(not @myarray) which does the same thing. And here I was thinking Guido had deliberately aimed to avoid Perlisms in Python.

    That said, the Perlism in question is the right* way to do it in Perl. The length operator does not do the expected thing on an array variable. (You get the length of the stringified length of the array. And a warning if those are enabled.)

    * You can start a fight with modern Perl hackers with whether unless(@myarray) is better or just plain wrong, even if it works and is equivalent.


  • Nerd here. That’s soft-light Rimmer. He didn’t get the hard-light drive until they met Legion in season 6.

    The only things he could physically interact until then were other holographic things provided by Holly or whatever his light bee was programmed to supply.

    E-e-except where the script writers made a mistake. At one point he was able to smell something burning which definitely shouldn’t have been possible. Unless Holly simulated it for him anyway. That sort of shenanigan would be right up Holly’s alley now that I think about it.

    (For the uninitiated, Holly is the sarcastic and dry witted AI in charge of supervising all ship computer operations. And he’s allegedly senile after 3 million years in deep space. Allegedly.)


  • Per screenshots of the “skeet” = As can be understood from screenshots of the post, also known as a “skeet”

    as folks on the butterfly app = (a name that) users of Bluesky

    are wont to call their posts… = like to call their posts…

    “Skeet” being a combination of “sky” and “tweet”, which I hope you can figure out the origins of, and also a somewhat dirty word that the owners of Bluesky would really prefer people didn’t use as the non-generic name for posts on their platform, but is also disturbingly accurate if you compare the conceptually similar word “disseminate” for the spreading of information.

    I should probably have separated the above into two sentences somewhere.


  • Old school gamer here. Headline should definitely say Quake II.

    There might not seem to be much difference to a casual observer, but from that standpoint there’s not much difference between either and any other FPS. Even Minecraft to some extent.

    Speaking of which, the Minecraft equivalent to this had all the same problems outlined in other comments here. Interesting as a proof of concept, but there are almost certainly better ways of using AI.


  • If endl is a function call and/or macro that magically knows the right line ending for whatever ultimately stores or reads the output stream, then, ugly though it is, endl is the right thing to use.

    If a language or compiler automatically “do(es) the right thing” with \n as well, then check your local style guide. Is this your code? Do what you will. Is this for your company? Better to check what’s acceptable.

    If you want to guarantee a Unix line ending use \012 instead. Or \cJ if your language is sufficiently warped.


  • How documents are stored by MS Office has changed constantly over the last 40 years, as have the feature sets of the different applications, for which a new variant format if not a new format outright might be created each time. The file extension is a guide but not a complete indicator of what’s going on inside.

    Microsoft have the advantage of knowing the exact structure of all the previous formats so they can auto-detect and load a document transparently without the user having any idea there might have been a difference.

    Because the formats are proprietary, and follow no published standard (or not fully published), third parties like LibreOffice have to literally reverse engineer every single one of those formats and variants every time a new one pops up. It’s a game of whack-a-mole. Moving goalposts like I said.

    And it’s often the case that reverse-engineering a format covers only, say, 99% of cases; those used in most of the documents that a would-be reverse engineer has seen. And then someone tries to use LibreOffice to open a document with a feature from the other 1% and it looks incompetent.

    There’s also that it would be illegal to decompile a copy of MS Office to figure out exactly how it does it, so they have to work from the documents that MS Office generates and take their best guess. If Microsoft got even a whiff of the idea that someone working on LibreOffice had decompiled it, the whole project would be sued into oblivion.






  • Google could close the Chromium source at any time. There might be promises and provisions that they’ll never do that, but if they do, who has the money to sue them? And who, of those, can’t be bought?

    “So what, people can run with the last good codebase!”

    Sure, until there’s a critical bug that Google don’t publish which then cripples Chromium until the maintainers figure it out, or else Google (deliberately or otherwise) take web standards down an unexpected path requiring massive changes, also making life hard for the fork maintainers.

    And don’t say “that’ll never happen”. Need I gesture broadly at the state of the world?


  • IMO, this needs a different name. It’s too similar to “Saidit”, one of sites that sprang up as a refuge for the edgier (or sicker) content that Reddit wanted rid of about 10 years ago, and unlike Voat, it’s still live.

    If you’re one of the right-wing trolls and/or edgelords who used to hop between Reddit and 4chan back in the day, it might be the place for you. Otherwise, probably best to steer clear.

    Either way, steering clear of similar names might be a good idea.




  • Somewhere around here I have an old (1970’s Dartmouth dialect old) BASIC programming book that includes a type-in program that will write poetry. As I recall, the main problem with it did be that it lacked the singular past tense and the fixed rules kind of regenerated it. You may have tripped over the main one in the last sentence; “did be” do be pretty weird, after all.

    The poems were otherwise fairly interesting, at least for five minutes after the hour of typing in the program.

    I’d like to give one of the examples from the book, but I don’t seem to be able to find it right now.


  • My parents’ house never had and still doesn’t have Internet. I was the one with the computer desk and it had a Commodore 64C and a 13" portable colour TV on it originally.

    It finally became an Internet desk at some point in the mid '00s when I got my own place.

    I’m still using it right now… and kind of afraid that if I mention its age, it will spontaneously fall apart.

    Let’s just say that it’s older than Google.