CppCon 2024 Shared Libraries and Where to Find Them -- Luis Caro Campos

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!

Shared Libraries and Where to Find Them

Tuesday, September 17 • 14:00 - 15:00 MDT

by Luis Caro Campos

Summary of the talk:

Most C++ developers are familiar with the type of errors that arise when a shared library is not found. If they are really unlucky, they are have also faced a situation where the the wrong version of a library is loaded. However, a lot of us resort to suboptimal solutions just to get going, without fully addressing the root causes.

A lot of the time, we focus on the “build” process, that is, producing our binaries and executables. But getting the runtime linker/loader to locate the right libraries (and the right versions!) has a unique set of challenges that  should not be overlooked - after all, running the executables is critical for running tests, continuous integration, and obviously end-users running our apps and services.

Managing dependencies continues to be one of the top frustrations of C++ developers as per the most recents ISO C++ Developer Surveys. When it comes to shared libraries - different applications try to locate them at different times: the build system (e.g. CMake or Autotools) when configuring the build, the linker at build time, and the dynamic linker/loader at runtime.

This talk will cover in detail the different scenarios in which shared libraries need to be located, and how this is handled by package managers, build systems, and the the OS level. Emphasis will be placed on familiarizing the developer with the relevant tooling across multiple platforms, as well as associated concepts (e.g. RPATHs).

An often overlooked aspect will also be covered: how to create a self-contained, relocatable bundle for our user-facing applications, decoupled from the developer environment, as opposed to “works on my machine”.

 

Luis is a Electronics and Computer Engineer based in the UK, with previous experience as a C++ engineer in the field of Computer Vision and Robotics. With a passion to enable C++ engineers to develop at scale following modern DevOps practices. He is currently part of the Conan team at JFrog, focused on the problems of the C++ community at large.

CppCon 2024 Bridging the Gap: Writing Portable Programs for CPU and GPU -- Thomas Mejstrik

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!

Bridging the Gap: Writing Portable Programs for CPU and GPU

Monday, September 16 • 15:15 - 16:15 MDT

by Thomas Mejstrik

Summary of the talk:

This talk presents a series of effective patterns to address challenges arising when
code is developed that shall operate seamlessly on both GPU (Cuda) and CPU environments.
This scenario is a common oversight among Cuda developers, given the substantial architectural differences between CPUs and GPUs.

The patterns presented cover a range of scenarios, from handling stray function calls, strategies for conditional compilation, exploiting constexpr functions, leveraging undefined behaviour, usage of Cuda specific macros,
conditional instantiation of templates, and managing compiler warnings and errors.

Key patterns include: "Host device everything", "Conditional function body", "Constexpr everything", "Disable the warnings", "Defensive Programming", "Conditional Host Device Template", and "Function dispatching".

We evaluate each pattern based on ease of use, maintenance overhead, applicability and known usages. Additionally, pitfalls to avoid and considerations for implementations are provided to guide developers in adopting these patterns effectively.

 

Thomas Mejstrik earned his doctoral degree in Mathematics from the University of Vienna, Austria, specializing in numerical linear algebra and high-performance computing. Additionally, he obtained a Master's degree in Piano Education from the University of Music and Performing Arts Vienna, Austria. He also pursued studies in Chinese at the Central China Normal University, Wuhan, China, and the University of Vienna, Austria. With prior experience as a CUDA/C++ Senior Software Developer at Dimetor, Vienna, Austria, Thomas Mejstrik currently serves as a Postdoctoral Researcher at the University of Vienna, leading a research project on linear subdivision schemes, particularly relevant in animation. Beyond his academic and professional pursuits in mathematics, programming, and music, Thomas Mejstrik is actively involved in various women's political initiatives.

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.