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.

CppCon 2024 Multi Producer, Multi Consumer, Lock Free Atomic Queue -- Erez Strauss

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!

Multi Producer, Multi Consumer, Lock Free Atomic Queue

Tuesday, September 17 • 0900 - 10:00 MDT

by Erez Strauss

Summary of the talk:

This presentation introduces a multi-producer, multi-consumer, lock-free queue with unique characteristics. We will cover the C++17 implementation and the std::atomic features required for this queue based on the CPU atomic instructions and discuss the queue's portability across various CPU architectures, beyond just X86_64 and runtime environments.

Efficient message queue-based communication between threads is crucial for optimal performance in multi-threaded applications. Queues are fundamental data structures that interact with various aspects of the application environment, including schedulers, memory allocation systems, and CPU hardware architectures.

Many use cases such as trading platforms, games, audio processing and other fields have strict latency and scaling requirements and this queue implementation has proved to reduce system latencies.

The presentation will feature the design of the queue, the required template language features, bandwidth and latency consideration, and multiple demo applications. Comparing this queue implementation’s benchmark results with other existing queues will follow. Finally, we will discuss potential future work and areas for improvement.

Join us to explore how this innovative queue implementation can improve your multi-threaded application performance.

All presentation materials, including the C++17 source code, slides, benchmarks, and demo applications are available on GitHub.

 

Erez Strauss worked in Banks and Hedge Funds while focused on low latency systems.

CppCon 2024 Many Ways to Kill an Orc (or a Hero) -- Patrice Roy

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!

Many Ways to Kill an Orc (or a Hero)

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

by Patrice Roy

Summary of the talk:

Our game programmers and game engines involve fights between heroes and their foes. There are «classical», traditional ways to express heroes and monsters fighting each other, but contemporary C++ is particularly expressive and versatile language and with out language there are many ways for heroes and monsters to hit at each other. These techniques are what this talk will explore

 

Patrice Roy has been playing with C++, either professionally, for pleasure or (most of the time) both for over 30 years. After a few years doing R&D and working on military flight simulators, he moved on to academics and has been teaching computer science since 1998. Since 2005, he’s been involved more specifically in helping graduate students and professionals from the fields of real-time systems and game programming develop the skills they need to face today’s challenges.He’s been a participating member in the ISO C++ Standards Committee since late 2014 and has been involved with the ISO Programming Language Vulnerabilities since late 2015. He has five kids, and his wife ensures their house is home to a continuously changing numbers of cats, dogs and other animals.

Voting and early bird tickets for Meeting C++ 2024 are available until August 11th

A few weeks ago the voting for Meeting C++ 2024 started, contribute with your own voting session to the program selection of this years Meeting C++!

Also, as the most recent announcement, early bird tickets are on sale until August 11th, the day the voting ends:

Early Bird Tickets for Meeting C++ 2024 are available until August 11!

by Jens Weller

From the article:

Quick reminder that the early bird tickets for Meeting C++ 2024 are going to be availble until the end of the voting on the talks!

Which is August 11th! Its also possible that early bird tickets sell out before this. Currently only the hotel ticket and the online ticket are available as early bird. The onsite early bird ticket sold out a few weeks ago.

 

CppCon 2024 So You Think You Can Hash -- Victor Ciura

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!

So You Think You Can Hash

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

by Victor Ciura

Summary of the talk:

Hashing is crucial for efficient data retrieval and storage. This presentation delves into computing hashes for aggregated user-defined types and experimenting with various hash algorithms. We will explore the essentials of hash functions and their properties, techniques for hashing complex user-defined types, and customizing std::hash for specialized needs.

Additionally, we (re)introduce a framework for experimenting with and benchmarking different hash algorithms. This will allow easy switching of hashing algorithms used by complex data structures, enabling easy comparisons. Hash algorithm designers can concentrate on designing better hash algorithms, with little worry about how these new algorithms can be incorporated into existing code. Type designers can create their hash support just once, without worrying about what hashing algorithm should be used.

You will gain practical insights and tools to implement, customize, and evaluate hash functions in C++, enhancing software performance and reliability.

 

Victor Ciura is a Principal Engineer on the Visual C++ team, helping to improve the tools he’s been using for years. Leading engineering efforts across multiple teams working on making Visual Studio the best IDE for C++ Game developers.   Before joining Microsoft, he programmed C++ professionally for 20 years, designing and implementing several core components & libraries of Advanced Installer, improving the virtualization and repackaging technologies for MSI/MSIX.   One of his hobbies is tidying-up and modernizing aging codebases and has been known to build open-source tools that help this process: Clang Power Tools.   He’s a regular guest at Computer Science Department of his Alma Mater, University of Craiova, where he gives student lectures & workshops on using modern C++, STL, algorithms and optimization techniques.   More details: @ciura_victor & https://ciura.ro & linkedin.com/in/victor-ciura

What’s the point of std::monostate? You can’t do anything with it! -- Raymond Chen

RaymondChen_5in-150x150.jpgC++17 introduced std::monostate, a dummy type with no members and trivial functions, primarily used when no action is needed. Despite its simplicity, std::monostate plays a crucial role in scenarios like coroutines and std::variant, where a default-constructible placeholder type is required.

What’s the point of std::monostate? You can’t do anything with it!

by Raymond Chen

From the article:

C++17 introduced std::monostate, and I used it as a placeholder to represent the results of a coroutine that produces nothing. In the comments, Neil Rashbrook asked what you are expected to do with a std::monostate, seeing as has no members and only trivial member functions.

The answer is “nothing”.

The purpose of std::monostate is to be a dummy type that does nothing. All instances are considered equal to each other. It is basically this:

struct monostate {};
// plus relational operators and a hash specialization

You can see it in libcxx (LLVM/clang)libstdc++ (gcc), and stl (msvc).

CppCon 2024 Creating a Sender/Receiver HTTP Server -- Dietmar Kühl

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!

Creating a Sender/Receiver HTTP Server 

Monday, September 16 • 11:00 - 12:00 MDT

by Dietmar Kühl

Summary of the talk:

The sender/receiver framework for asynchronous operations in C++ is well on its way towards standardization in C++26. Previously, the theoretical background and implementation of the framework was shown but there wasn't much detail on how an application using sender/receiver would look like.

This presentation shows how to create a simple HTTP server using the sender/receiver framework with matching networking senders together with a coroutine task and and async scope. The code is created live using fundamental facilities. The goal is to demonstrate that the use of an asynchronous framework doesn't necessarily lead to excessive complexity when using C++'s facilities effectively. The resulting server could be embedded into any application, e.g., to inspect its state or change configurations. The takeaway is that it is reasonably straight forward to create an asynchronous program.

 

Dietmar Kühl is a senior software developer at Bloomberg L.P. working on the data distrubtion environment used both internally and by enterprise installations at clients. In the past, he has done mainly consulting for software projects in the finance area. He is a regular attendee of the ANSI/ISO C++ standards committee, frequent presenter at the ACCU conference, and a moderator of the newsgroup comp.lang.c++.moderated.

CppCon 2023 Undefined Behavior in C++: What Every Programmer Should Know and Fear -- Fedor Pikus

pikus-undefinedbehavior.pngRegistration 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 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 2024!

Undefined Behavior in C++: What Every Programmer Should Know and Fear

by Fedor Pikus

Summary of the talk:

This talk is about You-Know-What, the thing in our programs we don’t mention by name.

What is this undefined behavior every C++ programmer has grown to fear? Just as importantly, what it isn’t? If it’s so scary, why is it allowed to exist in the language?
The aim of this talk is to approach undefined behavior rationally: without fear but with due caution. We will learn why the standard allows undefined behavior in the first place, what actually happens when a program does something the standard calls “undefined,” and why it must be taken seriously even when the program “works as-is.” As this is a practical talk, we will have live demos of programs with undefined behavior and sometimes unexpected outcomes (if you are very lucky, you might see demons fly out of the speaker’s nose). Also, as this is a practical talk, we will learn how to detect undefined behavior in one’s programs, and how to take advantage of the undefined behavior to gain better performance.