C noobs & and expert exchange learning (Sirs)Bunker thread for when the shitting on Rust threads get too chaotic.
I'm writing an interpreter for LAST (LATS to be exact), an alternative for Binary Lambda Calculus that to my knowledge was first proposed by xtao.It is a provisoric call graph optimizer.
unsafe rust is harder than C.
>>107590516type are an illusion, it's pointers all the way down
>>107590554a chqr isnt a pointer on most platforms bc it's too small
>>107590584wtf are you saying
>>107590516the trick is to read inside out just like mathsit is also nice that you can call literally anywhere you want as a function with whatever calling convention you likelikeuint32_t myfunc = 0x123456;((void (__cdecl *)(int i, char* str)) (void*)(myfunc))(1, "abc");and this will emit exactly the type of assembly you want and follow the calling conventionthis is why C needs to be the first language because once you look at what u did in assembly and follow it and read about calling conventions assembly and registers and shityou will understand how computers workand only then you can start programming with whatevermodern software sucks because people who dont understand how computers work are coding themits like having mechanics work on your car who dont know how the engine worksit is not very complicated either but that is a snippet that once you thoroughly understand it entirely you already know the basics
>>107590475>blog post sourced knowledgelol
>>107590475Because unsafe rust is undocumented and UB isn't defined by anything, there's no standard, no clear rules, just one mentally ill tranny's whim on whether your particular unsafe block is valid or too chuddy and will cause it to become a backdoor.