Show newer

re: c++ complaining, wall of text 

@wallhackio i am looking at the C++ Refrence page fur reinterpret_cast and it’s implying you can’t even cast to char: en.cppreference.com/w/cpp/lang

re: c++ complaining, wall of text 

@wallhackio that only makes sense if you are casting to a char * or char&. otherwise you will store a copy of that truncated data in a new location fur the new char

re: c++ complaining, wall of text 

@wallhackio that is an extremely meaningful diffurence!!

re: c++ complaining, wall of text 

@wallhackio

me: how does this work if you cast to char?

you: this is how casting to char& works

me: but you said the function is casting to char, which is not that

re: c++ complaining, wall of text 

@wallhackio in your wall of text you described the function’a casting to char& as casting to char. but casting to char and casting to char& are not the same thing. i am stubbornly asking why casting to char is impawsible to draw your attention to this mistake

re: c++ complaining, wall of text 

@wallhackio if a char refurence is an alias to a preexisting char, then how can you cast data larger than one byte to a char refurence?

re: c++ complaining, wall of text 

@wallhackio

So, the point here is that we want to cast whatever data type is given to the function as a char. Why a char?

you are saying the function is casting arbitrary data to char. you cannot cast arbitrary data to char exactly because a char (typically) only holds one byte. so, the function cannot actually doing what you wrote in your description that it is doing

:blobmeow_sadafterreach:​ TypeScript generics

:blobmeow_forereach:​ Hindley-Milner type system that gives you infurred parametric polymorphism fur free

re: c++ complaining, wall of text 

@wallhackio i think you have a serious conceptual error here. casting to char cannot pawsibly avoid alignment issues as a char is typically large enough to hold ASCII, and thus one byte. in C, it was (sort of) char * that can repurresent arbitrary data because that could repurresent an array of any arbitrary number of bytes. (nowadays you Should use void * fur this because the standard guarantees it actually does have the memory layout you would expect)

the function is not doing a bit-preserving cast to char; this is obviously impawsible. it is doing a bit-preserving cast to char&, which i assume works enough like a char pointer that it can give the programmer an arbitrary view of data of arbitrarily large size

On the Transmutation of Anger

"I do not need to watch video footage of agents of a fascist state execute a human being in broad daylight to know that it happened and to know that it is unjust and worthy of action. Watching it serves no meaningful purpose except to inflame my anger to unsafe levels. Instead, I want to transmute the anger I already have into empathy and turn it into action."

nullrouted.space/2026/01/26/on

Please boost this post and consider supporting my writing work through the following methods:

Stripe:
subscribe.packetcat.ca

Patreon:
patreon.com/Bastetrix

hello! wake up! it’s kitn! mewmew!! *puts paw in your face*

@wallhackio that was tame compared to me showing you what a song was by linking a softcore furry video lol

if you add a thirteenth, does that make it an anger’s dozen?

Show older
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.