Programming Leftovers
-
Rlang ☛ Breaking In and Out of Looped Code: A Beginner’s Guide to C Loop Control
Learning to control program flow is a fundamental skill in C programming, and mastering loop control statements is essential for writing efficient code. This comprehensive guide will walk you through the intricacies of breaking in and out of loops, helping you understand when and how to use these powerful control mechanisms.
-
Sandor Dargo ☛ C++26: Delete with a reason
Let’s start exploring C++26 with a simple but useful change. Thanks to Yihe Li’s proposal (2573R2), when we =delete a special member function or a function overload, we can specify a reason.
This is a practical and not very surprising change. Why do I say it’s not very surprising? Adding the ability to specify reasons for some operations has become a pattern in C++ evolution. Since C++11, we can add an optional message to static_assert, C++14 enriched the [[deprecated]] attribute with an optional reason, and the same happened in C++20 to the [[nodiscard]] attribute.
-
Karl Seguin ☛ Sorting Strings in Zig
std.mem.sort takes 4 arguments: the type of value we're sorting, the list of values to sort, an arbitrary context, and a function. The last argument, the function, is what determines how two values should be ordered with respect to each other. Above we're doing a byte-by-byte comparison of two strings. If we wanted to do an case insensitive comparison of ASCII values, we'd replace std.mem.order with std.ascii.orderIgnoreCase.
-
Simon Josefsson ☛ Simon Josefsson: Guix Container Images for GitLab CI/CD
I am using GitLab CI/CD pipelines for several upstream projects (libidn, libidn2, gsasl, inetutils, libtasn1, libntlm, …) and a long-time concern for these have been that there is too little testing on GNU Guix. Several attempts have been made, and earlier this year Ludo’ came really close to finish this. My earlier effort to idempotently rebuild Debian recently led me to think about re-bootstrapping Debian. Since Debian is a binary distribution, it re-use earlier binary packages when building new packages. The prospect of re-bootstrapping Debian in a reproducible way by rebuilding all of those packages going back to the beginning of time does not appeal to me. Instead, wouldn’t it be easier to build Debian trixie (or some future release of Debian) from Guix, by creating a small bootstrap sandbox that can start to build Debian packages, and then make sure that the particular Debian release can idempotently rebuild itself in a reproducible way? Then you will eventually end up with a reproducible and re-bootstrapped Debian, which pave the way for a trustworthy release of Trisquel. Fortunately, such an endeavour appears to offer many rabbit holes. Preparing Guix container images for use in GitLab pipelines is one that I jumped into in the last few days, and just came out of.
Let’s go directly to the point of this article: here is a GitLab pipeline job that runs in a native Guix container image that builds
libksba
after installing thelibgpg-error
dependency from Guix using the pre-built substitutes. -
K Desktop Environment/KDE SC/Qt
-
MauiKit ☛ Maui Release Briefing #7
Today, we bring you a report on the brand-new release of the Maui Project.
With the previous version released, MauiKit Frameworks and Maui Apps were ported over to Qt6, however, some regressions were introduced and those bugs have now been fixed with this new revision version.
Currently, there are over 10 frameworks, with two new ones recently introduced. They all, for the most part, have been fully documented, and although, the KDE doxygen agent has some minor issues when publishing some parts, you can find the documentation online at https://api.kde.org/mauikit/ (and if you find missing parts, confusing bits, or overall sections to improve – you can open a ticket at any of the framework repos and it shall be fixed shortly after)
-
-
Perl / Raku
-
Arne Sommer ☛ Beautifully Nested with Raku
-