• 1 Post
  • 195 Comments
Joined 2 years ago
cake
Cake day: July 2nd, 2023

help-circle
  • C, C++, C#, to name the main ones. And quite a lot of languages are compiled similarly to these.

    To be clear, there’s a lot of caveats to the statement, and it depends on architecture as well, but at the end of the day, it’s rare for a byte or bool to be mapped directly to a single byte in memory.

    Say, for example, you have this function…

    public void Foo()
    {
        bool someFlag = false;
        int counter = 0;
    
        ...
    }
    

    The someFlag and counter variables are getting allocated on the stack, and (depending on architecture) that probably means each one is aligned to a 32-bit or 64-bit word boundary, since many CPUs require that for whole-word load and store instructions, or only support a stack pointer that increments in whole words. If the function were to have multiple byte or bool variables allocated, it might be able to pack them together, if the CPU supports single-byte load and store instructions, but the next int variable that follows might still need some padding space in front of it, so that it aligns on a word boundary.

    A very similar concept applies to most struct and object implementations. A single byte or bool field within a struct or object will likely result in a whole word being allocated, so that other variables and be word-aligned, or so that the whole object meets some optimal word-aligned size. But if you have multiple less-than-a-word fields, they can be packed together. C# does this, for sure, and has some mechanisms by which you can customize field packing.













  • I’d say it depends on WHY you like the art. Does it tie into the toxic or reprehensible traits of the artist? Was the artist trying to send a toxic or reprehensible message with this art?

    If not, then it’s just a matter of ensuring that your enjoyment of the art doesn’t translate into support for the artist. Or, at least, that it doesn’t cross your personal line of support for the artist.

    So, for example, does the Kanye music you like have nazi themes or messaging? Far as I’m aware, no, the nazi-ism is just his newest shit, so you’re probably fine as long as you’re not streaming from Spotify or YouTube, or otherwise giving him revenue.


  • This isn’t just a horrifically-misleading headline, it’s straight-up false.

    The bill originally was written to directly establish personhood of a fetus, but Democrats got an amendment in that keeps the “pregnant mothers get to use the carpool lane” part, without the language that establishes personhood for a fetus. They literally called the Republicans’ bluff on “this bill is about supporting mothers”, by making that specific. This caused one Republican to retract his vote, because the amendment “guts the pro-life purpose of the bill”.