Thursday, September 25, 2025

The eagle visited the bay

I happened to see a notice that the USCG Eagle was visiting the bay: Media Advisory: U.S. Coast Guard Barque Eagle ride-in opportunity into San Francisco Bay, Friday, July 25.

Of course, with my puny blog, I'm not a qualified media representative. Still! It would have been so cool!

Seeing that article instantly took me back to 2008, when the Festival of Sail occurred. That was a long time ago, I didn't even have my blog back then!

The Festival of Sail had a Parade of Tall Ships, which assembled just outside the Golden Gate and sailed through the gate in a grand procession. You can read a little bit about it here.

The Festival’s opening Parade of Sail, at noon on July 23, is a unique opportunity for Bay Area residents to view the stately procession of the visiting Tall Ships as they enter the Golden Gate, led proudly by the sleek, elegant United States Coast Guard Cutter Eagle. The historic fleet will be met and escorted by dozens of local sailing vessels as it proceeds past Marina Green, Fort Mason, Aquatic Park, Fisherman’s Wharf, the Embarcadero and the Ferry Building. At the Bay Bridge, the Tall Ships will tack around to be welcomed at their individually assigned berths along the San Francisco waterfront.

I certainly wouldn't call the Eagle sleek, nor elegant, but it was definitely impressive.

A colleague of mine had a 36 foot Hunter, and loved to sail, and in those days I would often act as crewmember (more fondly known as "meat on the high rail"), assisting with the boat, trimming the sails, helping with tacking, raising and lowering the spinnaer, taking turns at the wheel, keeping my friend company, and generally enjoying a day on the bay.

We arranged to be out on the water during the parade, and it was certainly something! Unfortunately it seems like it mostly pre-dated the Internet, and it's hard to find much information online about it anymore, though I did locate this fun short video. In the video you can get a great feel for what it was like to be out on the water, and there are a few beautiful shots of the Eagle. As I recall, the wind was high and the conditions were challenging, and we were almost too busy with our own sailing to be able to admire the big boys. Watch the video all the way through for some stunning footage of the Eagle coming under the Bay Bridge near the end of the parade.

2008 was a bit of a peak time for sailing in the Bay Area. All of the marinas were full, there were sailing clubs everywhere, there were major regattas every weekend, oh what a time it was.

If the timing for this year's visit by the Eagle had been just a little different, I would have tried to get my dad out to see the Eagle, somehow. I often spoke about the Eagle with my dad, who of course was a 30-year veteran of the United States Coast Guard Reserve, retiring as a full Captain. My dad never had a chance to ride the Eagle himself, but we made several other lovely trips on the bay, including one on the Jeremiah O'Brien during Fleet Week, and another for a special Navy League event.

If you ever get a chance to see the Eagle, by all means do so; it's very interesting!

Wednesday, September 24, 2025

Apple's memory safety work

I was fascinated by this survey article from Apple describing their work on memory safety: Memory Integrity Enforcement: A complete vision for memory safety in Apple devices.

I spent pretty much my entire 45-year software engineering career working in systems programming areas where memory safety is a constant challenge. We have many many tools (lint, valgrind, Rust, etc) for finding such problems, yet still they seem ever-present.

So it's wonderful to see Apple taking a new approach to the problem, working across multiple layers. Programming languages, operating systems, function libraries, and custom hardware all have a role to play in their work.

This is an approach that is currently possible for Apple, because they deliver integrated systems where such complete stack control is possible. You wouldn't, for example, be able to do this on your Windows PC or on your Linux workstation because in those environments you tend to get the operating system, programming language, and hardware from three different vendors.

So good on Apple for realizing they had an opportunity to do something new and powerful, and for seizing that opportunity and delivering on it.

Tuesday, September 16, 2025

They're calling it the Turkish Immortal

Have a look at this recent chess game. Just play through the moves.

It's from a recent chess tournament in Samarkand, Uzbekistan. This is one of the qualifying tournaments for next year's World Championship, and there are some very fine players competing.

Chess is very popular around the world these days, and many new young stars from unfamiliar regions are making the modern game quite exciting to watch.

In this game, the white pieces are played by Aditya Mittal, who will have his 19th birthday this Friday, while the black pieces are played by Yağız Kaan Erdoğmuş , currently the youngest grandmaster in the world, having just turned 14 in June.

Wednesday, September 3, 2025

Pointer Provenance in C and C++

I happened to stumble across some interesting work from some people who are trying to take some of the Rust ideas about tracking memory lifetimes down into C and C++:

  • A Provenance-aware Memory Object Model for C
    In a committee discussion from 2004 concerning DR260, WG14 confirmed the concept of provenance of pointers, introduced as means to track and distinguish pointer values that represent storage instances with same address but non-overlapping lifetimes. Implementations started to use that concept, in optimisations relying on provenance-based alias analysis, without it ever being clearly or formally defined, and without it being integrated consistently with the rest of the C standard.
  • P2434R4: Nondeterministic pointer provenance
    The main alternative that was considered and rejected is the PVI model, which avoids the notion of storage exposure but imposes further restrictions on integer conversions. These restrictions provide further opportunities for optimization but also complicate the execution model in subtle ways that make it difficult for the programmer to determine whether a manipulation preserves the validity of a pointer (yet to be reconstructed). They also interact badly with serialization of pointers where operations on the converted pointer value are entirely invisible; additional annotations might be required to support this use case.
  • What on Earth Does Pointer Provenance Have to do With RCU?
    The results of operations on invalid pointers are not guaranteed, which provides additional opportunities for optimization. This example perhaps seems a bit silly, but modern compilers can use pointer provenance and invalidity to carry out serious points-to and aliasing analysis.

Not very easy reading. And a bunch of it is nearly 20 years old!

Change comes very slowly to the world of system programming in C. But at least C is still, slowly, evolving.