Stopping bash script on error, and what can possibly go wrong
TL;DR Don’t mix set -e and && operators in bash, it’s not going to work well. What is ‘set -e’ Bash command set -e stops the script when any of […]
TL;DR Don’t mix set -e and && operators in bash, it’s not going to work well. What is ‘set -e’ Bash command set -e stops the script when any of […]
Fold expressions, starting with C++ 17, provide succinct, if somewhat unorthodox, syntax for processing of parameter packs. Printing a pack to standard output Suppose, I want to write a function […]
std::optional and std::variant are attractive alternatives to raw pointers and unions, but they come with a caveat: when you create an optional/variant from a “real” value, a copy will be […]
Conan is a package manager for C++. It has a concept of profiles where different settings are specified, including OS, compiler and compiler version. [settings] os=linux compiler=clang version=16 I was […]
In Python, async for uses asynchronous generator to iterate over values. But how is it different from a regular for that uses a generator that yields awaitables? TL;DR: not much, […]
There is a rumor C++ 23 introduces method string::contains that checks whether a string contains a substring. I guess in mere 10-20 years we will have string::toupper and string::tolower. Here’s […]
TL;DR std::function works great when we know exact types of the arguments and the return value. It breaks down miserably in presence of templates, and the error messages are not […]
Last week I had an opportunity to experiment with Cassandra database in a semi-real environment. A few notes: Cassandra goes out of its way to be friendly to “traditional” SQL […]
Another entry to the [error message] => [solution] hash table. Context: C++ build with Conan. Error: relocation R_X86_64_PC32 against undefined hidden symbol `_ZTCN5boost10wrapexceptISt11logic_errorEE0_NS_16exception_detail10clone_implINS3_19error_info_injectorIS1_EEEE’ can not be used when making a […]
As part of the conanfile.py, add the following: def generate(self): toolchain = CMakeToolchain(self) toolchain.variables[‘CMAKE_VERBOSE_MAKEFILE’] = ‘ON’ toolchain.generate() CMakeDeps(self).generate() Build output without CMAKE_VERBOSE_MAKEFILE: [ 78%] Building CXX object cpp/test/unit/CMakeFiles/IntegrationTest.cpp.o Build output […]