Video & On-Demand

CppCon 2022 endnote video posted: "Can C++ be 10x simpler and safer ... ?" -- Herb Sutter

The second video from CppCon 2022 has now been posted:

CppCon 2022 talk is online: “Can C++ be 10x simpler & safer ... ?”

by Herb Sutter

From the post:

It was great to see many of you at CppCon, in person and online! It was a really fun conference this year, and the exhibitor hall felt crowded again which was a good feeling as we all start traveling more again.

The talk I gave on Friday is now on YouTube. In it I describe my experimental work on a potential alternate syntax for C++ (aka ‘syntax 2’ or Cpp2 for short) and my cppfront compiler that I’ve begun writing to implement it...

Serialization with Boost.Serialization -- Richard Thomson

Utah C++ Programmers has released a new video:

Serialization with Boost.Serialization

by Richard Thomson

From the video description:

Many times you need a stable, versioned, archivable representation of your internal data structures. Serialization is one means of achieving this goal. Serialization is often used with REST APIs as a means of conveying data structures into and out of your application. XML and JSON formats are commonly used to encode your data structure. But serialization often is not just a data format.

How do you represent different versions of your data structures as they evolve over time? How do you ensure that old versions of your data structures interoperate with new versions of your data structures and vice-versa? While interoperability and backwards compatibility are an application responsibility, versioning itself is something you want from your serialization layer.

This month, Richard Thomson will give us an introduction to serialization via the Boost.Serialization library, one of the older and more mature boost libraries having first been contributed to Boost in 2002.

https://www.youtube.com/watch?v=YmEPMFMP7TE

CopperSpice: Is Virtual Of Value?

New video on the CopperSpice YouTube Channel:

Is Virtual Of Value

by Barbara Geller and Ansel Sermersheim

About the video:

Virtual methods have a specific meaning in C++. Are virtual destructors the same? Where does virtual have no meaning? Can using virtual cause UB? Watch our new video and find out if you really know the difference between delete and destroy.

Please take a look and remember to subscribe!

Adding a REST API with Pistache -- Richard Thomson

Utah C++ Programmers has released a new video:

Adding a REST API with Pistache

by Richard Thomson

From the video description:

Many times you need to integrate your C++ infrastructure with services written in other languages on other machines from other teams. In the past, this might have been accomplished with custom RPC (remote procedure call) networking services that exposed resource data in your application to authorized clients.

HTTP REST (representational state transfer) APIs have become a common architectural pattern for exposing resource data across the network. With SSL/TLS (secure socket layer/transport layer security) connections and the HTTPS protocol, the client/server exchange can be secured. Authentication can be implemented with a session mechanism or the built-in authentication mechanisms in HTTP itself.

This month, Richard Thomson will give us an introduction to pistache, a high-performance REST toolkit written in C++. After an overview of the library, we'll look at what it takes to implement an HTTP server that responds to resource requests.

https://www.youtube.com/watch?v=9BCO5W_Kw3Q

Lessons Learned from Packaging 10,000+ C++ Projects - Bret Brown & Daniel Ruoso - CppCon 2021

Registration is now open for CppCon 2022, which starts on September 11 and will again be held both in person and online. To whet your appetite for this year’s conference, we’re posting videos of some of the top-rated talks from last year’s conference. Here’s another CppCon talk video we hope you will enjoy – and why not register today for CppCon 2022 to attend in person, online, or both!

Lessons Learned from Packaging 10,000+ C++ Projects

by Bret Brown & Daniel Ruoso

Summary of the video:

At Bloomberg, we maintain a system that coherently builds and integrates more than 10,000 C++ packages that are maintained independently by thousands of software engineers on hundreds of teams across our Engineering department. In this talk, we will go over the lessons we have learned about maintaining these packages, as well as how package management should interact with third-party libraries, third-party tools, build systems, IDEs, static analysis tools, and refactoring automation. We hope this will start a conversation around the potential requirements for a more complete package management solution in the C++ ecosystem.

Exceptional C++ - Victor Ciura - CppCon 2021

Registration is now open for CppCon 2022, which starts on September 11 and will again be held both in person and online. To whet your appetite for this year’s conference, we’re posting videos of some of the top-rated talks from last year’s conference. Here’s another CppCon talk video we hope you will enjoy – and why not register today for CppCon 2022 to attend in person, online, or both!

Exceptional C++

by Victor Ciura

Summary of the video:

When writing code we usually focus our attention on the happy paths - that’s where the interesting stuff happens. But there are also plenty of exciting things happening on the error handling flow, too. Although not universally loved/used, exceptions are a powerful mechanism of maneuvering execution on the unhappy path.

Even if std::exception and related machinery are not your cup of tea, you might care about hardware faults or OS signals like access violations, page errors, ALU overflows.

Let’s take a deep dive and explore what happens when an exception occurs, both at the application level and the OS level. We’ll explore the unwind process, the compiler generated code, the CRT hooks available and other exception internals. As we’re taking the scenic Windows route, we’re also going to encounter async exceptions (structured exceptions) on our quest for a better crash. We’ll poke into these mechanisms and see how we can leverage them in our application error handling. Did I mention threads? Routing exceptions between threads… oh my!

Design and Implementation of Highly Scalable Quantifiable Data Structures - CppCon 2021--Victor Cook

Registration is now open for CppCon 2022, which starts on September 11 and will again be held both in person and online. To whet your appetite for this year’s conference, we’re posting videos of some of the top-rated talks from last year’s conference. Here’s another CppCon talk video we hope you will enjoy – and why not register today for CppCon 2022 to attend in person, online, or both!

Design and Implementation of Highly Scalable Quantifiable Data Structures in C++

by Victor Cook

Summary of the video:

Architectural imperatives due to the slowing of Moore's Law, the broad acceptance of relaxed semantics and the O(n!) worst case verification complexity of generating sequential histories motivate a new approach to concurrent correctness. Quantifiability is proposed as a novel correctness condition that models a system in vector space to launch a new mathematical analysis of concurrency. Analysis is facilitated with linear algebra, better supported and of much more efficient time complexity than traditional combinatorial methods.

In this talk, we present the design and implementation of a lock-free quantifiable stack (QStack) and a lock-free quantifiable queue (QQueue) in the C++ programming language. Our design achieves lock-freedom using compare_exchange_strong from the C++17 Atomic Operations Library. We depict several code snippets that illustrate how quantifiable data structures are highly scalable through use of relaxed semantics, an explicit implementation trade-off permitted by quantifiability. We explain how to reason about the correctness of quantifiable data structures and present a technique and a dynamic analysis tool developed in C++ for efficiently verifying a concurrent history as quantifiably correct, referred to as Vector Space Verification (VSV). We illustrate why it is impractical to use alternative verification techniques that compare concurrent histories to sequential histories for determining correctness for real programs.

We showcase the performance of quantifiable data structures by presenting a live demonstration that runs the QStack and QQueue and plots the results in real time. The QStack is compared with the lock-free Elimination Backoff Stack and the lock-free Treiber stack. The QQueue is compared with the lock-free LCRQ, and the wait-free Fetch-And-Add queue. The live performance demonstration illustrates how the QStack and QQueue achieve substantially higher scalability than the state-of-the-art linearizable counterparts. We also present a live demonstration of our VSV tool to dynamically check a concurrent history for the QStack and QQueue as quantifiably correct in less than O(n^2) time.

Data Orientation For The Win! - Eduardo Madrid - CppCon 2021

Registration is now open for CppCon 2022, which starts on September 11 and will again be held both in person and online. To whet your appetite for this year’s conference, we’re posting videos of some of the top-rated talks from last year’s conference. Here’s another CppCon talk video we hope you will enjoy – and why not register today for CppCon 2022 to attend in person, online, or both!

Data Orientation For The Win!

by Eduardo Madrid

Summary of the video:

C++ conferences have had presentations showing the important performance benefits of data-oriented design principles; however, the principles seem to require lots of "manual" effort and "code uglification"; these make the principles less practical, and there haven't been clear recommendations about how to deal with runtime-polymorphic types.

In this talk we will recapitulate on data orientation principles and their benefits showing their application through production-strength Generic Programming components made to support them.

Specific examples include:
1. Structures of arrays instead of arrays of complex structures (a.k.a. "scattering")
2. Support for data oriented designs for runtime-polymorphism without inheritance+virtual (the equivalent of using std::variant or std::function, but generalized as allowed by the Zoo type-erasure framework)
----1. Hybrid buffers: the equivalent of the virtual table pointer is scattered out of the objects solving the "Goldilocks problem" of how big the local buffer should be, objects occupy the available space optimally
----2. Easy (de)serialization through very easy relocatability
----3. Voiding the need for pointers in favor of indices into arrays

Configuration, Extension, Maintainability - Titus Winters - CppCon 2021

Registration is now open for CppCon 2022, which starts on September 11 and will again be held both in person and online. To whet your appetite for this year’s conference, we’re posting videos of some of the top-rated talks from last year’s conference. Here’s another CppCon talk video we hope you will enjoy – and why not register today for CppCon 2022 to attend in person, online, or both!

Configuration, Extension, Maintainability

by Titus Winters

Summary of the video:

Configurability should be considered a potential design smell, especially for systems and interfaces that will be in use for a long time. As an unfortunate result, “No, please don’t add that feature” must be a viable response to design proposals - just because a change can be made doesn’t mean it should. This is particularly challenging to square with a customer-focused product mindset: it’s hard to balance between long-term needs and immediate “the customer is always right.”

Providing options and toggles to configure settings gives users more freedom, but those settings become stale and brittle almost immediately, and regularly wind up pessimizing overall efficiency results. This is particularly true of rarely-used forms of extensibility and configuration. Of course, whatever sort of optionality and customization you provide will be hard to ever undo, because of Hyrum’s Law.

At the root of it, there is a fundamental tension between customization, extensibility, configuration vs. centralization, efficiency, and evolvability, and this tension needs to be considered when you are evaluating whether to add new customization and extensibility options. This talk will address some of the basic ways that design and invariants interact with long-term maintenance and optimization, and some heuristics for deciding whether adding a knob will turn out to be a mistake.