CppCon
CppCon
  • 1 582
  • 28 003 561
Lightning Talk: Is Polymorphism in C++ Really That Bad? - Paul Tsouchlos - CppCon 2023
cppcon.org/
---
Lightning Talk: Is Polymorphism in C++ Really That Bad? - Paul Tsouchlos - CppCon 2023
github.com/CppCon/CppCon2023
Case study of how we used polymorphism at my work to solve a problem with hardware control. I'll present what we did wrong at first, how we corrected it and the performance we can achieve for our particular application. I'll also briefly mention ways we can further improve our design.
---
Paul Tsouchlos
I'm a C++ dev that enjoys coding outside work and writing open source libraries and applications. I've worked with C++ for ~8 years and enjoy implementing algorithms and have a great interest in AI and high performance computing.
__
Videos Filmed & Edited by Bash Films: www.BashFilms.com
CZcams Channel Managed by Digital Medium Ltd: events.digital-medium.co.uk
---
Registration for CppCon: cppcon.org/registration/
#cppcon #cppprogramming #cpp
zhlédnutí: 890

Video

Lightning Talk: Enhancing C++ exceptions with Context - Shachar Shemesh - CppCon 2023
zhlédnutí 2,5KPřed 13 hodinami
cppcon.org/ Lightning Talk: Enhancing C exceptions with Context - Shachar Shemesh - CppCon 2023 github.com/CppCon/CppCon2023 Exceptions in C are missing important context. You know something bad happened, and you kinda know what, but you don't have any context on what the program was trying to do, or why it was trying to do it. Class Context to the rescue! Shachar Shemesh Shachar Shemesh has be...
Lightning Talk: Writing a Better std::move - Jonathan Müller - CppCon 2023
zhlédnutí 7KPřed 16 hodinami
cppcon.org/ Lightning Talk: Writing a Better std::move - Jonathan Müller - CppCon 2023 github.com/CppCon/CppCon2023 std::move allows the creation of const rvalue references, which is almost always wrong. It also allows moving out of lvalue references, which can be dangerous since you don't have real ownership over them and a caller might not expect the object to disappear. Let's fix those probl...
Lightning Talk: Know Your Audience: Who’s Building Your C++ Code - Chris Thrasher - CppCon 2023
zhlédnutí 1,5KPřed 18 hodinami
cppcon.org/ Lightning Talk: Know Your Audience: Who’s Building Your C Code - Chris Thrasher - CppCon 2023 github.com/CppCon/CppCon2023 Know who is building your code because it impacts the decisions you make in your build system. My talk presents an idea for dealing with how different people need different things from your build. Chris Thrasher Chris Thrasher is a robotics software developer wh...
Lightning Talk: (Fine) Wine and MSVC: What Could Possibly Go Wrong? - Yannic Staudt - CppCon 2023
zhlédnutí 2,3KPřed 20 hodinami
cppcon.org/ Lightning Talk: (Fine) Wine and MSVC: What Could Possibly Go Wrong? - Yannic Staudt - CppCon 2023 github.com/CppCon/CppCon2023 A short story about wine, command line arguments, paths and what it takes to cross compile binaries for Windows targets on a Linux host using MSVC and why you might consider doing the same! Yannic Staudt Yannic is one of the co-founders of tipi.build, a hack...
Lightning Talk: Let's Fix Sparse Linear Algebra with C++. It'll Be Fun and Easy! - Benjamin Brock
zhlédnutí 10KPřed 23 hodinami
cppcon.org/ Lightning Talk: Let's Fix Sparse Linear Algebra with C . It'll Be Fun and Easy! - Benjamin Brock - CppCon 2023 github.com/CppCon/CppCon2023 Sparse linear algebra is hard. There are a large variety of different sparse linear algebra formats, and they all require obtuse index arithmetic in order to use. But what if we could fix this? In this talk, I'll present an idea for "fixing spar...
Lightning Talk: Higher-Order Template Metaprogramming with C++23 - Ed Catmur - CppCon 2023
zhlédnutí 6KPřed dnem
cppcon.org/ Lightning Talk: Higher-Order Template Metaprogramming with C 23 - Ed Catmur - CppCon 2023 github.com/CppCon/CppCon2023 C 20's Concepts transformed metaprogramming, but they can still be inflexible and are not readily composable. I demonstrate a few simple yet powerful techniques to allow building concepts from type traits, type transformations and even other concepts. Ed Catmur At M...
Lightning Talk: The Responsibility of C++ - Neil Henderson - CppCon 2023
zhlédnutí 2,9KPřed dnem
cppcon.org/ Lightning Talk: The Responsibility of C - Neil Henderson - CppCon 2023 github.com/CppCon/CppCon2023 Hopefully an amusing and light-hearted look at C and its strengths and responsibilities in the software world from a recent life-changing experience. Neil Henderson Neil is a C software developer from Australia working with video and media. Videos Filmed & Edited by Bash Films: www.Ba...
Lightning Talk: Whitespace: A Humorous Short Talk - Dan Curran - CppCon 2023
zhlédnutí 4,3KPřed dnem
cppcon.org/ Lightning Talk: Whitespace: A Humorous Short Talk - Dan Curran - CppCon 2023 github.com/CppCon/CppCon2023 i want a holy war over whitespace. the most productive discussion. Dan Curran working in finance. i like to experiment in language design, and implement proposals for c in clang. sometimes. Videos Filmed & Edited by Bash Films: www.BashFilms.com CZcams Channel Managed by Digital...
Lightning Talk: Thread Safety With synchronized_value in C++ - Jørgen Fogh - CppCon 2023
zhlédnutí 4,1KPřed dnem
cppcon.org/ Lightning Talk: Thread Safety With synchronized_value in C - Jørgen Fogh - CppCon 2023 github.com/CppCon/CppCon2023 Adding thread safety to existing code is hard. The proposed type synchronized_value makes it less hard. I will show you why. Jørgen Fogh Jørgen Fogh has been writing software his entire life. The last 15 years he has primarily done it in C . Videos Filmed & Edited by B...
Lightning Talk: You Should Use AddressSanitizer - Brody Holden - CppCon 2023
zhlédnutí 5KPřed 14 dny
cppcon.org/ Lightning Talk: You Should Use AddressSanitizer - Brody Holden - CppCon 2023 github.com/CppCon/CppCon2023 This talk aims to get you, yes you, to use Address Sanitizer. ASan will detect various memory errors and is worth your time. Brody Holden Brody works in fintech and lives in Canada. When he's not using ASAN he is thinking about using ASAN. Videos Filmed & Edited by Bash Films: w...
Lightning Talk: Write Valid C++ and Python in One File - Roth Michaels - CppCon 2023
zhlédnutí 7KPřed 14 dny
cppcon.org/ Lightning Talk: Write Valid C and Python in One File - Roth Michaels - CppCon 2023 github.com/CppCon/CppCon2023 A demo of a neat/horrifying hack to use the preprocessor to define a constants file that can be consumed by C and Python. Roth Michaels Roth Michaels is a Principal Software Engineer at Native Instruments, an industry leader in real-time audio software for music production...
Lightning Talk: Filling the Bucket: Reading Code, C++ Code Interviews & Exams - Amir Kirsh - CppCon
zhlédnutí 3,1KPřed 14 dny
cppcon.org/ Lightning Talk: Filling the Bucket: Reading Code, C Code Interviews & Exams - Amir Kirsh - CppCon 2023 github.com/CppCon/CppCon2023 We are going to review and practice a reading code challenge. Reading code skills are quite important, maybe even more than writing code. So let's dive together into filling the bucket code reading challenge! Amir Kirsh Amir Kirsh is a C lecturer at the...
Lightning Talk: C++ and the Next Generation: How to Support Women and Families in Tech - Sara Boulé
zhlédnutí 1,5KPřed 14 dny
cppcon.org/ Lightning Talk: C and the Next Generation: How to Support Women and Families in Tech - Sara Boulé - CppCon 2023 github.com/CppCon/CppCon2023 We have a problem in Tech. Statistically speaking, women make up 27% of the workforce in Tech, and half of women in tech drop out by the age of 35. What are some steps and strategies that we can take as a community to support our colleagues suc...
Lightning Talk: Spanny: Abusing C++ mdspan Is Within Arm’s Reach - Griswald Brooks - CppCon 2023
zhlédnutí 3KPřed 14 dny
cppcon.org/ Lightning Talk: Spanny: Abusing C mdspan Is Within Arm’s Reach - Griswald Brooks - CppCon 2023 github.com/CppCon/CppCon2023 mdspan introduced in C 23 gave us a standard multidimensional way to view into a container of data. While the canonical use case is to refer to a stack or heap allocated data, the accessor policy allows you to inject any side effect allowing the data to come fr...
Lightning Talk: Help! My Expression Template Type Names Are Too Long! - Braden Ganetsky CppCon 2023
zhlédnutí 5KPřed 21 dnem
Lightning Talk: Help! My Expression Template Type Names Are Too Long! - Braden Ganetsky CppCon 2023
Lightning Talk: Interfaces in C++ - Megh Parikh - CppCon 2023
zhlédnutí 4,6KPřed 21 dnem
Lightning Talk: Interfaces in C - Megh Parikh - CppCon 2023
Lightning Talk: Un-Undefining Undefined Behavior in C++ - Jefferson Carpenter - CppCon 2023
zhlédnutí 4,9KPřed 21 dnem
Lightning Talk: Un-Undefining Undefined Behavior in C - Jefferson Carpenter - CppCon 2023
Lightning Talk: A Fast, Concurrent Data Loader for Time-Series Data - Glenn Philen - CppCon 2023
zhlédnutí 3,2KPřed 21 dnem
Lightning Talk: A Fast, Concurrent Data Loader for Time-Series Data - Glenn Philen - CppCon 2023
Lightning Talk: ClangFormat Is Not It - Anastasia Kazakova - CppCon 2023
zhlédnutí 7KPřed 21 dnem
Lightning Talk: ClangFormat Is Not It - Anastasia Kazakova - CppCon 2023
Lightning Talk: The Power of Silence and Music in Agile Software - Valentina Ricupero - CppCon 2023
zhlédnutí 1,4KPřed 28 dny
Lightning Talk: The Power of Silence and Music in Agile Software - Valentina Ricupero - CppCon 2023
Lightning Talk: Implementing Coroutines Using C++17 - Alon Wolf - CppCon 2023
zhlédnutí 4,1KPřed měsícem
Lightning Talk: Implementing Coroutines Using C 17 - Alon Wolf - CppCon 2023
Lightning Talk: Introverts: Speak! - Rudyard Merriam - CppCon 2023
zhlédnutí 3,1KPřed měsícem
Lightning Talk: Introverts: Speak! - Rudyard Merriam - CppCon 2023
Lightning Talk: Constraining Automated Trading Risk with Linux Signals - Max Huddleston CppCon 2023
zhlédnutí 2,6KPřed měsícem
Lightning Talk: Constraining Automated Trading Risk with Linux Signals - Max Huddleston CppCon 2023
Great C++ is_trivial: trivial type traits - Jason Turner - CppCon 2023
zhlédnutí 15KPřed měsícem
Great C is_trivial: trivial type traits - Jason Turner - CppCon 2023
Better CMake: A World Tour of Build Systems - Better C++ Builds - Damien Buhl & Antonio Di Stefano
zhlédnutí 9KPřed měsícem
Better CMake: A World Tour of Build Systems - Better C Builds - Damien Buhl & Antonio Di Stefano
Plenary: Coping With Other People's C++ Code - Laura Savino - CppCon 2023
zhlédnutí 17KPřed měsícem
Plenary: Coping With Other People's C Code - Laura Savino - CppCon 2023
Behavioral Modeling in HW/SW Co-design Using C++ Coroutines - Jeffrey Erickson, Sebastian Schoenberg
zhlédnutí 3,1KPřed měsícem
Behavioral Modeling in HW/SW Co-design Using C Coroutines - Jeffrey Erickson, Sebastian Schoenberg
Writing Python Bindings for C++ Libraries: Easy-to-use Performance - Saksham Sharma - CppCon 2023
zhlédnutí 7KPřed měsícem
Writing Python Bindings for C Libraries: Easy-to-use Performance - Saksham Sharma - CppCon 2023
Building Effective Embedded Systems in C++: Architectural Best Practices - Gili Kamma - CppCon 2023
zhlédnutí 8KPřed měsícem
Building Effective Embedded Systems in C : Architectural Best Practices - Gili Kamma - CppCon 2023

Komentáře

  • @cadelmonterde7472
    @cadelmonterde7472 Před 12 hodinami

    Powerpoint link on Github points to the visitor design pattern document.

  • @zbychs
    @zbychs Před 13 hodinami

    Very interesting and useful. Thanks.

  • @kai18763
    @kai18763 Před 16 hodinami

    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 Před 19 hodinami

    very useful video

  • @Soil1199
    @Soil1199 Před dnem

    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 Před dnem

    Thank you for this concise talk!

  • @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 Před dnem

    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 Před dnem

    Aren't his interfaces missing a virtual destructor? Edit: should have listened for five more seconds before posting xD

  • @jimhewes7507
    @jimhewes7507 Před 2 dny

    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 Před 2 dny

    I would be interested to know what is the happy path overhead for ExContext compared to try catch

  • @N....
    @N.... Před 2 dny

    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 Před 2 dny

    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 Před 2 dny

    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 Před 2 dny

    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 Před 2 dny

    I'm not sure I got what was the issue with the shared_ptr version of Simple String (21:47 - Slide 27)

  • @OleksandrShrubkovskyi

    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

    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 Před 3 dny

    It smells like a glorified errno… It really puts me off.

  • @petermuller608
    @petermuller608 Před 3 dny

    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 Před 3 dny

    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 Před 3 dny

    Legend!

  • @guiorgy
    @guiorgy Před 3 dny

    That's actually a cool idea 😮

  • @user-cd5ft4lb9e
    @user-cd5ft4lb9e Před 3 dny

    That guy is a genius

  • @Eyalkamitchi1
    @Eyalkamitchi1 Před 3 dny

    Nice idea!

  • @SamWhitlock
    @SamWhitlock Před 3 dny

    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 Před 3 dny

    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 Před 3 dny

    Reminds me of Boost.LEAF's on_error as well as scope_guard. I wish we had scope_guard in C++.

  • @radoslawbiernacki
    @radoslawbiernacki Před 3 dny

    Wooow this is so good. Compact and to the point! Ideal for C++ devs.

  • @skulver
    @skulver Před 3 dny

    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 Před 3 dny

    Intriguing, but not entirely convinced it's a good idea.

  • @jopa19991
    @jopa19991 Před 4 dny

    really decent talk

  • @toast_on_toast1270
    @toast_on_toast1270 Před 4 dny

    If you return a std::expected/std::variant for error handling, does it break return value optimisation?

  • @zbychs
    @zbychs Před 4 dny

    Very interesting, thanks.

  • @KX36
    @KX36 Před 4 dny

    don't watch an hour lecture on move semantics, watch this instead!

  • @employeeofthemonth1

    Excellent talk this!

  • @kuhluhOG
    @kuhluhOG Před 4 dny

    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 Před 4 dny

    How are compile times affected? Especially given the usage of "is_id_expression".

  • @314Labs
    @314Labs Před 4 dny

    The ending 😆.

  • @xbmarx
    @xbmarx Před 4 dny

    When I see a C++ developer with a Hawaiian shirt, I know I'm in for a good talk.

  • @metinevrenkurtulus
    @metinevrenkurtulus Před 4 dny

    Should you even take advice from someone who cannot title their presentation properly?

  • @u9vata
    @u9vata Před 4 dny

    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 Před 4 dny

    The meta function just looks like the macro pre-processor to me...

  • @CapiEtheriel
    @CapiEtheriel Před 4 dny

    today i learned "in day one there is going to be magic". it is a valuable lesson.

  • @alexeysubbota
    @alexeysubbota Před 4 dny

    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 Před 4 dny

    No pun intended.

  • @kuhluhOG
    @kuhluhOG Před 5 dny

    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 Před 5 dny

    not bad

  • @cyrilanisimov
    @cyrilanisimov Před 5 dny

    6:40 in C++ 17 foo(...) is safe in both cases AFAIK

  • @abhi-5783
    @abhi-5783 Před 6 dny

    This was a bit fast paced. Too many concepts, too little time and examples. Better cover it in 2 hour talks.