• 0 Posts
  • 99 Comments
Joined 1 year ago
cake
Cake day: June 21st, 2023

help-circle

  • Huh? When are you guys celebrating Halloween? The only Friday 13ths in 2024 are in September and December.

    Also I thought the calendar cycles every 400 years. So if Fri 13th Oct 2024 exists, which it doesn’t, then Fri 13th Oct 1624 and 2424 also, er, don’t exist.

    ♫ In the year 2424, if trolls are still alive… ♫








  • Lower performance though. At each iteration through the string you need to compare the length with a counter, which if you want strings longer than 255 characters will have to be multibyte. With NTS you don’t need the counter or the multibyte comparison, strings can be indefinitely long, and you only need to check if the byte you just looked at is zero, which most CPUs do for free so you just use a branch-if-[not-]zero instruction.

    The terminating null also gives you a fairly obvious visual clue where the end of the string is when you’re debugging with a memory dump. Can you tell where the end of this string is: “ABCDEFGH”? What about now: “ABCD\0EFGH”?










  • letsgo@lemm.eetoLemmy Shitpost@lemmy.worldCar
    link
    fedilink
    arrow-up
    6
    arrow-down
    1
    ·
    5 months ago

    Next time you’re driving somewhere, just pick a pedal and push it to see if it has the desired effect. If you go faster that’s the gas. If you go slower that’s the brake. If neither of them do anything try switching the engine on. You might need to fiddle with the gearstick as well, one of them makes you go backwards, the others are forwards. Just experiment and you’ll figure it out.

    Preferably well away from any othe traffic.