Create an array of all possible variants alternatives of std::variant type
The standard library std::variant is a usefull feature, introduced since c++17, to define a type that can hold multiple alternative types.
For example a cell of a CSV file could represent multiple data types such as a string or int. Declaring a new type std::variant<std::string, int> allows to store one of the alternative types at the time. The std::variant internally allocates space for the largest alternative type.
But what if you need to extract what the possible alternatives of the std::variant ?
published on Thu, 02 Mar 2023
How to build Macos Universal Binaries with Conan and CMake
Universal Binaries contain native instructions for multiple target architectures like x86_64 and arm64 to run your app both on Intel Mac and Apple silicon machines. When using Conan there are a few common build systems, or native build tool generators, when creating packages from the Conan Center Index(CCI) like: CMake, Autotools, Pkgconfig, b2 (Boost Build) and Make. Some of these build tools have build-in support when it comes to building Universal Binaries.
published on Fri, 25 Nov 2022
How a smart mirror project finished after years of work
Introduction Early 2019 I noticed the Magic Mirror project. To me the way of how woodworking and technology come together really got me. I just had to build one from scratch, ofcourse. It was a great opportunity for me to build something physical and learn a few things about some fancy new JavaScript frontend framework. I decided to call it the mirrorm8 project. I never wrote about it until now.
published on Tue, 22 Feb 2022
C# Performance - Profiling introduction
Welcome! In this blog series I will share some of the knowledge I gained when doing performance optimizations for a project some time ago. Optimizing code for performance requires good knowledge of the fundamental concepts of computer architecture. In this first blog post I will explain about software profiling, some of the computer architecture concepts and my personal experience what worked for my and what did not. In later post(s) I will go more into detail in how to optimize code for performance.
published on Wed, 14 Oct 2020
Reactive testing with Gherkin, ReactiveX and asyncio
Have you ever written integration test with asynchronous behavior? I have, and it has always been a struggle… CI/CD pipelines which regularly fail because of some timeout. Then, “a wild project manager appears!”, and starts asking questions why investigating takes so long…
Solution: The timeout is increased to quickly solve the issue, when usually the failure is caused by regression.
There must be some more elegant way to assert or await asynchronous calls in Behavior Driven Development (BDD) steps.
published on Mon, 14 Sep 2020