September 2023

CppCon 2023 How to Build and Deploy Your First C++ Automated Refactoring Tool -- Kristen Shaker

Registration is now open for CppCon 2023! The conference starts on October 1 and will be held in person in Aurora, CO. To whet your appetite for this year’s conference, we’re posting some upcoming talks that you will be able to attend this year. Here’s another CppCon future talk we hope you will enjoy – and register today for CppCon 2023!

How to Build and Deploy Your First C++ Automated Refactoring Tool

Wednesday, October 4 • 16:45 - 17:45

by Kristen Shaker

Summary of the talk:

Your company is large; You have a lot of C++ code and a lot of engineers writing C++, but you have a limited number of C++ experts. How do you ensure new developers follow C++ best practices and your company’s style guide? How can you scale the knowledge of your C++ experts as your company and code base grows?

Clang provides a rich assortment of tools that can proactively identify and improve problematic code. What are these tools? How can you use them?

This talk introduces the fundamentals of clang refactoring capabilities and discusses their practical applications as they relate to your code base, ensuring only correct, idiomatic C++ lands without excessive toil.

Highlighting the program for Meeting C++ 2023

The first version of the schedule of Meeting C++ 2023 is live!

Highlighting the program for Meeting C++ 2023

by Jens Weller

From the article:

While there is still some changes coming, I wanted to highlight the released schedule of Meeting C++ 2023. The conference it self is less than 2 months away (12th - 14th November).

The program will feature 3 keynotes (1 per day) by Kevlin Henney, Lydia Pintscher and Ivan Čukić...

CppCon 2023 Object Introspection: A Revolutionary Memory Profiler for C++ Objects -- Haslam/Sarwade

Registration is now open for CppCon 2023! The conference starts on October 1 and will be held in person in Aurora, CO. To whet your appetite for this year’s conference, we’re posting some upcoming talks that you will be able to attend this year. Here’s another CppCon future talk we hope you will enjoy – and register today for CppCon 2023!

Object Introspection: A Revolutionary Memory Profiler for C++ Objects

Wednesday, October 4 • 15:15 - 16:15

by Jonathan Haslam and Aditya Sarwade

Summary of the talk:

This talk presents a new open source technology for the Linux platform that we have developed and deployed at Meta. It enables you to observe the precise memory footprint and composition of your C++ objects in live applications including their containers (even user-defined ones!) and all dynamic memory allocations. This is achieved with no code modification or recompilation using regular DWARF debug data.

We provide two different approaches for introspecting objects, (1) a profiler that operates on a target process and (2) APIs that allow you to introspect objects directly from within your application code. We describe the core technology underlying both mechanisms followed by details of how the two approaches work and how they can be used. We will give code examples demonstrating the types of efficiency improvements made in our C++ source base and demonstrate just how easy it is to make significant efficiency improvements in your code when you have the data in hand. As this technology is open source we hope it will inspire you to leave here fired up to introspect every object that is now in sight!

Understanding the detailed memory footprint of your C++ objects in live applications allows you to develop code to more efficiently utilize memory and CPU. Existing tools and techniques in this space are extremely thin on the ground and tend to be prohibitively intrusive for real world applications in production environments and provide partial information at best. We are on a mission to elevate the observability of data to the same level as code.

https://github.com/facebookexperimental/object-introspection

CppCon 2023 Coping With Other People's Code -- Laura Savino

Registration is now open for CppCon 2023! The conference starts on October 1 and will be held in person in Aurora, CO. To whet your appetite for this year’s conference, we’re posting some upcoming talks that you will be able to attend this year. Here’s another CppCon future talk we hope you will enjoy – and register today for CppCon 2023!

Coping With Other People's Code

Wednesday, October 4 • 16:45 - 17:45

by Laura Savino

Summary of the talk:

Sometimes we're fortunate enough to work with a small group of devs who share our coding values, and when we see their PRs come in, we nod along and say, "Yup, that's what I would have done. Oh, nice, that one's even better than my usual approach, I'd better tuck that idea away for next time."

This perfect alignment is precious... and particularly elusive in C++. Most of us are living in codebases that are profitable, complex, and updated in ways with which we have legitimate beef. How can we keep a sense of curiosity, progress, and satisfaction amidst patterns we would never have chosen?

This presentation explores the often-overlooked social aspects of C++ development, offering both practical tools and light-hearted commiseration. We'll draw from the field of behavior science to build strategies that address conflicting design patterns and the strong opinions that come with them.

CppCon 2023 Is std::mdspan a Zero-overhead Abstraction? -- Oleksandr Bacherikov

Registration is now open for CppCon 2023! The conference starts on October 1 and will be held in person in Aurora, CO. To whet your appetite for this year’s conference, we’re posting some upcoming talks that you will be able to attend this year. Here’s another CppCon future talk we hope you will enjoy – and register today for CppCon 2023!

Is std::mdspan a Zero-overhead Abstraction?

Wednesday, October 4 • 15:15 - 16:15

by Oleksandr Bacherikov

Summary of the talk:

C++23 introduces std::mdspan into the standard library as a view over multi-dimensional arrays. This talk will try to establish some of the best practices for using mdspan, and highlight subtleties to be aware of. Taking some basic matrix and image operations, we'll compare the generated assembly to low-level implementations similar to BLAS, and check if mdspan can be used in a way to avoid any overhead. We'll discuss how the results are affected by mdspan design decisions and ABI limitations.

Inside STL: The deque, implementation -- Raymond Chen

RaymondChen_5in-150x150.jpgNow that we understand the design behind the common STL dequeue implementations, we can peek into the implementation details.

Inside STL: The deque, implementation

By Raymond Chen

From the article:

All three of the major implementations of the standard library maintain an array of pointers to blocks, which they confusingly call a “map” even though it is unrelated to std::map. (Even more confusingly, gcc internally uses the term “node” instead of “block”.) Initially, all the pointers in the map are nullptr, and the blocks are allocated only on demand.

We will say that a block is spare if it contains only spare elements.

CppCon 2023 Embracing CTAD -- Nina Ranns

Registration is now open for CppCon 2023! The conference starts on October 1 and will be held in person in Aurora, CO. To whet your appetite for this year’s conference, we’re posting some upcoming talks that you will be able to attend this year. Here’s another CppCon future talk we hope you will enjoy – and register today for CppCon 2023!

Embracing CTAD

Wednesday, October 4 • 15:15 - 16:15

by Nina Ranns

Summary of the talk:

Class template argument deduction, or CTAD, is a C++17 feature that has divided the experts into those who consider it very helpful and those who wish it never came to be. What is it, how can it make your life easier, and what makes some wary of it ? We explore the answers to all these questions while covering the history and the current state of CTAD, so you too can form your own opinion on the subject.

CppCon 2023 A Case Study on Using std::future for Robot Drivers -- Anthony Baker

Registration is now open for CppCon 2023! The conference starts on October 1 and will be held in person in Aurora, CO. To whet your appetite for this year’s conference, we’re posting some upcoming talks that you will be able to attend this year. Here’s another CppCon future talk we hope you will enjoy – and register today for CppCon 2023!

Time Is of the Essence: A Case Study on Using std::future for Robot Drivers

Wednesday, October 4 • 15:15 - 16:15

by Anthony Baker

Summary of the talk:

When it comes to robot control software, timing is important. In this presentation, we will examine the trade-offs of an asynchronous approach to writing control software to interface with robot hardware, using modern c++ features, versus a synchronous one. The audience will be introduced to the widely used robot control framework for ROS(Robot Operating System) 2, ros2_control, and a couple of robot drivers utilizing it, one for the Robotiq 2f 85 gripper and one for the Kinova Gen3 robot arm. The presentation will feature quantitative benchmarking data to observe the performance of the asynchronous and synchronous approaches, as well as video examples of both approaches in action on the robot hardware.

CppCon 2023 Exploration of Strongly-typed Units: A Case Study from Digital Audio -- Roth Michaels

Registration is now open for CppCon 2023! The conference starts on October 1 and will be held in person in Aurora, CO. To whet your appetite for this year’s conference, we’re posting some upcoming talks that you will be able to attend this year. Here’s another CppCon future talk we hope you will enjoy – and register today for CppCon 2023!

Exploration of Strongly-typed Units: A Case Study from Digital Audio

Wednesday, October 4 • 14:00 - 15:00

by Roth Michaels

Summary of the talk:

API or math mistakes with units can cause problems ranging from a digital audio processing outputting silence to crashing your Mars rover—we’ll discuss real-life examples of both!

The combination of user-defined types, conversion operators/constructors, and operator overloading in C++ give us the tools to use strong-types and avoid unit mistakes; std::chrono is a great example of this that everyone should be using. Unfortunately, when dealing with units beyond time many developers still use primitive types encoding units in variable names or comments because the standard does not offer any tools for user-defined units.

In this talk we will look at the mp-units library which has been proposed for standardization in P1935 (A C++ Approach to Physical Units). We will look at the implementation of various units used in digital audio / DSP that go beyond “physical” units and what the experience is like to develop your own units with this library/proposal.

CppCon 2023 Applicative: The Forgotten Functional Pattern -- Ben Deane

Registration is now open for CppCon 2023! The conference starts on October 1 and will be held in person in Aurora, CO. To whet your appetite for this year’s conference, we’re posting some upcoming talks that you will be able to attend this year. Here’s another CppCon future talk we hope you will enjoy – and register today for CppCon 2023!

Applicative: The Forgotten Functional Pattern

Wednesday, October 4 • 14:00 - 15:00

by Ben Deane

Summary of the talk:

Monads get all the press. Functors are often presented as a prerequisite to monads. Applicative (functor) almost never gets mentioned. But it's massively useful - to the point where a lot of the time when we think about a "monadic interface" what we really want is an applicative interface.

This talk will put applicative in the limelight, showing how it works and why it's so powerful, with lots of examples grounded in code; there are no category theory diagrams in this talk. Attendees will come away with a solid understanding of the applicative pattern and its many uses. And as a byproduct, their opinions of monads will probably change too.

Optionals. Expected. Ranges. Futures. Parsing. Validation. Error Handling. Transforms. Functions themselves. These are all examples where thinking in terms of applicatives (and importantly, NOT just reaching for "a monadic interface") helps us write simpler, more composable code.

If you're kind of fuzzy about functors and monads, what's missing is probably the third piece of the puzzle: applicative.