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

help-circle
  • 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”?


  • I had a Sony phone once. It was shite. Couldn’t remember the date and time on a reboot.

    It was crap in other ways too but that was the one that annoyed me the most. Obviously the majority of the price went on the name and not the phone. Shame really, Sony used to be a name that meant quality, now they’re just another bunch of MBA-led enshittifiers.












  • letsgo@lemm.eetoProgrammer Humor@programming.devRebase Supremacy
    link
    fedilink
    arrow-up
    21
    arrow-down
    3
    ·
    5 months ago

    Merge gives an accurate view of the history but tends to be “cluttered” with multiple lines and merge commits. Rebase cleans that up and gives you a simple A->B->C view.

    Personally I prefer merge because when I’m tracking down a bug and narrow it down to a specific commit, I get to see what change was made in what context. With rebase commits that change is in there, but it’s out of context and cluttered up with zillions of other changes from the inherent merges and squashes that are included in that commit, making it harder to see what was changed and why. The same cluttered history is still in there but it’s included in the commits instead of existing separately outside the commits.

    I honestly can’t see the point of a rebased A->B->C history because (a) it’s inaccurate and (b) it makes debugging harder. Maybe I’m missing some major benefit? I’m willing to learn.