#hardwarenah β Public Fediverse posts
Live and recent posts from across the Fediverse tagged #hardwarenah, aggregated by home.social.
-
Yesterday, I learned that I had a completely wrong concept in mind of what typecasting in #C actually is.
Now, I learned about #punning, a ridiculously cumbersome way to save raw data of a variable of one type into memory of another type (say, I havefloatsand need to save them in auint32_ttyped memory space).
Granted, I am stupid, because instead of this, I could simply have two or more pointers to the memory region. One as typeuint32_t, and one asfloat.Still, both ways feel weirdly far-from-hardware, and thus un-C-ish.
Like, when I get to mess up memory, why make it so cumbersome?Also: I hereby advocate to add #hardwarenah (adj.) to the English language.
-
Yesterday, I learned that I had a completely wrong concept in mind of what typecasting in #C actually is.
Now, I learned about #punning, a ridiculously cumbersome way to save raw data of a variable of one type into memory of another type (say, I havefloatsand need to save them in auint32_ttyped memory space).
Granted, I am stupid, because instead of this, I could simply have two or more pointers to the memory region. One as typeuint32_t, and one asfloat.Still, both ways feel weirdly far-from-hardware, and thus un-C-ish.
Like, when I get to mess up memory, why make it so cumbersome?Also: I hereby advocate to add #hardwarenah (adj.) to the English language.
-
Yesterday, I learned that I had a completely wrong concept in mind of what typecasting in #C actually is.
Now, I learned about #punning, a ridiculously cumbersome way to save raw data of a variable of one type into memory of another type (say, I havefloatsand need to save them in auint32_ttyped memory space).
Granted, I am stupid, because instead of this, I could simply have two or more pointers to the memory region. One as typeuint32_t, and one asfloat.Still, both ways feel weirdly far-from-hardware, and thus un-C-ish.
Like, when I get to mess up memory, why make it so cumbersome?Also: I hereby advocate to add #hardwarenah (adj.) to the English language.
-
Yesterday, I learned that I had a completely wrong concept in mind of what typecasting in #C actually is.
Now, I learned about #punning, a ridiculously cumbersome way to save raw data of a variable of one type into memory of another type (say, I havefloatsand need to save them in auint32_ttyped memory space).
Granted, I am stupid, because instead of this, I could simply have two or more pointers to the memory region. One as typeuint32_t, and one asfloat.Still, both ways feel weirdly far-from-hardware, and thus un-C-ish.
Like, when I get to mess up memory, why make it so cumbersome?Also: I hereby advocate to add #hardwarenah (adj.) to the English language.