Georg Kullgren: Searching for time
17:13
Timur Doumler: C++ and Safety
1:10:48
Johan Berg: Empty Objects
10:32
Жыл бұрын
Arvid Norberg: Efficient parsing
12:15
Пікірлер
@weekendwarrior3420
@weekendwarrior3420 4 сағат бұрын
Since lower-addressed data come earlier in C, using the opposite convention in diagrams isn't very ergonomic.
@blessingchinagolu4142
@blessingchinagolu4142 21 күн бұрын
Please i want to become a listener in Hearme
@valshaped
@valshaped Ай бұрын
C++: I have zero costs 6502: C++: I have one cost
@Jack-dx7qb
@Jack-dx7qb Ай бұрын
Here's why f(S&) is called nonetheless: In C++, when a temporary object is passed to a function, the compiler tries to find the best match among overloaded functions. It prioritizes functions taking rvalue references (f(S&&)) for efficiency reasons. However, in this specific case, there's a catch. The function f(S&) is also a viable candidate because a reference can bind to both values (variables) and rvalues (temporary objects). Since there's no explicit conversion happening within the wrap function (e.g., casting the temporary object to an lvalue), the compiler might choose the seemingly simpler option - f(S&).
@robertoredford2560
@robertoredford2560 Ай бұрын
'PromoSM' 😂
@FreeOfFantasy
@FreeOfFantasy Ай бұрын
Who thought it was a good idea to film it from the side, so you can't read the slides easily?
@SwedenCpp
@SwedenCpp Ай бұрын
Nobody. This is the 'backup', since the desktop recording failed us this time. But luckily most of the slides are well visible from the camera recording
@Roibarkan
@Roibarkan Ай бұрын
You can find the slides of a previous version of the talk by looking for meetingcpp 2023 slides
@Roibarkan
@Roibarkan Ай бұрын
meetingcpp.com/mcpp/slides/2023/throwing_tools_at_ranges56083.pdf
@Roibarkan
@Roibarkan Ай бұрын
An earlier version if the talk, from meeting c++ 2023, if anyone prefers: kzbin.info/www/bejne/b6fYlYWDapybfpI
@dimitrioskantakouzinos8590
@dimitrioskantakouzinos8590 17 күн бұрын
@@SwedenCpp Good that you had a backup then.
@qiushizheng9208
@qiushizheng9208 2 ай бұрын
best tutorial for the freshmen to learn the basic idea of memory model and memory barrier!!!
@kaihusravnajmiddinov5413
@kaihusravnajmiddinov5413 2 ай бұрын
C++ will live longer than rust. It's more safe than RUST. Someday, when stupid managers, cheaters and government authorities will understand what safety means they will agree with that point. Toooooo many words out of core theme.
@stuartlomas8557
@stuartlomas8557 2 ай бұрын
😅There is a comeneratative monument at Bletchey Park which acknolowdges the contribution of the Poles.
@jimmarshall3724
@jimmarshall3724 2 ай бұрын
Very interesting - thank you. Thanks also for providing code,
@HaraldAchitz
@HaraldAchitz 2 ай бұрын
I agree with your (original, pre-edited) comment that the use of 'auto' does not make the code more readable. Exceptions do exist, generic parts where types are not known, or parts where types are super obvious, like a vector.begin() ...
@jimmarshall3724
@jimmarshall3724 2 ай бұрын
@@HaraldAchitz I edited my original comment because I thought it was overly negative - more than anything else this is an interesting talk by someone who knows a lot more about C++ than me. That being said I don't like the use of auto, and think it should almost never be used. In fact I find the entire drive towards terser code to often be misguided, there''s a lot to be said for code that is a bit longer but more explicit, actual time taken to type something out shouldn't be a factor in deciding how to write code as its only ever a tiny amount compared to time spent planning the code and then reading it back again. If code is made terser by making more use of declarative styles of writing code then that is one thing, and can make the code easier to understand, but this isn't a problem that is solved by auto - which exists purely for laziness
@jimmarshall3724
@jimmarshall3724 2 ай бұрын
I know this isn't everyones approach though - some people really like using auto and use it nearly all the time - I've seen code examples for libraries that use auto and be little use as examples as a result
@KtimesDifferentiable
@KtimesDifferentiable 3 ай бұрын
how is this different from std::function_ref?
@HaraldAchitz
@HaraldAchitz 3 ай бұрын
This talk is from 2018, std::function_ref will (most likely) come to C++ in 2026 which means, 'official compiler support' (until 2026 is an official voted ISO standard) it will be 2027.
@RictorScale
@RictorScale 3 ай бұрын
This is a great talk, will show to others
@erkintek
@erkintek 3 ай бұрын
I cant understand why boost asio post is used!
@QuavePL
@QuavePL 3 ай бұрын
as async task executor
@Roibarkan
@Roibarkan 3 ай бұрын
To elaborate on @QuavePL’s answer - I believe the idea is that all the public functions in AsyncService should return as quickly as possible and have their work done asynchronously (for example in another thread, and in this case on the main thread) and call ‘Finish()’ when they are done (when they populated the response object, ideally). This quick return “ensures” that the gRPC thread isn’t blocked.
@pmholtmo6585
@pmholtmo6585 3 ай бұрын
Correct answers above. We need to handle the request in a separate thread for asynchronous handling and return the call from the gRPC thread directly. I just picked boost asio as an example since it is pretty easy to work with.
@weekendwarrior3420
@weekendwarrior3420 3 ай бұрын
This has contributed to training of my I.
@tinni6441
@tinni6441 3 ай бұрын
Nice talk. For bug 3, clang-format helps. When the format is unexpeced and you wonder why, you will stumble over the semicolon.
@weekendwarrior3420
@weekendwarrior3420 3 ай бұрын
I can almost swear I saw a warning about this from GCC, perhaps it also has some switch to activate it... -Wmisleading-indentation
@sanjaygatne1424
@sanjaygatne1424 3 ай бұрын
Nice talk. All examples are very useful. One doubt: in Bug2 slide "maxSteps" not defined. is it global?.
@christer8964
@christer8964 3 ай бұрын
Another event I missed 😞
@SwedenCpp
@SwedenCpp 3 ай бұрын
You can find the dates for the next 2 meetups in the video. Block the dates, and check our homepage, it will be shown there (or also on the meetup page ;-)
@cppmsg
@cppmsg 4 ай бұрын
Very nicely coded and presented.
@SamWhitlock
@SamWhitlock 4 ай бұрын
Wow I haven't written Asio code in a minute, and it has become so much better! This talk inspired me to check this library out again!
@weekendwarrior3420
@weekendwarrior3420 5 ай бұрын
PDP-11 is 16-bit. int would be 16 bits there.
@hmf4711
@hmf4711 3 ай бұрын
Correct, the PDP-11 is 16 bit, but some CPU registers could also be used as 8 bit registers. I guess that's what they did, since the reports state that overflow happened every 256:th call.
@weekendwarrior3420
@weekendwarrior3420 5 ай бұрын
The hospital had better people than the manufacturer.
@Delfigamer1
@Delfigamer1 5 ай бұрын
The CRTP case is not equivalent - the explicit object parameter-code may do Unexpected Things if called through a reference to base: struct Base { template<typename Self) auto&& work(this Self&& self) { return std::forward<Self>(self).do_work(); } void do_work() { puts("do_work default impl "); } }; struct Derived: Base { void do_work() { puts("do_work overridde "); } }; int main() { Derived d; d.work(); // do_work overridde Base& b = d; b.work(); // do_work default impl // no compiler diagnostic required } In case of the classical CRTP, this scenario is much less likely, since the actual base class for each Derived is a unique template instance, so even if you still wanted to get a reference-to-base, you'd still have to make it explicitly templated, or it won't compile. Or in other words - the legacy CRTP actually provides better type safety than the templated EOP, which might be quite a compelling reason to actually avoid the latter in new code, even in a codebase with C++23 enabled.
@StefanoBorini
@StefanoBorini 5 ай бұрын
main issues of SOUP and also other requirements from IEC62304: 1) SOUP validation procedures, especially if the SOUP is required to be validated for class C, are not strictly prescribed. In other words, if memory serves me correctly, the IEC standard says nothing about how you are supposed to perform validation activities on the SOUP. Do you test only the functions you use, or the whole package, and if the latter, how? Imagine you use numpy to perform matrix multiplications. What do you do to ensure that numpy is fit for purpose in your class C application? 2) I personally found myself unable to verify if currently open bugs on third party software were affecting us, because the vendor (Note: not an opensource vendor. A microcontroller, closed source vendor) refused to release information about currently open defects of their software and hardware. The consequence is that you are asked, as for IEC62304, unable to verify which standing issues in your third party products may affect your product. Eventually I managed to get them to release this information only to us, but it took *a lot* of effort.
@MaksimVolkau
@MaksimVolkau 5 ай бұрын
Storing the offset and not the pointer is my know-how of the talk. Thank you.
@MagnusOsterlund
@MagnusOsterlund 6 ай бұрын
Where can I see the source code for the emulator?
@JonasMinnberg
@JonasMinnberg 6 ай бұрын
I tried to reply with a github link but the comment gets consistently deleted by youtube for some reason :(
@MagnusOsterlund
@MagnusOsterlund 6 ай бұрын
@@JonasMinnberg Give the address without the domain
@JonasMinnberg
@JonasMinnberg 6 ай бұрын
@@MagnusOsterlund It manages to outfox all my ways of referring to something at github...
@JonasMinnberg
@JonasMinnberg 6 ай бұрын
My repo can be seen in the intro screen. Then you need to select the dev branch and look in the src dir for the emulator (single header)
@SwedenCpp
@SwedenCpp 6 ай бұрын
I added the link to the video description, @MagnusOsterlund
@dave7244
@dave7244 6 ай бұрын
Thanks for uploading this. I've watched a bunch of videos around this and this is the one where it started to click for me :D
@stephenwhite506
@stephenwhite506 6 ай бұрын
Very interesting talk, thanks. I have been trying to convert my Pi1541 code to run on a Pi Pico, a Cortex-M0 and need the fastest code possible. I have been viewing the disassembly of every instruction to see what the compiler generated and altering the C code to get the most efficient output. I am finding that macros still beat static inline functions. It will be interesting to test out the presenter's code/ideas and see how it compares to the generated assembly.
@JonasMinnberg
@JonasMinnberg 6 ай бұрын
I am guessing you want to run it on a Neo6502? EDIT: Ah, misread, it was the Pico. But if you manage that you could also run it on the Neo6502...
@varshneydevansh
@varshneydevansh 6 ай бұрын
Amazing talk
@MattGodbolt
@MattGodbolt 6 ай бұрын
Thanks!
@SwedenCpp
@SwedenCpp 6 ай бұрын
Thank you for supporting this channel!
@MarekKnapek
@MarekKnapek 6 ай бұрын
About that switch/jump table and one predictable and one unpredictable jumps vs one unpredictable jump: I know about this technique thanks to Eli Bendersky blog. Search for article "Computed goto for efficient dispatch tables" from 2012. He has more articles about this. He claims 15-20% improvement for CPython interpreter.
6 ай бұрын
7:40 On a Swedish keyboard, you need to hit alt-gr + the tilde key then n to get ñ, skipping the alt-gr gives "¨n" so this is more of a user/input error than a bug in Power Point
@infernumpegasus
@infernumpegasus 7 ай бұрын
You could just use unsigned int as template parameter, solving problem with things like -1, and use static_assert to set range of number of bits
@__hannibaalbarca__
@__hannibaalbarca__ 7 ай бұрын
Hi
@weekendwarrior3420
@weekendwarrior3420 8 ай бұрын
Midly usefil content starts at about 10:00. Before that, he's just trying to convince us that the speed is important.
@csalmeida
@csalmeida 8 ай бұрын
This is such a good talk, the explanations are incredibly helpful and considerate as well! Explaining the ? operator as either use the value or return early with an error made a lot of sense to me. Thanks Mats.
@LowellBoggs
@LowellBoggs 8 ай бұрын
I am confused as to why it is considered advisable to let people pass a writable reference to an unnamed variable -- that is what is happening when you forward a reference of any non-const reference of any kind (forwarding or simple reference, I mean) to a function that might write on it. The changes made to it would be unavailable to the calling function since the object has no name in its context with which to refer to the data so changed. While I thought this was a good tutorial, i would have appreciated an actual use in the context of a real program that benefits from this feature.
@Roibarkan
@Roibarkan 8 ай бұрын
1:01:41 Michele Caini’s talk: kzbin.info/www/bejne/jXOYk4WBgKyFi80
@Roibarkan
@Roibarkan 8 ай бұрын
17:27 (slide 45) this SoA approach could have been taken to an extreme, to have a separate array for each of {x, y, z, dx, dy, dz, hp}. That approach will also allow better chances of SIMD vectorization of calculations
@Roibarkan
@Roibarkan 8 ай бұрын
On cppcon 2021 Eduardo Madrid gave a talk about capabilities of his ‘zoo’ library for writing nice-looking data oriented code: kzbin.info/www/bejne/h5PJl3qJnNh2mbM
@Roibarkan
@Roibarkan 8 ай бұрын
On cppnow 2023 Floris Bob van Enzelingen gave a good talk about data oriented programming and writing libraries for them: kzbin.info/www/bejne/faCsgKGHetKLmNU
@Roibarkan
@Roibarkan 8 ай бұрын
In cppnow 2023 Chandler Carruth gave a good talk about using the same approach for the Carbon lexer/parser: kzbin.info/www/bejne/kHqUamube8ybgM0
@Roibarkan
@Roibarkan 8 ай бұрын
30:21 Mike Acton’s talk: kzbin.info/www/bejne/qImTeqeMerudfsU
@gedaliap
@gedaliap 8 ай бұрын
I made a presentation multithreaded perf optimization where I discussed using Tracy, really great tool, and can be handy even for simple cpu bound examples. kzbin.info/www/bejne/gWSWdIN5hsh5Z5Ysi=3ivMrtLsyZCUkQZQ
@atomicCache_
@atomicCache_ 8 ай бұрын
This video clarified many things, thanks 😇😇
@evgenyyakut2716
@evgenyyakut2716 9 ай бұрын
I appreciate the intuitive model for atomics, though I was a bit disappointed by the speaker showing shaky understanding of the atomics, which was leaking into the presentation and some takeaways. "memory_order_relaxed is most likely a bug" is simply not true. When two threads talk to each other by means of a single atomic variable (and nothing else) it is acceptable to use memory_order_relaxed. The phrase "last resort" also didn't make sense to me. I'm assuming they meant that we should use the safest things first, optimizing as we see fit, but that wasn't clear to me at first.
@weekendwarrior3420
@weekendwarrior3420 9 ай бұрын
27:23 Can't agree more. I say "I hate code!" when I delete it, then feel happy for a couple of hours. This lecture is very useful for a vast majority of C++ users and should definitely have more than 3.3K views.
@kenny3796
@kenny3796 10 ай бұрын
what does S( ) mean in f(S()), I don't remember a syntax like this for a C++ struct , what does it return? Thanks
@LowellBoggs
@LowellBoggs 8 ай бұрын
S() means to construct an object of type S with no parameters but do not give it the name of a variable, just use it in the current expression, then destruct it at a time convenient to the compiler.
@christer8964
@christer8964 10 ай бұрын
So every time ZoneScoped appear in the code a new timer starts and every time it goes out of scope it's destructor stops the timer? And the results sends through a websocket?
@christer8964
@christer8964 10 ай бұрын
Okej! Var på reservplats 29 och trodde att jag inte skulle finnas en chans att det skulle bli en ledig stol. 😞
@HaraldAchitz
@HaraldAchitz 10 ай бұрын
There is always a lot of RSVP change shortly before the Meetup, so never give up and monitor the situation until the beginning of the Meetup, chances are you get your seat And if in doubt, just stop by. Det brukar lösa sig. ;-)
@chakibchemso
@chakibchemso 11 ай бұрын
its really good and very promising, tho I'd like to see dotnet support at least for c# project as premake and cmake does. that's crucial for game development ppl.