November 2021

Audio Programming with Cinder -- Richard Thomson

Utah C++ Programmers has released a new video.

Audio Programming with Cinder

by Richard Thomson

From the video description:

This Fall we will look into some audio libraries for C++ developers. A couple years ago we took a general look at Cinder. Cinder is a C++ library for programming with aesthetic intent - the sort of development often called creative coding. This includes domains like graphics, audio, video, and computational geometry. Cinder is cross-platform, with official support for macOS, Windows, Linux, iOS, and Windows UWP.

This month, Richard Thomson will give us a more in-depth look at audio programming with Cinder. We'll start with a look at the "voice API", which is suitable for simple audio playback. Next, we'll dive deeper by looking at the "modular API" for more advanced audio processing, including digital signal processing.

https://www.youtube.com/watch?v=nbAFfbV8YFg

Three reasons to pass std::string_view by value--Arthur O’Dwyer

You should.

Three reasons to pass std::string_view by value

by Arthur O’Dwyer

From the article:

It is idiomatic to pass std::string_view by value. Let’s see why.

First, a little background recap. In C++, everything defaults to pass-by-value; when you say Widget w you actually get a whole new Widget object. But copying big things can be expensive. So we introduce “pass-by-const-reference” as an optimization of “pass-by-value,” and we tell people to pass big and/or expensive things like std::string by const reference instead of by value.

But for small cheap things — int, char*, std::pair<int, int>, std::span<Widget> — we continue to prefer the sensible default behavior of pass-by-value.

Pass-by-value has at least three performance benefits over pass-by-(const)-reference. I’ll illustrate all three of them via string_view...

The program for CPPP is now available

The CPPP - an international online C++ Conference from 1-3 December 2021 with a hint of French accent - has published their programme.

CPPP Programme

by CPPP Conference

About the programme

CPPP has now published its program along three tracks:

  • Progress: This track is all about the bases. These are the talks that you wish every C++ developer would listen to early in their career to start on the right foot. They can be very valuable to experts but need to be accessible to students and beginners.
  • Produce: Talks that can be immediately applied by professional C++ programmers in their everyday job. Concrete tools and pragmatic ideas that work for legacy codebases and scale well with big teams.
  • Push Forward: Novel ideas and approaches for C++. They can be patterns that are not well known yet, new features coming in the language, libraries using these recent features or new ways to think about old problems.

You can also already buy your tickets.

 

CppCon 2021 trip report -- Timur Doumler

Timur has noted down his thoughts about the recent CppCon 2021 trip:

Trip Report

by Timur Doumler

About the article

I was on-site and this was actually my first in-person conference since the pandemic started, as well as my first conference in my new role as Developer Advocate at JetBrains. I had an amazing time, a huge thanks to the organisers for pulling this off! See you next year!

Strong Types for Safe Indexing in Collections – Part 2--Jonathan Boccara

Are you interested?

Strong Types for Safe Indexing in Collections – Part 2

by Jonathan Boccara

From the article:

In the previous article on strong types, we set out to find how to use strong types for safe indexing in collections.

More precisely, if we have two vectors with two indices to access them, how can we use strong types to make sure we use the right index for the right vector, and that we don’t swap them by mistake?

A capturing lambda can be a coroutine, but you have to save your captures while you still can

Will you use one?

A capturing lambda can be a coroutine, but you have to save your captures while you still can

by Raymond Chen

From the article:

We saw some time ago that capturing lambdas which are coroutines result in lifetime issues because the lambda itself returns at the first suspension point, at which point there’s a good chance it will be destructed. After that point, any attempt by the lambda body to access those captured variables is a use-after-free bug...

C++ String Benchmark -- Giovanni Dicanio

This small article compares different string implementations on the Windows platform.

C++ String Benchmark: STL vs. ATL vs. Custom Pool Allocator

by Giovanni Dicanio

From the article:

I was curious to compare the performance of the STL string implementation versus ATL CString, using Visual Studio 2019, so I wrote some simple C++ benchmark code for this purpose. I also added into the mix a custom string pool allocator.

 

Template Metaprogramming - How it All Started--Rainer Grimm

The series continue.

Template Metaprogramming - How it All Started

by Rainer Grimm

From the article:

Metaprogramming is programming on programs. C++ applies metaprogramming at compile time. It started in C++98 with template metaprogramming, was formalized in C++11 with the type-traits library, and since C++11 has steadily improved. The main driving force is constant expressions. In this post, I want to write about its roots...