Thanks! I really appreciated Ben and Dan who gave us opportunities to deep dive into c and c++.
@xorbe22 ай бұрын
primer at 0:36 volatile at 20:29 summary at 44:05 audience questions at 46:40
@LS-cb7lg2 ай бұрын
Great talk. good thing i knew most of it already, but a great refresher nonetheless :) the workaround with the opaque functions is a good thing to keep in mind!
@azdinator2 ай бұрын
Now that I've watched the whole video : I apologize. This is great job. Thank you Mr. Saks.
@TechTalksWeekly2 ай бұрын
This is an excellent talk and it has been featured in the latest issue of 💥Tech Talks Weekly. Congrats!
@NEWDIABLO962 ай бұрын
9:17 more NOP/s seem like a good metric!
@StanleyPinchak2 ай бұрын
🤣
@milasudril2 ай бұрын
Can the language be made more expressive in order to prevent compiler bugs related to volatile?
@sanjaygatne14242 ай бұрын
नीट समजावून सांगितले. होलाटाइल बद्दलच्या शंका दुर झाल्या. धन्यवाद.
@АлександрРоманов-э8ъ5о2 ай бұрын
Thanks! It looks like slide 41 missing pointer dereference
@АндрейЛащев-м6ж2 ай бұрын
The speaker looks like Peter Gregory from Silicon Valley Series. 🙂
@japedr2 ай бұрын
To be fair, I believe one of the mistakes of C and C++ is that the value and not the address is what is declared volatile, where it only makes sense in practice is when it's under a pointer/reference. I believe a much more cleaner solution would be having special functions like "volatile_read" and "volatile_write" that modify volatile memory locations. That would even allow adding non-volatile read and writes mixed in where needed; or even hardware-specific functions with their own particular set of guarantees (e.g. "semi-volatile").
@ZeroPlayerGame2 ай бұрын
What does it even mean to have one volatile and one non-volatile access to the same memory location? Also, in C++, like C, unlike e.g. Rust, each value has a definite place in memory which can only be "changed" by copying or moving out, so the distinction is not very meaningful.
@Fardin.Alizadeh2 ай бұрын
you are more Peter Gregory that Peter Gregory itself =))))
@Minty_Meeo2 ай бұрын
This is sort of interesting, but about halfway through I had to put it on 1.5x speed because the speaker has a really slow and choppy speaking rhythm.
@jefffriedman69422 ай бұрын
it shouldn't take an hour to learn what volatile is. this is a core problem with c++ and the people surrounding it. 1 hour presentations in a world that had already been dominated by 140 characters over a decade ago.
@ZeroPlayerGame2 ай бұрын
have you watched the talk or just read the title and looked at runtime
@srnissen_2 ай бұрын
Explaining how to use it takes a second if you're not touching hardware ("don't"), one sentence if you're doing C++ ("The standard says it does the same as C"), and one (different) sentence if you're doing C ("Ask your hardware provider.") I would be wildly surprised to learn that it's any different for Zig or Rust. "What it is" can take arbitrarily long, depending on how long of a history lesson you want.
@ShtrikeBirb2 ай бұрын
So true
@juliovata91942 ай бұрын
@@jefffriedman6942 it’s a feature adopted from C…
@japedr2 ай бұрын
Within 140 characters: Just use volatile for memory mapped hardware registers as the compiler would generate wrong code otherwise. Do not use it for other purposes. For the longer explanation, watch the talk. I mean, I agree that often C++ is overly complicated, but this particular issue affects all low-level languages with an optimizing compiler (like pure C, Rust, Zig or even Ada). The only way to avoid this problem is to write the assembly code yourself.
@klcousins2 ай бұрын
Jesus, Mary, and Joseph! Lose the water! So distracting!
@klcousins2 ай бұрын
I mean: just how dehydrated can one GET during a 𝘖𝘕𝘌 𝘏𝘖𝘜𝘙 presentation?
@ABaumstumpf2 ай бұрын
Volatile - an problem created by the C++ committee not understanding what volatile means, why it was defined in C as it was, or what it is meant to be used for. And then in an attempt to solve the problem we got std::atomic: it does not even come close to resolving the problems `volatile` was misused for. It says nothing about actual atomicity but instead deals with memory-fencing and can also be locking. volatile means that any operations on that object are to be treated as if they have sideeffects. Nothing less, nothing more.
@kuhluhOGАй бұрын
it's not a problem created by the C++ committee the C++ committee just saw that a lot of C and C++ programmers (yes, both groups) used volatile wrong and thought it needs to do something about it furthermore, atomic and volatile are orthogonal to each other and the former is necessary to write performant multiple thread code with shared data without needing to drop down to assembly; there's a reason why C has _Atomic (and no, it's not C++ compatibility)