Programming Leftovers
-
A case-like macro for regular expressions
I often find myself wanting a simple case-like macro where the keys are regular expressions. regex-case is an attempt at this.
I use CL-PPCRE for the usual things regular expressions are useful for, and probably for some of the things they should not really be used for as well. I often find myself wanting a case like macro, where the keys are regular expressions. There is a contributed package for Trivia which will do this, but Trivia is pretty overwhelming. So I gave in and wrote regex-case which does what I want.
-
divmod, Rust, x86, and Optimisation
I also learned that the div instruction on x86 provides the remainder so there is potentially some benefit to combining the operation. I suspected that LLVM was probably able to optimise the separate operations and a trip to the Compiler Explorer confirmed it.
-
Day 17 (Advent of Code 2022)
Advent of Code gets harder and harder, and I'm not getting any smarter. Or any more free time. So, in order to close out this series anyway, I'm going to try and port other people's solutions from "language X" to Rust. That way, they already figured out the hard stuff, and we can just focus on the Rust bits!
-
You Can (Somewhat) Reliably Measure Change Failure Rate
In the State of the dora DevOps Metrics in 202211 Which is otherwise excellent, and I recommend reading it. In particular, the discovery around the uselessness of mean time to recovery was important to me, in that sense of “oh man, this is obvious and I should really have realised it sooner, on my own, instead of blindly trusting an authority on it. ” article, Logan claims that change failure rate cannot be measured consistently across an organisation. I disagree.
-
Dirk Eddelbuettel: linl 0.0.5 on CRAN: Extended Background Support
A new release of our linl package for writing LaTeX letters with (R)markdown is now on CRAN. linl makes it easy to write letters in markdown, with some extra bells and whistles thanks to some cleverness chiefly by Aaron.
This version add extended header and footer placement support thanks to an included copy of wallpaper.sty as added in a nice PR by Iñaki. As the previous release was well over three years ago, we also enhanced continuous integration in the process. The repository README.md shows some screenshots of input and output files.
-
Not coalescing around None-aware [LWN.net]
The wish for a "None-aware" operator (or operators) is longstanding within the Python community. While there is fairly widespread interest in more easily handling situations where a value needs to be tested for being None before being further processed, there is much less agreement on how to "spell" such an operator (or construct) and on whether the language truly needs it. But the idea never seems to go away, with long discussions erupting every year or two—and no resolution really in sight.
-
This Week In Rust: This Week in Rust 477