C++ London
C++ London
  • 38
  • 33 608
Timur Doumler - "Contracts for C++" - C++ London
Recorded live at the C++ London meetup at Maven Securities, March 2024
www.meetup.com/cpplondon/events/299320783/
(Please note, this was recorded using a backup approach so has a number of compromises on audio and video quality. In particular the mic was an open room mic that picks up a lot of room noise.)
Design by Contract is a very effective approach for writing safer, more correct programs. It has been successfully implemented in programming languages like Eiffel and Ada. Attempts to add a Contracts facility to C++ have a long and storied history spanning two decades. Since the last attempt to standardise Contracts (for the C++20 Standard) has failed, SG21 - the Contracts Study Group on the C++ Standard Committee - has been working on a new design, the so-called Contracts MVP, which is now essentially feature-complete and on track to make it into the upcoming C++26 Standard.
In this talk, we present the current design of the Contracts MVP targeting C++26. We discuss preconditions, postconditions, assertions, contract-violation handling and much more. We consider how the Contracts MVP provides a superior replacement for custom assertion macros and, when used correctly, can significantly improve the safety and correctness of your code.
---
Timur Doumler is the co-host of CppCast and an active member of the ISO C++ standard committee, where he is currently co-chair of SG21, the Contracts study group. Timur started his journey into C++ in computational astrophysics, where he was working on cosmological simulations. He then moved into the audio and music technology industry, where he has been working for over a decade and co-founded the music tech startup Cradle. In the past, Timur also worked for JetBrains, first as a developer on CLion's C++ parser and later as a Developer Advocate for C++ developer tools. Currently, Timur lives in Finland, where he works as an independent consultant and organises the monthly C++ Helsinki meetup.
zhlédnutí: 3 406

Video

Gašper Ažman - "(Fun)ctional C++ and the M-word" - C++ London
zhlédnutí 533Před 4 měsíci
Recorded live at the C London meetup at Ripple, December 2023 www.meetup.com/cpplondon/events/297195240/ C is a multi-paradigm language. Procedural programming and object-oriented programming are very well supported, and as of C 23 there is decent support for generic programming. The functional programming paradigm, however, is only getting love recently. Gašper is the Chief Ecosystem Engineer ...
Antony Peacock - "An Update on Vocabulary Types for Composite Class Design" - C++ London
zhlédnutí 160Před 4 měsíci
Recorded live at the C London meetup at Ripple, December 2023 www.meetup.com/cpplondon/events/297195240/ An update on the progress of Vocabulary Types for Composite Class Design proposal. This will look at how the design has changed, what feedback this proposal received at the recent ISO C standards committee meeting in Hawaii and what is remaining to get it into the standard for C 26 Antony is...
Javier Honduvilla Coto - "How stack unwinding works?" - C++ London
zhlédnutí 896Před rokem
Recorded live at the Ripple offices in London, February 2023 www.meetup.com/cpplondon/events/291464561/ This talk will describe the facilities that are needed to implement stack unwinding of native applications such as C ’s. We’ll describe the DWARF CFI format, the roles it plays, and how the general unwinding algorithm works. This talk will be mostly focused on the unwinding bits and not so mu...
Darren Prehaye and Gavin Burns - "Digital Security by Design, CHERI and the Morello Board"
zhlédnutí 97Před rokem
Recorded live at the Ripple offices in London, February 2023 www.meetup.com/cpplondon/events/291464561/ This talk introduces Digital Security by Design, a UKRI led programme that aims to radically update the foundation of the insecure digital computing infrastructure by creating a new, more secure hardware and software ecosystem. For more information please visit our website, www.dsbd.tech/- Th...
Marcin Kosiba - "Compiling C++: {fast,correct} you want both" - C++ London
zhlédnutí 182Před rokem
Recorded live at the Ripple offices in London, February 2023 www.meetup.com/cpplondon/events/291464561/ C is a powerful programming language that enables developers to create highly efficient software. However, the process of building and testing C code can be time-consuming, especially for larger codebases. In this talk, we will provide an overview of build tools such as Make and Bazel and exp...
Dimitrios Polymenos - "Using parser combinators to invoke C++ callables" - C++ London
zhlédnutí 387Před rokem
Recorded live at the C London meetup at G-Research, November 2022 www.meetup.com/cpplondon/events/289226938/ Have you ever had the need to call c functions with json (or any other) payload with parsing involved? then this is the talk for you! Code and slides: bitbucket.org/toulis9999/string-fn-invoker Dimitrios is a professional C dev for ~7 years. Currently in fintech, previously in games. He ...
Stefan Popa - "Applications of SIMD" - C++ London
zhlédnutí 143Před rokem
Recorded live at the C London meetup at Macquarie, October 2022 www.meetup.com/cpplondon/even... - Stefan currently work as equities quant analyst in Citibank, but the talk has nothing to do with that subject. Currently, he mainly does mainly Java but C/C is still one of the programming languages close to his heart :)
Mateusz Pusz - "Gitpod" - C++ London
zhlédnutí 117Před rokem
Recorded live at the C London meetup at Macquarie, October 2022 www.meetup.com/cpplondon/events/288620978/ This was a last minute, impromptu, lightning talk from Mateusz.
Denis Yaroshevskiy - "My First SIMD" - C++ London
zhlédnutí 520Před rokem
Recorded live at the C London meetup at Macquarie, October 2022 www.meetup.com/cpplondon/events/288620978/ `std::strlen` is 16 or 32 times faster than a while loop, depending on your machine. How? It uses SIMD. And so can you. The talk will show you a few algorithms with SIMD, enough for you to get a feel for it. The talk will utilize `eve` library github.com/jfalcou/eve but you don't have to, ...
Improve Test Automation Efficiency by Recording Test Failures - Chris Croft-White
zhlédnutí 190Před 2 lety
www.meetup.com/CppLondon/events/279711703/ Continuous delivery at speed is essential but equally important is delivering high-quality software. Despite all of this, some critical testing and debugging steps still fall outside the automation process and are often handled manually. This introduces risk and unpredictability into the process. Join us as we demonstrate workflows and techniques to de...
Cool Compiler Tidbits - Matt Godbolt
zhlédnutí 927Před 2 lety
www.meetup.com/CppLondon/events/279711703/ We use compilers every day, but how often do we stop to think about the kinds of amazing things they do for us? Modern compilers are a feat of engineering and in this talk Matt will demonstrate just a few of the very clever things they do for you. Matt will use Compiler Explorer to show how simple, easy to read code can be turned into amazing optimized...
The price of dynamic memory in C/C++ - Ivica Bogosavljevic
zhlédnutí 646Před 3 lety
www.meetup.com/CppLondon/events/277750678/ For most C/C developers, working with dynamic memory comes down to using new/malloc and delete/free functions. However, when your program's speed is important, you will need to rethink the way you are using these functions and how you are organizing your data in memory. We will investigate how memory allocation and memory access patterns influence the ...
How to deal with tech debt - Lessons learned from 200+ engineering teams - Alex Omeyer
zhlédnutí 267Před 3 lety
www.meetup.com/CppLondon/events/277750678/ I have interviewed 200 top engineering teams to learn the perfect process to manage technical debt. In this talk, I will share my learnings: tactics, processes, and tools to use when dealing with small, medium, and large pieces of tech debt, and the approach you can take depending on your company’s stage, size, business priorities, and culture.
The Compound Block "LOOP" - and some implications - Frank Haferkorn
zhlédnutí 143Před 3 lety
www.meetup.com/CppLondon/events/276266931/ The compound group "LOOP" is a C / C language extension.. The introduced compound statements loop() {}, typed_loop() {}, named_loop_up() {} and named_loop_down() {} are reductions of the regular for(;;){} compound. They will allow writing different algorithms and will increase teachability of C/C .
Conan Package Manager for C++ in Practice - Jerry Wiltse
zhlédnutí 1,2KPřed 3 lety
Conan Package Manager for C in Practice - Jerry Wiltse
Dmitri Goloubentsev - "Supercharging HPC for OO Languages"
zhlédnutí 182Před 3 lety
Dmitri Goloubentsev - "Supercharging HPC for OO Languages"
Pavel Novikov - "Understanding Coroutines by Example" - C++ London
zhlédnutí 8KPřed 3 lety
Pavel Novikov - "Understanding Coroutines by Example" - C London
Eduardo Madrid - "Type-Erasing the Pains of Runtime Polymorphism: The Practical Part" - C++ London
zhlédnutí 1,2KPřed 3 lety
Eduardo Madrid - "Type-Erasing the Pains of Runtime Polymorphism: The Practical Part" - C London
Roi Barkan - "Argument passing, core guidelines and concepts" - C++ London, December 2020
zhlédnutí 225Před 3 lety
Roi Barkan - "Argument passing, core guidelines and concepts" - C London, December 2020
C++ && Rust : "FCE: using interface types for server-side WebAssembly modules" - Mikhail Voronov
zhlédnutí 442Před 3 lety
C && Rust : "FCE: using interface types for server-side WebAssembly modules" - Mikhail Voronov
C++ && Rust : "Access All Arenas" - James Munns
zhlédnutí 2,6KPřed 3 lety
C && Rust : "Access All Arenas" - James Munns
Are Graphs Hard in Rust? - Payas Rajan
zhlédnutí 2,5KPřed 3 lety
Are Graphs Hard in Rust? - Payas Rajan
A Friendly Introduction to Rust - Henrik Niemeyer
zhlédnutí 1,2KPřed 3 lety
A Friendly Introduction to Rust - Henrik Niemeyer
C++ && Rust Ldn - Sept 2020 - Intro
zhlédnutí 381Před 3 lety
C && Rust Ldn - Sept 2020 - Intro
"'tag_invoke' - An Actually Good Way to Do Customization Points" - Gašper Ažman
zhlédnutí 3,4KPřed 3 lety
"'tag_invoke' - An Actually Good Way to Do Customization Points" - Gašper Ažman
How To Improve Exception Throwing
zhlédnutí 245Před 3 lety
How To Improve Exception Throwing
Pavel Novikov: "Coroutines + Type Erasure = State Machine"
zhlédnutí 604Před 3 lety
Pavel Novikov: "Coroutines Type Erasure = State Machine"
Jarl Ostensen - "Lessons learned for best C and C++ practices in a live production code base"
zhlédnutí 347Před 4 lety
Jarl Ostensen - "Lessons learned for best C and C practices in a live production code base"
Hana Dusíková - "Compile Time Regular Expressions with Deterministic Finite Automaton"
zhlédnutí 158Před 4 lety
Hana Dusíková - "Compile Time Regular Expressions with Deterministic Finite Automaton"

Komentáře

  • @joe_hoeller_chicago
    @joe_hoeller_chicago Před měsícem

    Graphs are driven by graph theory in mathematics. These math formulas that are specific to graph types (Bipartate graph, DAGs, etc) can be recreated in any programming language.

  • @Ash-qp2yw
    @Ash-qp2yw Před měsícem

    A really fun talk - I want to try a small personal project in asm at some point, although it's relatively overwhelming to look at

  • @aniketbisht2823
    @aniketbisht2823 Před měsícem

    9:30 Class invariants are something that the implementer of the class guarantees and the user of the class assumes to be true. So if there is a "violation" of class invariant then it's a bug in class implementation. The user need not "worry" about messing the class invariant. They only need to ensure that the pre-conditions of the class method they are calling are satisfied. 9:17 If you are "messing up the class invariant through reinterpret_cast", you're most likely invoking undefined behaviour by violating pre-conditions of some core-language feature.

  • @sanjaygatne1424
    @sanjaygatne1424 Před měsícem

    Poor sound quality.

  • @vladp72
    @vladp72 Před měsícem

    Thanks for the great summary of where the feature is. I am wondering if we should split pre/postconditions that are thread safe vs non-thread safe. For example, if pre/post conditions reference a private variables and implementation of that class takes care of locking inside method definition then evaluating pre/postconditions during runtime will result in UB since it will be happening outside of the scoped lock declared in the function's definition. That would mean we can never enable run time checks on multithreaded programs. If we can split preconditions that are thread safe, then we can enable a subset of pre/postconditions.

    • @vladp72
      @vladp72 Před měsícem

      Never mind, around 1:03 Timur made a comment that acquiring lock in pre/post is allowed.

  • @milasudril
    @milasudril Před měsícem

    Hmm, virtual functions are just function pointers under the hood. if you solve it for function pointers, you should get it for virtual functions for free, so maybe you should try to extend the facility that you are working on for virtual functions, so you can have it on function pointers as well.

  • @Voy2378
    @Voy2378 Před 2 měsíci

    underwater audio

    • @tiranito2834
      @tiranito2834 Před 2 měsíci

      HD audio is still being debated by the standard committee and won't be introduced in the standard until at least C++29

    • @ABaumstumpf
      @ABaumstumpf Před měsícem

      @@tiranito2834And then they will decide on an obscure codec not in use since the 90s with 5:3 and 123p as the default resolution with 7bit mono audio.

    • @kodirovsshik
      @kodirovsshik Před měsícem

      @@tiranito2834🤣

    • @embeddor3023
      @embeddor3023 Před měsícem

      -underwater- dogwater audio

  • @chomandengnya
    @chomandengnya Před 4 měsíci

    1:34 Thanks for clarifying vocabulary types! Every discussion of vocabulary types I’ve seen somehow only mentions optional and variant

  • @cppmsg
    @cppmsg Před 7 měsíci

    Good talk. I have searched for the slides, anyone know where they are?

  • @cppmsg
    @cppmsg Před 7 měsíci

    I googled for >>john lakos std::vector::at()<< but found nothing that contained a reference to at(). I did find a very recent 74-page document. Is that what was is being referenced at 29:19

  • @cppmsg
    @cppmsg Před 7 měsíci

    Is this the talk he refers to in the beginning? czcams.com/video/QbffGSgsCcQ/video.html

  • @agni8840
    @agni8840 Před 9 měsíci

    i like it !!! moving to rust from js myself

  • @howardlevitt3641
    @howardlevitt3641 Před rokem

    ✨ 'promosm'

  • @Roibarkan
    @Roibarkan Před rokem

    22:06 Dave Watson’s talk: czcams.com/video/_Ivd3qzgT7U/video.html

  • @denisyaroshevskiy5679

    Hi! If you find the sound quality difficult on the ear - here is the previous iteration of this talk: czcams.com/video/d6NcnyXjc3I/video.html I don't think I can post a link to the slides without CZcams blocking me but you can find them on my github in presenations repo

    • @clondon3897
      @clondon3897 Před rokem

      Thanks Denis. I've added a link to your slides in the description. I think we fixed your mic a bit too close, so it does distort a bit. Still understandable, though.

  • @inraid
    @inraid Před 2 lety

    rambling and disorganized

  • @kylcho5239
    @kylcho5239 Před 2 lety

    I think so called Niebloids and CPOs are different entities to solve different types of problems. Niebloids (called entities in the std::ranges in the standard?) is to inhibit ADL when using in unqualified and CPOs internally rely on ADL. Right now the only way to implement Niebloids without a new language feature is to use function objects. Due to using function objects and dealing with ADL, these two are seemingly same/equivalent but not. So in the future, people can come up with new ideas(e.g., new language feature) to implement Niebloids not using function objects.

  • @SamWhitlock
    @SamWhitlock Před 2 lety

    11:21 I know this is a simplification in the presentation, but this needs to be `return { coroutine_handle<Promise<T>>::from_promise(*this); }`. That effectively does the same thing, but it returns the coro handle (which the Task needs to hang on to as a member variable to preserve the coro).

    • @PaulSkeptic
      @PaulSkeptic Před 2 lety

      That's the other way to implement it. Coroutine handle and reference to promise are basically synonyms: having one you can trivially get the other (unless the coroutine handle is type erased like this: *std::coroutine_handle<>* ). In this case it was easier to use a pointer to promise instead of coroutine handle since *Promise* exposes functionality that the *Task* implementation can access directly without converting a coroutine handle to a reference to promise every time.

    • @SamWhitlock
      @SamWhitlock Před 2 lety

      @@PaulSkeptic Ah yes this makes sense. I'm still rewatching this presentation every week or so to learn a little more each time :D

  • @SamWhitlock
    @SamWhitlock Před 2 lety

    10:12 shouldn't this custom deleter also call `delete on the Promise pointer too?

    • @PaulSkeptic
      @PaulSkeptic Před 2 lety

      Promise "lives" inside the coroutine frame, so calling *.destroy()* on the coroutine _handle_ effectively destroys the coroutine frame _and_ the promise, freeing all the resources used by the coroutine.

  • @kwitee
    @kwitee Před 2 lety

    The version with 8 partial accumulators will produce a faster AND more accurate sum, but the compiler has not been told to produce an accurate sum, just THIS sum. Careful what you ask for!

  • @iliasazizi6633
    @iliasazizi6633 Před 2 lety

    Did you use any optimizer while running the experiments ?

  • @MaceUA
    @MaceUA Před 2 lety

    12:50 - can we just write `U&&` instead of that complex `decltype(...)` expression?

    • @PaulSkeptic
      @PaulSkeptic Před 2 lety

      Yes, you absolutely can. Expression inside decltype is just a copypaste of the expression in initialization.

  • @FindecanorNotGmail
    @FindecanorNotGmail Před 3 lety

    The combination of accent and audio compression makes the talk unintelligible for me without reading the slides at the same time. CZcams's system tried to capture captions in Russian... which of course failed.

  • @PaulDiracTWR
    @PaulDiracTWR Před 3 lety

    Thank you for the lecture.

  • @w-mwijnja8919
    @w-mwijnja8919 Před 3 lety

    I very much enjoyed your Robert C. Weide joke at the beginning! :-D

  • @yotty97
    @yotty97 Před 3 lety

    wtf are you YELLING in this talk? just talk gently, stop being hysterical ffs, calm down

  • @yotty97
    @yotty97 Před 3 lety

    anyonoe else find rust programmers so smug and condescending? i cant stand them

    • @alejandroagua5813
      @alejandroagua5813 Před 3 lety

      Would be funny if Rust turns out to be an industry flop (somewhat like Ruby in 2010), and Javascript, Java, and Python continue to rule the world. People will remember them "oh those have-beens Rustacean wisenheimers..."

    • @CuriousCauliflowerX
      @CuriousCauliflowerX Před 3 lety

      really? compared to the ever-present c++ mantra of "this feature is for library developers, you shouldn't understand it"?

    • @yotty97
      @yotty97 Před 3 lety

      @@CuriousCauliflowerX that's not out of smugness, it's because c++ is an enormous and complicated language with decades of cruft

  • @Roibarkan
    @Roibarkan Před 3 lety

    Link to the slides: docs.google.com/presentation/d/1TWugFU1AQVT_tGcjOyWICtu1CHLLem6_Z9fDpK-GnYo/preview?rm=minimal

  • @DavidFreeseLee
    @DavidFreeseLee Před 3 lety

    Was very confused. Assumed this was a talk on arena allocators.

  • @heater5979
    @heater5979 Před 3 lety

    A great presentation. Thanks. With regard the performance of Rust, in my first year of Rust have been able to match the speed of C/C++ in all the little programs of mine that I reimplemented in Rust for exactly this comparison. Most of those C/C++ programs were performance leaders in various coding challenges I have been involved in. BUT: The performance of Rust can be very sensitive to the way you write your Rust, even for the same algorithm. For example using good old fashioned C style array indexing vs Rust style iterators. It's not always clear which will be better at the outset. As usual, measure everything.

  • @heater5979
    @heater5979 Před 3 lety

    Nobody told me graphs were hard in Rust. Over a recent rainy weekend afternoon I just implemented one. It generates graphs of 20 vertices of valance 3 and 30 edges, randomly connected. And then does some traversal around the graph. It could easily be much bigger. These graphs are as per the famous old "Hunt the Wumpus" game from the early days of Unix. Being an old school C programmer who avoids malloc as much as possible my Rust graph was created as elements of Vectors. The links simply being indices to other elements. No worries with the borrow checker there :) Great talk by the way. Thanks.

    • @pragmacpp5518
      @pragmacpp5518 Před 2 lety

      Can you share your code via gist?

    • @RD-fb6ei
      @RD-fb6ei Před rokem

      Ok. Now try a doubly linked list, using your same vector backed method. You see the issue? You fuck up the time complexity. Like everything in rust, it’s not actually zero overhead, the compiler just forces YOU to add the overhead by disallowing everything under the sun.

    • @heater5979
      @heater5979 Před rokem

      @@RD-fb6ei I don't think so. If you really want to write a doubly linked list using good old fashioned raw pointers you can do it. Did you hear of the "unsafe" keyword? Personally I have never used the "unsafe" keyword, and yet on my road to learning Rust I found myself recreating little programs in Rust that I had in C already. In all cases performance matched or surpassed that of C. If it had not I would not have continue pushing Rust.

  • @iikjjpp
    @iikjjpp Před 3 lety

    The technique is super neat. 54:43 "let's have **one** Niebloid". Why not zero? stackoverflow.com/questions/63818871/why-does-tag-invoke-pattern-need-the-niebloid-stdtag-invoke-at-all

  • @think2086
    @think2086 Před 3 lety

    Thanks for this hard to find information. This video is a "milestone" test in understanding, I believe. I.e., the ideas referenced in the video are in themselves quite difficult and educational. You will (unless you're in the standards club or whatever) need to pause and take multiple days to study the various aspects. My rule is that I'm not allowed to not know a piece of vocabulary in English, so I always stop to look up words and phrases until I know them. You can do the same for C++. Eventually, if you can get through the entire video in one setting without pausing or rewinding, in real time, and fully understand all of it, it will serve as a sort of mega test in modern C++ understanding. It's one of *those* kinds of courses. It sort of demands you go back and learn all this other older (and also cutting edge) stuff you didn't know you didn't know. One small suggestion, consider renaming Problem #5 "Extension problem" instead of "Adaptation problem." This whole thing is adaptation, and it's a bit confusing with #3. Realizing you're talking about EXTENDING something helps.

  • @spazzatour
    @spazzatour Před 3 lety

    For those who want to jump over the premises, the actual talk about tag_invoke starts at 52:45

  • @think2086
    @think2086 Před 3 lety

    Maybe change `shout("Come in, it's open!");` to `shout("Come in, it's unlocked.");` Right now, it's confusing haha. The state is CLOSED, not open. The door isn't open. It's unlocked.

  • @goodvilhunting
    @goodvilhunting Před 4 lety

    Brilliant

  • @PrashantKumar-nr6ou
    @PrashantKumar-nr6ou Před 4 lety

    why did he rate SRP 2 at 31:27 .How does changing the implementation(not signature) of circle's draw() affect triangle's draw()?

    • @MUCplusplus
      @MUCplusplus Před 4 lety

      The SRP is about separating concerns, i.e. separating the things that don't really belong together. The draw() aspect does not belong to the circle. It creates (artificial) dependencies by coupling the implementation details of drawing to the Circle class. For instance, there could be a dependency on the OpenGL library (if that is chosen as the means to draw a circle). This dependency limits reusability (you always have to drag along the dependency to OpenGL) and testability (you always need to have OpenGL available for testing) and thus justifies the rating of 2. That is one of the reasons for choosing the strategy design pattern later in the talk. It helps to extract the implementation details and to remove the dependencies on the implementation details.

  • @gauravsharma-dy7pv
    @gauravsharma-dy7pv Před 4 lety

    thanka for your kind effort for putting this video on CZcams

  • @gauravsharma-dy7pv
    @gauravsharma-dy7pv Před 4 lety

    hi c++ london please add more videos

    • @clondon3897
      @clondon3897 Před 4 lety

      Hi Gaurav, thanks for watching. Most of the videos for C++ London events are hosted by SkillsMatter: skillsmatter.com/groups/10709-c-plus-plus-london#past_events