Fully Schrödinger crosswords

In December, Kory Mathewson tweeted this puzzle-creation challenge:

Create a 5x5 crossword puzzle with two distinct solutions. Each clue must work for both solutions. Do not use the same word in both solutions. No black squares.

Here’s my offering; solutions given at the end of this post.

Click for a PDF of the puzzle

Read More

What I watched and read this year

In 2024, for the first time, I kept a record of the media that I took in this year. Well, not “media” in the news-media sense (however relevant that might have been), but in the sense of books, films, stage shows; and to a lesser extent, journal articles, magazines, TV series, and long-form online content.

Read More

Labeled loop syntax in many languages

Many existing languages support labeled loops, such that you can say break foo; to break out of the loop labeled foo, instead of just breaking from the smallest enclosing loop. The C programming language just gained labeled loops, too, with the adoption of N3355 “Named loops” (Alex Celeste, 2024).

Erich Keane and Aaron Ballman reacted to N3355’s adoption with N3377 “An Improved Syntax for N3355,” which I very much hope will be voted down. It’s an “interesting” proposal, in that the authors are compiler engineers who work on a polyglot compiler (Clang), and yet they don’t seem to consider consistency with other languages to be a positive for C at all.

Read More

Should std::expected be [[nodiscard]]?

A correspondent writes to me that he’s switched from throw/catch exceptions to C++23’s std::expected in all new code. That is, where a traditional C++ program would have:

int f_or_throw();

int g_or_throw() {
  f_or_throw();
    // arguably OK, discards f's result
    // but propagates any exceptional error
  return 1;
}

his programs always have:

using Eint = std::expected<int, std::error_code>;
[[nodiscard]] Eint f_or_error() noexcept;

Eint g_or_error() {
  return f_or_error().transform([](int) {
    return 1;
  });
}

In the former case, we “discard” the result of f_or_throw() by simply discarding the value of the whole call-expression. That’s safe, because errors are always signaled by exceptions, which will be propagated up the stack regardless of what we do with the (non-exceptional, non-error) return value. This ensures that the error is never swallowed except on purpose.

Read More

Wolf (1906) on the false Quijotes of Avellaneda and Lesage

Earlier this year I joined a book club reading Don Quijote and got deep enough into it to seek out the “false second volume of Quijote” of Alonso Fernández de Avellaneda, the book that Don Quixote catches Don Jerónimo and Don Juan reading in Chapter 59 of Cervantes’ actual Part II.

“Why do you want us to read all that nonsense, Don Juan? Nobody who has read the first part of the history of Don Quixote de la Mancha can possibly derive any pleasure from reading this second part.”

“All the same,” said Don Juan, “it’ll be as well to read it, because there’s no book so bad that there isn’t something good in it.”

Read More

Why don’t compilers warn for const T f()?

The other day I got an intriguing question from Sándor Dargó. In const all the things?” (2022-01-23) I had written:

Returning “by const value” is always wrong. Full stop.

Sándor writes: “I was wondering — given that it’s really the case, even the Core Guidelines says so, and it seems to be easy to identify — do you know why we don’t have compiler warnings for such return types?”

Read More

Playing A Serf’s Tale (1986)

The other week I was contacted by a fellow digital antiquarian re an erratum in the “Adventure Family Tree” (managed by Nathanael Culver and hosted by Mike Arnautov). That page had listed under “No known download”:

BROO_XXX: “Enhanced” version of WOOD0350, with “added locations, text added, puzzles reworked,” by Nigel Brooks. […] This version was later renamed “A Serf’s Tale, A Retelling of the Original Adventure”.

In fact, wrote our correspondent, A Serf’s Tale is very much alive and well; the ZX Spectrum tape image survives, and is playable in any Spectrum emulator, such as in JSSpeccy on spectrumcomputing.co.uk. Ctrl+F “speccy” on that page, or (modulo link-rot) click here, to play A Serf’s Tale online.

So I spent a few days trying to beat A Serf’s Tale — and eventually succeeded, with the help of several vintage walkthroughs and hint files. Spoilers galore below the break.

Read More

The red right arm of Jove

In Milton’s Paradise Lost, book II (1667), Belial counsels against an assault on Heaven:

What if the breath that kindl’d those grim fires
Awak’d should blow them into sevenfold rage
And plunge us in the flames? or from above
Should intermitted vengeance arm again
His red right hand to plague us?

This last image is lifted from Horace’s Odes I.2:

Iam satis terris nivis atque dirae
grandinis misit Pater et rubente
dextera sacras iaculatus arces
terruit urbem […]

Read More