Programming Leftovers
-
C++ standard library ABI compatibility
For a user who only uses one C++ standard library, such as libc++, there are typically three compatibility goals, each with increasing compatibility requirements:
Can the program, built with a specific version of libc++, work with an upgraded libc++ shared object (DSO)?
Can an executable and its DSOs be compiled with different versions of libc++ headers?
Can two relocatable object files, compiled with different versions of libc++ headers, be linked into the same executable or DSO?
-
Components and LEGOs
“We’re going to build a component library — which are like a bunch of LEGOs — so designers/developers can just pick a prefabricated component off the shelf and build with consistency and coherence.”
It’s a nice thought, if you don’t think about it too much. But I recently read Christian Heilmann talking about “componentisation without big picture planning” and it hit me like a ton of LEGO bricks: [...]
-
Problem Solving
Software creates value by solving problems. But effectively solving problems is hard. How can we get better at it?
-
[Repeat] Time is not a synchronization primitive
Today I want to talk about one of the most common ways that I see things fall apart. This has caused tests, production-load-bearing bash scripts, and normal application code to be unresponsive at best and randomly break at worst. It's when people use time as a synchronization mechanism.
-
Ranges (C++20)
At work-work, we try to stick to the forefront of C++ language development: C++20 all the time, C++23 as it shows up and is available in compilers. It’s a weird mix sometimes with a codebase that has a lengthy history.
A while back I bumped into a for loop, tried to be clever and then hit limitations of Clang – and those limitations are sometimes relevant for KDE code that lands in FreeBSD, which is why I’m writing about it.
-
Raku is pretty damn Cool
This is not going to be a tutorial, but I'll show you my favorite Raku features. There are many more, and these are not necessarily the biggest ones.
In general Raku has everything the typical scripting language has. Functions, Classes, Exceptions, typical data types (like lists and dicts / hash maps), modules, and all the usual control flow. An abundance of those. In all forms and colors. One interesting thing that is unusual is the type system: you don't need to type anything, and by default you get dynamic typing, but you can, and then the (byte code) compiler will check the types for you.
-
How to map more informative values onto fill argument of sjPlot::plot_model
Whereas the direction of main effects can be interpreted from the sign of the estimate, the interpretation of interaction effects often requires plots. This task is facilitated by the R package sjPlot (Lüdecke, 2022).
-
How to visually assess the convergence of a mixed-effects model by plotting various optimizers
To assess whether convergence warnings render the results invalid, or on the contrary, the results can be deemed valid in spite of the warnings, Bates et al. (2023) suggest refitting models affected by convergence warnings with a variety of optimizers.