news
Programming Leftovers
-
Sal ☛ Thoughts in progress: jj and my homelab
With git, I generally avoid rebasing other than simple workflows, like pulling the latest state of whatever branch I’m working on and rebasing my local changes on top of it. I don’t enjoy rebasing with git. It feels uncomfortable and risky. Admittedly, I’m not super experienced at it, and I have some emotional scars from failing at complicated rebases in years past.
With jj, on the other hand, rebasing has become an easy, default, and almost joyful way of working.
-
Naveen Srinivasan ☛ How Do I Profile eBPF Code?
The goal of the code example above is to keep it simple and reopen the same file under warm cache conditions, minimizing unrelated filesystem and disk I/O variability and helping identify the p50/p99. The code invokes syscall(SYS_openat, …) instead of the libc openat() wrapper, and the first 10% of the results are discarded as a warmup period.
This test harness would produce results of opening a file x number of times and how long it took to open. So we could use this to measure the before and after of when the eBPF hook attached.
-
Ben Deane ☛ const_cast: A Necessary Evil
We don’t like const_cast much. It’s ugly, and can even lead to undefined behaviour. But unfortunately sometimes it’s needed. Even aside from interacting with C libraries which don’t respect const, there is at least one place in the C++ standard that requires you to use it.
-
R-Script
-
Dirk Eddelbuettel ☛ Thinking inside the box
RcppDate ships the featureful date library written by Howard Hinnant to enable use from R packages. This header-only modern C++ library has been in pretty wide-spread use for a while now, and adds to C++11, C++14 and C++17 what is (with minor modifications) the ‘date’ library in C++20. The RcppDate package adds no extra R or C++ code and can therefore be a zero-cost dependency for any other project; yet a number of other projects decided to re-vendor it resulting in less-efficient duplication. Oh well. C’est la vie.
-
-
Python
-
Adam Johnson ☛ Python: fix ValueError: day of month directive '%d' may not be used without a year directive - Adam Johnson
Take this code, parsing the date of an annually recurring event that only has a month and day, such as a work anniversary: [...]
-
-
Java/Golang
-
Redowan Delowar ☛ Accepted proposal: range over all command-line flags
Go’s proposal for package flag was accepted on July 23, 2026. It fixes an awkward case in programs that read the same setting from command-line flags, environment variables, and defaults.
-
-
Rust
-
Rust Weekly Updates ☛ This Week In Rust: This Week in Rust 662
Hello and welcome to another issue of This Week in Rust!
-