[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


[Advertise on 4chan]


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.
>>
File: images(14).jpg (35 KB, 524x381)
35 KB
35 KB JPG
>>
File: pointers.png (717 KB, 1476x1149)
717 KB
717 KB PNG
>>107590516
type are an illusion, it's pointers all the way down
>>
>>107590554
a chqr isnt a pointer on most platforms bc it's too small
>>
>>107590584
wtf are you saying
>>
>>107590516
the trick is to read inside out just like maths
it is also nice that you can call literally anywhere you want as a function with whatever calling convention you like

like

uint32_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 convention
this 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 shit

you will understand how computers work
and only then you can start programming with whatever

modern software sucks because people who dont understand how computers work are coding them
its like having mechanics work on your car who dont know how the engine works

it 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 knowledge
lol
>>
>>107590475
Because 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.



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.