Tuesday, July 28, 2026

Practical Testing: 42 - Another code updateBack in 2004 I started a series of blog posts, called β€œPractical Testing”, about testing real-world, multi-threaded code. In 2023 I did a brief precis of how we got here and, since the code is still in regular use and still evolving, it’s time to talk about some of the recent changes. This release of the code makes no functional changes to the code that we’re testing in this series of articles.πŸ“Rambling Comments - Len Holgate's blog
A crosswording miscellanyI just finished reading Natan Last's 2025 book _Across the Universe: The Past, Present, and Future of the Crossword Puzzle._ It was... fatiguing. Now, I myself am a "discursive" writer, so I'm throwing stones from a glass house here; but it seemed to me that Last's _every_ paragraph consisted of three or four anecdotes halfway told, capped off with some nonsensical simile. Open the book at random to page 31: > On December 11, 2022, Eric [Albert] suffered a hemorrhagic stroke of his cerebellum. > He's lucky to be alive: around 50 percent of patients die in a month, half of those within > the first two days. When we first spoke in April 2023, I immediately asked if his language > had been affected, then regretted it. But he was fine, he said. The neurologists don't know > why the stroke happened, or how he recovered his cognition so quickly. He says he repeated the > French he was learning to himself in the ICU. I imagined him, was almost ashamed to imagine him, > saying _cirΓ© cirΓ© cirΓ©, Γ©pΓ©e Γ©pΓ©e Γ©pΓ©e_ β€” as if the accent marks were stray neurons in need of repair > β€” or an item from James Joyce's _Finnegans Wake_ I'd just seen in _Word Ways_ because it's the > only "word" with five or more Q's: _Quoiquoiquoiquoiquoiquoiquoiq!_ In Joyce's _Wake_, it's > preceded by the line: "He lifts the lifewand and the dumb speak." I remembered analyses of > Broca's aphasia I'd read studying neuroscience in college [...]πŸ“Arthur O’Dwyer

If this page is useful, please consider donating a coffee

Monday, July 27, 2026

Sunday, July 26, 2026

Interconverting `std::function` with `copyable_function`C++11 introduced std::function as a type-erased callable-object holder. function was badly designed in a few ways: Its rarely used β€œgo fish” API bloats every user; it advertises operator() const even when the controlled object’s operator() is mutating; it handles what should be a precondition violation by throwing an exception, which again bloats every user and means its operator() can never be noexcept. So C++26 fixed these problems by adding std::copyable_function. (Which preserves some of function’s suboptimal design decisions: copyable_function remains implicitly convertible to copyable_function , contextually convertible to bool, and assignable from nullptr.)πŸ“Arthur O’Dwyer

Saturday, July 25, 2026

Friday, July 24, 2026

Introducing Logarithmic Quantities and UnitsIntroducing Logarithmic Quantities and Units Decibels are everywhere in engineering. Signal levels in dBm , sound pressure in dB SPL , voltage gain in dB , filter slopes in dB/octave . The neper, pH, and stellar magnitude share the same structure. Yet, to the best of our knowledge, no general-purpose units library models logarithmic quantities correctly. Most do not model them at all. The few that do treat a decibel as a non-linear scale or an offset unit, and that choice gets the arithmetic wrong in ways that compile silently. This article is a request for feedback . We believe we have a correct design, derived from the same affine-space model we introduced for absolute quantities . It also aims to stay consistent with the ISO/IEC 80000 standards: especially IEC 80000-15:2026, Logarithmic quantities and their units , which consolidates the logarithmic-quantity rules once held in ISO 80000-1:2009 (Annex C); together with ISO 80000-2 (the logarithm functions lb , ln , lg ), ISO 80000-8 (acoustics), and IEC 80000-13 (information theory). We have read those against this design, cite them throughout, and call out the one place we knowingly diverge from them ( Open Question 5 ). This post describes the design in full, from the quantity spec to the named units, the arithmetic, the conversions, and every domain we surveyed (audio, RF, acoustics, chemistry, astronomy, music, information theory). Then it lays out the open questions , each with every alternative we considered and our current preference. Before we implement any of this in mp-units , we want the people who use these quantities daily to tell us where we are wrong.πŸ“mp-units

Thursday, July 23, 2026

The PImpl idiom and the C++26 std::indirect typePImpl (which stands for Pointer to implementation) is a programming tehnicque to remove implementation details from a class by placing them in a separate class that is accessed through an opaque pointer. Its purpose is to separate interfaces and implementations and minimize compile-time dependencies. In this article, we’ll at how the PImpl idiom is typically ... Read more The post The PImpl idiom and the C++26 std::indirect type first appeared on Marius Bancila's Blog .πŸ“Marius Bancila's Blog

Wednesday, July 22, 2026

From Institutions to Individuals: the White House Report on Revitalizing U.S. Scientific LeadershipIn 1945, Vannevar Bush published a report entitled Science: The Endless Frontier. His thesis was that prosperity follows from basic research. The report was highly influential in the United States and elsewhere. It led to the creation of an entirely new government bureaucracy. With this report, Bush popularized the linear model of innovation: innovation (such … Continue reading From Institutions to Individuals: the White House Report on Revitalizing U.S. Scientific LeadershipπŸ“Daniel Lemire's blog