Using Wikipedia’s API to find inconsistently hyphenated French names
Arthur O’Dwyer
by
6d ago
The other day I noticed that a lot of English Wikipedia articles about French people for some reason use a space between parts of the given name where primary sources and/or the French Wikipedia use a hyphen; for example, the English Wikipedia (as of May 2024) has “Marie Thérèse Geoffrin” where both the Bibliothèque nationale and Encyclopaedia Britannica have “Marie-Thérèse Geoffrin.” I wrote a Python script that uses the Mediawiki API to enumerate the articles with this inconsistency, and generate requested moves for each page where the French article’s title begins with e.g. “Marie-Thérèse ..read more
Visit website
Reverse the List of Integers
Arthur O’Dwyer
by
2w ago
On 2024-04-09, Alexandre Muñiz posted to Mathstodon a new mathematical recreation he calls “Reverse the List of Integers.” (Also on Hacker News here.) The game works like this: Start with a list of distinct positive integers, e.g. (10 5 3). Your goal is to reverse the list, via “moves” of these two kinds: Split a single number into two parts that sum to the whole; e.g. (10 5 4) could become (7 3 5 4) or (10 2 3 4). Combine two adjacent numbers into their sum; e.g. (7 3 5 4) could become (7 8 4) or (7 3 9). Throughout, it is forbidden to create a number greater than the original list’s ..read more
Visit website
A case study in not-quite-move-semantic library design
Arthur O’Dwyer
by
3w ago
Building on yesterday’s post “Name lookup in multiple base classes” (2024-04-17), Seth Bromberger and I recently talked about the following library-design problem involving (or at least seeming to involve) exactly that issue. The shape of the problem is: We have a class Graph whose constructor takes a collection of data and puts the top k values into a nice graph. Its constructor will be templated to work with any collection c, as long as c.topk(10) yields a result of type vector<Datum>. We have, let’s say, four different collection types that are usable with Graph; let’s call them A ..read more
Visit website
Name lookup in multiple base classes
Arthur O’Dwyer
by
3w ago
Several times people have asked me, “Why does overload resolution not work if the overload set spans two base classes?” That is: struct Plant { void f(int); }; struct Fungus { void f(int, int); }; struct Lichen : Plant, Fungus { void g() { f(1); // error, lookup fails f(1, 2); // error, lookup fails } }; This is because [class.member.lookup] says, essentially, that if we don’t find a declaration of the name f in Lichen’s scope then we should look into its base classes; and if we find declarations of f in more than one base class, we should consider this an unresolvable ..read more
Visit website
Help wanted: Compile your codebase with P1144 and P2786 relocatability!
Arthur O’Dwyer
by
1M ago
At today’s WG21 SG14 (Low Latency) meeting, there was a discussion of P1144 trivial relocatability versus P2786 trivial relocatability. It was remarked that each proposal has a corresponding Clang fork. My P1144 implementation, as seen in “Announcing Trivially Relocatable” (2018-07-18) and on godbolt.org Corentin Jabot’s P2786 implementation, as seen [TODO fill this in: godbolt.org/z/KEY3n4P3W was shown before, but doesn’t work at the moment] So I suggested that anyone interested in relocation could really help us out by downloading both compiler implementations and trying them out on th ..read more
Visit website
Johnson’s definition of _network_
Arthur O’Dwyer
by
1M ago
In Jane Loudon’s The Mummy!: A Tale of the Twenty-Second Century (1827) — more on that soon — one of the running gags is that due to the success of “universal education,” all the lower-class people speak in learned Latinate phrases, while the average member of the upper class affects (I, 3) an excessive plainness and simplicity in his language; so much so, indeed, as sometimes almost to degenerate into rudeness, in order that it might be clearly distinguished from the elaborate and scientific expressions of the vulgar. So we get this exchange between the foreigner Hans and an English cottage ..read more
Visit website
Trivial, but not trivially default constructible
Arthur O’Dwyer
by
1M ago
I just watched Jason Turner’s CppCon 2023 talk “Great C++ is_trivial.” Circa 41m00s he picks on the wording of [class.prop]/2: A trivial class is a class that is trivially copyable and has one or more eligible default constructors, all of which are trivial. “That phrasing’s always bothered me. How can you have more than one default constructor? They could be constrained by requires-clauses… but then not more than one of them is eligible.” Here’s the trick: Jason, you were wrongly assuming that a trivial class must be default-constructible at all! Godbolt: template<class T> struct S ..read more
Visit website
Ed Catmur’s Triliteral esolang
Arthur O’Dwyer
by
1M ago
Prolific C++ contributor Ed Catmur died unexpectedly on a fell run on New Year’s Eve 2023. (Many tributes from the C++ and especially the fell-running community; see e.g. here. He will be missed.) After Ed’s memorial, where a snippet of his CppCon 2023 lightning talk was played, I sifted his GitHub hoping to find the slides from that talk. (It turns out Phil Nash still had them, and they’re now publicly available.) Ed left behind a lot of thought-provoking material. One thing that caught my eye — which I had never known about him — was that he was briefly active on esolangs.org, the wiki for e ..read more
Visit website
Some St. Patrick’s Day math
Arthur O’Dwyer
by
1M ago
At today’s Gathering 4 Gardner social, Colm Mulcahy presented on two Irish figures in recreational mathematics with whom Martin Gardner corresponded: Victor Meally and Owen O’Shea. Owen O’Shea is the natural successor to Gardner’s “Professor I.J. Matrix” as a prolific generator of numerological coincidences — see for example The Magic Numbers of the Professor (2007). Victor Meally shows up occasionally in Gardner’s Mathematical Games columns, and also in “Problem 3.14” (appropriate for Pi Day!) in The Colossal Book of Short Puzzles and Problems (2006): One of the satisfactions of recreational ..read more
Visit website
The 2024 Google Summer of Code idea lists are out
Arthur O’Dwyer
by
2M ago
As of late February, Google Summer of Code (GSoC) has published its official list of sponsoring open-source organizations, and each organization has independently published its own list of project ideas. People interested in doing a GSoC project (sort of a summer internship for open source software) should submit a proposal application — the quite short application window is March 18 to April 2. If you’re a fan of my “trivial relocatability” content, or just want to help relocation’s progress into the mainstream of C++, you might be particularly interested in these three GSoC sponsors: Ste ..read more
Visit website

Follow Arthur O’Dwyer on FeedSpot

Continue with Google
Continue with Apple
OR