Machine Code Explained -- Matt Godbolt

machinecode.pngExplaining machine code from the ground up! 

Machine Code Explained

by Matt Godbolt

From the video:

In this video, Matt Godbolt appears on Computerphile to discuss their fascination with how computers work and their mental model developed in the 1980s, which still helps them understand modern computer systems. They use a simple analogy involving a robot with an abacus and pigeonholes to explain fundamental computer operations and how programs are executed. Matt then demonstrates how machine code, the computer's language, can be represented as a sequence of numbers and stored in memory to instruct the computer in performing tasks, illustrating the basic concept of programming.

What are senders good for, anyway? -- Eric Niebler

In a recent blog post, Eric Niebler gets inside the soon-to-be-standard async programming model and shows why you should care.

What are senders good for, anyway?

by Eric Niebler

From the article:

At the heart of P2300 is a simple, elegant (IMHO) core that brings many benefits, but it’s hard to see that forest for all the trees.

So let’s make this concrete. In this post, I’ll show how to bring a crusty old C-style async API into the world of senders, and why you might want to do that.

mp-units 2.1.0 released -- Mateusz Pusz

We are happy to announce that mp-units 2.1.0 has been released and is available for download in Conan.

mp-units 2.1.0 released!

by Mateusz Pusz

About the release

Please check our blog post to read more about the improvements and some, unfortunately, breaking changes.

 

 

How I Learned to Stop Worrying and Love Juggling C++ Atomics -- brilliantsugar

In his recent blog post brilliantsugar talks about technics to find race conditions in multithreading code by using different tools.

How I Learned to Stop Worrying and Love Juggling C++ Atomics

by brilliantsugar

From the blog post

As most C++ programmers are aware, courtesy of Herb Sutter, programming lock-free data structures is akin to juggling razor blades. Reasoning about concurrent programs is already complex enough but modern CPU memory models are so complicated that they manage to make it even harder. The prevailing suggestion you often come across is to steer clear of lock-free programming entirely.

In this article, I share the adventures of exploring methods for formally verifying lock-free C++ code. To showcase three different approaches, I delve into the implementation of a lock-free triple buffer data structure.

 

 

Class Invariants -- Andrzej Krzemieński

Andrzej talks in his recent blog post about class invariants.

Class Invariants

by Andrzej Krzemieński

About the blog post:

The primary motivation for defining a class in C++ is to reflect and maintain a class invariant. In this post we will see what class invariants are and how you deal with them. Class invariants are important part of C++, even though there is no “invariant” keyword in C++.

CppDepend 2024.1 Released! - Unveiling New Features and Improvements

We are thrilled to announce the launch of CppDepend 2024.1, a significant update that introduces a plethora of enhancements and new features to further bolster your C/C++ development workflow.

CppDepend 2024.1 Released! - Unveiling New Features and Improvements

by the CppDepend Team

From the Article:

The latest version of CppDepend comes packed with an array of improvements and several new features that are designed to streamline project management, enhance code quality monitoring, and provide deeper insights into code bases. Key highlights of this release include an advanced source explorer, support for C++23/C++20/C++17, Improved Incremental analysis, and much more.

 

C++20 Concepts Applied -- Andreas Fertig

me.pngIn this post, we'll dive into implementing this technique in C++17 and then explore how it evolves with the application of C++20 concepts to the code. The goal is to simplify the code by eliminating the need for cumbersome constructs like enable_if and introduce further improvements in C++23.

C++20 Concepts Applied - Safe Bitmasks using Scoped Enums

by Andreas Fertig

From the article:

In 2020 I wrote an article for the German magazine iX called Scoped enums in C++. In that article, I shared an approach of using class enums as bitfields without the hassel of having to define the operators for each enum. The approach was inspired by Anthony William's post Using Enum Classes as Bitfields.

Today's post aims to bring you up to speed with the implementation in C++17 and then see how it transforms when you apply C++20 concepts to the code.

One operator for all binary operations of a kind
The idea is that the bit-operators are often used with enums to create bitmasks. Filesystem permissions are one example. Essentially you want to be able to write type-safe code like this:

using Filesystem::Permission;
Permission readAndWrite{Permission::Read | Permission::Write};

The enum Permission is a class enum, making the code type-safe. Now, all of you who once have dealt with class enums know that they come without support for operators. Which also is their strength. You can define the desired operator or operators for each enum. The issue here is that most of the code is the same. Cast the enum to the underlying type, apply the binary operation, and cast the result back to the enum type. Nothing terribly hard, but it is so annoying to repeatedly type it.

Anthony solved this by...

ACCU Early Bird Tickets and Workshops Now Available -- ACCU

logo2024.png

The 2024 ACCU Conference has published workshops and opened Early Bird tickets.

Early-bird tickets and workshops now available

From the article:

At time of writing our Early Bird rates are in effect, but hurry! These will end on 15th February, after which standard rates will apply. As ever the cheapest way to get tickets is to be, or become, an ACCU member - so join up today if you're not already a member!