Dante’s hypersphere in THREE.js

Mark A. Peterson’s essay “Dante and the 3-sphere” (Am. J. Phys. 47(12), December 1979) suggests that when, in Paradiso 27, Dante looks from the starry sphere upward in the direction of the Empyrean and downward in the direction of Earth, and when he sees that nine concentric circles of angels above mirror the nine concentric planetary spheres below, he is “groping for a language to express an idea conceived intuitively and nonverbally” — namely, the idea of “how a 3-sphere would look from its equator.”

Read More

The crossword from Bored to Death S2E5

In HBO’s Bored to Death episode S2E5 “Forty-Two Down,” protagonist Jonathan Ames (Jason Schwartzman) introduces himself to his target Vikram (Ajay Naidu) by asking his help with that day’s New York Times crossword. We get two brief shots of the crossword itself. The first, a closeup, is just enough to irk the crossworders in the audience, as we see a plethora of unkeyed letters. The second medium shot shows that the black squares in this asymmetric grid spell out the word “HIT.” (Or does the black blob in front of the “H” represent a fourth letter?)

The episode aired 2010-10-24, but the Times shown is mostly the issue of Wednesday 2007-11-14: the facing column contains Mike Hale’s review of the TV show Kenny vs. Spenny, and the “Answer to Previous Puzzle” at lower left is indeed Fred Piscop’s puzzle of 2007-11-13. The crossword, however, is completely doctored — I see no resemblance to the Jim Page puzzle that actually ran on that date. The clues (which do not match the grid) are hilariously zany!

Read More

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