Пікірлер
@cadelmonterde7472
@cadelmonterde7472 5 сағат бұрын
Powerpoint link on Github points to the visitor design pattern document.
@zbychs
@zbychs 7 сағат бұрын
Very interesting and useful. Thanks.
@kai18763
@kai18763 10 сағат бұрын
Instead of moving value between registers directly, ``` move eax, edi ``` Why the compiler first moves the value to memory then copy to the register like below? ``` mov dword ptr [rbp-4], edi mov eax, dword ptr [rbp-4] ```
@redram4574
@redram4574 12 сағат бұрын
very useful video
@Soil1199
@Soil1199 18 сағат бұрын
Really interesting talk, I learned a lot and I will recommend it to anyone learning about hardware architecture and how atomic operations work. I would just add that knowing hardware architecture is not mandatory to use C++ atomics correctly (really good to know though). That’s exactly what the C++ memory model is for: to wrap the complexities of real hardware into an abstract machine that is easier to reason about.
@scouter84
@scouter84 21 сағат бұрын
Thank you for this concise talk!
@chukwujiobicanon961
@chukwujiobicanon961 Күн бұрын
For the 110th time, I hope I get an answer this time 😢. Why does ISO C have getenv and setenv but ISO C++ has only std::getenv?
@nangld
@nangld Күн бұрын
Does an audio engineering C++ job pay enough to afford a trichologist? One can expect people presenting good technology to also look tidy.
@petermuller608
@petermuller608 Күн бұрын
Aren't his interfaces missing a virtual destructor? Edit: should have listened for five more seconds before posting xD
@jimhewes7507
@jimhewes7507 Күн бұрын
Ok, so I have a collection of Shape objects including shapes like Circle, Square and Triangle. Now I want to find the average radius of all the Circle objects. How do I do that? I'll need to loop over all the Shape objects in the collection. I don't want to have to put a GetRadius() function in the ShapeConcept class because it's irrelevant to the Square and Triangle classes. Some functions are common to all Shapes like draw() and serialize() but some are specific to a particular Shape. I may want to use those functions. Not easy to do with this type erasure pattern.
@KX36
@KX36 2 күн бұрын
I would be interested to know what is the happy path overhead for ExContext compared to try catch
@N....
@N.... 2 күн бұрын
2:30 I thought this was what std::throw_with_nested was for? It does exactly this but lets you use any exception classes you want
@Hector-bj3ls
@Hector-bj3ls 2 күн бұрын
Not sure you're supposed to mention the star gate. Mr SG14. Not SG1, I get it. You just want some recognition for your hard work.
@RN-rm7gd
@RN-rm7gd 2 күн бұрын
Hmm, i fear it's a dump question. But why do you move in the first place? Or is make_padding designed not to take a reference? Anyways, designing a function in a way of moving around a pointer which than is expected to end up in the original parameter doens't feel right in the first place. Ronald.
@erik7726
@erik7726 2 күн бұрын
Very good presentation! From the trenches, by a developer trying to get his job done, and tries to read the standard and avoid UB.
@Ptiteigne
@Ptiteigne 2 күн бұрын
I'm not sure I got what was the issue with the shared_ptr version of Simple String (21:47 - Slide 27)
@OleksandrShrubkovskyi
@OleksandrShrubkovskyi 2 күн бұрын
It does not work for library exceptions. The way better solution is to override cxa_ exception functions. For Windows there is stacktraced-exception by flexborne and for Linux - libsfe.
@sirhenrystalwart8303
@sirhenrystalwart8303 2 күн бұрын
This is pretty clever but the "ugly" still looks better to me. Copying a string for every loop iteration doesn't sound great, especially if you want more than a few characters, since that will trigger heap allocations. You also have to check for uncaught exceptions at the end of each iteration when this thing is destructed, as well as free the string you copied in.
@germanassasin1046
@germanassasin1046 2 күн бұрын
It smells like a glorified errno… It really puts me off.
@petermuller608
@petermuller608 2 күн бұрын
While I love CMake, I really dislike how hard it is to learn the modern style. Even the author of CMake uses legacy style set(CMAKE_CXX_STANDARD...) instead of target_compile_features(...) And it's not because it's slide code, both take up a line. Also complexity cannot be the reason, since he used much more complex generator expressions before. How should a novice learn? Is there something like shellcheck for cmake, warning about the usage of old features?
@petermuller608
@petermuller608 3 күн бұрын
Nice idea in general, however I dislike the context being constructed even if no exception was thrown I don't get how he comes to the conclusion that no work is done in the happy path. Can someone elaborate?
@user-cd5ft4lb9e
@user-cd5ft4lb9e 3 күн бұрын
Legend!
@guiorgy
@guiorgy 3 күн бұрын
That's actually a cool idea 😮
@user-cd5ft4lb9e
@user-cd5ft4lb9e 3 күн бұрын
That guy is a genius
@Eyalkamitchi1
@Eyalkamitchi1 3 күн бұрын
Nice idea!
@SamWhitlock
@SamWhitlock 3 күн бұрын
Though I agree the "catch-and-release" isn't great, it does indeed have zero overhead on the happy path. This technique (though definitely ergonomically a LOT better), does incur overhead (for creating the ExContext object). However, for most real-world production code I've worked on, this seems to be a better choice, as you can build this new context out incrementally instead of having to "catch and release" every possible function / frame and change to a new exception type everywhere. Much easier for a PR :D
@adamattinello2447
@adamattinello2447 3 күн бұрын
There is surprisingly little mentorship as people move from individual contributor to a lead/manager in most engineering groups. This is a great talk to help highlight some of the challenges others face and some nice insights on how to be more inclusive as people take on more leadership roles. Thank you for sharing.
@KhalilEstell
@KhalilEstell 3 күн бұрын
Reminds me of Boost.LEAF's on_error as well as scope_guard. I wish we had scope_guard in C++.
@radoslawbiernacki
@radoslawbiernacki 3 күн бұрын
Wooow this is so good. Compact and to the point! Ideal for C++ devs.
@skulver
@skulver 3 күн бұрын
I'm not sure if I'm more impressed by the level of knowledge on display or if I'm more horrified by the level of knowledge required to write a move function. Definitely a video that warrants a few watches because there's a lot in there. Well done!
@passerby4507
@passerby4507 3 күн бұрын
Intriguing, but not entirely convinced it's a good idea.
@jopa19991
@jopa19991 3 күн бұрын
really decent talk
@toast_on_toast1270
@toast_on_toast1270 3 күн бұрын
If you return a std::expected/std::variant for error handling, does it break return value optimisation?
@zbychs
@zbychs 3 күн бұрын
Very interesting, thanks.
@KX36
@KX36 3 күн бұрын
don't watch an hour lecture on move semantics, watch this instead!
@employeeofthemonth1
@employeeofthemonth1 4 күн бұрын
Excellent talk this!
@kuhluhOG
@kuhluhOG 4 күн бұрын
8:10 Personally I always find integration tests considerably harder to write (and more time consuming to write in total) than unit tests. I also consider integration tests in general more important than unit tests, because while most units you would unit test are small and simple enough that you can (mostly) make sure that they work by looking at it (and if it isn't, a unit test normally isn't that hard to write, even without a test framework), that doesn't hold for integration tests (let alone even system tests).
@aniketbisht2823
@aniketbisht2823 4 күн бұрын
How are compile times affected? Especially given the usage of "is_id_expression".
@314Labs
@314Labs 4 күн бұрын
The ending 😆.
@xbmarx
@xbmarx 4 күн бұрын
When I see a C++ developer with a Hawaiian shirt, I know I'm in for a good talk.
@metinevrenkurtulus
@metinevrenkurtulus 4 күн бұрын
Should you even take advice from someone who cannot title their presentation properly?
@u9vata
@u9vata 4 күн бұрын
I wish popular oss things just would came with a simple makefile. Literally are not picking libraries or tools where I spot cmake if there is any alternative to them... Key take-away though is "user builds vs developer builds". That is already a good thing to do even if your project is small!
@JaapVersteegh
@JaapVersteegh 4 күн бұрын
The meta function just looks like the macro pre-processor to me...
@CapiEtheriel
@CapiEtheriel 4 күн бұрын
today i learned "in day one there is going to be magic". it is a valuable lesson.
@alexeysubbota
@alexeysubbota 4 күн бұрын
Terrible presentation! The speaker's speech is monotonous, as if a robot were speaking. The words are not supported by a visual component, the slides are static, contain a lot of information and do not change for a long time. Speech and image live their own independent lives. This is the second time I have tried to watch the performance of this speaker, but each time it turns out the same thing.
@314Labs
@314Labs 4 күн бұрын
No pun intended.
@kuhluhOG
@kuhluhOG 5 күн бұрын
1:08:25 I think that good judgement derives from good intuition, which in turn derives from good skill, which in turn comes from lots of experience. Obviously, a person may not necessarily get stuff from right to level, but that's a different topic. So, no, I wouldn't say that AI levels the playing field in terms of skill.
@EgorChebotarev
@EgorChebotarev 5 күн бұрын
not bad
@cyrilanisimov
@cyrilanisimov 5 күн бұрын
6:40 in C++ 17 foo(...) is safe in both cases AFAIK
@abhi-5783
@abhi-5783 5 күн бұрын
This was a bit fast paced. Too many concepts, too little time and examples. Better cover it in 2 hour talks.