April 2019

CppCast Episode 194: Linear Algebra and Audio with Guy Davidson

Episode 194 of CppCast the first podcast for C++ developers by C++ developers. In this episode Rob and Jason are joined by Guy Davidson to talk about his work with the ISO C++ committee including proposals for a linear algebra library and audio api.

CppCast Episode 194: Linear Algebra and Audio with Guy Davidson

by Rob Irving and Jason Turner

About the interviewee:

Guy Davidson is the Principal Coding Manager of Creative Assembly, makers of the Total War franchise, Alien: Isolation and Halo Wars 2, Guy has been writing games since the early 1980s. He is now also a contributor to SG14, the study group devoted to low latency, real time requirements, and performance/efficiency especially for Games, Financial/Banking, and Simulations, and to SG13, the HMI study group. He speaks at schools, colleges and universities about programming and likes to help good programmers become better programmers.

How to Emulate the Spaceship Operator Before C++20 with CRTP--Henrik Sjöström

To wait until the real thing.

How to Emulate the Spaceship Operator Before C++20 with CRTP

by Henrik Sjöström

From the article:

Making a class comparable is usually something of a chore. In C++20 we’ll get the “three-way comparison operator” or informally spaceship operator <=>. It will allow the compiler to create comparison operators when we want a simple lexicographical comparison and when we have a more complex comparison we only need to implement a single operator to be able to do all comparisons...

Overload 150 is now available

ACCU’s Overload journal of April 2019 is out. It contains the following C++ related articles.

Overload 150 is now available

From the journal:

This means war!.
Careless use of language can upset people. Frances Buontempo asks what we can do to make the developer experience better.

NullableAttribute and C# 8.
C# 8 will bring many new features. Jon Skeet investigates the metadata representation of Nullable Reference Types.

lvalues, rvalues, glvalues, prvalues, xvalues, help!.
C++11 introduced new value categories. Anders Schau Knatten explains his way of thinking about them.

Modern SAT solvers: fast, neat and underused (part 1 of N).
SAT solvers can quickly find solutions to Boolean Logic problems. Martin Hořeňovský demonstrates how this can be used to solve arbitrary Sudoku puzzles.

The Duality….
Genetic algorithms can find solutions that other algorithms might miss. Anders Modén discusses their use in conjunction with back-propagation for finding better solutions.

Blockchain-Structured Programming.
Coins are a wedge-shaped piece used for some purpose. Teedy Deigh shares her angle on the technology underpinning crypto-currencies.

The BooSTL Algorithms: Boost Algorithms That Extend the STL (3/3)--Jonathan Boccara

The final article.

The BooSTL Algorithms: Boost Algorithms That Extend the STL (3/3)

by Jonathan Boccara

From the article:

The BooSTL algorithms are what we can call the Boost algorithms which are in the same spirit as those of the STL. They encapsulate operations on collections, and being able to use them allows to write (or re-write) more expressive code. To cover all their contents, we split up the articles of the BooSTL into three parts:

  • the BooSTL algorithms on sorting and partitioning,
  • the BooSTL algorithms on searching,
  • the other BooSTL algorithms.

So here we go to cover the rest of the BooSTL algorithms which are not in sorting, partitioning nor searching.

Quick Q: C++ template typedef

Quick A: Use the normal template declaration.

Recently on SO:

C++ template typedef

C++11 added alias declarations, which are generalization of typedef, allowing templates:

template <size_t N>
using Vector = Matrix<N, 1>;

The type Vector<3> is equivalent to Matrix<3, 1>.

The BooSTL Algorithms: Boost Algorithms That Extend the STL (2/3)--Jonathan Boccara

The series continues.

The BooSTL Algorithms: Boost Algorithms That Extend the STL (2/3)

by Jonathan Boccara

From the article:

One good way to extend our knowledge beyond the STL is to learn the Boost STL-like algorithms. I like to call them the BooSTL algorithms. To cover all the contents in this algorithms library, we have chunked up the story into three parts:

  • the BooSTL algorithms on sorting and partitioning,
  • the BooSTL algorithms on searching,
  • the other BooSTL algorithms.

After seeing the BooSTL algorithms on sorting and partitioning, we are now going to focus on BooSTL algorithms on searching...

The BooSTL Algorithms: Boost Algorithms That Extend the STL (1/3)--Jonathan Boccara

No need to do them yourself.

The BooSTL Algorithms: Boost Algorithms That Extend the STL (1/3)

by Jonathan Boccara

From the article:

The STL features a proud 105 algorithms, but that is by no means all the algorithms there is in C++.

There are many ways to extend the STL. One of them is to include the STL-like algorithms that are in Boost, which I like to call the BooSTL algorithms!