Why Include Files Only Once?

  Рет қаралды 14,804

Tsoding Daily

Tsoding Daily

Күн бұрын

Пікірлер: 33
@liorean
@liorean 3 жыл бұрын
At the end: Win64 is NOT the x86-64 API for windows. It's the IA64 (Itanium) architecture API, which had to diverge because of the considerable differences in Intel's ISA design. That's the reason Microsoft did not simply go with calling the 64-bit version of Win32 Win64 - the name was already taken. But Windows didn't really leave the majority of 32-bit behind anyway, they changed to LLP64, so the types long long and pointers went 64-bit, but everything else is still the same as it was on 32-bit. So they figured, why not just add a plus sign. So the first name they used (for public use of the API, their internal dev team name *was* Win64 though) is Win32+, but not very much, because their marketing liked another term to play on the x86 base of the API, namely x64. They do call the 64-bit version of their binary format (PE32) PE32+ throughout though. When you see the use of Win64 for the x86-64 version of Win32, it's usually by non-Microsoft people that aren't exactly correct in their usage. However, recently Microsoft has stopped calling it the Win32 API and are instead just calling it the Windows API. They also have the WinRT (Windows Runtime) API and a set of different APIs they bundle together into the .NET API, such as WPF and Windows Forms. And old DOS based Windows versions have Win16 of course.
@evertonsantosdeandradejuni3787
@evertonsantosdeandradejuni3787 2 жыл бұрын
That's enlightening
@italoaugustooliveira9664
@italoaugustooliveira9664 2 жыл бұрын
Thanks, great insight.
@hedgechasing
@hedgechasing 3 жыл бұрын
You can use the device and inode number of a file (after following symlinks) to determine if you have the same file no need for determining the real path and this even handles hard links.
@SingleTheShot
@SingleTheShot 3 жыл бұрын
Thats drive format specific right
@frechjo
@frechjo 3 жыл бұрын
I'm thinking if a construct that could do both type checking and some managing of the stack at the same time could be useful. Something like this: A keyword "with" opens a block, takes input ("ins") and output ("outs") declarations, and marks the level or state of the stack ("stsk"). "end" checks that the stack correspond to "ststk" + "x" + "outs", and drops any "x". I.e: 1 2 3 with a int b int -- bool bool in a b + 4 + true true // stack here: 1 9 true true end //stack here: 1 true true Kinda like an immediately invoked lambda, just for type checking and auto-dropping intermediate values. Hard to know without using the language, haha.
@fredesch3158
@fredesch3158 3 жыл бұрын
I just noticed how cute Tsoding character is, really like it
@robheusd
@robheusd 3 жыл бұрын
Isn't it #pragma once ?? (instead of #program once)
@cyrylo23
@cyrylo23 3 жыл бұрын
@@kreuner11 2:37. But he seems to say Pragma, not Program.
@nonadqs
@nonadqs 3 жыл бұрын
@@kreuner11 3:30
@matela6635
@matela6635 3 жыл бұрын
@@nonadqs typo
@tissuepaper9962
@tissuepaper9962 3 жыл бұрын
He just typed it too fast to notice the mistake. People who type a lot have whole words in muscle memory (especially if you do things like play typing games), sometimes you type the wrong word and don't notice.
@telnobynoyator_6183
@telnobynoyator_6183 3 жыл бұрын
from the looks of the thumbnail he already knows that
@peanut3645
@peanut3645 3 жыл бұрын
If you combine `peek` with `proc`, you can give names to procedure parameters. What do you think?
@GegoXaren
@GegoXaren 3 жыл бұрын
Hey, Tsoding! I think you should buy a popfilter. There are the ones that you "put on" the mic and it goes around it, like the _t.bone MS 60_ or _Windtech Popgard_ (or any other brand) that do not obscure as much as a standard pop-filter.
@name._..-.
@name._..-. 3 жыл бұрын
what windows manager do you use?
@akshitsingh6429
@akshitsingh6429 3 жыл бұрын
whats the font that he uses inside emacs ?
@aciddev_
@aciddev_ 10 ай бұрын
i am *a little* late, but its iosevka
@SingleTheShot
@SingleTheShot 3 жыл бұрын
Lmao my first thought was hashing the included files and making sure their hashes don't match, but I doubt that'd be a good solution Hashing would take longer than just comparing paths, but resolving absolute paths would be more effort
@SingleTheShot
@SingleTheShot 3 жыл бұрын
Probably make more sense to compare files byte by byte at that point idk
@dirrelito
@dirrelito 3 жыл бұрын
My idea too...
@SingleTheShot
@SingleTheShot 3 жыл бұрын
@@dirrelito something about great minds :p
@SingleTheShot
@SingleTheShot 3 жыл бұрын
oh wow, with the videos end, hasing doesnt doesnt seem so bad anymore edit: nvm he doesnt like hashes
@ramongonzalezfernandez8904
@ramongonzalezfernandez8904 3 жыл бұрын
@@SingleTheShot That would cause immense slowdown when you have many files as every included file would have to be compared to all previously used headers, whereas a hash only requires reading a file once, and can then be very rapidly compared to the others.
@danidotexe_
@danidotexe_ 3 жыл бұрын
when i'm writing in c++ i always avoid boost
@telnobynoyator_6183
@telnobynoyator_6183 3 жыл бұрын
I don't see why loops are that much of a problem, if the file was included already, just ignore every time it's included again right ? Maybe he'll talk about it later.
@TheOisannNetwork
@TheOisannNetwork 3 жыл бұрын
full-path sister Kreygasm
@dwightk.schrute8696
@dwightk.schrute8696 3 жыл бұрын
Function NFTs? I demand you stop this blasphemy!
@zyansheep
@zyansheep 3 жыл бұрын
Thats a blursed idea
@diconicabastion5790
@diconicabastion5790 3 жыл бұрын
#pragma once isn't standard. You really should be using #ifndef #define and #endif
@evertonsantosdeandradejuni3787
@evertonsantosdeandradejuni3787 2 жыл бұрын
#pragma twice
This is how I add new features to my language
45:18
Tsoding Daily
Рет қаралды 11 М.
I tried Ninja Build Tool and it changed me...
1:22:16
Tsoding Daily
Рет қаралды 16 М.
#behindthescenes @CrissaJackson
0:11
Happy Kelli
Рет қаралды 27 МЛН
I'VE MADE A CUTE FLYING LOLLIPOP FOR MY KID #SHORTS
0:48
A Plus School
Рет қаралды 20 МЛН
КОНЦЕРТЫ:  2 сезон | 1 выпуск | Камызяки
46:36
ТНТ Смотри еще!
Рет қаралды 3,7 МЛН
Automatically Removing Unused Code
2:00:05
Tsoding Daily
Рет қаралды 16 М.
Better Stack Operations Have Been Discovered
42:28
Tsoding Daily
Рет қаралды 23 М.
When optimization breaks your code
1:04:21
Tsoding Daily
Рет қаралды 14 М.
I've been programming without Negative Numbers the whole time
1:05:31
Tsoding Daily
Рет қаралды 38 М.
CppCon 2014: Mike Acton "Data-Oriented Design and C++"
1:27:46
The Power of Inline Functions
1:31:10
Tsoding Daily
Рет қаралды 30 М.
Coding Ray Tracing in C
1:56:48
HirschDaniel
Рет қаралды 153 М.
First Ancient Neural Network in C
2:00:48
Tsoding Daily
Рет қаралды 63 М.
Fast Inverse Square Root - A Quake III Algorithm
20:08
Nemean
Рет қаралды 5 МЛН
#behindthescenes @CrissaJackson
0:11
Happy Kelli
Рет қаралды 27 МЛН