CppCon 2024 Reflection Based Libraries to Look Forward To -- Saksham Sharma

Registration is now open for CppCon 2024! The conference starts on September 15 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 2024!

Reflection Based Libraries to Look Forward To

Tuesday, September 17 • 09:00 - 10:00 MDT

by Saksham Sharma

Summary of the talk:

The primary reason for your code to get bored is fatigue from repetitive instructions. You write down enums, but then you also have to write their stringified version, and you also have to write a function to map the strings to the enums. You write down a class, but you have to expose every method / member in the class separately to be able to bind your class to a Python program (for example).
Reflection is (potentially / hopefully) showing up for C++26, having already been forwarded from the SG7 subgroup on reflection / compile time programming to the LEWG and EWG. This talk will discuss everything there is so far on reflection, and we will lead up to three library ideas based on reflection:

Python bindings
ABI hashing (hashing a type for efficient compatibility checking)
A better std::any variant type with duck typing ��
Come attend this talk if you'd like to hear about cool new library possibilities that have opened up with reflection!

For background, we will look at a little bit of context and how reflection works in some other languages, and will explore how the P2996R1 paper’s proposed version of reflection looks in practice, with some real use-case inspired code.

 

Saksham Sharma is a Director of Quantitative Research Technology at Tower Research Capital LLC, a high frequency trading firm based out of New York. He develops low latency and high throughput trading systems and strategies used for the firm's global quantitative trading. In addition, he also helps design and improve big data research infrastructure used for trading research using a combination of C++ and Python. Thanks to an urge to optimize his daily workflow, he also owns the build systems, tooling, and package managers for C++ within his team.In the past, he has worked in the fields of program analysis research, functional programming, and systems security. He is a reformed geek (exemplified by a switch to VSCode after almost a decade with Emacs), and now enjoys driving, guitar, badminton, and snowboarding.

22 Common Filesystem Tasks in C++20 -- Bartlomiej Filipek

Filipek-22common.pngWorking with the filesystem can be a daunting task, but it doesn’t have to be. In this post, I’ll walk you through some of the most common filesystem operations using the powerful features introduced in C++17, as well as some new enhancements in C++20/23. Whether you’re creating directories, copying files, or managing permissions, these examples will help you understand and efficiently utilize the std::filesystem library.

22 Common Filesystem Tasks in C++20

by Bartlomiej Filipek

From the article:

Creating directories is a basic yet essential operation. The std::filesystem library makes this straightforward with the create_directory function.

Filipek-22common2.png

CppCon 2024 Taming the C++ Filter View -- Nicolai Josuttis

Registration is now open for CppCon 2024! The conference starts on September 15 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 2024!

Taming the C++ Filter View

Tuesday, September 17 • 16:45 - 17:45 MDT

by Nicolai Josuttis

Summary of the talk:

C++20 introduced "views" as easy-to-use building blocks for processing the elements and values of containers and ranges.
The filter view is one of the key views, because filtering collections of data to process only elements that satisfy a specific constraint or requirement is one of the most important use cases of dealing with ranges and views.

Unfortunately, the filter view is also one of the most surprising C++ standard views. Even for simple use cases, you can easily get:
- Unexpected functional behavior
- Surprising compile-time errors with cryptic error messages
- Fatal runtime errors (without even noticing them)

There are reasons for the design of the filter view. For a successful filtering of elements you should know and understand the design and all of its consequences.

The talk will demonstrate all the issues with simple real-work examples and explain both the motivation and consequences if this design in practice. Listen and learn aspects you would not expect but have to know when using the filter views and views in general.

 

Nicolai Josuttis (www.josuttis.com) is well-known in the community for his authoritative books and talks. For more than 20 years he has been a member of the C++ Standard Committee. He is the author of several worldwide best-sellers, including:- C++20: The Complete Guide- C++17: The Complete Guide- C++ Move Semantics: The Complete Guide- The C++ Standard Library: A tutorial and Reference- C++ Templates: The Complete Guide (w/ David Vandevoorde & Doug Gregor)

CppCon 2024 Implementing Ranges and Views -- Roi Barkan

Registration is now open for CppCon 2024! The conference starts on September 15 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 2024!

Implementing Ranges and Views

Wednesday, September 18 • 16:45 - 17:45 MDT

by Roi Barkan

Summary of the talk:

Since `ranges` were introduced to C++20, a new paradigm was presented to us C++ developers. This paradigm, [sequence oriented programming](https://cppcast.com/sequence_oriented_programming/) allows easy expression of useful algorithms, helps us decompose problems into smaller-clearer sub-problems and has the potential of increasing the readability and maintainability of solutions we develop to difficult problems.

Though rich and diverse, the set of tools in our `ranges` toolbox is at its infancy, and the robust design of the library makes it possible for us to extend it with algorithms and views on our own. Doing so can increase our productivity, enrich our vocabulary and also be fun and challenging.

In this talk I'll discuss the structure of the ranges library in terms of its main `concept`s and how it was designed to be extensible (especially as on C++23).

We will focus on the implementation `range views`, and go over several examples of how new views which aren't part of the standard should be designed and implemented, in a way that fits with the rest of the `ranges` library.

Join me in the development of range adapters as we learn about range categories, concepts, adapters, customization-point-objects and range-adapter-closures.

 

Professional software developer and architect since 2000, Roi's main focus throughout his career was on high performance and distributed systems, implementing complex and innovative algorithms. Roi is the SVP technologies of Istra Research, where he helps creating low latency financial systems. Prior to working for Istra Research, Roi spent 12 years in software development, architecture and management in the IT Security field. Roi received his B.A in Computer Science with high honors from the Technion in Israel, and his executive MBA from Tel Aviv University.

CppCon 2024 C++/Rust Interop: Using Bridges in Practice -- Tyler Weaver

Registration is now open for CppCon 2024! The conference starts on September 15 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 2024!

C++/Rust Interop: Using Bridges in Practice

Friday, September 20 • 10:30 - 11:30 MDT

by Tyler Weaver

Summary of the talk:

A practical guide to bridging the gap between C++ and Rust. We cover bindings, including a manual approach, and compare them with generated bindings using CXX.  We also show how to link CMake with Cargo and link with transitive C++ dependencies using Conan.

 

Tyler Weaver has been writing C++ for 10 short years in multiple domains. He's worked on signal processing, robotics, and now back-end web development at SciTec.

C++ programmer's guide to undefined behavior: part 3 of 11

Your attention is invited to the third part of an e-book on undefined behavior. This is not a textbook, as it's intended for those who are already familiar with C++ programming. It's a kind of C++ programmer's guide to undefined behavior and to its most secret and exotic corners. The book was written by Dmitry Sviridkin and edited by Andrey Karpov.

C++ programmer's guide to undefined behavior: part 3 of 11

by Dmitry Sviridkin

From the article:

This program, built by GCC 10.1, -std=c++20 -O3, doesn't crash, but it doesn't output anything either. If we take GCC 14.1 and the same keys, we suddenly get "helloworld" in the output. It's old but gold undefined behavior.

CppCon 2024 Irksome C++ -- Walter E Brown

Registration is now open for CppCon 2024! The conference starts on September 15 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 2024!

Irksome C++

Thursday, September 19 • 16:45 - 17:45 MDT

Walter E Brown

Summary of the talk:

As much as I like C++, it is certainly not free of -- let's say -- quirks.  Both the core language and the standard library exhibit idiosyncracies, sometimes even in conflict with one another.

Some of these "oops" may be historical in origin.  However, most are due to the spectrum of viewpoints held by the hundreds of contributors who have participated in C++ standardization to date.

This talk points out many of these inconsistencies and numerous other infelicities in naming, behavior, or both.  Come see whether *your* pet C++ peeve is mentioned!

 

With broad experience in industry, academia, consulting, and research, Dr. Walter E. Brown has been a computer programmer for almost 60 years, and a C++ programmer for more than 40 years.He joined the C++ standards effort in 2000, and has since written circa 175 proposal papers. Among numerous other contributions, he is responsible for introducing such now-standard C++ library features as cbegin/cend, common_type, gcd/lcm, void_t, and ’s mathematical special functions, as well as the headers and . He has also significantly impacted such C++ core language features as alias templates, contextual conversions, variable templates, static_assert, and operator (the C++20 “spaceship operator”).When not playing with his grandchildren, Dr. Brown continues as an Emeritus participant in the C++ standards process and as a frequent speaker at C++ conferences and meetups worldwide.

CppCon 2024 Building Cppcheck - What We Learned from 17 Years of Development -- Daniel Marjamäki

Registration is now open for CppCon 2024! The conference starts on September 15 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 2024!

Building Cppcheck - What We Learned from 17 Years of Development

Wednesday, September 18 • 09:00 - 10:00 MDT

by Daniel Marjamäki

Summary of the talk:

Cppcheck has been evolving for 17 years, guided by a clear philosophy: minimal false positives and ease of use. This presentation will share the insights we've gained during its development. Our approach to easy configuration is a double-edged sword, providing user-friendly setup while occasionally leading to lower recall. We maintain a strict definition of false positives, ensuring the tool does not warn about well-written, functional code. This principle, while challenging, drives us to fix rather than suppress false positives. A core philosophy of Cppcheck is to learn from mistakes. When an issue is identified, we strive to implement checkers to prevent similar mistakes in the future.

The open-source community plays a crucial role in Cppcheck's evolution. We collaborate to enhance the tool, scanning large codebases like Debian's source code to identify inconsistent or dangerous code and measure false positives. We also explore how abstractions, compiler annotations, and contracts can improve SCA tools' precision and performance. This talk will provide a comprehensive look at the lessons learned and the continuous improvement of Cppcheck.

 

Daniel Marjamäki is a software engineer from Sweden and the author of Cppcheck, a static analysis tool for C/C++ code. He created Cppcheck to help developers find bugs and improve code quality. Thanks to his work, Cppcheck has become a widely used tool in the programming community. Marjamäki is known for his contributions to improving software development practices.

CppCon 2024 Data Is All You Need for Fusion -- Manya Bansal

Registration is now open for CppCon 2024! The conference starts on September 15 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 2024!

Data Is All You Need for Fusion

Monday, September 16 • 16:45 - 17:45 MDT

by Manya Bansal

Summary of the talk:

Functions are the fundamental unit of interoperability in software design: users write applications by composing functions provided by various libraries. However, naive function composition can result in poor performance due to memory overheads that exist at function boundaries. Operator fusion --- combining the execution of several operators into one operator --- is a well-known technique to combat this overhead. Previous solutions to add fusion rely on complex, monolithic compilers and languages that force performance engineers to rediscover old solutions in new ecosystems, leading to decades of performance engineering work going underutilized. In this work, I attempt to identify the minimal ingredients required to enable fusion on top of existing library interfaces. In doing so, I propose a lightweight enrichment of function interfaces that exposes data production and consumption patterns of functions. I show how to implement these ideas in C++ and demonstrate the benefits of my system by showing that it is competitive with state-of-the-art high-performance libraries, and that it can fuse across library boundaries for unforeseen workloads.
 

Manya is a computer science PhD student at MIT, advised by Saman Amarasinghe and Jonathan Ragan-Kelley. Before starting her PhD, she studied Mathematics at Stanford University, and worked with Fredrik Kjolstad and Dawson Engler. Manya is interested in designing extensible and productive languages and tools for heterogeneous systems.

Trip Report: C++ On Sea 2024 -- Sandor Dargo

SANDOR_DARGO_ROUND.JPGI had the privilege to attend and present at C++ on Sea 2024 for the 5th time in a row!

Trip Report: C++ On Sea 2024

by Sandor Dargo

From the article:

The conference had a very strong start. Right after the keynote by Dave Abrahams, 4 incredible speakers were on stage at the same time on the 4 different tracks. Jason Turner, Walter E Brown, Nico Josuttis, Mateusz Pusz…

 

If a conference could have these people throughout the whole program, it would already be a strong conference. C++ On Sea proposed such a strong line-up that these people could be scheduled at the same time. It didn’t make my decision easier, so I chose based on the topic, and I wanted to grow my knowledge on constexpr so I stayed in the main() room.