Loading video...
Video Failed to Load
Insane Shadow Data Trick in C
55,148 views • 8 months ago •via X (Twitter)
26 Comments

References: - - - Source Code:

Besides the video being great, I gotta say it's super scary that printf does what it does :D

ikr!

The way you structure content makes it extremelly satisfacting as you are able to explain complex topics fast, White not dumbing it down. You sir are a inspiration!!

cries in UB:

I was learning C in 2016, and this is what I made as soon as I got comfortable with pointers. I didn't even have a header struct, I used raw offsets for the count and capacity.

Great video! Also great follow up:

iirc malloc does a similar thing, it also appends a header to the memory it allocated

All I see is 69, Weed, Leet and Boobs ^^

my first ever implementation of a dynamic data buffer and mutable dynamic string buffer was like that (seriously: if people learned assembly before C, we'd have fewer "memory bugs" and more effective coding) 🤷♂️

The video is great! I'll add though, the most error prone thing about it is holding long-term pointers to array items as it can be reallocated at any time and most likely the old values will be valid for a while, very frustrating bugs.

Clever C techniques enable hidden data tricks

Where are my Flexible-Array Member brothers @?

That was very entertaining. 20 minutes just flew past!

cant wait to see this every now and then from now on

Tu canal me da esperanza

you just increased my braincells

Nice. I personally rather use (inline) functions over macros. Sure you lose type generality, but it's safer. I would not do this in C. I rather use C++ for something like this. Templates, namespaces and friendly constructors.

Thank you for this good videos. But how many rehearsal times you do for it?

bro dropped Dynamic Array 2: The return of the King

Where's the dynamic array part

C for Cool

cool

Now this is gold ! I wonder if it’s possible to define a new type just we can know where numbers isn’t just a “simple” float* or int*

shlen, ха-ха, член

I finally know how to make dynamic arrays in C. Thank you!
