Articles & Books

Plotting the Lorenz Attractor with C++20 [In Spanish] -- Daniel G Vergel

This post, written in Spanish, provides a step-by-step guide to create an application that plots orbits of the Lorenz system in a 3-dimensional perspective window. This is achieved by using C++17/20 coding techniques and the Boost.Numeric.Odeint and Dlib libraries.

Lorenz attractor

Plotting the Lorenz Attractor with C++20(Spanish)

by Daniel G Vergel

About the article:

This is a coding exercise that I often ask my students at the European University (Madrid, Spain) to complete as part of their programming training. In order to ease the gathering of data from the terminal, the article also uses a small C++20 library that prompts the user for inputs and handles any formatting errors. The details of its implementation are covered in a different article.

The blog tries to mitigate the lack of educational materials on modern C++ currently available in my native language. Code examples are nevertheless self-explanatory, and I hope, may be of interest to non-Spanish readers as well.

Creating a co_await awaitable signal that can be awaited multiple times, part 2--Raymond Chen

The series continue.

Creating a co_await awaitable signal that can be awaited multiple times, part 2

by Raymond Chen

From the article:

Last time, we created an awaitable signal that can be awaited multiple times. We noted that one problem with the implementation is that the object couldn’t be copied: Everybody has to await the same object, which can create lifetime issues...

return first example--Marius Elvert

Clarifying.

return first example

by Marius Elvert

From the article:

It seems my “return first” post was not as enlightening as I had hoped. It was posted on reddit, and while the majority of commenters completely missed the point, it wasn’t really clear for those that did not just read the title. Either way, I am to blame for that – the examples and my reasoning were not very conclusive. So let me try clearing up the confusion with a better example...

Creating a co_await awaitable signal that can be awaited multiple times, part 1--Raymond Chen

Harnessing the power of coroutines.

Creating a co_await awaitable signal that can be awaited multiple times, part 1

by Raymond Chen

From the article:

C++/WinRT asynchronous activities can be awaited only once. This is consistent with their intended usage pattern, which is for an application to start the activity, co_await the result, and then continue.

But maybe you want something like a Win32 event, where any number of people can co_await the event, and then once it is signaled, all the awaiters are resumed...

C++ Concepts: More than Syntactic Requirements--Jonathan Boccara

A new tool to simplify usage.

C++ Concepts: More than Syntactic Requirements

by Jonathan Boccara

From the article:

After years and years of expectation, concepts have finally made it in C++20.

Concepts are descriptions in code of a set of expressions that must be valid with a given type. Those are syntactic requirements. But there is more to concepts than that: concepts also have semantic requirements.

Before getting into that, here is a recap of what concepts are. If you’re already familiar with concepts you can skip to the section on semantic requirements...