Loading video...

Video Failed to Load

Go Home

Insane Shadow Data Trick in C

55,148 views • 8 months ago •via X (Twitter)

26 Comments

Тsфdiиg's profile picture
Тsфdiиg8 months ago

References: - - - Source Code:

Valentin Ignatev's profile picture
Valentin Ignatev8 months ago

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

Тsфdiиg's profile picture
Тsфdiиg8 months ago

ikr!

Marcos Capistrano's profile picture
Marcos Capistrano8 months ago

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!!

Igor's profile picture
Igor8 months ago

cries in UB:

Liberté, égalité, anxiété's profile picture
Liberté, égalité, anxiété8 months ago

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.

Reece's profile picture
Reece8 months ago

Great video! Also great follow up:

Tħ∀TΣΔGIC∀LCΔT's profile picture
Tħ∀TΣΔGIC∀LCΔT8 months ago

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

Drewsky's profile picture
Drewsky8 months ago

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

Elementary, Watson's profile picture
Elementary, Watson8 months ago

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) 🤷‍♂️

FlyingSolomon's profile picture
FlyingSolomon8 months ago

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.

Mario's profile picture
Mario8 months ago

Clever C techniques enable hidden data tricks

John's profile picture
John8 months ago

Where are my Flexible-Array Member brothers @?

Jiří Moravec's profile picture
Jiří Moravec8 months ago

That was very entertaining. 20 minutes just flew past!

Momoyon!!!!!!'s profile picture
Momoyon!!!!!!8 months ago

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

F A B I A N🧋's profile picture
F A B I A N🧋8 months ago

Tu canal me da esperanza

Plague's profile picture
Plague8 months ago

you just increased my braincells

facts matter, lies shatter 🇳🇱 🇺🇸's profile picture
facts matter, lies shatter 🇳🇱 🇺🇸8 months ago

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.

Salah's profile picture
Salah8 months ago

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

Ayan Khan's profile picture
Ayan Khan8 months ago

bro dropped Dynamic Array 2: The return of the King

pkuseri (🍉)'s profile picture
pkuseri (🍉)8 months ago

Where's the dynamic array part

dyma's profile picture
dyma8 months ago

C for Cool

Yeab - engg / core was in Palo Alto🌴's profile picture
Yeab - engg / core was in Palo Alto🌴8 months ago

cool

Da Silva Miguel's profile picture
Da Silva Miguel8 months ago

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*

Someone's profile picture
Someone8 months ago

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

Kolt's profile picture
Kolt8 months ago

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

Related Videos