July 2024

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.

Concurrency: From Theory to Practice -- Lucian Radu Teodorescu

concurrencyteodorescu.pngConcurrency is a complicated topic. Lucian Radu Teodorescu provides a simple theory of concurrency which is easy to reason about and apply.

Concurrency: From Theory to Practice

by Lucian Radu Teodorescu

From the article:

One of the big challenges with concurrency is the misalignment between theory and practice. This includes the goals of concurrency (e.g., improving the performance of the application) and the means we use to achieve that goal (e.g., blocking primitives that slow down the program). The theory of concurrency is simple and elegant. In practice, concurrency is often messy and strays from the good practices of enabling local reasoning and using structured programming.

We present a concurrency model that starts from the theory of concurrency, enables local reasoning, and adheres to the ideas of structured programming. We show that the model can be put into practice and that it yields good results.

Most of the ideas presented here are implemented in a C++ library called concore2full [concore2full]. The library is still a work in progress. The original goal for this model and for this library was its inclusion in the Hylo programming language [Hylo]. For Hylo, we want a concurrency model that allows local reasoning and adheres to the structured programming paradigm. We also wanted a model in which there is no function colouring [Nystrom15], in which concurrency doesn’t require a different programming paradigm.

This article is based on a talk I gave at the ACCU 2024 conference [Teodorescu24]. The conference was great! The programme selection was great; there was always something of interest to me. With many passionate C++ engineers and speakers, the exchange of information between participants was excellent; as they say, the best track was the hallway track. I highly encourage all C++ enthusiasts (and not just C++) to participate in future ACCU conferences.

CppCon 2023 Thread Safety With synchronized_value in C++ -- Jørgen Fogh

Fogh-threadsafety.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!

Lightning Talk: Thread Safety With synchronized_value in C++

by Jørgen Fogh

Summary of the talk:

Adding thread safety to existing code is hard. The proposed type synchronized_value makes it less hard.
I will show you why.

CppCon 2023 The Responsibility of C++ -- Neil Henderson

Henderson-responsibility.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!

Lightning Talk: The Responsibility of C++ 

by Neil Henderson

Summary of the talk:

Hopefully an amusing and light-hearted look at C++ and its strengths and responsibilities in the software world from a recent life-changing experience.

Fat API Bindings of C++ Objects into Scripting Languages -- Russell K. Standish

fatstandish.pngHow do you expose a C++ object to a TypeScript layer or other scripting language? Russell K. Standish demonstrates an approach using a RESTService API that is scripting-language independent.

Fat API Bindings of C++ Objects into Scripting Languages

by Russell K. Standish

From the article:

fat API exposes nearly all of a C++ object’s public attributes and methods to a consuming environment, such as a scripting language, or web client. This can be contrasted with a conventional, or thin API, where the API is defined up front, and the C++ object provides the implementation, most of which is private to the C++ layer.

Obviously, reflection is required to expose C++ objects to a consuming layer like this – this paper explores using the Classdesc system to implement reflection of C++ objects into a JavaScript/TypeScript environment via a REST service, and also via a Node.js API module.