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


  • Your first two lines need a caveat: … at a local meridian as chosen by the will of the people*.

    Otherwise you end up in situations where every individual location sets their clock by local noon, which varies by longitude. If you think it’s bad there are a handful of different time zones across your continent, wait until it’s different from one end of town to the other.

    The British invented (or popularised) standard time to avoid those sorts of problems. Problems that didn’t exist until high-speed long distance travel became a thing. And time zones were a later addition because Britain didn’t need any, but they’re also somewhat necessary.

    * for “will of the people”, read “will of the ruling class” as necessary. See: China.