D. C. Phillips’ The Promised One (1915)

My grandmother’s grandfather was David Celyddon Phillips (1848–1915), Welsh-born minister and poet, known by the bardic name “Celyddon.” Recently I learned that my second cousin David M. Phillips Jr. has in his possession a leatherbound, hand-written copy of D. C. Phillips’ long narrative poem The Promised One, or, Jesus of Nazareth — previously unpublished as far as either of us know, despite that one of Celyddon’s lengthy obituaries mentions:

Read More

Explainable Minesweeper and solvable nonograms

Via Hacker News: “Making Explainable Minesweeper” (July 2025). By “explainable Minesweeper,” the blogger means that we generate a Minesweeper level that is guaranteed solvable by perfect play — that is, for which the solution never requires “guessing” at an unknown cell (and possibly losing the game at that point). The blogger describes a procedure for creating partially explainable levels: simply generate a random level, then simulate solving it with a computer player that knows only certain heuristics. If the computer player completes the level without guessing, then it’s good; otherwise, generate a new random level and repeat.

Read More

Animating moving juggling patterns

About 15 years ago I was active with the Santa Barbara Jugglers Association (which still exists and still meets up by UCSB in Isla Vista). They’re particularly known for club-passing in moving patterns. We’re talking things like Havana and Shooting Star. (I don’t think either of those patterns came out of Isla Vista, mind you. I don’t know where either of them did come from. The Madison Area Jugglers’ Pattern Book credits Shooting Star to “Bryan Olson in 1993.”)

Read More

Array member-initializers in GCC

The other day I ran across some code like this:

template<class T>
struct Holder {
  T t_;
  explicit Holder() : t_() {}
  Holder(const Holder& rhs) : t_(rhs.t_) {}
  ~~~~
};

This was in an old codebase, which until recently had still been using GCC’s -Weffc++ to enforce C++98 idioms such as the explicitly non-defaulted copy constructor depicted above.

If you’re still using -Weffc++, please, stop using it!

Read More

Wordle-like games require two word lists

Suppose you’re implementing a “Wordle-like” game such as Juho Snellman’s Huewords or Alan Bellows’ Omiword. The defining principle of such games (as I’m defining them here, anyway!) is that the solution to the puzzle is an arrangement of English words which satisfies some criterion, and the player arrives at that solution by guessing various English words, such that the game must differentiate “that’s a valid word, but not the answer” from “that sequence of letters isn’t even a word.”

Read More

Phrase origin: Why do we “call” functions?

On StackExchange, someone asks why programmers talk about “calling” a function. Several possible allusions spring to mind:

  • Calling a function is like calling on a friend — we go, we stay a while, we come back.
  • Calling a function is like calling for a servant — a summoning to perform a task.
  • Calling a function is like making a phone call — we ask a question and get an answer from outside ourselves.

The true answer seems to be the middle one — “calling” as in “calling up, summoning” — but indirectly, originating in the notion of “calling for” a subroutine out of a library of subroutines in the same way that we’d “call for” a book out of a closed-stack library of books.

Read More

Constexpr factors_of

I’m just now getting around to blogging this snippet from March 2024 (hat tip to Chip Hogg). Apparently some units libraries — things like Au and mp-units — find it useful to represent linear combinations of units as the products of primes; for example, if you represent “meters” as 2 and “seconds” as 5, then “meter-seconds” is 10. Or at least that’s the general idea, I think. Don’t quote me on that part.

This means there’s a market for fast compile-time versions of the functions next_prime_after(p) and prime_factors_of(c). Chip even went so far as to propose that vendors should provide “largest prime factor of c” as a builtin; see P3133 “Fast first-factor finding function” (February 2024). I said, “You don’t need the vendor to do your factoring; you can write that in general-purpose C++ already!”

Read More

NYPL Musical of the Month

Today I learned that the New York Public Library has a blog, on which, many years ago, curator Douglas Reside had a “Musical of the Month” series where he posted old libretti, recordings, and other paraphernalia. Sadly the NYPL’s current website design lacks any coherent indexing or tagging system: no full-text search, no search by author, etc. So, for my own benefit and the benefit of posterity, here are direct links to all of the NYPL “Musical of the Month” blog posts — at least, all of them I could discover via public indices. If you discover any more, please tell me and I’ll add them here!

Read More