Programming Leftovers
-
Sudo and signal propagation
I had remarked a few months ago I was surprised the sudo project has over 12,000 commits. Now I am no longer surprised. Behind a rather simple interface (from the common use case perspective) lies a mountain of complexity. That being said, I’m still quite surprised it took over 40 years for this surprising and undocumented behavior to be fixed.
-
Drawing a Circle in Qt QML three different ways
Qt has no Circle built in to QML as a basic type, as for example the Rectangle or the Button control. This post shows you how to get a Circle in QML, from the most basic method (a Rectangle with a radius of 180) to more advanced methods, using the Canvas JavaScript API (which allows us to draw a partially filled Circle, for a Pie Chart) and a c++ control based on QQuickPaintedItem. I wanted to experiment with the Canvas QML control and the QQuickPaintedItem C++ interface to get a better understanding of Qt and QML drawing interfaces, this post reflects that journey including showing your grouped QML properties exposed from C++.
-
Having fun with string literal suffixes in C++
The C++11 standard introduced user-defined string suffixes. It also added regular expressions to the C++ language as a standard feature. I wanted to have fun and see whether we could combine these features.
-
Learning to learn Rust
I’m enjoying a two-month sabbatical this summer. It’s been great so far! I’ve used almost half of the time to cycle through the entire Great Britain and let my body work physically and my mind rest (usually, the opposite is true). And now that I’m back, I’ve switched focus to a few personal projects that I have really wanted to work on for a while but never found time.
-
[Older] Writing shell scripts in Nushell
Using Nushell as an actual terminal shell is all good and well but I think a more interesting use case is to use it to write scripts.