Feed fetched in 358 ms.
Warning Content type is application/atom+xml
, not text/xml
.
Feed is 184,893 characters long.
Feed has an ETag of "2dae1-63b3e566dcfb8"
.
Feed has a last modified date of Thu, 31 Jul 2025 19:06:24 GMT
.
Warning This feed does not have a stylesheet.
This appears to be an Atom feed.
Feed title: ongoing by Tim Bray
Feed self link matches feed URL.
Feed has 19 items.
First item published on 2025-07-29T19:00:00.000Z
Last item published on 2025-04-21T19:00:00.000Z
Home page URL: https://www.tbray.org/ongoing/
Home page has feed discovery link in <head>.
Home page has a link to the feed in the <body>
<?xml version="1.0" encoding="UTF-8"?> <feed xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0" xml:lang="en-us"> <title>ongoing by Tim Bray</title> <link rel="hub" href="http://pubsubhubbub.appspot.com/"/> <id>https://www.tbray.org/ongoing/</id> <link href="https://www.tbray.org/ongoing/"/> <link rel="self" href="https://www.tbray.org/ongoing/ongoing.atom"/> <link rel="replies" thr:count="101" href="https://www.tbray.org/ongoing/comments.atom"/> <logo>rsslogo.jpg</logo> <icon>/favicon.ico</icon> <updated>2025-07-31T12:06:23-07:00</updated> <author> <name>Tim Bray</name> </author> <subtitle>ongoing fragmented essay by Tim Bray</subtitle> <rights>All content written by Tim Bray and photos by Tim Bray Copyright Tim Bray, some rights reserved, see /ongoing/misc/Copyright</rights> <generator uri="/misc/Colophon">Generated from XML source code using Perl, Expat, Emacs, Mysql, Ruby, and ImageMagick. Industrial-strength technology, baby.</generator> <entry> <title>De-Google Project Update</title> <link href="https://www.tbray.org/ongoing/When/202x/2025/07/29/DeGoogling"/> <link rel="replies" thr:count="13" type="application/xhtml+xml" href="/ongoing/When/202x/2025/07/29/DeGoogling#comments"/> <id>https://www.tbray.org/ongoing/When/202x/2025/07/29/DeGoogling</id> <published>2025-07-29T12:00:00-07:00</published> <updated>2025-07-31T12:06:18-07:00</updated> <category scheme="https://www.tbray.org/ongoing/What/" term="The World/Life Online/De-Google"/> <category scheme="https://www.tbray.org/ongoing/What/" term="The World"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Life Online"/> <category scheme="https://www.tbray.org/ongoing/What/" term="De-Google"/> <summary type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml">I <a href="/ongoing/When/202x/2024/03/09/DeGoogling">introduced this family project</a> in the spring of 2024. I won’t reproduce those arguments for why we’re working on this, but in the current climate I feel like I hardly need to. Since that post, our aversion to Google dependency has only grown stronger. Progress has been non-zero but not fast</div> </summary> <content type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml"> <p> I <a href="/ongoing/When/202x/2024/03/09/DeGoogling">introduced this family project</a> in the spring of 2024. I won’t reproduce those arguments for why we’re working on this, but in the current climate I feel like I hardly need to. Since that post, our aversion to Google dependency has only grown stronger. Progress has been non-zero but not fast. </p> <p>Here’s the table, with progress notes below.</p> <table> <tr valign="top"> <th>Need</th> <th>Supplier</th> <th>Alternatives</th> </tr> <tr valign="top"> <td> <a href="/ongoing/When/202x/2024/03/09/DeGoogling#p-3">Office</a> </td> <td class="unhappy">Google Workspace</td> <td>Proton?</td> </tr> <tr valign="top"> <td> <a href="/ongoing/When/202x/2024/03/09/DeGoogling#p-17">Data sharing</a> </td> <td class="happy">Dropbox</td> <td></td> </tr> <tr valign="top"> <td> <a href="/ongoing/When/202x/2024/03/09/DeGoogling#p-17">Photos</a> </td> <td class="unhappy">Google Photos</td> <td>Dropbox?</td> </tr> <tr valign="top"> <td> <a href="/ongoing/When/202x/2024/03/09/DeGoogling#p-16">Video meetings</a> </td> <td class="unhappy">Google Meet</td> <td>Jitsi, Signal?</td> </tr> <tr valign="top"> <td> <a href="/ongoing/When/202x/2024/03/09/DeGoogling#p-10">Maps</a> </td> <td class="unhappy">Google Maps</td> <td>Magic Earth, Here, something OSM-based?</td> </tr> <tr valign="top"> <td> <a href="/ongoing/When/202x/2024/03/09/DeGoogling#p-4">Browser</a> </td> <td class="happy">Safari, Firefox, Vivaldi, LibreWolf</td> <td></td> </tr> <tr valign="top"> <td> <a href="/ongoing/When/202x/2024/03/09/DeGoogling#p-12">Search</a> </td> <td class="unhappy">Google</td> <td>Bing-based options, Kagi?</td> </tr> <tr valign="top"> <td> <a href="/ongoing/When/202x/2024/03/09/DeGoogling#p-5">Chat</a> </td> <td class="happy">Signal</td> <td></td> </tr> <tr valign="top"> <td> <a href="/ongoing/When/202x/2024/03/09/DeGoogling#p-6">Photo editing</a> </td> <td class="neutral">Adobe Lightroom & Nik</td> <td>Capture One, Darktable, ?</td> </tr> <tr valign="top"> <td> <a href="/ongoing/When/202x/2024/03/09/DeGoogling#p-7">In-car interface</a> </td> <td class="neutral">Google Android Auto</td> <td>Automaker software</td> </tr> <tr valign="top"> <td> <a href="/ongoing/When/202x/2024/03/09/DeGoogling#p-8">Play my music</a> </td> <td class="happy">Plex, USB</td> <td></td> </tr> <tr valign="top"> <td> <a href="/ongoing/When/202x/2024/03/09/DeGoogling#p-9">Discover music</a> </td> <td class="happy">Qobuz</td> <td></td> </tr> <tr valign="top"> <td> <a href="/ongoing/When/202x/2024/03/09/DeGoogling#p-13">TV</a> </td> <td class="neutral">Roku, Apple, migration</td> <td></td> </tr> </table> <p>Pink indicates a strong desire to get off the incumbent service, green means we’re happy-ish with what we’re using, and blue means that, happy or not, it’s not near the top of the priority list.</p> <p>I’ll reproduce the metrics we care about when looking to replace Google products, some combination of:</p> <ol> <li> <p>Not ad-supported</p> </li> <li> <p>Not VC-funded</p> </li> <li> <p>Not Google, Microsoft, or Amazon</p> </li> </ol> <p>The list used to include “Open Source” but I decided that while that’s good, it’s less important than the other three criteria.</p> <p>Now let’s walk down the chart.</p> <h2 id="p-3">Office</h2> <p>This is going to be a wrenching transition; we’ve been running the family on Google stuff forever, and I anticipate muscle-memory pain. But increasingly, using Google apps feels like being in enemy territory. And, as I said last time, I will not be sorry to shake the dust of Google Drive and Docs from my heels, I find them clumsy and am always having trouble finding something that I know is in there.</p> <p>While I haven’t dug in seriously yet, I keep hearing reasonably-positive things about Proton, and nothing substantive to scare me away. Wish us luck.</p> <h2 id="p-17">Data sharing (progress!)</h2> <p>Dropbox is, eh, OK. It doesn’t seem actively evil, there’s no advertising, and the price is low.</p> <h2 id="p-21">Photos</h2> <p>We’re a four-Android family including a couple of prolific photographers, and everything just gets pumped into Google and then it fills up and then they want more money. If we could configure the phones to skip Google and go straight to Dropbox, that would be a step forward.</p> <h2 id="p-16">Video meetings</h2> <p>Google meet isn’t painful but I totally suspect it of data-mining what should be private conversations. I’m getting the feeling that the technical difficulty of videoconferencing is going steadily down, so I’m reasonably optimistic that something a little less evil will come along with a fair price.</p> <h2 id="p-10">Maps</h2> <p> The fear and loathing that <a href="/ongoing/When/201x/2017/06/29/Fear-Google-Reviews">I started feeling in 2017</a> grows only stronger. But replacements aren’t obvious. It’s a pity, maps and directions and reviews feel like a natural monopoly that should be a public utility or something, rather than a corporate moat. </p> <h2 id="p-4">Browser (progress!)</h2> <p>Chrome has seriously started making my flesh crawl; once again, enemy territory. Fortunately, there are lots of good options. Even people like us who have multiple lives we need to keep separate can find enough better browsers out there.</p> <p>Maybe I’ll have a look at one of the new genAI-company browsers ha ha just kidding.</p> <h2 id="p-12">Search</h2> <p>The reports on Kagi keep being positive and giving it a try is definitely on the To-Do list.</p> <h2 id="p-5">Chat</h2> <p>Signal is the only sane choice at this point in history for personal use.</p> <h2 id="p-6">Photo editing</h2> <p>Adobe’s products are good, and I’m proficient and happy with Lightroom, but they are definitely suffering from bad genAI craziness. Also the price is becoming unreasonable.</p> <p>I’ve had a few Lightroom software failures in recent months and if that becomes a trend, looking seriously at the alternatives will move to the top of the priority list.</p> <h2 id="p-7">In-car interface</h2> <p> It’s tough, Android Auto is a truly great product. I think I’m stuck here for now, particularly given that I plan to be driving a <a href="/ongoing/What/The%20World/Jaguar%20Diary/">2019-model-year car</a> for the foreseeable future. Also, it supports my music apps. </p> <h2 id="p-9">Discover music and play mine (progress!)</h2> <p>Progress here. I’ve almost completely stopped using YouTube Music in favor of Plex and Qobuz. Really no downside; YTM has more or less completely lost the ability to suggest good new stuff.</p> <h2 id="p-13">TV</h2> <p> Video continues morphing itself into Cable TV redux. We have an old Roku box that works fine and I think I’ve managed to find its don’t-spy-on-us settings. We’ll keep subscribing to Apple+ as long as they keep shipping great shows. I have zero regrets about having <a href="/ongoing/When/202x/2025/03/06/Canceled-Prime">left Prime behind</a> . </p> <p>As for the rest, we’ve become migrants, exclusively month-at-a-time subscriptions for the purpose of watching some serial or sports league, unsubscribe after the season finale or championship game. The good news is that I haven’t encountered much friction in unsubscribing, just a certain amount of earnest pleading.</p> <h2 id="p-20">Looking forward</h2> <p>I have yet to confront any of the really hard parts of this project, but the sense of urgency is increasing. Let’s see.</p> </div> </content> </entry> <entry> <title>QRS: Finite-state Struggles</title> <link href="https://www.tbray.org/ongoing/When/202x/2025/07/21/Automaton-merge-war"/> <link rel="replies" thr:count="2" type="application/xhtml+xml" href="/ongoing/When/202x/2025/07/21/Automaton-merge-war#comments"/> <id>https://www.tbray.org/ongoing/When/202x/2025/07/21/Automaton-merge-war</id> <published>2025-07-21T12:00:00-07:00</published> <updated>2025-07-22T09:10:25-07:00</updated> <category scheme="https://www.tbray.org/ongoing/What/" term="Technology/Quamina Diary"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Technology"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Quamina Diary"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Technology/Software"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Software"/> <summary type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml">I just posted a big <a href="https://github.com/timbray/quamina">Quamina</a> PR representing months of work, brought on by the addition of a small basic regular-expression feature. This ramble doesn’t exactly have a smooth story arc but I’m posting it anyhow because I know there are people out there interested in state-machine engineering and they are my people</div> </summary> <content type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml"> <p> I just posted a big <a href="https://github.com/timbray/quamina">Quamina</a> PR representing months of work, brought on by the addition of a small basic regular-expression feature. This ramble doesn’t exactly have a smooth story arc but I’m posting it anyhow because I know there are people out there interested in state-machine engineering and they are my people. </p> <p> As far as I can tell, a couple of the problems I’m trying to solve haven’t been addressed before, at least not by anyone who published their findings. Partly because of that, I’m starting to wonder if all <a href="/ongoing/What/Technology/Quamina%20Diary/">these disorderly Quamina postings</a> might be worked into a small book or monograph or something. State machines are really freaking useful software constructs! So yeah, this is a war story not an essay, but if you like finite automata you’ll likely be interested in bits of it. </p> <h2 id="p-1">The story thus far</h2> <p> Prior to beginning work on Regular Expressions, I’d already wired shell-style “ <code>*</code> ” wildcards into Quamina, which forced me to start working with NFAs and ε-transitions. The implementation wasn’t crushingly difficult, and the performance was… OK-ish. </p> <p> Which leads me to The Benchmark From Hell. I wondered how the wildcard functionality would work under heavy stress, so I pulled in a list of 12,959 five-letter strings from the Wordle source code, and inserted a “ <code>*</code> ” at a random position in each. Here are the first ten: </p> <blockquote> <pre> <code>aalii* *aargh aar*ti abaca* a*baci a*back ab*acs ab*aft abak*a</code> </pre> </blockquote> <p> I created an NFA for each and merged them together <a href="/ongoing/When/202x/2024/07/28/Union-of-Finite-Automata">as described here</a> . Building and merging the automata were plenty fast enough, and the merged NFA had 46,424 states, which felt reasonable. Matching strings against it ran at under ten thousand per second, which is pretty poor given that Quamina can do a million or two per second on patterns encoded in a DFA. </p> <p>But, I thought, still reasonably usable.</p> <h2 id="p-2">The cursed “<code>?</code>”</h2> <p> Last year, my <a href="/ongoing/When/202x/2024/12/12/Quamina-Regular-Expression-Series">slow grind through the regexp features</a> had led me to the zero-or-one quantifier “ <code>?</code> ”. The state machine for these things is not rocket science; there’s a discussion with pictures in my recent <a href="/ongoing/When/202x/2025/07/07/Epsilon-Wrangling#p-3">Epsilon Wrangling</a> . </p> <p> So I implemented that and fired off the unit tests, most of which <a href="/ongoing/When/202x/2024/12/12/QRS-Parsing-Regular-Expressions#p-1">I didn’t have to write</a> , and they all failed. Not a surprise I guess. </p> <p> It turned out that the way I’d implemented ε-transitions for the wildcards <a href="/ongoing/When/202x/2024/07/28/Union-of-Finite-Automata#p-9">was partially wrong</a> , as in it worked for the tight-loop state-to-itself ε-transitions, but not for more general-purpose things like “ <code>?</code> ” requires. </p> <p> In fact, it turns out that merging NFAs is hard (DFAs are easy), and I found precious little help online. <a href="https://en.wikipedia.org/wiki/Thompson%27s_construction">Thompson’s construction</a> does give an answer: Make an otherwise-empty state with two ε-transitions, one to each of the automata, and it’ll do the right thing. Let’s call that a “splice state”. It’s easy to implement, so I did. Splicing is hardly “merging” in the Quamina sense, but still. </p> <p>Unfortunately, the performance was hideously bad, just a few matches per second while pegging the CPU. A glance at the final NFA was sobering; endless chains of splice states, some thousands long.</p> <p>At this point I became very unhappy and got stalled for months dealing with real-life issues while this problem lurked at the back of my mind, growling for attention occasionally.</p> <p>Eventually I let the growler out of the cave and started to think through approaches. But first…</p> <h2 id="p-4">Worth solving?</h2> <p>Is it, really? What sane person is going to want to search for the union of thousands of regular expressions in general or wild-carded strings in particular?</p> <p> I didn’t think about this problem at all, because of my experience with Quamina’s parent, <a href="https://github.com/aws/event-ruler">Ruler</a> . When it became popular among several AWS and Amazon teams, people sometimes found it useful to match the union of not just thousands but a million or more different patterns. When you write software that anyone actually uses, don’t expect the people using it to share your opinions on what is and isn’t reasonable. So I wasn’t going to get any mental peace until I cracked this nut. </p> <p>I eventually decided that three approaches were worth trying:</p> <ol> <li> <p>Figure out a way really to merge, not just splice, the wildcarded patterns, to produce a simpler automaton.</p> </li> <li> <p>Optimize the NFA-traversal code path.</p> </li> <li> <p>Any NFA can be transformed into a DFA, says computer-science theory. So do that, because Quamina is really fast at DFA-based matching.</p> </li> </ol> <h2 id="p-5">Nfa2Dfa</h2> <p>I ended up doing all of these things and haven’t entirely given up on any of them. The most intellectually-elegant was the transform-to-DFA approach, because if I did that, I could remove the fairly-complex NFA-traversal logic from Quamina.</p> <p>It turns out that the Net is rich with textbook extracts and YouTubes and slide-shows about how to do the NFA-to-DFA conversion. It ended up being quite a pleasing little chunk of code, only a couple hundred lines.</p> <p>The bad news: Converting each individual wildcard NFA to a DFA was amazingly fast, but then as I merged them in one by one, the number of automaton states started increasing explosively and the process slowed down so much that I never had the patience to let it finish. Finite-automata theory warns that this can happen, but it’s hard to characterize the cases where it does. I guess this one of them.</p> <p> Having said that, I haven’t discarded the <code>nfa2Dfa</code> code, because perhaps I ought to offer a Quamina option to apply this if you have some collection of patterns that you want to run really super fast and are willing to wait for a while for the transformation process to complete. Also, I may have missed opportunities to optimize the conversion; maybe it’s making more states than it needs to? </p> <h2 id="p-6">Faster NFA traversal</h2> <p> Recently in <a href="/ongoing/When/202x/2025/07/07/Epsilon-Wrangling">Epsilon wrangling</a> I described how NFA traversal has to work, relying heavily on implementing a thing called an ε-closure. </p> <p>So I profiled the traversal process and discovered, unsurprisingly, that most of the time was going into memory allocation while computing those ε-closures. So now Quamina has an ε-closure cache and will only compute each one once.</p> <p> This helped a lot but not nearly enough, and the profiler was still telling me the pain was in Go’s allocation and garbage-collection machinery. Whittling away at this kind of stuff is not rocket science. The standard Go trick I’ve seen over and over is to keep all your data in slices, keep re-using them then chopping them back to <code>[:0]</code> for each request. After a while they’ll have grown to the point where all the operations are just copying bytes around, no allocation required. </p> <p>Which also helped, but the speed wasn’t close to what I wanted.</p> <h2 id="p-7">Merging wildcard automata</h2> <p> I coded multiple ways to do this, and they kept failing. But I eventually found a way to build those automata so that any two of them, or any one of them and a DFA, can merged and generate dramatically fewer ε-transition chains. I’m not going to write this up here for two reasons: First of all, it’s not <em>that</em> interesting, and second, I worry that I may have to change the approach further as I go on implementing new regxp operators. </p> <p> In particular, at one point I was looking at the code while it wasn’t working, and I could see that if I added a particular conditional it would work, but I couldn’t think of a principled reason to do it. Obviously I’ll have to sort this out eventually. In the meantime, if you’re the sort of um special person who is now burning with curiosity, check out my branch from that PR and have a look at the <code>spinout</code> type. </p> <p> Anyhow, I added that conditional even though it puzzled me a bit, and now you can add wildcard patterns to Quamina at 80K/second, and my 12.9K wildcards generate an NFA with with almost 70K states, which can scan events at almost 400K/second. And that’s good enough to ship the <code>“?”</code> feature. </p> <p>By the way, I tried feeding that 70K-state automaton to the DFA converter, and gave up after it’d burned an hour of CPU and grown to occupy many GB of RAM.</p> <h2 id="p-8">Next steps</h2> <p>Add “<code>+</code>” and “<code>*</code>”, and really hope I don’t have to redesign the NFA machinery again.</p> <p>Also, figure out the explanation for that puzzling <code>if</code> statement.</p> <h2 id="p-9">And I should say…</h2> <p>Despite the very narrow not to say obsessive focus of this series, I’ve gotten a few bits and pieces of positive feedback. So there are a few people out there who care about this stuff. To all of you, thanks.</p> </div> </content> </entry> <entry> <title>Memory in Saskatchewan</title> <link href="https://www.tbray.org/ongoing/When/202x/2025/07/09/Saskatchewan"/> <link rel="replies" thr:count="9" type="application/xhtml+xml" href="/ongoing/When/202x/2025/07/09/Saskatchewan#comments"/> <id>https://www.tbray.org/ongoing/When/202x/2025/07/09/Saskatchewan</id> <published>2025-07-09T12:00:00-07:00</published> <updated>2025-07-16T10:11:34-07:00</updated> <category scheme="https://www.tbray.org/ongoing/What/" term="The World/Places/Saskatchewan"/> <category scheme="https://www.tbray.org/ongoing/What/" term="The World"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Places"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Saskatchewan"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Arts/Photos"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Arts"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Photos"/> <summary type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml">I just came back from Canada’s <a href="https://en.wikipedia.org/wiki/Saskatchewan">only rectangular province</a>. I was there to help out my 95-year-old mother while her main caregiver took vacation. It’s an unhappiness that my family has splashed itself across Canada in such a way that we have to get on an airplane (or take drives measured in days) to see each other, but that’s where we are. I came back with pictures and stories</div> </summary> <content type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml"> <p> I just came back from Canada’s <a href="https://en.wikipedia.org/wiki/Saskatchewan">only rectangular province</a> . I was there to help out my 95-year-old mother while her main caregiver took vacation. It’s an unhappiness that my family has splashed itself across Canada in such a way that we have to get on an airplane (or take drives measured in days) to see each other, but that’s where we are. I came back with pictures and stories. </p> <p>Let me set the stage with a couple of photos. Everyone knows that Saskatchewan is flat and brown and empty, right?</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/07/09/TXT55665.png" alt="Flowers, intensely colored in near-black purple and yellow"/> <img src="https://www.tbray.org/ongoing/When/202x/2025/07/09/TXT55710.png" alt="Trees and lawns, behind a still body of water and somewhat reflected in it"/> <p> Mom lives in <a href="https://en.wikipedia.org/wiki/Regina,_Saskatchewan">Regina</a> , the provincial capital, a city built round a huge park that contains the Legislature (the flowers are from its front lawn), a sizeable lake, and an artificial mini-mountain (the water and trees are from its tip). Have no fear, I’ll get to some no-kidding prairie landscapes. </p> <h2 id="p-1">Health-care drama</h2> <p>The night I arrived, after my Mom went to bed she got up again, tripped on something and fell hard. Her right arm was swollen, bruised, and painful. The skin and adjacent blood vessels of very old people become thin and fragile; her whole forearm was a bruise. I tried to get her to go to Emergency but she wasn’t having any of it: “You wait for hours and then they give you a pain-killer, which is constipating.” Since she could twist her wrist and wiggle her fingers and give my hand a firm grasp, I didn’t push too hard.</p> <p> A couple days later on Saturday she got her regular twice-a-week visit from the public <a href="https://www.saskatchewan.ca/residents/health/accessing-health-care-services/care-at-home-and-outside-the-hospital/home-care">HomeCare</a> nurse, a friendly and highly competent Nigerian immigrant, to check her meds and general condition. She looked at Mom’s wrist and said “Get her an appointment with her doctor, they’ll probably want an X-Ray.” </p> <p>I called up her doctor at opening time Monday. The guy who answered the phone said “Don’t have any appointments for a couple weeks but come on over, we’ll squeeze her in.” So we went in after morning coffee and waited less than an hour. The doctor looked at her arm for 45 seconds and said “I’m writing a prescription for an X-Ray” and there was a radiologist around the corner and she was in ten minutes later. The doctor called me back that afternoon and said “Your mother’s got a broken wrist, I got her an 8AM appointment tomorrow at Regina General’s Cast Clinic.”</p> <p>The doctor at the clinic looked at her wrist for another 45 seconds and said “Yeah, put on a cast” so they did and we were home by ten. I’d pessimistically overpaid a couple bucks for hospital parking.</p> <p>The reason I’m including this is because I notice that this space has plenty of American readers. Did you notice that the story entirely omits insurance companies and money (except parking)? In Canada your health-care comes with your taxes (granted, higher than Americans’) and while the system is far from perfect, it can fix up an old lady’s broken wrist pretty damn fucking quick without any bureaucratic bullshit. Also, Canada spends a huge amount less per head on health-care than the US does.</p> <p> And Mom told me not to forget that Saskatchewan is the birthplace of Canadian single-payer universal healthcare. <a href="https://en.wikipedia.org/wiki/Tommy_Douglas">Tommy Douglas</a> , the Social Democrat who made that happen, has been named <a href="https://en.wikipedia.org/wiki/The_Greatest_Canadian">The Greatest Canadian</a> . </p> <h2 id="p-2">Gentle surface</h2> <p>Oh, did I say “flat and brown and empty”? Wrong, wrong, and wrong. The Prairies, in Canada and the US too, have textures and colors and hills and valleys, it’s just that the slopes are gentle. There are really flat parts and they make farmers’ lives easier, but more or less every square inch that’s not a town or a park is farmed. I took Mom for a drive out in the country southeast of Regina, from whence these views:</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/07/09/TXT55698.png" alt="A road leading slightly uphill, brilliant yellow canola on both sides"/> <img src="https://www.tbray.org/ongoing/When/202x/2025/07/09/TXT55700.png" alt="Yellow canola flowers under a blue sky"/> <div class="caption"> <p> Note that in both shots we’re looking up a gentle slope. In the second, there’s farm infrastructure on the distant horizon. <br/> Also consider the color of the sky. </p> </div> <p> In Canada that yellow-flowering crop is called “Canola”, which Wikipedia claims refers to a particular cultivar of <i>Brassica napus</i> , commonly known as rapeseed or just rape, so you can see why when Canada’s agribiz sector wanted to position its oil as the thing to use while cooking they went for the cultivar not the species name. I’m old enough to remember when farmers still said just “rapeseed”. Hmm, Wikipedia also claims that the OED claims this: The term “rape” derives from the Latin word for turnip, <i>rāpa</i> or <i>rāpum</i> , cognate with the Greek word ῥάφη, <i>rhaphe</i> . </p> <p>Let’s stick with canola.</p> <h2 id="p-4">Pixelated color</h2> <p>After I’d taken those two canola-field shots I pulled out my Pixel and took another, but I’m not gonna share it because the Pixel decided to turn the sky from what I thought was a complex and interesting hue into its opinion of “what a blue sky looks like” only this sky didn’t.</p> <p>Maybe it’s just me, but I think Google’s camera app is becoming increasingly opinionated about color, and not in a good way. There are plenty of alternative camera apps, I should check them out.</p> <p>In case it’s not obvious, I love photographing Saskatchewan and think it generally looks pretty great, especially when you look up. On the province’s license plates it says “Land of living skies”, and no kidding.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/07/09/PXL_20250704_032320050.png" alt="Saskatchewan’s living skies"/> <img src="https://www.tbray.org/ongoing/When/202x/2025/07/09/PXL_20250704_032334240.png" alt="Saskatchewan’s living skies"/> <img src="https://www.tbray.org/ongoing/When/202x/2025/07/09/TXT55717.png" alt="Saskatchewan’s living skies"/> <div class="caption"> <p> The first two are from the park behind Mom’s place, <br/> the third from that mini-mountain mentioned above. </p> </div> <h2 id="p-6">Experience and memory</h2> <p>My Mom’s doing well for a nonagenerian. She’s smart. When I visited early last fall and we talked about the US election I was bullish on Kamala Harris’s chances. She laughed at me and said “The Americans won’t elect a woman.” Well then.</p> <p>But she’s forgetful in the short term. I took her to the Legislature’s garden and to the top of the mini-mountain and for a drive out in the country and another adventure we’ll get to; she enjoyed them all. But maybe she won’t remember them.</p> <p>“Make memories” they say, but what if you show someone you love a good time and maybe they won’t remember it the next day? I’m gonna say it’s still worthwhile and has a lesson to teach about what matters. There endeth the lesson.</p> <h2 id="p-5">The gallery</h2> <p> Indigenous people make up 17% of Regina’s population, the highest share in any significant Canadian city. By “indigenous” I mean the people that my ancestors stole the land from. It’s personal with me; Around 1900, my Dad’s family, Norwegian immigrants, took over some pretty great farmland southeast of Edmonton by virtue of “homesteading”, such a <em>nice</em> word isn’t it? </p> <p> Regina tries to honor its indigenous heritage and my favorite expression of that is its <a href="https://mackenzie.art">Mackenzie Art Gallery</a> , a lovely welcoming space in the <a href="https://www.saskatchewan.ca/government/directory?ou=a8e54600-77d6-4b7e-9702-f07a3dac1b47">T.C.Douglas building</a> (for “T.C.” read “Tommy”. (Did I mention him?) Mom and I walked around it and had lunch in its very decent café. </p> <p>Every time I’ve been there the big exhibitions in the big rooms have been indigenous-centered, and generally excellent. I try to go every time I visit and I’ve never been disappointed.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/07/09/PXL_20250708_172437441.png" alt="Indigenous art at Regina’s Mackenzie Gallery"/> <p>In 2025, anything I have to say about this piece would be superfluous.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/07/09/PXL_20250708_173041377.png" alt="Every American Flag Is A Warning Sign"/> <p>I love modern-art galleries, especially with big rooms full of big pieces, even if I don’t like all the art. Because it feels good to be in the presence of the work of people who are pouring out what they have to offer, especially at large scale. If the task wasn’t hard enough that failures are common then it wouldn’t be worthwhile, would it?</p> <p>They’re especially great when there’s someone I love there enjoying it with me. Here’s Mom.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/07/09/PXL_20250708_172836385.png" alt="Jean Bray considers indigenous art"/> <p>These days, any visit might be the last. I hope this wasn’t.</p> </div> </content> </entry> <entry> <title>QRS: Epsilon Wrangling</title> <link href="https://www.tbray.org/ongoing/When/202x/2025/07/07/Epsilon-Wrangling"/> <link rel="replies" thr:count="0" type="application/xhtml+xml" href="/ongoing/When/202x/2025/07/07/Epsilon-Wrangling#comments"/> <id>https://www.tbray.org/ongoing/When/202x/2025/07/07/Epsilon-Wrangling</id> <published>2025-07-07T12:00:00-07:00</published> <updated>2025-07-09T19:41:00-07:00</updated> <category scheme="https://www.tbray.org/ongoing/What/" term="Technology/Quamina Diary"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Technology"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Quamina Diary"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Technology/Software"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Software"/> <summary type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml">I haven’t shipped any new features for <a href="https://github.com/timbray/quamina">Quamina</a> in many months, partly due to a flow of real-life distractions, but also I’m up against tough performance problems in implementing <a href="/ongoing/When/202x/2024/12/12/Quamina-Regular-Expression-Series">Regular Expressions at massive scale</a>. I’m still looking for a breakthrough, but have learned things about building and executing finite automata that I think are worth sharing. This piece has to do with <a href="https://en.wikipedia.org/wiki/Nondeterministic_finite_automaton#NFA_with_ε-moves">epsilons</a>; anyone who has studied finite automata will know about them already, but I’ll offer background for those people to skip</div> </summary> <content type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml"> <p> I haven’t shipped any new features for <a href="https://github.com/timbray/quamina">Quamina</a> in many months, partly due to a flow of real-life distractions, but also I’m up against tough performance problems in implementing <a href="/ongoing/When/202x/2024/12/12/Quamina-Regular-Expression-Series">Regular Expressions at massive scale</a> . I’m still looking for a breakthrough, but have learned things about building and executing finite automata that I think are worth sharing. This piece has to do with <a href="https://en.wikipedia.org/wiki/Nondeterministic_finite_automaton#NFA_with_ε-moves">epsilons</a> ; anyone who has studied finite automata will know about them already, but I’ll offer background for those people to skip. </p> <p> I’ve written about this before in <a href="/ongoing/When/202x/2024/06/17/Epsilon-Love">Epsilon Love</a> . A commenter pointed out that the definition of “epsilon” in that piece is not quite right per standard finite-automata theory, but it’s still a useful in that it describes how epsilons support constructs like the shell-style “ <code>*</code> ”. </p> <h2 id="p-2">Background</h2> <p>Finite automata come in two flavors: Deterministic (DFA) and Nondeterministic (NFA). DFAs move from state to state one input symbol at a time: it’s simple and easy to understand and to implement. NFAs have two distinguishing characteristics: First, when you’re in a state and an input symbol arrives, you can transfer to more than one other state. Second, a state can have “epsilon transitions” (let’s say “ε” for epsilon), which can happen any time at all while you’re in that state, input or no input.</p> <p> NFAs are more complicated to traverse (will discuss below) but you need them if you want to implement regular expressions with <code>.</code> and <code>?</code> and <code>*</code> and so on. You can turn any NFA into a DFA, and I’ll come back to that subject in a future piece. </p> <p> For implementing NFAs, I’ve been using <a href="https://en.wikipedia.org/wiki/Thompson%27s_construction">Thompson's construction</a> , where “Thompson” is <a href="https://en.wikipedia.org/wiki/Ken_Thompson">Ken Thompson</a> , co-parent of Unix. This technique is also nicely described by Russ Cox in <a href="https://swtch.com/~rsc/regexp/regexp1.html">Regular Expression Matching Can Be Simple And Fast</a> . You don’t need to learn it to understand this piece, but I’ll justify design choices by saying “per Thompson”. </p> <p>I’m going to discuss two specific issues today, ε-closures and a simpler NFA definition.</p> <h2 id="p-3">ε-closures</h2> <p>To set the stage, consider this regexp: <nobr><code>A?B?C?X</code></nobr></p> <p> It should match “X” and “BX” and “ACX” and so on, but not “CAX” or “XX”. Thompson says that you implement <code>A?</code> with a transition to the next state on “A” and another ε-transition to that next state; because if you see an “A” you should transition, but then you can transition anyhow even if you don’t. </p> <p>The resulting NFA looks like this:</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/07/07/AcmBcmCcmX.png" alt="NFA matching A?B?C?X"/> <p> In finite-automaton math, states are usually represented by the letter “q” followed by a number (usually italicized and subscripted, like <i>q<sub>0</sub></i> , but not here, sorry). Note <code>q4</code> ’s double circle which means it’s a goal state, i.e. if we get here we’ve matched the regexp. I should add that this was produced with <a href="https://draw.io">draw.io</a> , which seems to make this sort of thing easy. </p> <h2 id="p-5">Back to that NFA</h2> <p>So, here’s a challenge: Sketch out the traversal code in your head. Think about the input strings “AX” and “BCX” and just “X” and how you’d get through the NFA to the Q4 goal state.</p> <p> The trick is what’s called the ε-closure. When you get to a state, before you look at the next input symbol, you have to set up to process it. In this case, you need to be able to transition on an A or B or C. So what you do is pull together the start state <code>q0</code> and also any other states you can reach from there through ε-transitions. In this case, the ε-closure for the start state is <code>{q0, q1, q2, q3}</code> . </p> <p> Suppose, then, that you see a “B” input symbol. You apply it to all the states in the ε-closure. Only <code>q1</code> matches, transitioning you to <code>q2</code> . Before you look at the next input symbol, you compute the ε-closure for <code>q2</code> , which turns out to be <code>{q2, q3}</code> . With this ε-closure, you can match “C” or “X”. If you get a “C”, you”ll step to <code>q3</code> , whose ε-closure is just itself, because “X” is the only path forward. </p> <p>So your NFA-traversal algorithm for one step becomes something like:</p> <ol> <li> <p>Start with a list of states.</p> </li> <li> <p>Compute the ε-closure of that list.</p> </li> <li> <p>Read an input symbol.</p> </li> <li> <p>For each state in the ε-closure, see if you can traverse to another state.</p> </li> <li> <p>If so, add it to your output list of states.</p> </li> <li> <p>When you’re done, your output list of states is the input to this algorithm for the next step.</p> </li> </ol> <h2 id="p-6">Computation issues</h2> <p> Suppose your regular expression is <code>(A+BC?)+</code> . I’m not going to sketch out the NFA, but just looking at it tells you that it has to have loopbacks; once you’ve matched the parenthetized chunk you need to go back to a state where you can recognize another occurrence. For this regexp’s NFA, computing the ε-closures can lead you into an infinite loop. (Should be obvious, but I didn’t realize it until after the first time it happened.) </p> <p>You can have loops and you can also have dupes. In practice, it’s not that uncommon for a state to have more than one ε-transition, and for the targets of these transitions to overlap.</p> <p>So you need to watch for loops and to dedupe your output. I think the only way to avoid this is with a cookie-crumbs “where I’ve been” trail, either as a list or a hash table.</p> <p>Both of these are problematic because they require allocating memory, and that’s something you really don’t want to do when you’re trying to match patterns to events at Quamina’s historic rate of millions per second.</p> <p>I’ll dig into this problem in a future Quamina-Diary outing, but obviously, caching computed epsilon closures would avoid re-doing this computation.</p> <p>Anyhow, bear ε-closures in mind, because they’ll keep coming up as this series goes on.</p> <h2 id="p-7">And finally, simplifying “NFA”</h2> <p>At the top of this piece, I offered the standard definition of NFAs: First, when you’re in a state and an input symbol arrives, you can transfer to more than one other state. Second, you can have ε-transitions. Based on my recent work, I think this definition is redundant. Because if you need to transfer to two different states on some input symbol, you can do that with ε-transitions.</p> <p>Here’s a mini-NFA that transfers from state <code>q0</code> on “A” to both <code>q1</code> and <code>q2</code>.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/07/07/Splice-1.png" alt="An NFA transferring to two different states on an input symbol"/> <p>And here’s how you can achieve the same effect with ε-transitions:</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/07/07/Splice-2.png" alt="Transferring to two destinations using ε-transitions"/> <p> In that NFA, in <code>qS</code> the “S” stands for “splice”, because it’s a state that exists to connect two threads of finite-automaton traversal. </p> <p> I’m pretty sure that this is more than just a mathematical equivalence. In my regexp implementation, so far at least, I’ve never encountered a need to do that first kind of dual transition. Furthermore, the “splice” structure is how Thompson implements the regular-expression “ <code>|</code> ” operator. </p> <p>So if you’re building an NFA, all the traversal stuff you need in a state is a simple map from input symbol to next state, and a list of ε-transitions.</p> <h2 id="p-8">Next up</h2> <p>How my own implementation of NFA traversal collided head-on into the Benchmark From Hell and still hasn’t recovered.</p> </div> </content> </entry> <entry> <title>The Real GenAI Issue</title> <link href="https://www.tbray.org/ongoing/When/202x/2025/07/06/AI-Manifesto"/> <link rel="replies" thr:count="9" type="application/xhtml+xml" href="/ongoing/When/202x/2025/07/06/AI-Manifesto#comments"/> <id>https://www.tbray.org/ongoing/When/202x/2025/07/06/AI-Manifesto</id> <published>2025-07-06T12:00:00-07:00</published> <updated>2025-07-06T12:06:43-07:00</updated> <category scheme="https://www.tbray.org/ongoing/What/" term="Technology/AI"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Technology"/> <category scheme="https://www.tbray.org/ongoing/What/" term="AI"/> <summary type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml">Last week I published a <a href="/ongoing/When/202x/2025/07/01/First-AI-Code">featherweight narrative</a> about applying GenAI in a real-world context, to a tiny programming problem. Now I’m regretting that piece because I totally ignored the two central issues with AI: What it’s meant to do, and how much it really costs</div> </summary> <content type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml"> <p> Last week I published a <a href="/ongoing/When/202x/2025/07/01/First-AI-Code">featherweight narrative</a> about applying GenAI in a real-world context, to a tiny programming problem. Now I’m regretting that piece because I totally ignored the two central issues with AI: What it’s meant to do, and how much it really costs. </p> <h2 id="p-1">What genAI is for</h2> <p> The most important fact about genAI in the real world is that there’ve been literally <a href="https://finance.yahoo.com/news/how-nvidia-played-a-central-role-in-the-306-billion-ai-startup-boom-195741749.html?guccounter=1">hundreds of billions</a> of dollars invested in it; that link is just startups, and ignores a comparable torrent of cash pouring out of Big Tech. </p> <p>The business leaders pumping all this money of course don’t understand the technology. They’re doing this for exactly one reason: They think they can discard armies of employees and replace them with LLM services, at the cost of shipping shittier products. Do you think your management would spend that kind of money to help you with a quicker first draft or a summarized inbox?</p> <p> Adobe said the quiet part out loud: <a href="https://petapixel.com/2024/05/03/adobe-throws-photographers-under-the-bus-again-skip-the-photoshoot/">Skip the Photoshoot</a> . </p> <p>At this point someone will point out that previous technology waves have generated as much employment as they’ve eliminated. Maybe so, but that’s not what business leaders think they’re buying. They think they’re buying smaller payrolls.</p> <p>Maybe I’m overly sensitive, but thinking about these truths leads to a mental stench that makes me want to stay away from it.</p> <h2 id="p-2">How much does genAI cost?</h2> <p>Well, I already mentioned all those hundreds of billions. But that’s pocket change. The investment community in general and Venture Capital in particular will whine and moan, but the people who are losing the money are people who can afford to.</p> <p>The first real cost is hypothetical: What if those business leaders are correct and they can gleefully dispose of millions of employees? If you think we’re already suffering from egregious levels of inequality, what happens when a big chunk of the middle class suddenly becomes professionally superfluous? I’m no economist so I’ll stop there, but you don’t have to be a rocket scientist to predict severe economic pain.</p> <p> Then there’s the other thing that nobody talks about, the massive greenhouse-gas load that all those data centers are going to be pumping out. This at a time when we we blow past one atmospheric-carbon metric after another and David Suzuki says <a href="https://www.ipolitics.ca/2025/07/02/its-too-late-david-suzuki-says-the-fight-against-climate-change-is-lost/">the fight against climate change is lost</a> , that we need to hunker down and work on survival at the local level. </p> <h2 id="p-3">The real problem</h2> <p>It’s the people who are pushing it. Their business goals are quite likely, as a side-effect, to make the world a worse place, and they don’t give a fuck. Their technology will inevitably worsen the onrushing climate catastrophe, and they don’t give a fuck.</p> <p> It’s probably not as simple as “They’re just shitty people” <span class="dashes"> —</span> it’s not exactly easy to escape the exigencies of modern capitalism. But they are people who are doing shitty things. </p> <h2 id="p-4">Is genAI useful?</h2> <p>Sorry, I’m having trouble even thinking about that now.</p> </div> </content> </entry> <entry> <title>My First GenAI Code</title> <link href="https://www.tbray.org/ongoing/When/202x/2025/07/01/First-AI-Code"/> <link rel="replies" thr:count="3" type="application/xhtml+xml" href="/ongoing/When/202x/2025/07/01/First-AI-Code#comments"/> <id>https://www.tbray.org/ongoing/When/202x/2025/07/01/First-AI-Code</id> <published>2025-07-01T12:00:00-07:00</published> <updated>2025-07-01T11:38:00-07:00</updated> <category scheme="https://www.tbray.org/ongoing/What/" term="Technology/AI"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Technology"/> <category scheme="https://www.tbray.org/ongoing/What/" term="AI"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Technology/Software"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Software"/> <summary type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml">At the moment, we have no idea what the impact of genAI on software development is going to be. The impact of <em>anything</em> on coding is hard to measure systematically, so we rely on anecdata and the community’s eventual consensus. So, here’s my anecdata. Tl;dr: The AI was not useless</div> </summary> <content type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml"> <p> At the moment, we have no idea what the impact of genAI on software development is going to be. The impact of <em>anything</em> on coding is hard to measure systematically, so we rely on anecdata and the community’s eventual consensus. So, here’s my anecdata. Tl;dr: The AI was not useless. </p> <h2 id="p-1">The problem</h2> <p> My current work on <a href="/ongoing/What/Technology/Quamina%20Diary/">Quamina</a> involves dealing with collections of finite-automata states, which, in the Go programming language, are represented as slices of pointers to state instances: </p> <blockquote> <p> <code>[]*faState</code> </p> </blockquote> <p> The problem I was facing was deduping them, so that there would be only one instance corresponding to any particular collection. This is what, in Java, the <code>intern()</code> call does with strings. </p> <p>The algorithm isn’t rocket science:</p> <ol> <li> <p>Dedupe the states, i.e. turn the collection into a set.</p> </li> <li> <p>For each set of states, generate a key.</p> </li> <li> <p>Keep a hash table of sets around, and use the key to see whether you’ve already got such a set, and if so return it. Otherwise, make a new entry in the hash table and return that.</p> </li> </ol> <p>I’m out of touch with the undergrad CS curriculum, but this feels like a second-year assignment or thereabouts? Third?</p> <h2 id="p-2">Enter Claude</h2> <p>So I prompted Claude thus:</p> <blockquote> <p>I need Go code to provide a "intern"-like function for lists of pointers. For example, if I have several different []*int arrays, which may contain duplicates, I want to call intern() on each of them and get back a single canonical pointer which is de-duplicated and thus a set.</p> </blockquote> <p> Claude did pretty well. It got the algorithm right, the code was idiomatic and usefully commented, and it also provided a decent unit test (but in a <code>main()</code> stanza rather than a proper Go test file). I didn’t try actually running it. </p> <p> The interesting part was the key computation. I, being lazy, had just done a Go <code>fmt.Sprintf("%p")</code> incantation to get a hex string representing each state’s address, sorted them, joined them, and that was the key. </p> <p>Claude worked with the pointers more directly.</p> <pre> <code>// Sort by pointer address for consistent ordering sort.Slice(unique, func(i, j int) bool { return uintptr(unsafe.Pointer(unique[i])) < uintptr(unsafe.Pointer(unique[j])) })</code> </pre> <p>Then it concatenated the raw bytes of the map addresses and lied to Go by claiming it was a string.</p> <pre> <code>// Create key from pointer addresses key := make([]byte, 0, len(slice)*8) for _, ptr := range slice { addr := uintptr(unsafe.Pointer(ptr)) // Convert address to bytes for i := 0; i < 8; i++ { key = append(key, byte(addr>>(i*8))) } } return string(key)</code> </pre> <p>This is an improvement in that the keys will be half the size of my string version. I didn’t copy-paste Claude’s code wholesale, just replaced ten or so lines of key construction.</p> <h2 id="p-3">Take-away</h2> <p> I dunno. I thought the quality of the code was fine, wouldn’t have decomposed the functions in the same way but wouldn’t have objected on review. I was pleased with the algorithm, but then I would be since it was the same one I’d written, and, having said that, quite possibly that’s the only algorithm that anyone has used. It will be <em>super</em> interesting if someone responds to this write-up saying “You and Claude are fools, here’s a much better way.” </p> <p>Was it worth fifteen minutes of my time to ask Claude and get a slightly better key computation? Only if this ever turns out to be a hot code path and I don’t think anybody’s smart enough to know that in advance.</p> <p> Would I have saved time by asking Claude first? Tough to tell; Quamina’s data structures are a bit non-obvious and I would have had to go to a lot of prompting work to get it to emit code I could use directly. Also, since Quamina is low-level performance-critical infrastructure code, I’d be nervous about having any volume of code that I didn’t really <em>really</em> understand. </p> <p> I guess my take-away was that in this case, Claude knew the Go idioms and APIs better than I did; I’d never looked at the <a href="https://pkg.go.dev/unsafe">unsafe</a> package. </p> <p>Which reinforces my suspicion that genAI is going to be especially useful at helping generate code to talk to big complicated APIs that are hard to remember all of. Here’s an example: Any moderately competent Android developer could add a feature to an app where it strobes the flash and surges the vibration in sync with how fast you’re shaking the device back and forth, probably in an afternoon. But it would require a couple of dozen calls into the dense forest of Android APIs, and I suspect a genAI might get you there a lot faster by just filling the calls in as prompted.</p> <p>Reminder: This is just anecdata.</p> </div> </content> </entry> <entry> <title>Qobuz and Mac</title> <link href="https://www.tbray.org/ongoing/When/202x/2025/06/22/Qobuz-and-Others"/> <link rel="replies" thr:count="0" type="application/xhtml+xml" href="/ongoing/When/202x/2025/06/22/Qobuz-and-Others#comments"/> <id>https://www.tbray.org/ongoing/When/202x/2025/06/22/Qobuz-and-Others</id> <published>2025-06-22T12:00:00-07:00</published> <updated>2025-06-26T13:13:08-07:00</updated> <category scheme="https://www.tbray.org/ongoing/What/" term="Arts/Music"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Arts"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Music"/> <summary type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml">Back in March I offered <a href="/ongoing/When/202x/2025/03/27/Music-Plus-Qobuz">Latest Music (feat. Qobuz)</a>, describing all the ways I listen to music (Tl;dr: YouTube Music, Plex, Qobuz, record player). I stand by my opinions there but wanted to write more on two subjects: First Qobuz, because it suddenly got a lot better. And a recommendation, for people with fancy A/V setups, that you include a cheap Mac Mini</div> </summary> <content type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml"> <p> Back in March I offered <a href="/ongoing/When/202x/2025/03/27/Music-Plus-Qobuz">Latest Music (feat. Qobuz)</a> , describing all the ways I listen to music (Tl;dr: YouTube Music, Plex, Qobuz, record player). I stand by my opinions there but wanted to write more on two subjects: First Qobuz, because it suddenly got a lot better. And a recommendation, for people with fancy A/V setups, that you include a cheap Mac Mini. </p> <h2 id="p-1">Qobuz</h2> <p>That other piece had a list of the reasons to use Qobuz, but times have changed, so let’s revise it:</p> <ol> <li> <p>It pays artists more per stream than any other service, by a wide margin.</p> </li> <li> <p>It seems to have as much music as anyone else.</p> </li> <li> <p>It’s album-oriented, and I appreciate artists curating their own music.</p> </li> <li> <p>Classical music is a first-class citizen.</p> </li> <li> <p> It’s actively curated; they highlight new music regularly, and pick a “record of the week”. To get a feel, check out <a href="https://www.qobuz.com/ca-en/magazine">Qobuz Magazine</a> ; you don’t have to be a subscriber. </p> </li> <li> <p>It gives evidence of being built by people who love music.</p> </li> <li> <p>They’re obsessive about sound quality, which is great, but only makes a difference if you’re listening through quality speakers.</p> </li> <li> <p>A few weeks ago, the mobile app quality switched from adequate to excellent.</p> </li> </ol> <h2 id="p-2">That app</h2> <p>I want to side-trip a bit here, starting with a question. How long has it been since an app you use has added a feature that was genuinely excellent and let you do stuff you couldn’t before and didn’t get in your way and created no suspicion that it was strip-mining your life for profit? I’m here to tell you that this can still happen, and it’s a crushing criticism of my profession that it so rarely does.</p> <p> I’m talking about <a href="https://www.qobuz.com/ca-en/connect">Qobuz Connect</a> . I believe there are other music apps that can do this sort of stuff, but it feels like magic to me. </p> <p> It’s like this. I listen to music at home on an audiophile system with big speakers, in <a href="/ongoing/What/The%20World/Jaguar%20Diary/">our car</a> , and on <a href="/ongoing/When/201x/2019/08/06/Jeanneau-795">our boat</a> . The only app I touch is the <a href="https://play.google.com/store/apps/details?id=com.qobuz.music">Qobuz Android app</a> . The only time it’s actually receiving and playing the music itself is in the car, with the help of Android Auto. In the other scenarios it’s talking to Qobuz running on a Mac, which actually fetches the music and routes it to the audio system. Usually it figures out what player I want it to control automatically, although there’ve been a couple times when I drove away in the car and it got confused about where to send the music. Generally, it works great. </p> <p>The app’s music experience is rich and involving.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/06/22/Screenshot_20250622-230116.png" alt="Qobuz Android app screenshot"/> <p>It has New Releases and curated playlists and a personalized stream for me and a competent search function for those times I absolutely must listen to Deep Purple or Hania Rani or whoever.</p> <p>I get a chatty not-too-long email from Qobuz every Friday, plugging a few of the week’s new releases, with sideways and backward looks too. (This week: A Brian Wilson stream.) The app has so much stuff, especially among the themed streams, that I sometimes get lost. But somehow it’s not irritating; what’s on the screen remains musically interesting and you can always hit the app’s Home button.</p> <p> Qobuz has its own musical tastes that guide its curation. They’re not always compatible with mine <span class="dashes"> —</span> my tolerance for EDM and mainstream Hip-hop remains low. And I wish they were stronger on Americana. But the intersection is broad enough to provide plenty of enjoyable new-artist experiences. Let me share one with you: <a href="https://kwashibu.bandcamp.com/album/love-warrior-s-anthem">Kwashibu Area Band</a> , from Ghana. </p> <p>Oh, one complaint: Qobuz was eating my Pixel’s battery. So I poked around online and it’s a known problem; you have to use the Android preferences to stop it from running in the background. Huh? What was it doing in the background anyhow?! But it seems to work fine even when it’s not doing it.</p> <h2 id="p-3">A Mac, you say?</h2> <p>The music you’re listening to is going to be stored on disk, or incoming from a streaming service. Maybe you want to serve some of the stored music out to listen to it in the car or wherever. There are a variety of audio products in the “Streamer” category that do some of these things in various combinations. A lot of them make fanciful claims about the technology inside and are thus expensive, you can easily spend thousands.</p> <p>But any reasonably modern computer can do all these things and more, plus it also can drive a big-screen display, plus it will probably run the software behind whatever next year’s New Audio Hotness is.</p> <p>At this point the harder-core geeks will adopt a superior tone of voice to say “I do all that stuff with FreeBSD and a bunch of open-source packages running on a potato!”</p> <p>More power to ’em. But I recommend a basic Apple Silicon based Mac Mini, M1 is fine, which you can get for like $300 used on eBay. And if you own a lot of music and video you can plug in a 5T USB drive for a few more peanuts. This will run Plex and Qobuz and almost any other imaginable streaming software. Plus you can plug it into your home-theater screen and it has a modern Web browser so you can also play anything from anywhere on the Web.</p> <p>I’ve been doing this for a while but I had one big gripe. When I wanted to stream music from the Mac, I needed to use a keyboard and mouse, so I keep one of each, Bluetooth-flavored, nearby. But since I got Qobuz running that’s become a very rare occurrence.</p> <h2 id="p-4">You’re forgetting something</h2> <p>Oh, and yeah, there’s the record player. Playing it requires essentially no software at all, isn’t that great?</p> </div> </content> </entry> <entry> <title>Long Links</title> <link href="https://www.tbray.org/ongoing/When/202x/2025/06/21/Long-Links"/> <link rel="replies" thr:count="6" type="application/xhtml+xml" href="/ongoing/When/202x/2025/06/21/Long-Links#comments"/> <id>https://www.tbray.org/ongoing/When/202x/2025/06/21/Long-Links</id> <published>2025-06-21T12:00:00-07:00</published> <updated>2025-06-21T11:56:27-07:00</updated> <category scheme="https://www.tbray.org/ongoing/What/" term="The World"/> <category scheme="https://www.tbray.org/ongoing/What/" term="The World"/> <summary type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml">“Wow, Tim, didn’t you do a <a href="/ongoing/When/202x/2025/05/06/Long-Links">Long Links</a> just last month? Been spending too much time doomscrolling, have we?” Maybe. There sure are a lot of tabs jostling each other along the top of that browser. Many are hosting works that are both long and good. So here they are; you probably don’t have time for all of ’em but my hope is that one or two might reward your visit</div> </summary> <content type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml"> <p> “Wow, Tim, didn’t you do a <a href="/ongoing/When/202x/2025/05/06/Long-Links">Long Links</a> just last month? Been spending too much time doomscrolling, have we?” Maybe. There sure are a lot of tabs jostling each other along the top of that browser. Many are hosting works that are both long and good. So here they are; you probably don’t have time for all of ’em but my hope is that one or two might reward your visit. </p> <p> Let’s start with a really important subject: Population growth oh actually these days it’s population shrinkage. For a short-sharp-shock-flavored introduction I recommend <a href="https://www.youtube.com/watch?v=Ufmu1WD2TSk">South Korea Is Over</a> which explains the brick wall societies with fertility rates way below the replacement rate of 2.1 children per woman per lifetime are hurtling toward. South Korea, of course, being the canonical example. But also Japan and Taiwan and Italy and Spain and so on. </p> <p> And, of course, the USA, where the numbers aren’t <em>that</em> much higher: <a href="https://www.macrotrends.net/global-metrics/countries/usa/united-states/fertility-rate">U.S. Fertility Rate (1950-2025)</a> . Even so, the population still grows (because of immigration), albeit at less than 1% per annum: <a href="https://www.macrotrends.net/global-metrics/countries/usa/united-states/population-growth-rate">U.S. Population Growth Rate</a> . If the MAGAs get their way and eventually stop all non-white immigration, the US will be in South Korea territory within a generation or two. </p> <p> A reasonable person might ask why. It’s not really complicated, as you can read here: <a href="https://www.nytimes.com/2025/06/15/opinion/birth-rate-parenting-natalism.html?unlocked_article_code=1.Pk8.OBam.dOi0UpP-8-DV&smid=url-share">A Bold Idea to Raise the Birthrate: Make Parenting Less Torturous</a> . From which I quote: “To date, no government policies have significantly improved their nation’s birthrates for a sustained period.” The essay argues convincingly that it’s down to two problems: Capitalism and sexism. Neither of which offers an easy fix. </p> <p> Speaking of the travails of late capitalism, here’s how bad it’s getting: <a href="https://www.nytimes.com/2025/03/01/opinion/crisis-working-homeless.html?unlocked_article_code=1.Qk8.jsTO.aUBSAMHw7Op2&smid=url-share">America Is Pushing Its Workers Into Homelessness</a> . </p> <p> For a refreshingly different take on the business world, here’s Avery Pennarun, CEO of Tailscale: <a href="https://apenwarr.ca/log/20250530">The evasive evitability of enshittification</a> . Not sure I buy what he’s saying, but still worth reading. </p> <p> Most people who visit these pages are geeks or geek-adjacent. If you’re one of those, and especially if you enjoy the small but vibrant genre of Comical Tech War Stories, I recommend <a href="https://yeet.cx/blog/lock-free-rust/">Lock-Free Rust: How to Build a Rollercoaster While It’s on Fire</a> </p> <p> And here’s write-up on an AWS product which has one of the best explanations I’ve ever read of the different flavors modern databases come in: <a href="https://www.redshift-observatory.ch/white_papers/downloads/introduction_to_the_fundamentals_of_amazon_redshift.html">Introduction to the Fundamentals of Amazon Redshift</a> </p> <p> Of course, the geek conversation these days is much taken up with the the impact of genAI as in “vibe coding”. To summarize the conversation: A few people, not obviously fools, are saying “This stuff seems to help me” and many others, also apparently sensible, are shouting back “You’re lying to yourself, it can’t be helping!” Here is some of the testimony: Kellan on <a href="https://laughingmeme.org//2025/05/25/vibe-coding-for-teams.html">Vibe coding for teams, thoughts to date</a> , Armin Ronacher on <a href="https://lucumr.pocoo.org/2025/6/12/agentic-coding/">Agentic Coding Recommendations</a> , Harper on <a href="https://harper.blog/2025/05/08/basic-claude-code/">Basic Claude Code</a> , and Klabnik on <a href="https://steveklabnik.com/writing/a-tale-of-two-claudes/">A tale of two Claudes</a> </p> <p>I lean to believing narratives of personal experience, but on the other hand the skeptics make good points. Another random piece of evidence: Because I’m lazy, I tend to resist adopting technologies that have steep learning curves, which genAI currently does. On many occasions, this has worked out well because those technologies have turned out not to pay off very well. Am I a canary in the coal mine?</p> <h2 id="p-2">*cough*</h2> <p>Since I introduced myself into the narrative, I’ll note that today is my 70th birthday. I am told that this means that my wisdom has now been maximized, so you’re safe in believing whatever you read in this space. I don’t have anything special to say to commemorate the occasion, so here’s a picture of my neighborhood’s network infrastructure, which outlines the form of a cathedral’s nave. I’m sure there’s a powerful metaphor lurking in there.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/06/21/TXT55659.png" alt="Many electrical and data wires festoon a back alley"/> <p> Oh, and here’s a photography Long Link: <a href="https://www.lux.camera/what-is-hdr/">What is HDR, anyway?</a> It’s actually a pitch for a nice-looking mobile camera app, but it offers real value on things that can affect the quality of your pictures. </p> <p>Regular readers will know that I’m fascinated by the many unsolved issues and open questions in cosmology, which are by definition the largest problems facing human consciousness. The ΛCDM-vs-MOND controversy, i.e. “Is there really dark matter or does gravity get weird starting at the outer edges of galaxies?”, offers great entertainment value. And, there is news!</p> <p> First of all, here’s a nice overview on the controversy: <a href="https://arxiv.org/pdf/2505.21638v1">Modified Newtonian Dynamics: Observational Successes and Failures</a> . </p> <p> Which points out that the behavior of “wide binary” star systems ought to help resolve the issue, but that people who study it keep coming up with contradictory findings. Here’s the latest, from Korean researchers: Press release <a href="http://www.sejongpr.ac.kr/sejongnewspaperview.do?currentPage=1&searchField=&searchValue=&boardType=3&pkid=73549&utm_source=beehiiv&utm_medium=newsletter&utm_campaign=mediamobilize&_bhlid=3e40dce99e536f4015a1dd2c6afd193a465d17ea">New method of measuring gravity with 3D velocities of wide binary stars is developed and confirms modified gravity</a> and peer-reviewed paper: <a href="https://iopscience.iop.org/article/10.3847/1538-4357/adce09">Low-acceleration Gravitational Anomaly from Bayesian 3D Modeling of Wide Binary Orbits: Methodology and Results with Gaia Data Release 3</a> . Spoiler: They think the gravity gets weird. I have a math degree but cosmology math is generally way over my head. Having said that, I think those South Koreans may be a bit out over their skis; I generally distrust heroic statistical methods. We’ll see. </p> <p> Let’s do politics. It turns out that the barbaric junta which oppresses the people of China does not limit its barbarism to its own geography: <a href="https://www.cbc.ca/news/politics/china-targets-dissidents-canada-1.7543745?cmp=rss">Followed, threatened and smeared — attacks by China against its critics in Canada are on the rise</a> . </p> <p> More politics: The MAGAs are always railing against “elites”. Here are two discussions of what they mean: <a href="https://www.theatlantic.com/ideas/archive/2025/04/class-money-finances/682301/">What the Comfort Class Doesn’t Get</a> and <a href="https://siderea.dreamwidth.org/1865048.html">When They Say Elites, They Mean Us</a> . </p> <p> The world’s biggest political issue <em>should</em> be the onrushing climate crisis. When Trump and his toadies are justly condemned and ridiculed by future historians, it is their malevolent cluelessness on this subject that may burn the hottest. Who knows, maybe they’ll pay attention to this: <a href="https://www.bloomberg.com/news/newsletters/2025-06-18/insurers-want-businesses-to-wake-up-to-costs-of-extreme-heat">Insurers Want Businesses to Wake Up to Costs of Extreme Heat</a> . </p> <h2 id="p-1">The list of Long Links is too long</h2> <p>So I’ll try to end cheerfully.</p> <p> A graceful essay about an old camera and a dreamy picture: <a href="https://petapixel.com/2025/05/27/a-bridge-across-time-for-sebastiao-salgado/">A Bridge Across Time: For Sebastião Salgado</a> </p> <p> Latin Wikipedia has 140,000 articles; consider the delightful discussion of <a href="https://la.wikipedia.org/wiki/Equus_asinus"> <cite>Equus asinus</cite> </a> . </p> <img src="https://www.tbray.org/ongoing/When/202x/2025/06/21/equus-asinus.png" alt="Asinus in opere tesselato Byzantino"/> <div class="caption"> <p>Asinus in opere tesselato Byzantino</p> </div> <p> Here’s a lovely little song from TORRES and Julien Baker: <a href="https://www.youtube.com/watch?v=TurU_Jn-LEg">The Only Marble I’ve Got Left</a> . </p> <p> Finally, a clear-eyed if lengthy essay on why and how to think: <a href="https://www.newyorker.com/culture/open-questions/should-you-question-everything">Should You Question Everything?</a> </p> </div> </content> </entry> <entry> <title>June 2025 C2PA News</title> <link href="https://www.tbray.org/ongoing/When/202x/2025/06/17/More-C2PA"/> <link rel="replies" thr:count="1" type="application/xhtml+xml" href="/ongoing/When/202x/2025/06/17/More-C2PA#comments"/> <id>https://www.tbray.org/ongoing/When/202x/2025/06/17/More-C2PA</id> <published>2025-06-17T12:00:00-07:00</published> <updated>2025-06-19T09:20:16-07:00</updated> <category scheme="https://www.tbray.org/ongoing/What/" term="Technology/Identity"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Technology"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Identity"/> <summary type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml">Things are happening in the C2PA world; here are a couple of useful steps forward, plus cheers and boos for Adobe. Plus a live working C2PA demo you can try out</div> </summary> <content type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml"> <p>Things are happening in the C2PA world; here are a couple of useful steps forward, plus cheers and boos for Adobe. Plus a live working C2PA demo you can try out.</p> <p> Refresher: The <a href="https://c2pa.org/">C2PA</a> technology is driven by the <a href="https://contentauthenticity.org/">Content Authenticity Initiative</a> and usually marketed as “Content Credentials”. I’ve written before about it, an <a href="/ongoing/When/202x/2023/10/28/C2PA-Workflows">introduction in 2023</a> and a <a href="/ongoing/When/202x/2024/10/29/Lane-Provenance">progress report</a> last October. </p> <p>Let’s start with a picture.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/06/17/TXT55648.png" alt="A dark picture full of vague swirls and jiggly lights"/> <div class="caption"> <p> I was standing with the camera by the ocean at dusk and accidentally left it in the “B” long-exposure setting, so this isn’t really a picture <em>of</em> anything but I thought it was kinda pretty. </p> </div> <h2 id="p-1">Validating Content Credentials</h2> <p> As I write this, there are now at least two C2PA-validator Chrome extensions: the <a href="https://chromewebstore.google.com/detail/contentlens-c2pa-validato/gdejpnjeepoffhkbcgnjdbkgpohdhmln?hl=en">ContentLens C2PA Validator</a> from <a href="https://www.contentlens.ai/">ContentLens</a> and <a href="https://chromewebstore.google.com/detail/c2pa-content-credentials/mjkaocdlpjmphfkjndocehcdhbigaafp?hl=en">C2PA Content Credentials</a> from <a href="https://www.digimarc.com/">Digimarc</a> . </p> <img src="https://www.tbray.org/ongoing/When/202x/2025/06/17/cc-readout.png" alt="C2PA verifier display" class="inline"/> <img src="https://www.tbray.org/ongoing/When/202x/2025/06/17/cc2-readout.png" alt="C2PA verifier display" class="inline"/> <p>If you install either of them, and then you click on that picture just above in Chrome to get the larger version, then you right-click on the larger picture, the menu will offer Content-Credentials validation.</p> <p>Doing this will produce a little “CR” logo at the top right corner, meaning that the C2PA data has been verified as being present and signed by a trusted certificate issuer, in this case Adobe.</p> <p>Then there’s a popup; the two extensions’ are on the right. They’re different, in interesting ways. Let’s walk through the second one.</p> <p>The little thumbnail at the top of the popup is what the image looked like when the C2PA was added. Not provided by the other verifier.</p> <p>The paragraph beginning “Displaying credentials…” says that the C2PA manifest was embedded in the JPG as opposed to stored out on the cloud; The cloud works fine, and is perhaps a good idea because the C2PA manifest can be quite large. I’m not clear on what the “watermark” is about.</p> <p>“Issued by Adobe” means that the Chrome extension verified the embedded C2PA against Adobe’s public key and can be confident that yes, this was really signed by them.</p> <p> “ <b>Produced by</b> Timothy Bray” is interesting. How can it know? Well, it turns out that it used LinkedIn’s API to verify that I am <a href="https://www.linkedin.com/in/timbraysoftwareguy/">timbraysoftwareguy</a> over on LinkedIn. But it goes further; LinkedIn has an integration with <a href="https://www.clearme.com">Clear</a> , the airport-oriented identity provider. To get a Clear account you have to upload government-issued ID, it’s not trivial. </p> <p>So this short sentence expands to (take a deep breath) “The validator extension verified that Adobe said that LinkedIn said that Clear said that the government ID of the person who posted this says that he’s named Timothy Bray.”</p> <p>Note that the first extension’s popup also tells you that Adobe has verified what my LinkedIn and Instagram accounts are. This seems super-useful and I wonder why the other omits it.</p> <p> “ <b>App or device used</b> …” is simple enough, but I’m not actually sure how it works; I guess Adobe has embedded a keypair in my Lightroom installation? If I’d taken the picture with a C2PA-equipped camera this is where that history would be displayed. </p> <p> “ <b>AI tool used</b> None”. Interesting and useful, since Adobe provides plenty of genAI-powered tools. Of course, this relies on Lightroom telling the truth, but still. </p> <p> The “View More” button doesn’t currently work; it takes you to the interactive <a href="https://contentcredentials.org/verify/">contentcredentials.org/verify</a> page, which seems to fail in retrieving the JPG. If you download the picture then upload it into the verify page (go ahead, it’s free) that seems to work fine. In addition to the info on the popup, the verify page will tell you (nontechically i.e. vaguely) what I did to the picture with Lightroom. </p> <h2 id="p-3">What’s good about this?</h2> <p> Well, it’s here and it works! There’s all this hype about how cool it will be when the C2PA includes info about what model of camera and lens it used and what the shutter speed was and so on, but eh, who cares really? What matters to me (and should matter to the world) is <em>provenance</em> : Who posted this thing? </p> <p> As I write this, supporters of Israel and Iran are <a href="https://www.404media.co/the-ai-slop-fight-between-iran-and-israel/?ref=daily-stories-newsletter">having an AI Slop Fight</a> with fake war photos and videos. In a C2PA-rich world, you could check; If some clip doesn’t have Content Credentials you should probably be suspicious, and if it does, it matters whether it was uploaded by someone at <a href="https://www.idf.il/en/">IDF.il</a> versus <a href="https://www.bbc.com">BBC.co.uk</a> . </p> <h2 id="p-2">What’s wrong with this?</h2> <p>Look, I hate to nitpick. I’m overwhelmingly positive on this news, it’s an existence proof that C2PA can be made to work in the wild. My impression is that most of the money and muscle comes from Adobe; good on ’em. But there are things that would make it more useful, and usable by more Web sites. These are not listed in any particular order.</p> <h2 id="p-7">Identity!</h2> <p> Adobe, it’s nice that you let me establish my identity with LinkedIn, Instagram, and Clear. But what I’d <em>really</em> like is if you could also verify and sign my Fediverse and Bluesky handles. And, Fediverse and ATProto developers, would you please, first of all, stop stripping C2PA manifests from uploaded photo EXIF, and secondly, add your own link to the C2PA chain saying something like “Originally posted by @[email protected].” </p> <p>Because having verifiable media provenance in the world of social media would be a strong tool against disinformation and slop.</p> <p>Oh, and another note to Adobe: When I export a photo, the embed-manifest also offers me the opportunity, under the heading “Web3”, to allow the image “be used for NFT creative attribution on supported marketplaces” where the supported marketplaces are Phantom and MetaMask. Seriously, folks, in 2025? Please get this scammy cryptoslime out of my face.</p> <h2 id="p-4">Browsers please…</h2> <p>This was done with Chrome extensions. There are people working on extensions for Firefox and Safari, but they’re not here yet. Annoyingly, the extensions also don’t seem to work in mobile Chrome, which is where most people look at most media.</p> <p>I would love it if this were done directly and automatically by the browser. The major browsers aren’t perfect, but their creators are known to take security seriously, and I’d be much happier trusting one of them, rather than an extension from a company I’d never previously heard of.</p> <h2 id="p-8">… or maybe JavaScript?</h2> <p> The next-best solution would be a nice JS package that just Does The Right Thing. It should work like the way I do fonts: If you look in the source for the page you are now reading, the splodge of JS at the top includes a couple of lines that mention “typekit.com”. Typekit (since acquired by Adobe) offers access to a huge selection of excellent fonts. Those JS invocations result in the text you are now reading being displayed in <a href="/ongoing/When/201x/2011/07/17/Tisa">FF Tisa Web Pro</a> . </p> <p> Which <span class="dashes"> —</span> this is important <span class="dashes"> —</span> is not free. And to be clear, I am willing to pay to get Content Credentials for the pictures on this blog. It feels exactly like paying a small fee for access to a professionally-managed font library. Operating a Content-Credentials service wouldn’t be free, it’d require running a server and wrangling certs. At scale, though, it should be pretty cheap. </p> <p>So here’s an offer: If someone launches a service that allows me to straightforwardly include the fact that this picture was sourced from tbray.org in my Content Credentials, my wallet is (modestly) open.</p> <p> By the way, the core JavaScript code is already under construction; here’s <a href="https://github.com/microsoft/c2pa-extension-validator">Microsoft</a> and the <a href="https://opensource.contentauthenticity.org/docs/introduction">Content Authority Initiative</a> itself. There’s also a Rust crate for server-side use, and a “c2patool” command-line utility based on it.. </p> <h2 id="p-6">Open-Source issues</h2> <p> You’ll notice that the right-click-for-Content-Credentials doesn’t work on the smaller version of the picture embedded in the text you are now reading; just the larger one. This is because the decades-old Perl-based <span class="o">ongoing</span> publishing software runs the main-page pictures through <a href="https://imagemagick.org/index.php">ImageMagick</a> , which doesn’t do C2PA. I should find a way to route around this. </p> <p>In fact, it wouldn’t be rocket science for ImageMagick (or open-source packages generally) to write C2PA manifests and insert them in the media files they create. But how should they sign them? As noted, that requires a server that provides cert-based signatures, something that nobody would expect from even well-maintained open-source packages.</p> <p>I dunno, maybe someone should provide a managed-ImageMagick service that (for a small fee) offers signed-C2PA-manifest embedding?</p> <h2 id="p-9">What’s next?</h2> <p> The work that needs to be done is nontrivial but, frankly, not that taxing. And the rewards would be high. Because it feels like a no-brainer that knowing who posted something is a big deal. Also the inverse: Knowing that you <em>don’t</em> know who posted it. </p> <p>Where is it an especially big deal? On social media, obviously. It’s really time for those guys to start climbing on board.</p> </div> </content> </entry> <entry> <title>AI Angst</title> <link href="https://www.tbray.org/ongoing/When/202x/2025/06/06/My-AI-Angst"/> <link rel="replies" thr:count="13" type="application/xhtml+xml" href="/ongoing/When/202x/2025/06/06/My-AI-Angst#comments"/> <id>https://www.tbray.org/ongoing/When/202x/2025/06/06/My-AI-Angst</id> <published>2025-06-06T12:00:00-07:00</published> <updated>2025-06-08T15:39:49-07:00</updated> <category scheme="https://www.tbray.org/ongoing/What/" term="Technology/AI"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Technology"/> <category scheme="https://www.tbray.org/ongoing/What/" term="AI"/> <summary type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml">My input stream is full of it: Fear and loathing and cheerleading and prognosticating on what generative AI means and whether it’s Good or Bad and what we should be doing. All the channels: Blogs and peer-reviewed papers and social-media posts and business-news stories. So there’s lots of AI angst out there, but this is mine. I think the following is a bit unique because it focuses on cost, working backward from there. As for the genAI tech itself, I guess I’m a moderate; there is a there there, it’s not all slop. But first…</div> </summary> <content type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml"> <p>My input stream is full of it: Fear and loathing and cheerleading and prognosticating on what generative AI means and whether it’s Good or Bad and what we should be doing. All the channels: Blogs and peer-reviewed papers and social-media posts and business-news stories. So there’s lots of AI angst out there, but this is mine. I think the following is a bit unique because it focuses on cost, working backward from there. As for the genAI tech itself, I guess I’m a moderate; there is a there there, it’s not all slop. But first…</p> <h2 id="p-5">The rent is too damn high</h2> <p> I promise I’ll talk about genAI applications but let’s start with money. <em>Lots</em> of money, big numbers! For example, venture-cap startup money pouring into AI, which as of now apparently adds up to <a href="https://finance.yahoo.com/news/how-nvidia-played-a-central-role-in-the-306-billion-ai-startup-boom-195741749.html">$306 billion</a> . And that’s just startups; Among the giants, Google alone <a href="https://www.ciodive.com/news/google-cloud-generative-ai-data-center-capacity-buildouts/739357/">apparently plans $75B</a> in capital expenditure on AI infrastructure, and they represent maybe a quarter at most of cloud capex. You think those are big numbers? McKinsey offers <a href="https://www.mckinsey.com/industries/technology-media-and-telecommunications/our-insights/the-cost-of-compute-a-7-trillion-dollar-race-to-scale-data-centers">The cost of compute: A $7 trillion race to scale data centers</a> . </p> <p>Obviously, lots of people are wondering when and where the revenue will be to pay for it all. There’s one thing we know for sure: The pro-genAI voices are fueled by hundreds of billions of dollars worth of fear and desire; fear that it’ll never pay off and desire for a piece of the money. Can you begin to imagine the pressure for revenue that investors and executives and middle managers are under?</p> <p><a href="https://cosocial.ca/@timbray/114572118905328515">Here’s an example</a> of the kind of debate that ensues.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/06/06/Anil-MCP.png" alt="Anil Dash on Mastodon, on MCP vs the Fediverse"/> <div class="caption"> <p> “MCP” is <a href="https://en.wikipedia.org/wiki/Model_Context_Protocol">Model Context Protocol</a> , used for communicating between LLM software and other systems and services. <br/> I have no opinion as to its quality or utility. </p> </div> <p>I suggest that when you’re getting a pitch for genAI technology, you should have that greed and fear in the back of your mind. Or maybe at the front.</p> <h2 id="p-7">And that’s just the money</h2> <p> For some reason, I don’t hear much any more about the environmental cost of genAI, the gigatons of carbon pouring out of the system, imperilling my children’s future. Let’s please not ignore that; let’s read things like <a href="https://www.eesi.org/articles/view/data-center-energy-needs-are-upending-power-grids-and-threatening-the-climate">Data Center Energy Needs Could Upend Power Grids and Threaten the Climate</a> and let’s make sure every freaking conversation about genAI acknowledges this grievous cost. </p> <p>Now let’s look at a few sectors where genAI is said to be a big deal: Coding, teaching, and professional communication. To keep things balanced, I’ll start in a space where I have kind things to say.</p> <h2 id="p-2">Coding</h2> <p> Wow, is my tribe ever melting down. The pro- and anti-genAI factions are hurling polemical thunderbolts at each other, and I mean extra hot and pointy ones. For example, here are 5600 words entitled <a href="https://blog.glyph.im/2025/06/i-think-im-done-thinking-about-genai-for-now.html">I Think I’m Done Thinking About genAI For Now</a> . Well-written words, too. </p> <p> But, while I have a lot of sympathy for the contras and am sickened by some of the promoters, at the moment I’m mostly in tune with Thomas Ptacek’s <a href="https://fly.io/blog/youre-all-nuts/">My AI Skeptic Friends Are All Nuts</a> . It’s long and (fortunately) well-written and I (mostly) find it hard to disagree with. </p> <p>it’s as simple as this: I keep hearing talented programmers whose integrity I trust tell me “Yeah, LLMs are helping me get shit done.” The probability that they’re all lying or being fooled seems very low.</p> <p>Just to be clear, I note an absence of concern for cost and carbon in these conversations. Which is unacceptable. But let’s move on.</p> <p>It’s worth noting that I learned two useful things from Ptacek’s essay that I hadn’t really understood. First, the “agentic” architecture of programming tools: You ask the agent to create code and it asks the LLM, which will sometimes hallucinate; the agent will observe that it doesn’t compile or makes all the unit tests fail, discards it, and re-prompts. If it takes the agent module 25 prompts to generate code that while imperfect is at least correct, who cares?</p> <p>Second lesson, and to be fair this is just anecdata: It feels like the Go programming language is especially well-suited to LLM-driven automation. It’s small, has a large standard library, and a culture that has strong shared idioms for doing almost anything. Anyhow, we’ll find out if this early impression stands up to longer and wider industry experience.</p> <p>Turning our attention back to cost, let’s assume that eventually all or most developers become somewhat LLM-assisted. Are there enough of them, and will they pay enough, to cover all that investment? Especially given that models that are both open-source and excellent are certain to proliferate? Seems dubious.</p> <p>Suppose that, as Ptacek suggests, LLMs/agents allow us to automate the tedious low-intellectual-effort parts of our job. Should we be concerned about how junior developers learn to get past that “easy stuff” and on the way to senior skills? That seems a very good question, so…</p> <h2 id="p-10">Learning</h2> <p> Quite likely you’ve already seen Jason Koebler’s <a href="https://www.404media.co/teachers-are-not-ok-ai-chatgpt/?ref=daily-stories-newsletter">Teachers Are Not OK</a> , a frankly horrifying survey of genAI’s impact on secondary and tertiary education. It is a tale of unrelieved grief and pain and wreckage. Since genAI isn’t going to go away and students aren’t going to stop being lazy, it seems like we’re going to re-invent the way people teach and learn. </p> <p>The stories of students furiously deploying genAI to avoid the effort of actually, you know, learning, are sad. Even sadder are those of genAI-crazed administrators leaning on faculty to become more efficient and “businesslike” by using it.</p> <p>I really don’t think there’s a coherent pro-genAI case to be made in the education context.</p> <h2 id="p-11">Professional communication</h2> <p>If you want to use LLMs to automate communication with your family or friends or lovers, there’s nothing I can say that will help you. So let’s restrict this to conversation and reporting around work and private projects and voluntarism and so on.</p> <p> I’m pretty sure this is where the people who think they’re going to make big money with AI think it’s going to come from. If you’re interested in that thinking, <a href="https://docs.google.com/presentation/d/1Der8WWGeVxdOWx37bMV_nj9N1tUAVcvSSRa6qxKx75g/edit?slide=id.p1#slide=id.p1">here’s a sample</a> ; a slide deck by a Keith Riegert for the book-publishing business which, granted, is a bit stagnant and a whole lot overconcentrated these days. I suspect scrolling through it will produce a strong emotional reaction for quite a few readers here. It’s also useful in that it talks specifically about costs. </p> <p>That is for corporate-branded output. What about personal or internal professional communication; by which I mean emails and sales reports and committee drafts and project pitches and so on? I’m pretty negative about this. If your email or pitch doc or whatever needs to be summarized, or if it has the colorless affectless error-prone polish of 2025’s LLMs, I would probably discard it unread. I already found the switch to turn off Gmail’s attempts to summarize my emails.</p> <p>What’s the genAI world’s equivalent of “Tl;dr”? I’m thinking “TA;dr” (A for AI) or “Tg;dr” (g for genAI) or just “LLM:dr”.</p> <p>And this vision of everyone using genAI to amplify their output and everyone else using it to summarize and filter their input feels simply perverse.</p> <p> Here’s what I think is <a href="https://infosec.exchange/@codinghorror/114606355212363074">an important finding</a> , ably summarized by Jeff Atwood: </p> <img src="https://www.tbray.org/ongoing/When/202x/2025/06/06/Dare-Jeff.png" alt="Dare Obasanjo and Jeff Atwood on how to survive AI"/> <p>Seriously, since LLMs by design emit streams that are optimized for plausibility and for harmony with the model’s training base, in an AI-centric world there’s a powerful incentive to say things that are implausible, that are out of tune, that are, bluntly, weird. So there’s one upside.</p> <p>And let’s go back to cost. Are the prices in Riegert’s slide deck going to pay for trillions in capex? Another example: My family has a Google workplace account, and the price just went up from $6/user/month to $7. The announcement from Google emphasized that this was related to the added value provided by Gemini. Is $1/user/month gonna make this tech make business sense?</p> <h2 id="p-13">What I can and can’t buy</h2> <p>I can sorta buy the premise that there are genAI productivity boosts to be had in the code space and maybe some other specialized domains. I can’t buy for a second that genAI is anything but toxic for anything education-related. On the business-communications side, it’s damn well gonna be tried because billions of dollars and many management careers depend on it paying off. We’ll see but I’m skeptical.</p> <p>On the money side? I don’t see how the math and the capex work. And all the time, I think about the carbon that’s poisoning the planet my children have to live on.</p> <p>I think that the best we can hope for is the eventual financial meltdown leaving a few useful islands of things that are actually useful at prices that make sense.</p> <p>And in a decade or so, I can see business-section stories about all the big data center shells that were never filled in, standing there empty, looking for another use. It’s gonna be tough, what can you do with buildings that have no windows?</p> </div> </content> </entry> <entry> <title>Union of Finite Automata</title> <link href="https://www.tbray.org/ongoing/When/202x/2024/07/28/Union-of-Finite-Automata"/> <link rel="replies" thr:count="0" type="application/xhtml+xml" href="/ongoing/When/202x/2024/07/28/Union-of-Finite-Automata#comments"/> <id>https://www.tbray.org/ongoing/When/202x/2024/07/28/Union-of-Finite-Automata</id> <published>2024-07-28T12:00:00-07:00</published> <updated>2025-06-02T11:49:20-07:00</updated> <category scheme="https://www.tbray.org/ongoing/What/" term="Technology/Quamina Diary"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Technology"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Quamina Diary"/> <summary type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml">In building Quamina, I needed to compute the union of two finite automata (FAs). I remembered from some university course 100 years ago that this was possible in theory, so I went looking for the algorithm, but was left unhappy. The descriptions I found tended to be hyper-academic, loaded with mathematical notation that I found unhelpful, and didn’t describe an approach that I thought a reasonable programmer would reasonably take. The purpose of this <span class="o">ongoing</span> entry is to present a programmer-friendly description of the problem and of the algorithm I adopted, with the hope that some future developer, facing the same problem, will have a more satisfying search experience.<br/> <i>[Important update: There’s a serious error halfway through; see <a href="#p-9">here</a>.]</i></div> </summary> <content type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml"> <p> In building Quamina, I needed to compute the union of two finite automata (FAs). I remembered from some university course 100 years ago that this was possible in theory, so I went looking for the algorithm, but was left unhappy. The descriptions I found tended to be hyper-academic, loaded with mathematical notation that I found unhelpful, and didn’t describe an approach that I thought a reasonable programmer would reasonably take. The purpose of this <span class="o">ongoing</span> entry is to present a programmer-friendly description of the problem and of the algorithm I adopted, with the hope that some future developer, facing the same problem, will have a more satisfying search experience. <br/> <i>[Important update: There’s a serious error halfway through; see <a href="#p-9">here</a>.]</i> </p> <p>There is very little math in this discussion (a few subscripts), and no circles-and-arrows pictures. But it does have working Go code.</p> <h2 id="p-1">Finite automata?</h2> <p>I’m not going to rehash the theory of FAs (often called state machines). In practice the purpose of an FA is to match (or fail to match) some input against some pattern. What the software does when the input matches the pattern (or doesn’t) isn’t relevant to our discussion today. Usually the inputs are strings and the patterns are regular expressions or equivalent. In practice, you compile a pattern into an FA, and then you go through the input, character by character, trying to traverse the FA to find out whether it matches the input.</p> <p>An FA has a bunch of states, and for each state there can be a list of input symbols that lead to transitions to other states. What exactly I mean by “input symbol” turns out to be interesting and affects your choice of algorithm, but let’s ignore that for now.</p> <p>The following statements apply:</p> <ol> <li> <p>One state is designated as the “start state” because, well, that’s where you start.</p> </li> <li> <p>Some states are called “final”, and reaching them means you’ve matched one or more patterns. In Quamina’s FAs, each state has an extra field (usually empty) saying “if you got here you matched P*, yay!”, where P* is a list of labels for the (possibly more than one) patterns you matched.</p> </li> <li> <p> It is possible that you’re in a state and for some particular input, you transition to more than one other state. If this is true, your FA is <em>nondeterministic</em> , abbreviated NFA. </p> </li> <li> <p> It is possible that a state can have one or more “epsilon transitions”, ones that you can just take any time, not requiring any particular input. (I wrote about this in <a href="/ongoing/When/202x/2024/06/17/Epsilon-Love">Epsilon Love</a> .) Once again, if this is true, you’ve got an NFA. If neither this statement nor the previous are true, it’s a <em>deterministic</em> finite automaton, DFA. </p> </li> </ol> <p>The discussion here works for NFAs, but lots of interesting problems can be solved with DFAs, which are simpler and faster, and this algorithm works there too.</p> <h2 id="p-2">Union?</h2> <p> If I have <code>FA1</code> that matches “foo” and <code>FA2</code> that matches “bar”, then their union, <code>FA1 ∪ FA2</code> , matches both “foo” and “bar”. In practice Quamina often computes the union of a large number of FAs, but it does so a pair at a time, so we’re only going to worry about the union of two FAs. </p> <h2 id="p-3">The academic approach</h2> <p>There are plenty of Web pages and YouTubes covering this. Most of them are full of Greek characters and math symbols. They go like this:</p> <ol> <li> <p> You have two FAs, call them <code>A</code> and <code>B</code> . <code>A</code> has states <code>A<sub>1</sub></code> , … <code>A<sub>maxA</sub></code> , <code>B</code> has <code>B<sub>1</sub></code> , … <code>B<sub>maxB</sub></code> </p> </li> <li> <p> The union contains all the states in <code>A</code> , all the states in <code>B</code> , and the “product” of <code>A</code> and <code>B</code> , which is to say states you could call <code>A<sub>1</sub>B<sub>1</sub></code> , <code>A<sub>1</sub>B<sub>2</sub></code> , <code>A<sub>2</sub>B<sub>1</sub></code> , <code>A<sub>2</sub>B<sub>2</sub></code> , … <code>A<sub>maxA</sub>B<sub>maxB</sub></code> . </p> </li> <li> <p> For each state <code>A<sub>X</sub>B<sub>Y</sub></code> , you work out its transitions by looking at the transitions of the two states being combined. For some input symbol, if <code>A<sub>X</sub></code> has a transition to <code>A<sub>XX</sub></code> but <code>B<sub>Y</sub></code> has no transition, then the combined state just has the A transition. The reverse for an input where <code>B<sub>Y</sub></code> has a transition but <code>A<sub>X</sub></code> doesn’t. And if <code>A<sub>X</sub></code> transitions to <code>A<sub>XX</sub></code> and <code>B<sub>Y</sub></code> transitions to <code>B<sub>YY</sub></code> , then the transition is to <code>A<sub>XX</sub>B<sub>YY</sub></code> . </p> </li> <li> <p> Now you’ll have a lot of states, and it usually turns out that many of them aren’t reachable. But there are plenty of algorithms to filter those out. You’re done, you’ve computed the union and <code>A<sub>1</sub>B<sub>1</sub></code> is its start state! </p> </li> </ol> <h2 id="p-4">Programmer-think</h2> <p>If you’re like me, the idea of computing all the states, then throwing out the unreachable ones, feels wrong. So here’s what I suggest, and has worked well in practice for Quamina:</p> <ol> <li> <p> First, merge <code>A<sub>1</sub></code> and <code>B<sub>1</sub></code> to make your new start state <code>A<sub>1</sub>B<sub>1</sub></code> . Here’s how: </p> </li> <li> <p> If an input symbol causes no transitions in either <code>A<sub>1</sub></code> or <code>B<sub>1</sub></code> , it also doesn’t cause any in <code>A<sub>1</sub>B<sub>1</sub></code> . </p> </li> <li> <p> If an input symbol causes a transition in <code>A<sub>1</sub></code> to <code>A<sub>X</sub></code> but no transition in <code>B<sub>1</sub></code> , then you adopt <code>A<sub>X</sub></code> into the union, and any other <code>A</code> states it points to, and any they point to, and so on. </p> </li> <li> <p> And of course if <code>B<sub>1</sub></code> has a transition to <code>B<sub>Y</sub></code> but <code>A<sub>1</sub></code> doesn’t transition, you flip it the other way, adopting <code>B<sub>Y</sub></code> and its descendents. </p> </li> <li> <p> And if <code>A<sub>1</sub></code> transitions to <code>A<sub>X</sub></code> and <code>B<sub>1</sub></code> transitions to <code>B<sub>Y</sub></code> , then you adopt a new state <code>A<sub>X</sub>B<sub>Y</sub></code> , which you compute recursively the way you just did for <code>A<sub>1</sub>B<sub>1</sub></code> . So you’ll never compute anything that’s not reachable. </p> </li> </ol> <p>I could stop there. I think that’s enough for a competent developers to get the idea? But it turns out there are a few details, some of them interesting. So, let’s dig in.</p> <h2 id="p-5">“Input symbol”?</h2> <p>The academic discussion of FAs is very abstract on this subject, which is fair enough, because when you’re talking about how to build, or traverse, or compute the union of FAs, the algorithm doesn’t depend very much on what the symbols actually are. But when you’re writing code, it turns out to matter a lot.</p> <p>In practice, I’ve done a lot of work with FAs over the years, and I’ve only ever seen four things used as input symbols to drive them. They are:</p> <ul> <li> <p>Unicode “characters” represented by code points, integers in the range 0…1,114,111 inclusive.</p> </li> <li> <p>UTF-8 bytes, which have values in the range 0…244 inclusive.</p> </li> <li> <p> UTF-16 values, unsigned 16-bit integers. I’ve only ever seen this used in Java programs because that’s what its native <code>char</code> type is. You probably don’t want to do this. </p> </li> <li> <p>Enum values, small integers with names, which tend to come in small collections.</p> </li> </ul> <p>As I said, this is all I’ve seen, but 100% of the FAs that I’ve seen automatically generated and subject to set-arithmetic operations like Union are based on UTF-8. And that’s what Quamina uses, so that’s what I’m going to use in the rest of this discussion.</p> <h2 id="p-7">Code starts here</h2> <p> This comes from Quamina’s <a href="https://github.com/timbray/quamina/blob/main/nfa.go">nfa.go</a> . We’re going to look at the function <code>mergeFAStates</code> , which implements the merge-two-states logic described above. </p> <p> Lesson: This process can lead to a lot of wasteful work. Particularly if either or both of the states transition on ranges of values like <code>0…9</code> or <code>a…z</code> . So we only want to do the work merging any pair of states once, and we want there only to be one merged value. Thus we start with a straightforward memo-ization. </p> <div class="tbc"> <pre> <span class="kd">func</span> <span class="w"> </span> <span class="nx">mergeFAStates</span> <span class="p">(</span> <span class="nx">state1</span> <span class="p">,</span> <span class="w"> </span> <span class="nx">state2</span> <span class="w"> </span> <span class="o">*</span> <span class="nx">faState</span> <span class="p">,</span> <span class="w"> </span> <span class="nx">keyMemo</span> <span class="w"> </span> <span class="kd">map</span> <span class="p">[</span> <span class="nx">faStepKey</span> <span class="p">]</span> <span class="o">*</span> <span class="nx">faState</span> <span class="p">)</span> <span class="w"> </span> <span class="o">*</span> <span class="nx">faState</span> <span class="w"> </span> <span class="p">{</span> <span class="w"> </span> <span class="c1">// try to memo-ize</span> <span class="w"> </span> <span class="nx">mKey</span> <span class="w"> </span> <span class="o">:=</span> <span class="w"> </span> <span class="nx">faStepKey</span> <span class="p">{</span> <span class="nx">state1</span> <span class="p">,</span> <span class="w"> </span> <span class="nx">state2</span> <span class="p">}</span> <span class="w"> </span> <span class="nx">combined</span> <span class="p">,</span> <span class="w"> </span> <span class="nx">ok</span> <span class="w"> </span> <span class="o">:=</span> <span class="w"> </span> <span class="nx">keyMemo</span> <span class="p">[</span> <span class="nx">mKey</span> <span class="p">]</span> <span class="w"> </span> <span class="k">if</span> <span class="w"> </span> <span class="nx">ok</span> <span class="w"> </span> <span class="p">{</span> <span class="w"> </span> <span class="k">return</span> <span class="w"> </span> <span class="nx">combined</span> <span class="w"> </span> <span class="p">}</span> </pre> <p> Now some housekeeping. Remember, I noted above that any state might contain a signal saying that arriving here means you’ve matched pattern(s). This is called <code>fieldTransitions</code> , and the merged state obviously has to match all the things that either of the merged states match. Of course, in the vast majority of cases neither merged state matched anything and so this is a no-op. </p> <pre> <span class="w"> </span> <span class="nx">fieldTransitions</span> <span class="w"> </span> <span class="o">:=</span> <span class="w"> </span> <span class="nb">append</span> <span class="p">(</span> <span class="nx">state1</span> <span class="p">.</span> <span class="nx">fieldTransitions</span> <span class="p">,</span> <span class="w"> </span> <span class="nx">state2</span> <span class="p">.</span> <span class="nx">fieldTransitions</span> <span class="o">...</span> <span class="p">)</span> </pre> <p>Since our memo-ization attempt came up empty, we have to allocate an empty structure for the new merged state, and add it to the memo-izer.</p> <pre> <span class="w"> </span> <span class="nx">combined</span> <span class="w"> </span> <span class="p">=</span> <span class="w"> </span> <span class="o">&</span> <span class="nx">faState</span> <span class="p">{</span> <span class="nx">table</span> <span class="p">:</span> <span class="w"> </span> <span class="nx">newSmallTable</span> <span class="p">(),</span> <span class="w"> </span> <span class="nx">fieldTransitions</span> <span class="p">:</span> <span class="w"> </span> <span class="nx">fieldTransitions</span> <span class="p">}</span> <span class="w"> </span> <span class="nx">keyMemo</span> <span class="p">[</span> <span class="nx">mKey</span> <span class="p">]</span> <span class="w"> </span> <span class="p">=</span> <span class="w"> </span> <span class="nx">combined</span> </pre> <p>Here’s where it gets interesting. The algorithm talks about looking at the inputs that cause transitions in the states we’re merging. How do you find them? Well, in the case where you’re transitioning on UTF-8 bytes, since there are only 244 values, why not do the simplest thing that could possibly work and just check each byte value?</p> <p> Every Quamina state contains a table that encodes the byte transitions, which operates like the Go construct <code>map[byte]state</code> . Those tables are implemented in <a href="/ongoing/When/202x/2022/06/25/Small-Tables">a compact data structure optimized for fast traversal</a> . But for doing this kind of work, it’s easy to “unpack” them into a fixed-sized table; in Go, <code>[244]state</code> . Let’s do that for the states we’re merging and for the new table we’re building. </p> <pre> <span class="w"> </span> <span class="nx">u1</span> <span class="w"> </span> <span class="o">:=</span> <span class="w"> </span> <span class="nx">unpackTable</span> <span class="p">(</span> <span class="nx">state1</span> <span class="p">.</span> <span class="nx">table</span> <span class="p">)</span> <span class="w"> </span> <span class="nx">u2</span> <span class="w"> </span> <span class="o">:=</span> <span class="w"> </span> <span class="nx">unpackTable</span> <span class="p">(</span> <span class="nx">state2</span> <span class="p">.</span> <span class="nx">table</span> <span class="p">)</span> <span class="w"> </span> <span class="kd">var</span> <span class="w"> </span> <span class="nx">uComb</span> <span class="w"> </span> <span class="nx">unpackedTable</span> </pre> <p><code>uComb</code> is where we’ll fill in the merged transitions.</p> <p> Now we’ll run through all the possible input values; <code>i</code> is the byte value, <code>next1</code> and <code>next2</code> are the transitions on that value. In practice, <code>next1</code> and <code>next2</code> are going to be null most of the time. </p> <pre> <span class="w"> </span> <span class="k">for</span> <span class="w"> </span> <span class="nx">i</span> <span class="p">,</span> <span class="w"> </span> <span class="nx">next1</span> <span class="w"> </span> <span class="o">:=</span> <span class="w"> </span> <span class="k">range</span> <span class="w"> </span> <span class="nx">u1</span> <span class="w"> </span> <span class="p">{</span> <span class="w"> </span> <span class="nx">next2</span> <span class="w"> </span> <span class="o">:=</span> <span class="w"></span> <span class="nx"> u2</span> <span class="p">[</span> <span class="nx">i</span> <span class="p">]</span> </pre> <p>Here’s where we start building up the new transitions in the unpacked array <code>uComb</code>.</p> <p> For many values of <code>i</code> , you can avoid actually merging the states to create a new one. If the transition is the same in both input FAs, or if either of them are null, or if the transitions for this value of <code>i</code> are the same as for the last value. This is all about avoiding unnecessary work and the <code>switch</code> / <code>case</code> structure is the result of a bunch of profiling and optimization. </p> <pre> <span class="w"> </span> <span class="k">switch</span> <span class="w"> </span> <span class="p">{</span> <span class="w"> </span> <span class="k">case</span> <span class="w"> </span> <span class="nx">next1</span> <span class="w"> </span> <span class="o">==</span> <span class="w"> </span> <span class="nx">next2</span> <span class="p">:</span> <span class="w"> </span> <span class="c1">// no need to merge</span> <span class="w"> </span> <span class="nx">uComb</span> <span class="p">[</span> <span class="nx">i</span> <span class="p">]</span> <span class="w"> </span> <span class="p">=</span> <span class="w"> </span> <span class="nx">next1</span> <span class="w"> </span> <span class="k">case</span> <span class="w"> </span> <span class="nx">next2</span> <span class="w"> </span> <span class="o">==</span> <span class="w"> </span> <span class="kc">nil</span> <span class="p">:</span> <span class="w"> </span> <span class="c1">// u1 must be non-nil</span> <span class="w"> </span> <span class="nx">uComb</span> <span class="p">[</span> <span class="nx">i</span> <span class="p">]</span> <span class="w"> </span> <span class="p">=</span> <span class="w"> </span> <span class="nx">next1</span> <span class="w"> </span> <span class="k">case</span> <span class="w"> </span> <span class="nx">next1</span> <span class="w"> </span> <span class="o">==</span> <span class="w"> </span> <span class="kc">nil</span> <span class="p">:</span> <span class="w"> </span> <span class="c1">// u2 must be non-nil</span> <span class="w"> </span> <span class="nx">uComb</span> <span class="p">[</span> <span class="nx">i</span> <span class="p">]</span> <span class="w"> </span> <span class="p">=</span> <span class="w"> </span> <span class="nx">next2</span> <span class="w"> </span> <span class="k">case</span> <span class="w"> </span> <span class="nx">i</span> <span class="w"> </span> <span class="p">></span> <span class="w"> </span> <span class="mi">0</span> <span class="w"> </span> <span class="o">&&</span> <span class="w"> </span> <span class="nx">next1</span> <span class="w"> </span> <span class="o">==</span> <span class="w"> </span> <span class="nx">u1</span> <span class="p">[</span> <span class="nx">i</span> <span class="o">-</span> <span class="mi">1</span> <span class="p">]</span> <span class="w"> </span> <span class="o">&&</span> <span class="w"> </span> <span class="nx">next2</span> <span class="w"> </span> <span class="o">==</span> <span class="w"> </span> <span class="nx">u2</span> <span class="p">[</span> <span class="nx">i</span> <span class="o">-</span> <span class="mi">1</span> <span class="p">]:</span> <span class="w"> </span> <span class="c1">// dupe of previous step - happens a lot</span> <span class="w"> </span> <span class="nx">uComb</span> <span class="p">[</span> <span class="nx">i</span> <span class="p">]</span> <span class="w"> </span> <span class="p">=</span> <span class="w"> </span> <span class="nx">uComb</span> <span class="p">[</span> <span class="nx">i</span> <span class="o">-</span> <span class="mi">1</span> <span class="p">]</span> </pre> <p>If none of these work, we haven’t been able to avoid merging the two states. We do that by a recursive call to invoke all the logic we just discussed.</p> <p> There is a complication. The automaton might be nondeterministic, which means that there might be more than one transition for some byte value. So the data structure actually behaves like <code>map[byte]*faNext</code> , where <code>faNext</code> is a wrapper for a list of states you can transition to. </p> <p>So here we’ve got a nested loop to recurse for each possible combination of transitioned-to states that can occur on this byte value. In a high proportion of cases the FA is deterministic, so there’s only one state from each FA being merged and this nested loop collapses to a single recursive call.</p> <pre> <span class="w"> </span> <span class="k">default</span> <span class="p">:</span> <span class="w"> </span> <span class="c1">// have to recurse & merge</span> <span class="w"> </span> <span class="kd">var</span> <span class="w"> </span> <span class="nx">comboNext</span> <span class="w"> </span> <span class="p">[]</span> <span class="o">*</span> <span class="nx">faState</span> <span class="w"> </span> <span class="k">for</span> <span class="w"> </span> <span class="nx">_</span> <span class="p">,</span> <span class="w"> </span> <span class="nx">nextStep1</span> <span class="w"> </span> <span class="o">:=</span> <span class="w"> </span> <span class="k">range</span> <span class="w"> </span> <span class="nx">next1</span> <span class="p">.</span> <span class="nx">states</span> <span class="w"> </span> <span class="p">{</span> <span class="w"> </span> <span class="k">for</span> <span class="w"> </span> <span class="nx">_</span> <span class="p">,</span> <span class="w"> </span> <span class="nx">nextStep2</span> <span class="w"> </span> <span class="o">:=</span> <span class="w"> </span> <span class="k">range</span> <span class="w"> </span> <span class="nx">next2</span> <span class="p">.</span> <span class="nx">states</span> <span class="w"> </span> <span class="p">{</span> <span class="w"> </span> <span class="nx">comboNext</span> <span class="w"> </span> <span class="p">=</span> <span class="w"> </span> <span class="nb">append</span> <span class="p">(</span> <span class="nx">comboNext</span> <span class="p">,</span> <span class="w"> </span> <span class="nx">mergeFAStates</span> <span class="p">(</span> <span class="nx">nextStep1</span> <span class="p">,</span> <span class="w"> </span> <span class="nx">nextStep2</span> <span class="p">,</span> <span class="w"> </span> <span class="nx">keyMemo</span> <span class="p">))</span> <span class="w"> </span> <span class="p">}</span> <span class="w"> </span> <span class="p">}</span> <span class="w"> </span> <span class="nx">uComb</span> <span class="p">[</span> <span class="nx">i</span> <span class="p">]</span> <span class="w"> </span> <span class="p">=</span> <span class="w"> </span> <span class="o">&</span> <span class="nx">faNext</span> <span class="p">{</span> <span class="nx">states</span> <span class="p">:</span> <span class="w"> </span> <span class="nx">comboNext</span> <span class="p">}</span> <span class="w"> </span> <span class="p">}</span> <span class="w"> </span> <span class="p">}</span> </pre> <p>We’ve filled up the unpacked state-transition table, so we’re almost done. First, we have to compress it into its optimized-for-traversal form.</p> <pre> <span class="w"> </span> <span class="nx">combined</span> <span class="p">.</span> <span class="nx">table</span> <span class="p">.</span> <span class="nx">pack</span> <span class="p">(</span> <span class="o">&</span> <span class="nx">uComb</span> <span class="p">)</span> </pre> <p>Remember, if the FA is nondeterministic, each state can have “epsilon” transitions which you can follow any time without requiring any particular input. The merged state needs to contain all the epsilon transitions from each input state.</p> <pre> <span class="w"> </span> <span class="nx">combined</span> <span class="p">.</span> <span class="nx">table</span> <span class="p">.</span> <span class="nx">epsilon</span> <span class="w"> </span> <span class="p">=</span> <span class="w"> </span> <span class="nb">append</span> <span class="p">(</span> <span class="nx">state1</span> <span class="p">.</span> <span class="nx">table</span> <span class="p">.</span> <span class="nx">epsilon</span> <span class="p">,</span> <span class="w"> </span> <span class="nx">state2</span> <span class="p">.</span> <span class="nx">table</span> <span class="p">.</span> <span class="nx">epsilon</span> <span class="o">...</span> <span class="p">)</span> <span class="w"> </span> <span class="k">return</span> <span class="w"> </span> <span class="nx">combined</span> <span class="p">}</span> </pre> </div> <p>And, we’re done. I mean, we are once all those recursive calls have finished crawling through the states being merged.</p> <h2 id="p-9">Oops</h2> <p> The discussion of epsilons above is wrong, in a way that’s harder to reproduce than you might think. The discussion is still correct for DFA’s and (weirdly) (I think) (not sure why yet) the shell-style “wildcard” <code>*</code> operator, which means <code>.*</code> in a regular expression. </p> <p>It’s not clear that in general there’s a way to merge (Quamina-style) two NFA states when either or both of them have epsilon transitions. Per the academic literature, the right way to get the union of two NFAs is to have an empty branch state with two epsilon transitions, one to each NFA. So you traverse the two in parallel.</p> <p>It took me a a whole lot of pain to figure this out and I haven’t entirely worked out the best implementation. I promise more regular-expressions-at-scale walls of text and code in this space when I do.</p> <p>I write this because when you type “merge nondeterministic finite automata” into Web search, the blog you are now reading is dangerously high in the search results.</p> <h2 id="p-8">Is that efficient?</h2> <p>As I said above, this is an example of a “simplest thing that could possibly work” design. Both the recursion and the unpack/pack sequence are kind of code smells, suggesting that this could be a pool of performance quicksand.</p> <p>But apparently not. I ran a benchmark where I added 4,000 patterns synthesized from the Wordle word-list; each of them looked like this:</p> <p><code>{"allis": { "biggy": [ "ceils", "daisy", "elpee", "fumet", "junta", … </code> (195 more).</p> <p> This produced a <em>huge</em> deterministic FA with about 4.4 million states, with the addition of these hideous worst-case patterns running at 500/second. Good enough for rock ’n’ roll. </p> <p>How about nondeterministic FAs? I went back to that Wordle source and, for each of its 12,959 words, added a pattern with a random wildcard; here are three of them:</p> <p> <code> {"x": [ {"shellstyle": "f*ouls" } ] } <br/> {"x": [ {"shellstyle": "pa*sta" } ] } <br/> {"x": [ {"shellstyle": "utter*" } ] } </code> </p> <p>This produced an NFA with 46K states, the addition process ran at 70K patterns/second.</p> <p>Sometimes the simplest thing that could possibly work, works.</p> </div> </content> </entry> <entry> <title>Perfectly Different Colors</title> <link href="https://www.tbray.org/ongoing/When/202x/2025/05/31/Colors"/> <link rel="replies" thr:count="3" type="application/xhtml+xml" href="/ongoing/When/202x/2025/05/31/Colors#comments"/> <id>https://www.tbray.org/ongoing/When/202x/2025/05/31/Colors</id> <published>2025-05-31T12:00:00-07:00</published> <updated>2025-06-02T08:51:38-07:00</updated> <category scheme="https://www.tbray.org/ongoing/What/" term="Arts/Photos"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Arts"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Photos"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Arts/Photos/Cameras"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Cameras"/> <summary type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml">This considers how two modern cameras handle a difficult color challenge, illustrated by photos of a perfect rose and a piano</div> </summary> <content type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml"> <p>This considers how two modern cameras handle a difficult color challenge, illustrated by photos of a perfect rose and a piano.</p> <p>We moved into our former place in January 1997 and, that summer, discovered the property included this slender little rose that only had a couple blossoms every year, but they were perfection, beautifully shaped and in a unique shade of red I’d never seen anywhere else (and still haven’t). Having no idea of its species, we’ve always called it “our perfect rose”.</p> <p> So when <a href="/ongoing/When/202x/2025/02/28/Moved">we moved</a> last year, we took the rose with us. It seems to like the new joint, has a blossom out and two more on the way and it’s still May. </p> <p>I was looking at it this morning and it occurred to me that its color might be an interesting challenge to the two fine cameras I use regularly, namely a Google Pixel 7 and a Fujifilm X-T5.</p> <p>First the pictures.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/05/31/PXL_20250531_185139866.png" alt="The “perfect” rose."/> <img src="https://www.tbray.org/ongoing/When/202x/2025/05/31/TXT55657.png" alt="The “perfect” rose"/> <h2 id="p-2">Limitations</h2> <p>First of all, let’s agree that this comparison is horribly flawed. To start with, by the time the pixels have made it from the camera to your screen, they’ve been through Lightroom, possibly a social-media-software uploader and renderer, and then your browser (or mobile app) and screen contribute their opinions. Thus the colors are likely to vary a lot depending where you are and what you’re using.</p> <p>Also, it’s hard to get really comparable shots out of the Pixel and Fuji; their lenses and processors and underlying architectures are really different. I was going to disclose the reported shutter speeds, aperture, and ISO values, but they are so totally non-comparable that I decided that’d be actively harmful. I’ll just say that I tried to let each do its best.</p> <p>I post-processed both, but limited that to cropping; nothing about the color or exposure was touched.</p> <p>And having said all that, I think the exercise retains interest.</p> <h2 id="p-1">Which?</h2> <p>The Pixel is above, the Fuji below.</p> <p>The Pixel is wrong. The Fuji is… not bad. The blossom’s actual color, to my eye, has a little more orange than I see in the photo; but only a little. The Pixel subtracts the orange and introduces a suggestion of violet that the blossom, to my eye, entirely lacks.</p> <p>Also, the Pixel is artificially sharpening up the petals; in reality, the contrast was low and the shading nuanced; just as presented by the X-T5.</p> <p>Is the Pixel’s rendering a consequence of whatever its sensor is? Or of the copious amount of processing that contributes to Google’s widely-admired (by me too) “computational photography”? I certainly have no idea. And in fact, most of the pictures I share come from my Android because the best camera (this is always true) is the one you have with you. For example…</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/05/31/PXL_20250531_032232026.png" alt="Grand piano by itself in an old church"/> <div class="caption"> <p> That same evening we took in a concert put on by the local Chopin Society featuring 89-year-old <a href="MikhailVoskresensky">Mikhail Voskresensky</a> , who plays really fast and loud in an old super-romantic style, just the thing for the music: Very decent Beethoven and Mozart, kind of aimless Grieg, and the highlight, a lovely take on Chopin’s Op. 58 Sonata, then a <cite>Nocturne</cite> in the encores. </p> <p> Anyhow, I think the Camera I Had With Me did fine. This is <a href="https://www.thecathedral.ca/programs/architecture-heritage">Vancouver’s oldest still-standing building</a> , Christ Church Cathedral, an exquisite space for the eyes and ears. </p> </div> <p>Maybe I’ll do a bit more conscious color-correction on the Pixel shots in future (although I didn’t on the piano). Doesn’t mean it’s not a great camera.</p> </div> </content> </entry> <entry> <title>Comparing Numbers Badly</title> <link href="https://www.tbray.org/ongoing/When/202x/2025/05/30/Number-Comparison-Representation"/> <link rel="replies" thr:count="4" type="application/xhtml+xml" href="/ongoing/When/202x/2025/05/30/Number-Comparison-Representation#comments"/> <id>https://www.tbray.org/ongoing/When/202x/2025/05/30/Number-Comparison-Representation</id> <published>2025-05-30T12:00:00-07:00</published> <updated>2025-05-30T16:15:25-07:00</updated> <category scheme="https://www.tbray.org/ongoing/What/" term="Language"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Language"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Technology/Math"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Technology"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Math"/> <summary type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml">This is just a gripe about two differently bad ways to compare numbers. They share a good alternative</div> </summary> <content type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml"> <p>This is just a gripe about two differently bad ways to compare numbers. They share a good alternative.</p> <h2 id="p-1">“Order of magnitude”</h2> <p>Typically sloppy usages: “AI increases productivity by an order of magnitude”, “Revenue from recorded music is orders of magnitude smaller than back in the Eighties”.</p> <p>Everyone reading this probably already knows that “order of magnitude” has a precise meeting: Multiply or divide by ten. But clearly, the people who write news stories and marketing spiels either don’t, or are consciously using the idioms to lie. In particular, they are trying to say “more than” or “less than” in a dramatic and impressive-sounding way.</p> <p>Consider that first example. It is saying that AI delivers a ten-times gain in productivity. If they’d actually said “ten times” people would be more inclined to ask “What units?” and “How did you measure?” This phrase makes me think that its author is probably lying.</p> <p> The second example is even more pernicious. Since “orders” is plural, they are claiming at least two orders of magnitude, i.e. that revenue is down by <em>at least</em> a factor of a hundred. The difference between two, three, and four orders of magnitude is huge! I’d probably argue that the phrase “order <b>s</b> of magnitude” should probably never be used. In this case, I highly doubt that the speaker has any data, and that they’re just trying to say that the revenue is down really a lot. </p> <p>The solution is simple: Say “by a factor of ten” or “ten times as high” or “at least 100 times less.” Assuming your claim is valid, it will be easily understood; Almost everyone has a decent intuitive understanding of what a ten-times or hundred-times difference feels like.</p> <h2 id="p-2">“Percent”</h2> <p> What actually got me started reading this was reading a claim that some business’s “revenue increased by 250%.” Let’s see. If the revenue were one million and it increased by 10%, it’d be 1.1 million. If it increased by 100% it’d be two million. 200% is three million. So what they meant by 250% is that the revenue increased by a factor of 3.5. It is <em>so much</em> easier to understand “3.5 times” than 250%. Furthermore, I bet a lot of people intuitively feel that 250% means “2.5 times”, which is just wrong. </p> <p>I think quoting percentages is clear and useful for values less than 100. There is nothing wrong with talking about a 20% increase or 75% decrease.</p> <p>So, same solution: For percentages past 100, don’t use them, just say “by a factor of X”. Once again, people have an instant (and usually correct) gut feel for what a 3.5-times increase feels like.</p> <h2 id="p-3">“But English is a living language!”</h2> <p>Not just living, but also squirmy and slutty, open to both one-night stands and permanent relationships with neologisms no matter how ugly and imports from other dialects no matter how sketchy. Which is to say, there’s nothing I can do to keep “orders of magnitude” from being used to mean “really a lot”.</p> <p>In fact, it’s only a problem when you’re trying to communicate a numeric difference. But that’s an important application of human language.</p> <p>Perversely, I guess you could argue that these bad idioms are useful in helping you detect statements that are probably either ignorant or just lies. Anyhow, now you know that when I hear them, I hear patterns that make me inclined to disbelieve. And I bet I’m not the only one.</p> </div> </content> </entry> <entry> <title>CL XLVI: Happy Colors</title> <link href="https://www.tbray.org/ongoing/When/202x/2025/05/27/Happy-Colors"/> <link rel="replies" thr:count="0" type="application/xhtml+xml" href="/ongoing/When/202x/2025/05/27/Happy-Colors#comments"/> <id>https://www.tbray.org/ongoing/When/202x/2025/05/27/Happy-Colors</id> <published>2025-05-27T12:00:00-07:00</published> <updated>2025-05-28T21:58:08-07:00</updated> <category scheme="https://www.tbray.org/ongoing/What/" term="The World/Cottage Life"/> <category scheme="https://www.tbray.org/ongoing/What/" term="The World"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Cottage Life"/> <summary type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml">Last weekend we were at our cabin on <a href="https://en.wikipedia.org/wiki/Keats_Island_(British_Columbia)">Keats Island</a> and I came away with two <a href="/ongoing/What/The%20World/Cottage%20Life/">cottage-life</a> pictures I wanted to write about. To write cheery stuff actually, a rare pleasure in these dark days. Both have a story but this first one’s simple</div> </summary> <content type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml"> <p> Last weekend we were at our cabin on <a href="https://en.wikipedia.org/wiki/Keats_Island_(British_Columbia)">Keats Island</a> and I came away with two <a href="/ongoing/What/The%20World/Cottage%20Life/">cottage-life</a> pictures I wanted to write about. To write cheery stuff actually, a rare pleasure in these dark days. Both have a story but this first one’s simple. </p> <img src="https://www.tbray.org/ongoing/When/202x/2025/05/27/PXL_20250525_212106021.png" alt="Evergreen branches in spring with the new life showing"/> <p>It’s just an ordinary evergreen tree, not very tall, nothing special about it. But spring’s here! So at the end of each branch there’s a space where the needles are new and shout their youth in light green, a fragile color as compared to the soberly rich shade of the middle-aged needles further up the branch. Probably a metaphor for something complicated but I just see a tree getting on with the springtime business of tree-ness. Good on it.</p> <p>Now a longer story. What happened was, we had an extra-low tide. Tide is a big deal, we get 17 vertical feet at the extremes which can cause problems for boats and docks and if you happen to arrive with several days worth of supplies at low tide well it sucks to be you, because you’re gonna be toting everything up that much further.</p> <p>But I digress.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/05/27/PXL_20250525_172750708.png" alt="Purple sea stars hide among dark rocks"/> <p> I went for a walk at low tide because you see things that are usually mostly hidden. For example these <a href="https://en.wikipedia.org/wiki/Starfish">starfish</a> , also known as sea stars or even “asteroids”. No, really, check that link. </p> <p> These are <a href="https://en.wikipedia.org/wiki/Pisaster_ochraceus"> <i>Pisaster ochraceus</i> </a> , distinguished by that pleasing violet color. Have a close look. They’re intertidal creatures hiding from the unaccustomed light and air. The important thing is that they’re more or less whole, which is to say free of <a href="https://en.wikipedia.org/wiki/Sea_star_wasting_disease">wasting disease</a> , of which there’s been a major epizootic in recent years. The disease isn’t subtle, it makes their arms melt away into purple goo; extremely gross. </p> <p>Plus, ecologies being what they are, there are downstream effects. Sea stars predate on sea urchins only recently they haven’t been because wasting disease. It turns out that sea urchins eat the kelp that baby shrimp trying to grow up hide in. Fewer stars, more urchins, less prawns. Which means that the commercial prawn-fishers have been coming up empty and going out of business.</p> <p>Anyhow, seeing a cluster of disease-free stars is nice, whether you’re in the seafood business or you just like the stars for their own sake, as I do.</p> <p>And light-green needles too. And spring. Enjoy it while you can.</p> </div> </content> </entry> <entry> <title>The Lens of Spring</title> <link href="https://www.tbray.org/ongoing/When/202x/2025/05/17/Springtime-Lens"/> <link rel="replies" thr:count="3" type="application/xhtml+xml" href="/ongoing/When/202x/2025/05/17/Springtime-Lens#comments"/> <id>https://www.tbray.org/ongoing/When/202x/2025/05/17/Springtime-Lens</id> <published>2025-05-17T12:00:00-07:00</published> <updated>2025-05-18T11:53:07-07:00</updated> <category scheme="https://www.tbray.org/ongoing/What/" term="The World/Economics"/> <category scheme="https://www.tbray.org/ongoing/What/" term="The World"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Economics"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Arts/Photos/Cameras"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Arts"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Photos"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Cameras"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Arts/Photos"/> <summary type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml">Back in the early days of this blog, I used to publish posts that were mostly pictures of plants and flowers. Especially at this time of year. I think that energy went into Twitter and now the Fediverse, where it’s so easy to take a picture and post it right then. This week I got a freshly-repaired lens back from the shop and it put me in the mood to get closer to the botanical frenzy springing at us from every direction. Herewith four pix of two plants, one of a lens, and more thoughts on a familiar subject: Whether it’s better to repair than to replace</div> </summary> <content type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml"> <p>Back in the early days of this blog, I used to publish posts that were mostly pictures of plants and flowers. Especially at this time of year. I think that energy went into Twitter and now the Fediverse, where it’s so easy to take a picture and post it right then. This week I got a freshly-repaired lens back from the shop and it put me in the mood to get closer to the botanical frenzy springing at us from every direction. Herewith four pix of two plants, one of a lens, and more thoughts on a familiar subject: Whether it’s better to repair than to replace.</p> <p> The lens, by the way, was the <a href="https://www.fujifilm-x.com/en-ca/products/lenses/xf18-55mmf28-4-r-lm-ois/">Fuji 18-55</a> oops its full name is “Fujinon XF18-55mmF2.8-4 R LM OIS” so there. I <a href="/ongoing/When/201x/2013/03/06/Fuji-X-E1-in-Tokyo">bought it</a> in March of 2013 and have dropped it more than once; I have retained 1,432 pictures taken with it over the years. But then it stopped working. </p> <p>More words on that later, but pictures first.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/05/17/TXT55621.png" alt="A yellow Fru Dagmar Hastrup rose blossom"/> <div class="caption"> <p> Roses have names and this one is “Fru Dagmar Hastrup”. Therein <a href="/ongoing/When/200x/2008/06/26/Yellow-Rugosa">lies a tale</a> that is either 17 or 111 years old, depending how you count. </p> </div> <p>That’s the first picture I took with the repaired 18-55. But then I thought that the whole point of this basic zoom was that you could go wide to capture big things, or long to, well, zoom in on ’em. So I went out front.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/05/17/TXT55626.png" alt="Looking up into the branches of a large deciduous tree"/> <div class="caption"> <p> Trees have names too. This is a <a href="https://en.wikipedia.org/wiki/Fraxinus_americana">White Ash</a> ( <i>Fraxinus americana</i> ). </p> </div> <p> That ash is one of the trees lining the street we <a href="/ongoing/When/202x/2025/02/28/Moved">moved onto last October</a> . It’s really immense. Let’s crank the zoom way wide and capture most of it. Doing this reveals really great geometry, so let’s subtract the color and add some <a href="https://nikcollection.dxo.com/nik-silver-efex/">Silver Efex</a> sizzle. </p> <img src="https://www.tbray.org/ongoing/When/202x/2025/05/17/TXT55625-Edit.png" alt="Black and white rendition of the spreading branches of a large tree"/> <p>And then we can zoom back in.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/05/17/TXT55628.png" alt="The first fork in the trunk of a large tree, with moss and outgrowths"/> <p>The closer you get, the better it looks.</p> <h2 id="p-1">Fixing that lens</h2> <p> I like quirky fast compact opinionated prime lenses just as much as the next photoenthusiast, but a decent midrange zoom is just too useful not to have. I could’ve replaced this one with the new-fangled <a href="https://www.fujifilm-x.com/en-ca/products/lenses/xf16-50mmf28-48-r-lm-wr/">16-50mm</a> (also has a long complicated Real Name but never mind). That would cost me extra money and <a href="https://www.youtube.com/watch?v=1rLcCkilADY&t=3s">might not even be better</a> . </p> <p> So I poked around on the Fujifilm Web site and sure enough, they offer repair as a service, just package it up and mail it in. A few days after doing so I got an email quoting me a price and asking for approval, which I granted. You shouldn’t be surprised. Way back in 2011 I wrote <a href="/ongoing/When/201x/2011/10/20/Worth-Repairing">Worth Fixing</a> , the exemplar of which was a different excellent lens. And then just last year my <a href="/ongoing/When/202x/2024/06/01/Parable-of-the-Sofa">Parable of the Sofa</a> touched a few nerves. So I didn’t think very hard about it. </p> <p> But then I realized I hadn’t even checked whether the price was reasonable. So I <a href="https://www.ebay.com/sch/i.html?_nkw=xf18-55">turned to eBay</a> and, well, I could have got a mint-condition secondhand 18-55 for less than the cost of the repair. Not a lot less, but still. Oh well. If it were reasonable to care about a single instance of a standardized commercial product, I’d care about that lens. </p> <p>Anyhow, it works pretty well. Showing its age, but still reasonably handsome.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/05/17/PXL_20250518_040716981.png" alt="Fujifilm x-T5 camera with the 18-55mm lens attached"/> <p>If I live long enough maybe I’ll take another thousand pictures with it.</p> </div> </content> </entry> <entry> <title>Long Links</title> <link href="https://www.tbray.org/ongoing/When/202x/2025/05/06/Long-Links"/> <link rel="replies" thr:count="5" type="application/xhtml+xml" href="/ongoing/When/202x/2025/05/06/Long-Links#comments"/> <id>https://www.tbray.org/ongoing/When/202x/2025/05/06/Long-Links</id> <published>2025-05-06T12:00:00-07:00</published> <updated>2025-05-08T14:22:54-07:00</updated> <category scheme="https://www.tbray.org/ongoing/What/" term="The World"/> <category scheme="https://www.tbray.org/ongoing/What/" term="The World"/> <summary type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml">Another <cite>Long Links</cite> curation (the 31<sup>st</sup>!); substantial pieces of reading (or watching or listening) that you probably don’t have time to take in all of. One or two, though, might reward your attention. The usual assortmet of music, geekery, and cosmology</div> </summary> <content type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml"> <p> Another <cite>Long Links</cite> curation (the 31 <sup>st</sup> !); substantial pieces of reading (or watching or listening) that you probably don’t have time to take in all of. One or two, though, might reward your attention. The usual assortmet of music, geekery, and cosmology. </p> <h2 id="p-1">Galactic clusters</h2> <p> Ever heard of <a href="https://en.wikipedia.org/wiki/Laniakea_Supercluster">Laniakea</a> ? Neither had I. It’s another word for our home. This 7-minute YouTube video, <a href="https://www.youtube.com/watch?v=Ayj4p3WFxGk">The Laniakea supercluster of galaxies</a> , is graceful and mind-expanding; highly recommended. </p> <h2 id="p-2">Atom Heart Mother</h2> <p> I was sitting up late, pretty mellow, and Google Music showed me <a href="https://www.youtube.com/watch?v=RqcNqRA07yQ">Atom Heart Mother</a> as performed by Japanese tribute band Pink Floyd Trips in 2016. It woke me right up. The Japanese hipsters are instrumentally strong and use keyboards for the acoustic-instrument parts. As for the vocals, well, oh my oh my, definitely next level. Good stuff. </p> <p> Which made me curious about other performances of <cite>Atom Heart Mother</cite> . Turns out Floyd recorded <a href="https://www.youtube.com/watch?v=jWR-aI1qtEU">a 1971 performance</a> , coincidentally also from Japan. Obviously they’re competent, but they’re just four guys and the keyboard technology was way more primitive back then, so they’re at a disadvantage compared to the resources they had in the studio when recording it, or the technology deployed by PF Trips. A lot of the visuals are of the band arriving in and traveling around Japan, which is OK, because their performances in that era weren’t particularly visually stimulating. Credit to Gilmour for hitting the high notes (albeit with some electronic assist), but once again, he’s at a disadvantage compared to the awesome Japanese singers. </p> <p>The arrangement is quite a bit different than the original on the eponymous album and, within the limitations, is good.</p> <p>There’s a cover by “Pussycherry et l'Orchestre d'harmonie de Clermont Ferrand” which I abandoned partway through because the orchestra just isn’t very good, clumsy and harsh. There is a nice little cello part though.</p> <p> I will link to <a href="https://www.youtube.com/watch?v=0ra6B5evR2o">Orchestre Philharmonique de Radio France with Ron Geesin at the Théâtre du Chatelet</a> , once again an orchestra and a chorus. Ron Geesin is the guy that Floyd hired to do all the orchestral stuff after they’d recorded the basic tracks and went on tour. The orchestra is way better but disappointingly equals neither Geesin’s original take on the album, nor PF Trips. And the big choir doesn’t come close to those two Japanese women. </p> <p>There are more performances out there, but I had to go to bed.</p> <h2 id="p-3">C2PA C2PA C2PA</h2> <p> I have <a href="/ongoing/What/Technology/Identity/">written quite a bit</a> about <a href="https://c2pa.org/">C2PA</a> and other “Content Authenticity” initiative stuff. Recently, Adobe has released more C2PA-enabling technology in several of its apps, and there is commentary from <a href="https://www.dpreview.com/opinion/6029161962/adobe-content-authenticity-credentials-app-public-beta-ai-training">DPReview</a> and <a href="https://petapixel.com/2025/04/24/why-photographers-should-care-about-the-new-content-authenticity-app/">PetaPixel</a> . </p> <p> If you care about this stuff like I do you’ll probably enjoy reading both pieces. But they (mostly) miss what I think is the key point. The biggest value offered by this stuff is establishing provenance, and the most important place to establish provenance is on social media. Knowing that a pic on Fedi or Bluesky was first uploaded by <code>@[email protected]</code> is highly useful in helping people decide whether it’s real or not, and would not require a major technical leap from any social-media provider. </p> <h2 id="p-4">Less attention</h2> <p> Joan Westerberg’s excellent <a href="https://www.joanwestenberg.com/notes-from-the-exit-why-i-left-the-attention-economy/">Notes from the Exit: Why I Left the Attention Economy</a> is full of passion and truth. About stepping off the “content creator” treadmill, she writes: </p> <blockquote> <p>Leaving the attention economy doesn’t mean vanishing. It means choosing to matter to fewer people, more deeply. It means owning the means of distribution. It means publishing like a human being instead of a content mill. It means you stop playing to the house odds and start building your own game.</p> </blockquote> <p>And the rest is just as good. For what it’s worth, what she’s describing is what I’ve been trying to do in this space for the last 22 years.</p> <!-- <h2 id='p-5'>Monochromicity</h2> <p><a href="https://www.culture-critic.com/p/why-is-the-world-losing-color">Why is the world losing color?</a> is the question from Culture-critic.com. There’s no metaphor here, they’re talking about color literally, as in how and why monochrome color palettes are crowding out vibrant ones.</p>--> <h2 id="p-6">Defective outlook</h2> <p> I don’t read <cite>The Register</cite> often enough; for many years they’ve been full of fresh takes and exhibited a usefully belligerant attitude. For example, <a href="https://www.theregister.com/2025/03/31/opinion_column_big_tech/">When even Microsoft can’t understand its own Outlook, big tech is stuck in a swamp of its own making</a> excoriates “the weird cruft that happens when Microsoft saws bits of our limbs off to make us fit into whatever profit center is running strategy today.” I actually disagree with some of the article, as I often do with the <cite>Reg</cite> , but I enjoyed reading it anyhow. </p> <h2 id="p-7">A billion times a second</h2> <p> Time to put on your hardcore-geek hat and look at <a href="https://www.amazon.science/publications/formally-verified-cloud-scale-authorization">Formally verified cloud-scale authorization</a> . A group at AWS replaced a single heavily-used API call implementation with formally-verified code, simultaneously making it smaller and faster. The link is to an overview piece, the full PDF is <a href="https://assets.amazon.science/bb/40/22ac44f84f6d8eb625ac9666a00f/formally-verified-cloud-scale-authorization.pdf">here</a> . </p> <p>These are not lightweight technologies and this was not a cheap project; a lot of people did a lot of work and these are not junior people. But when what you’re working on is this call:</p> <blockquote> <p> <code>Answer evaluate(List<Policy> ps, Request r)</code> </p> </blockquote> <p>That call is at the core of where AWS grants or denies access by anything to anything, and it’s called more than a billion times a second. That’s billion with a B. A situation where this kind of investment isn’t merely justifiable, it’s a no-brainer. I know a couple of the people on the authors list, and I offer all of them my congratulations. Strong work!</p> <h2 id="p-8">Decarbonization at sea</h2> <p> Regular readers know that my family has a boat, that we’re trying to <a href="/ongoing/When/202x/2020/01/19/Decarbonization">decarbonize our lives</a> , and that the boat has been the hardest part of that. </p> <p> So, I pay close attention to the latest news from the electric-boat scene. I’m starting to gain confidence that in a single-digit number of years we’ll be using a quieter, cheaper, more environmentally praiseworthy vessel of some sort. So, in case anybody has similar worries, here are snapshots from a few of the more viable electric-boat startups: <a href="https://www.navierboat.com/about">Navier</a> , <a href="https://www.torqeedo.com/en/home">Torqueedo</a> , <a href="https://xshore.com/us/">X Shore</a> , <a href="https://candela.com">Candela</a> . Also, here’s <a href="https://www.aqua-superpower.com">Aqua superPower</a> , which wants to bring dockside charging to the electric-boat scene. And finally, here is the <a href="https://electrek.co/guides/electric-boats/">Electric boats</a> category from the always-useful <cite>electrek</cite> electric-mobility site. </p> </div> </content> </entry> <entry> <title>Censoring Social Media</title> <link href="https://www.tbray.org/ongoing/When/202x/2025/04/28/Censoring-Social-Media"/> <link rel="replies" thr:count="5" type="application/xhtml+xml" href="/ongoing/When/202x/2025/04/28/Censoring-Social-Media#comments"/> <id>https://www.tbray.org/ongoing/When/202x/2025/04/28/Censoring-Social-Media</id> <published>2025-04-28T12:00:00-07:00</published> <updated>2025-05-05T12:18:53-07:00</updated> <category scheme="https://www.tbray.org/ongoing/What/" term="The World/Social Media"/> <category scheme="https://www.tbray.org/ongoing/What/" term="The World"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Social Media"/> <summary type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml">In mid-April <a href="https://techcrunch.com/2025/04/23/government-censorship-comes-to-bluesky-but-not-its-third-party-apps-yet/">we learned</a> about Bluesky censoring accounts as demanded by the government of Türkiye. While I haven’t seen coverage of who the account-holders were and what they said, the action followed on protests against Turkish autocrat Erdoğan for ordering the arrest of an opposition leader<span class="dashes"> —</span> typical behavior by a thin-skinned Führer-wannabe. This essay concerns how we might think about censorship, its mechanics, and how the ecosystems built around ActivityPub and ATproto can implement and/or fight it</div> </summary> <content type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml"> <p> In mid-April <a href="https://techcrunch.com/2025/04/23/government-censorship-comes-to-bluesky-but-not-its-third-party-apps-yet/">we learned</a> about Bluesky censoring accounts as demanded by the government of Türkiye. While I haven’t seen coverage of who the account-holders were and what they said, the action followed on protests against Turkish autocrat Erdoğan for ordering the arrest of an opposition leader <span class="dashes"> —</span> typical behavior by a thin-skinned Führer-wannabe. This essay concerns how we might think about censorship, its mechanics, and how the ecosystems built around ActivityPub and ATproto can implement and/or fight it. </p> <p>That link above is to TechCrunch’s write-up of the situation, which is good. There’s going to be overlap between that and this but neither piece is a subset of the other, so you might want to read TechCrunch too.</p> <h2 id="p-1">Censorship goals and non-goals</h2> <p>How, as the community of people who live and converse online, should we want our decentralized social media to behave?</p> <p> I’m restricting this to <em>decentralized</em> social media because the issues around censorship differ radically between a service owned and controlled by a profit-seeking corporation, and an ecosystem of interoperating providers who may not be in it for the money. </p> <p>So, from the decentralized point of view, what should be the core censorship goals? As Mencken said, “For every complex problem there is an answer that is clear, simple, and wrong.” Here are two of those:</p> <ol> <li> <p>No censorship. Let people say what they will and the contest of ideas proceed. Freedom of speech must be absolute.</p> </li> <li> <p>Suppress any material which is illegal in the jurisdiction where the human participant is located. Stop there, because making policy in this area is not the domain of of social-media providers.</p> </li> </ol> <h2 id="p-2">“Free speech”?</h2> <p>The absolutists’ position is at least internally consistent. But it has two fatal flaws, one generic and one specific. In general, a certain proportion of people are garbage and will post terrible, hateful, damaging things that make the online experience somewhere in the range between unpleasant and intolerable, to the extent that many who deserve to be heard will be driven away.</p> <p>And specifically, history teaches us that certain narratives are dangerous to civic sanity and human life: Naziism, revanchism, hypernationalism, fomenting ethnic hatred, and so on.</p> <p>Another way to put this: Everyone has a basic right to free speech, but nobody has a right to be listened to.</p> <p>So, the Free Speech purists can now please show themselves out. (Disclosure: I didn’t mean that “please”.)</p> <h2 id="p-3">“Rule of law”?</h2> <p>I can get partially behind this. If you’re running a social-media service in a civilized democratic country and posting X is against the law, you’d better think carefully about allowing X. (Not saying that civil disobedience is always wrong, just that you need to think about it.)</p> <p>But mostly no. The legalist approach suffers from positive and negative failures. Negative, as in censoring-is-wrong: I really DGAF about Turkish legal restrictions, because they’re more or less whatever Erdoğan says they are, and Erdoğan is a tinpot tyrant. Similarly, on Trump’s current trajectory it’ll soon be illegal to express anti-Netanyahu sentiment in the USA.</p> <p> Positive, as in not-censoring is wrong: Lolicon is legal in Japan and treated like <a href="https://en.wikipedia.org/wiki/CSAM">CSAM</a> elsewhere. Elsewhere is right, Japan is wrong. Another example: Anti-trans hate is increasingly cheerled by conservative culture warriors all over the place and <a href="https://www.bbc.com/news/articles/crldey0z00ro">is now the official policy of the British government</a> . Sir Keir Starmer would probably be suspended from <a href="https://cosocial.ca">my Mastodon instance</a> and invited to find somewhere else, except for somewhere else would be mass-defederated if it tolerated foolish bigots like Starmer. </p> <h2 id="p-4">How Bluesky does it</h2> <p> (I should maybe say “How ATproto does it” but this seems more reader-friendly.) It’s not as though they pushed some button and silenced the hated-by-Erdoğan accounts. In fact, it’s subtle and complicated. For details, see <a href="https://fediversereport.com/bluesky-censorship-and-country-based-moderation/">Bluesky, censorship and country-based moderation</a> by Laurens Hof at <cite>The Fediverse Report</cite> . Seriously, if you think you might have an opinion about Bluesky and what they’re doing, go read Hof before you share it. </p> <p>Having said that, I think I can usefully offer a short form. Bluesky supports the use of multiple composable moderation services, and client software can decide which of them to subscribe to. It provides a central moderation service aimed at stopping things like CSAM and genocide-cheerleading that’s designed to operate at the scale of the whole network, which seems good to me.</p> <p>It also offers “geographic moderation labelers”, which can attach “forbidden” signals to posts which are being read by people in particular areas. That’s what they did in this case; the Erdoğan-hated accounts had those labels attached to their posts, but only for people who are in Türkiye.</p> <p>The default Bluesky client software subscribes to the geographic labeler and does as it’s told, which made Erdoğan and his toadies happy.</p> <p> But anyone can write Bluesky client software, and there’s nothing in the technology that requires clients to subscribe to or follow the instructions of any moderation service. One alternate client, <a href="https://deer.social">Deer.social</a> , is a straightforward fork of the default, but with the geographic moderation removed. (It may have other features but looks about like basic Bluesky to me.) </p> <h2 id="p-5">How the Fediverse does it</h2> <p>(I should maybe say “How ActivityPub does it” or “How Mastodon does it” but…) Each instance does its own moderation and (this is important) makes its own decision as to which other instances to federate with. There are plenty of sites out there running Fediverse software that are full of CSAM and Lolicon and Nazis and so on. But the “mainstream” instances have universally defederated them, so it’s rare to run across that stuff. I never do.</p> <p>To make things easy, there are “shared block-lists” that try to keep up-to-date on the malignant instances. It’s early days yet but I think this will be a growth area.</p> <p> Most moderation is based on “reporting” <span class="dashes"> —</span> if you see something you think is abusive or breaks the rules, you can hit the “report” button, and the moderators for your instance and the source instance will get messaged and can decide what to do about it. </p> <p> The effect is that there is a shared culture across a few thousand “mainstream” instances that leads, in my opinion, to a pretty pleasing atmosphere and low abuse level. We have a problem in that it’s still too easy to for a bad person to post abusive stuff in a way that is <a href="/ongoing/When/202x/2024/07/30/Invisible-Attackers">hard for moderators to see</a> , but <a href="https://social.growyourown.services/@FediTips/114149382005729304">it’s being worked on</a> and I’m optimistic. </p> <h2 id="p-6">Dealing with Erdoğan: Bluesky</h2> <p>So, suppose we want our social-media services to route around Erdoğan’s attempts to silence his political opponents. I do. How effective would Bluesky and the Fediverse be at that?</p> <p>Bluesky makes it easy: Just use an alternate client. Yay! Except for, most people don’t and won’t and shouldn’t have to. Boo!</p> <p> Still I dunno, in a place where the politics is hot, the word might get out on the grapevine and a lot of people could give another client a try. Maybe? Back in the day a <em>lot</em> of people used alternate Twitter clients, until Twitter stomped those out. I’m not smart enough to predict whether this could really be effective at routing round Erdoğan. I lean pessimistic though. </p> <p>Wait, what about the Bluesky Web interface? Who needs a client anyhow! No luck; it turns out that that’s a big fat React app with mostly the same code that’s in the mobile apps. Oh well.</p> <p>Anyhow, this ignores the real problem. Which is that if Erdoğan’s goons notice that people are dodging the censorship they’ll go nuclear on Bluesky (the company) and tell them to just stop displaying those people’s posts and to do it right fucking now.</p> <p>If that doesn’t work, they have a lot of options, starting with just blocking access to bsky.app, and extending to arresting any in-country staff or, even better, their families. And throwing them in an unheated basement. I dunno, a courageous and smart company might be able to fight back, but it wouldn’t be a good situation.</p> <p>And that’s a problem, because even though the ATproto is by design decentralized, in practice there’s only one central service that routes the firehose of posts globally. So my bet would be that Erdoğan wins.</p> <h2 id="p-7">Dealing with Erdoğan: Fediverse</h2> <p>This is a very different picture. Block access to the app and a lot of people won’t notice because they use the browser, connecting to one of the thousands of Fediverse instances, desktop or mobile, and it’ll work fine. OK, how about finding out which instances the people they’re trying to ban are on, and going after those instances? If the instance is in a rule-of-law democracy, the Turks would probably be told to go pound sand.</p> <p>OK, so what if the Turks ferociously attacked the home servers of the Thought Criminals? No problemo, they’d migrate to a more resilient instance and, since this is the Fediverse, their followers might never notice, they’d just come along with them.</p> <p> Pretty quickly the Erdoğan gang are gonna end up playing whack-a-mole. In fact I think it’s going to be really, really hard in general for oppressive governments to censor the Fediverse. Not impossible; the people who operate the <a href="https://en.wikipedia.org/wiki/Great_Firewall">Great Firewall</a> would probably find a way. </p> <p>When Bluesky progresses to the point that there isn’t a single essential company at the center of everything, it should be censorship-resilient too, for the same reasons.</p> <h2 id="p-8">Take-aways</h2> <p>I think that, to resist misguided censorship by misguided governments, we need (at least) these things:</p> <ol> <li> <p>A service with no central choke-points, but rather a large number of independent co-operating nodes.</p> </li> <li> <p>Accounts, and the follower relationships between them, are not tied to any single node.</p> </li> </ol> <p>Clearly these conditions are necessary; we don’t know yet whether or not they’re sufficient. But I’m generally optimistic that decentralized social media has the potential to offer a pretty decent level of censorship resistance.</p> </div> </content> </entry> <entry> <title>Southsiders</title> <link href="https://www.tbray.org/ongoing/When/202x/2025/05/04/Southsiders"/> <link rel="replies" thr:count="2" type="application/xhtml+xml" href="/ongoing/When/202x/2025/05/04/Southsiders#comments"/> <id>https://www.tbray.org/ongoing/When/202x/2025/05/04/Southsiders</id> <published>2025-05-04T12:00:00-07:00</published> <updated>2025-05-05T11:21:34-07:00</updated> <category scheme="https://www.tbray.org/ongoing/What/" term="Sports/Soccer"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Sports"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Soccer"/> <category scheme="https://www.tbray.org/ongoing/What/" term="The World/Places/Vancouver"/> <category scheme="https://www.tbray.org/ongoing/What/" term="The World"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Places"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Vancouver"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Arts/Photos"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Arts"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Photos"/> <summary type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml">Ever been to a soccer match and noticed the “supporters section”, full of waving flags and drummers and wild enthusiasm? Last Saturday I went there. And marched in their parade, even. I could claim it was anthropology research. But maybe it’s just old guys wanna have fun. Which I did. Not sure if I will again</div> </summary> <content type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml"> <p>Ever been to a soccer match and noticed the “supporters section”, full of waving flags and drummers and wild enthusiasm? Last Saturday I went there. And marched in their parade, even. I could claim it was anthropology research. But maybe it’s just old guys wanna have fun. Which I did. Not sure if I will again.</p> <p>For the rest of this piece, when I say “football” I mean fútbol as in soccer, because that‘s what everyone on the scene says.</p> <h2 id="p-1">Background</h2> <p> <a href="https://www.mlssoccer.com">MLS</a> (for Major League Soccer) is the top-level football league in North America and, depending on whose ratings you believe, the 9 <sup>th</sup> or 10 <sup>th</sup> strongest league in the world. At the moment, the <a href="https://www.whitecapsfc.com">Vancouver Whitecaps</a> are the strongest team in MLS and are <a href="https://www.concacaf.com/rankings/club/">ranked #2 in Concacaf</a> which means North and Central America. That may become #1 if they win the win the <a href="https://www.concacaf.com/champions-cup/">Champions Cup Final on June 1<sup>st</sup> in Mexico City</a> , against #1-ranked <a href="https://cfcruzazul.com">Cruz Azul</a> . </p> <p>Who knows if these good times will last, but for the moment it means they’re kind of a big deal here my home town. I’ve become a fan, because the Whitecaps are fun to watch.</p> <p>Mind you, the team is for sale and will probably be snapped up by a Yankee billionaire and relocated to Topeka or somewhere.</p> <p>When I’ve been to Whitecaps games, I’ve always been entertained by the raucous energy coming out of the supporters section. They provide a background roar, shout co-ordinated insults at the other team and referee, have a drum section, and feature a waving forest of flags.</p> <h2 id="p-2">Southsiders</h2> <p> They’re called that because they inhabit the south end of the stadium, behind the goal that the Whitecaps attack in the second half. Check out the <a href="https://vancouversouthsiders.ca">Web site</a> . </p> <p> So, on a manic impulse, I joined up. It didn’t cost much and got me a big-ass scarf with “Vancouver” on one side and “Southsiders” on the other. Which I picked up, along with a shiny new membership card, at <a href="https://www.dublincalling.com/vancouver/home">Dublin Calling</a> , a perfectly decent sports bar where the membership card gets you a discount. I have to say that the Southsiders people were friendly, efficient, and welcoming. </p> <p>My son was happy to come along; we got to the bar long enough before The Parade to have a beer and perfectly OK bar food at what, especially with the discount, seemed a fair price. This matters because the food and beer at the stadium is exorbitantly priced slop.</p> <h2 id="p-6">Alternatives</h2> <p> Since I wrote this, I learned that there are actually <a href="https://www.whitecapsfc.com/matchday/supporter-groups">four different fan clubs</a> . Especially, check out <a href="https://vssg.ca">Vancouver Sisters</a> . </p> <h2 id="p-3">The Parade</h2> <p>Forty-five minutes before game time, the fans leave Dublin Calling a couple hundred strong and march to the stadium, chanting dopey chants and singing dopey songs and generally having good clean fun. It’s a family affair.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/05/04/PXL_20250504_004756238.png" alt="Southsiders parade"/> <p>Note: Kid on Dad’s shoulders. Flags. Spectators, and here’s a thing: When you’re in a loud cheerful parade, everybody smiles at you. Well, except for the drivers stuck at an intersection. Since we’re Canadian we’re polite, so we stop the parade at red lights. Sometimes, anyhow.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/05/04/PXL_20250504_005058831.png" alt="Southsiders parade"/> <p>Note: Maximal fan. Scarves held aloft (this happens a lot). Blue smoke. Flags in Whitecaps blue and Canada red.</p> <p>When the parade gets to the stadium, everyone kneels.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/05/04/PXL_20250504_005738243.png" alt="Southsider parade kneels"/> <img src="https://www.tbray.org/ongoing/When/202x/2025/05/04/PXL_20250504_005802321.png" alt="Southsider parade kneels"/> <p>After a bit, someone starts a slow quiet chant, then they wind it up and up until everyone explodes to their feet and leaps around madly. That’s all then, time to pile into the stadium.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/05/04/PXL_20250504_010531982.png" alt="Inside BC Place stadium"/> <p>Which is visually impressive on with the lid open on a sunny day.</p> <h2 id="p-4">Indoor fun</h2> <p>The Southsiders section is General Admission, pick anywhere to stand. And I mean stand, there’s no sitting down while the game’s on. There’s a big flag propped up every half-dozen seats or so you can grab and wave when the spirit moves you. There’s a guy on a podium down at the front, facing the crowd, and he co-ordinates the cheers and songs and… He. Never. Stops.</p> <p>The Southsiders gleefully howl in joy at every good Whitecaps move and with rage at every adverse whistle, have stylized moves like for example whenever the opposing keeper launches a big goal kick everyone yells “You fat bastard!” No, I don’t know why.</p> <p>When I shared that I was going to do this crazy thing people wondered if it was safe, would I get vomited on, was there violence, and so on. In the event it was perfectly civilized as long as you don’t mind a lot of noise and shouting. The beer-drinking was steady but I didn’t see anyone who seemed the worse for the wear. If it weren’t for all the colorful obscenity I’d be comfy bringing a kid along.</p> <p>The crowd is a little whiter than usual for Vancouver, mostly pretty young, male dominated, with a visible gay faction. Nothing special.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/05/04/PXL_20250504_024141039.png" alt="View from the Southsiders section at BC Place"/> <p>Note: Canadian and rainbow flags. Somewhat obstructed view; the flags are out because a goal has just been scored, you can see the smoke from the fireworks. The opposing goal is a long way away.</p> <p>What’s good: Being right on top of any goals scored at the near end. The surges of shared emotion concerning the action in the game.</p> <p>What’s bad: Standing all through the game. The action at the other end is too far away. The songs and chants grow wearing after a while.</p> <h2 id="p-5">The game</h2> <p> The Whitecaps won, which was nice. It was pretty close, actually, against a team that shouldn’t be much of a threat. But then, most of Vancouver’s best players were out in healing-from-injury or resting-from-overwork mode. I still think the Whitecaps are substandard at working the ball through the middle of the field, but do well at both ends; At the moment <a href="https://www.mlssoccer.com/standings/">the stats</a> seem to say that they’re on top both at scoring and preventing goals. </p> <p>Here’s what to do if you’re watching a game: If either Pedro Vite (#45) or Jayden Nelson (#7) get the ball, lean in and focus. Both those guys are lightning in a bottle. I’ve enjoyed watching this team more than any other Vancouver sports franchise ever. It probably can’t last.</p> <p>Will I do the Southsiders section again? Maybe. I suspect I’ll enjoy their energy and edge just as much even when I’m not in the section, plus I’ll get to sit down. We’ll see.</p> <p>My son and I had fun. No regrets.</p> </div> </content> </entry> <entry> <title>CL XLV: Island Spring</title> <link href="https://www.tbray.org/ongoing/When/202x/2025/04/21/Happy-Island-Spring"/> <link rel="replies" thr:count="1" type="application/xhtml+xml" href="/ongoing/When/202x/2025/04/21/Happy-Island-Spring#comments"/> <id>https://www.tbray.org/ongoing/When/202x/2025/04/21/Happy-Island-Spring</id> <published>2025-04-21T12:00:00-07:00</published> <updated>2025-04-24T12:02:55-07:00</updated> <category scheme="https://www.tbray.org/ongoing/What/" term="The World/Cottage Life"/> <category scheme="https://www.tbray.org/ongoing/What/" term="The World"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Cottage Life"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Arts/Photos"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Arts"/> <category scheme="https://www.tbray.org/ongoing/What/" term="Photos"/> <summary type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml">Join me for a walk through a rain forest on a corner of a small island. This is to remind everyone that even in a world full of bad news, the trees are still there. From the slopes leading down to the sea they reach up for sunshine and rain, offering no objections to humans walking in the tall quiet spaces between them</div> </summary> <content type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml"> <p>Join me for a walk through a rain forest on a corner of a small island. This is to remind everyone that even in a world full of bad news, the trees are still there. From the slopes leading down to the sea they reach up for sunshine and rain, offering no objections to humans walking in the tall quiet spaces between them.</p> <p> [The island is <a href="https://en.wikipedia.org/wiki/Keats_Island_(British_Columbia)">Keats Island</a> , where we’ve <a href="/ongoing/What/The%20World/Cottage%20Life/">had a cabin since 2008</a> . It’s mostly just trees and cabins, you can buy an oceanfront mansion for millions or a basic Place That Needs Work for much less (as we did) or you can <a href="https://bcparks.ca/plumper-cove-marine-park">camp cheap</a> . Come on over sometime.] </p> <p>On the path up from the water to the cabin there’s this camellia that was unhappy at our home in the city, its flowers always stained brown even as they opened. So we brought it to the island and now look at it!</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/04/21/PXL_20250418_211131388.png" alt="Camellia bush with many white and gold blossoms"/> <p> One interior shot. On this recent visit I wired up this desk, a recent hand-me-down from old friend <a href="https://en.wikipedia.org/wiki/Tamara_Munzner">Tamara</a> . </p> <img src="https://www.tbray.org/ongoing/When/202x/2025/04/21/PXL_20250419_193220121.png" alt="A desk with a computer and outboard monitor and really great views"/> <p> When I got it all wired up I texted her “Now I write my masterpiece” but instead I wrote that one <a href="/ongoing/When/202x/2025/04/16/Decentralized-Schemes">about URI schemes</a> , no masterpiece but I was happy with it. And anyhow, it’s lovely space to sit and tap a keyboard. </p> <p>Now the forest walk.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/04/21/PXL_20250420_190132412.png" alt="Pacific Northwest rain forest"/> <p> These are rain forests and they are happy in their own way when it rains but I’m a <em>Homo sapiens</em> , we evolved in a sunny part of the world and my eyes welcome all those photons. </p> <p>In 2008 I was told that the island had been logged “100 years ago”. So most of these are probably in the Young-Adult tree demographic, but there are a few of the real old giants still to be seen.</p> <p>Sometimes the trees seem to dance with each other.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/04/21/TXT55561.png" alt="Tall bare tree trunks seem to dance"/> <img src="https://www.tbray.org/ongoing/When/202x/2025/04/21/TXT55554.png" alt="Tall bare tree trunks seem to dance"/> <p> Both of those pictures feature (but not exclusively) <i>Acer macrophyllum</i> , the bigleaf Maple, the only deciduous tree I know of that can compete for sun with the towering Cedar/Fir/Hemlock evergreens. It’s beautiful both naked (as here) and in its verdant midsummer raiment. </p> <p>But sometimes when you dance too hard you can fall over. He are two different photographic takes on a bigleaf that seems to have lost its grip and is leaning on a nearby hemlock.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/04/21/PXL_20250420_185053570.png" alt="Tall trees leaning together"/> <img src="https://www.tbray.org/ongoing/When/202x/2025/04/21/TXT55572.png" alt="Tall trees leaning together"/> <p>And sometimes you can just totally lose it.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/04/21/TXT55552.png" alt="Nurse log rolled, laying a tree trunk flat"/> <p>It is very common in these forests to see a tree growing out of a fallen log; these are called “nurse logs”. It turns out to be a high-risk arboreal lifestyle, as we see here. It must have been helluva drama when the nurse rolled.</p> <p>I’m about done and will end as I began, with a flower.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/04/21/TXT55560.png" alt="Small pink blossom, a bit tattered, the background out of focus"/> <p> This is the blossom of a salmonberry ( <i>Rubus spectabilis</i> ) a member of the rose family. It has berries in late summer but they’re only marginally edible. </p> <p>It’s one of the first blossoms you see in the forest depths as spring struggles free of the shackles of the northwest winter.</p> <p>Go hug a tree sometime soon, it really does help.</p> </div> </content> </entry> </feed>
<?xml version='1.0' encoding='UTF-8'?> <feed xmlns='http://www.w3.org/2005/Atom' xmlns:thr='http://purl.org/syndication/thread/1.0' xml:lang='en-us'> <title>ongoing by Tim Bray</title> <link rel='hub' href='http://pubsubhubbub.appspot.com/' /> <id>https://www.tbray.org/ongoing/</id> <link href='https://www.tbray.org/ongoing/' /> <link rel='self' href='https://www.tbray.org/ongoing/ongoing.atom' /> <link rel='replies' thr:count='101' href='https://www.tbray.org/ongoing/comments.atom' /> <logo>rsslogo.jpg</logo> <icon>/favicon.ico</icon> <updated>2025-07-31T12:06:23-07:00</updated> <author><name>Tim Bray</name></author> <subtitle>ongoing fragmented essay by Tim Bray</subtitle> <rights>All content written by Tim Bray and photos by Tim Bray Copyright Tim Bray, some rights reserved, see /ongoing/misc/Copyright</rights> <generator uri='/misc/Colophon'>Generated from XML source code using Perl, Expat, Emacs, Mysql, Ruby, and ImageMagick. Industrial-strength technology, baby.</generator> <entry> <title>De-Google Project Update</title> <link href='https://www.tbray.org/ongoing/When/202x/2025/07/29/DeGoogling' /> <link rel='replies' thr:count='13' type='application/xhtml+xml' href='/ongoing/When/202x/2025/07/29/DeGoogling#comments' /> <id>https://www.tbray.org/ongoing/When/202x/2025/07/29/DeGoogling</id> <published>2025-07-29T12:00:00-07:00</published> <updated>2025-07-31T12:06:18-07:00</updated> <category scheme='https://www.tbray.org/ongoing/What/' term='The World/Life Online/De-Google' /> <category scheme='https://www.tbray.org/ongoing/What/' term='The World' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Life Online' /> <category scheme='https://www.tbray.org/ongoing/What/' term='De-Google' /> <summary type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>I <a href='/ongoing/When/202x/2024/03/09/DeGoogling'>introduced this family project</a> in the spring of 2024. I won’t reproduce those arguments for why we’re working on this, but in the current climate I feel like I hardly need to. Since that post, our aversion to Google dependency has only grown stronger. Progress has been non-zero but not fast</div></summary> <content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'> <p>I <a href="/ongoing/When/202x/2024/03/09/DeGoogling">introduced this family project</a> in the spring of 2024. I won’t reproduce those arguments for why we’re working on this, but in the current climate I feel like I hardly need to. Since that post, our aversion to Google dependency has only grown stronger. Progress has been non-zero but not fast.</p> <p>Here’s the table, with progress notes below.</p> <table> <tr valign="top"><th>Need</th><th>Supplier</th><th>Alternatives</th></tr> <tr valign="top"> <td><a href="/ongoing/When/202x/2024/03/09/DeGoogling#p-3">Office</a></td> <td class="unhappy">Google Workspace</td> <td>Proton?</td> </tr> <tr valign="top"> <td><a href="/ongoing/When/202x/2024/03/09/DeGoogling#p-17">Data sharing</a></td> <td class="happy">Dropbox</td> <td></td></tr> <tr valign="top"> <td><a href="/ongoing/When/202x/2024/03/09/DeGoogling#p-17">Photos</a></td> <td class="unhappy">Google Photos</td> <td>Dropbox?</td></tr> <tr valign="top"> <td><a href="/ongoing/When/202x/2024/03/09/DeGoogling#p-16">Video meetings</a></td> <td class="unhappy">Google Meet</td> <td>Jitsi, Signal?</td></tr> <tr valign="top"> <td><a href="/ongoing/When/202x/2024/03/09/DeGoogling#p-10">Maps</a></td> <td class="unhappy">Google Maps</td> <td>Magic Earth, Here, something OSM-based?</td></tr> <tr valign="top"> <td><a href="/ongoing/When/202x/2024/03/09/DeGoogling#p-4">Browser</a></td> <td class="happy">Safari, Firefox, Vivaldi, LibreWolf</td> <td></td></tr> <tr valign="top"> <td><a href="/ongoing/When/202x/2024/03/09/DeGoogling#p-12">Search</a></td> <td class="unhappy">Google</td> <td>Bing-based options, Kagi?</td></tr> <tr valign="top"> <td><a href="/ongoing/When/202x/2024/03/09/DeGoogling#p-5">Chat</a></td> <td class="happy">Signal</td> <td></td></tr> <tr valign="top"> <td><a href="/ongoing/When/202x/2024/03/09/DeGoogling#p-6">Photo editing</a></td> <td class="neutral">Adobe Lightroom & Nik</td> <td>Capture One, Darktable, ?</td></tr> <tr valign="top"> <td><a href="/ongoing/When/202x/2024/03/09/DeGoogling#p-7">In-car interface</a></td> <td class="neutral">Google Android Auto</td> <td>Automaker software</td></tr> <tr valign="top"> <td><a href="/ongoing/When/202x/2024/03/09/DeGoogling#p-8">Play my music</a></td> <td class="happy">Plex, USB</td> <td></td></tr> <tr valign="top"> <td><a href="/ongoing/When/202x/2024/03/09/DeGoogling#p-9">Discover music</a></td> <td class="happy">Qobuz</td> <td></td></tr> <tr valign="top"> <td><a href="/ongoing/When/202x/2024/03/09/DeGoogling#p-13">TV</a></td> <td class="neutral">Roku, Apple, migration</td> <td></td></tr> </table> <p>Pink indicates a strong desire to get off the incumbent service, green means we’re happy-ish with what we’re using, and blue means that, happy or not, it’s not near the top of the priority list.</p> <p>I’ll reproduce the metrics we care about when looking to replace Google products, some combination of:</p> <ol> <li><p>Not ad-supported</p></li> <li><p>Not VC-funded</p></li> <li><p>Not Google, Microsoft, or Amazon</p></li> </ol> <p>The list used to include “Open Source” but I decided that while that’s good, it’s less important than the other three criteria.</p> <p>Now let’s walk down the chart.</p> <h2 id='p-3'>Office</h2> <p>This is going to be a wrenching transition; we’ve been running the family on Google stuff forever, and I anticipate muscle-memory pain. But increasingly, using Google apps feels like being in enemy territory. And, as I said last time, I will not be sorry to shake the dust of Google Drive and Docs from my heels, I find them clumsy and am always having trouble finding something that I know is in there.</p> <p>While I haven’t dug in seriously yet, I keep hearing reasonably-positive things about Proton, and nothing substantive to scare me away. Wish us luck.</p> <h2 id='p-17'>Data sharing (progress!)</h2> <p>Dropbox is, eh, OK. It doesn’t seem actively evil, there’s no advertising, and the price is low.</p> <h2 id='p-21'>Photos</h2> <p>We’re a four-Android family including a couple of prolific photographers, and everything just gets pumped into Google and then it fills up and then they want more money. If we could configure the phones to skip Google and go straight to Dropbox, that would be a step forward.</p> <h2 id='p-16'>Video meetings</h2> <p>Google meet isn’t painful but I totally suspect it of data-mining what should be private conversations. I’m getting the feeling that the technical difficulty of videoconferencing is going steadily down, so I’m reasonably optimistic that something a little less evil will come along with a fair price.</p> <h2 id='p-10'>Maps</h2> <p>The fear and loathing that <a href="/ongoing/When/201x/2017/06/29/Fear-Google-Reviews">I started feeling in 2017</a> grows only stronger. But replacements aren’t obvious. It’s a pity, maps and directions and reviews feel like a natural monopoly that should be a public utility or something, rather than a corporate moat.</p> <h2 id='p-4'>Browser (progress!)</h2> <p>Chrome has seriously started making my flesh crawl; once again, enemy territory. Fortunately, there are lots of good options. Even people like us who have multiple lives we need to keep separate can find enough better browsers out there.</p> <p>Maybe I’ll have a look at one of the new genAI-company browsers ha ha just kidding.</p> <h2 id='p-12'>Search</h2> <p>The reports on Kagi keep being positive and giving it a try is definitely on the To-Do list.</p> <h2 id='p-5'>Chat</h2> <p>Signal is the only sane choice at this point in history for personal use.</p> <h2 id='p-6'>Photo editing</h2> <p>Adobe’s products are good, and I’m proficient and happy with Lightroom, but they are definitely suffering from bad genAI craziness. Also the price is becoming unreasonable.</p> <p>I’ve had a few Lightroom software failures in recent months and if that becomes a trend, looking seriously at the alternatives will move to the top of the priority list.</p> <h2 id='p-7'>In-car interface</h2> <p>It’s tough, Android Auto is a truly great product. I think I’m stuck here for now, particularly given that I plan to be driving a <a href="/ongoing/What/The%20World/Jaguar%20Diary/">2019-model-year car</a> for the foreseeable future. Also, it supports my music apps.</p> <h2 id='p-9'>Discover music and play mine (progress!)</h2> <p>Progress here. I’ve almost completely stopped using YouTube Music in favor of Plex and Qobuz. Really no downside; YTM has more or less completely lost the ability to suggest good new stuff.</p> <h2 id='p-13'>TV</h2> <p>Video continues morphing itself into Cable TV redux. We have an old Roku box that works fine and I think I’ve managed to find its don’t-spy-on-us settings. We’ll keep subscribing to Apple+ as long as they keep shipping great shows. I have zero regrets about having <a href="/ongoing/When/202x/2025/03/06/Canceled-Prime">left Prime behind</a>.</p> <p>As for the rest, we’ve become migrants, exclusively month-at-a-time subscriptions for the purpose of watching some serial or sports league, unsubscribe after the season finale or championship game. The good news is that I haven’t encountered much friction in unsubscribing, just a certain amount of earnest pleading.</p> <h2 id='p-20'>Looking forward</h2> <p>I have yet to confront any of the really hard parts of this project, but the sense of urgency is increasing. Let’s see.</p> </div></content></entry> <entry> <title>QRS: Finite-state Struggles</title> <link href='https://www.tbray.org/ongoing/When/202x/2025/07/21/Automaton-merge-war' /> <link rel='replies' thr:count='2' type='application/xhtml+xml' href='/ongoing/When/202x/2025/07/21/Automaton-merge-war#comments' /> <id>https://www.tbray.org/ongoing/When/202x/2025/07/21/Automaton-merge-war</id> <published>2025-07-21T12:00:00-07:00</published> <updated>2025-07-22T09:10:25-07:00</updated> <category scheme='https://www.tbray.org/ongoing/What/' term='Technology/Quamina Diary' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Technology' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Quamina Diary' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Technology/Software' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Software' /> <summary type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>I just posted a big <a href='https://github.com/timbray/quamina'>Quamina</a> PR representing months of work, brought on by the addition of a small basic regular-expression feature. This ramble doesn’t exactly have a smooth story arc but I’m posting it anyhow because I know there are people out there interested in state-machine engineering and they are my people</div></summary> <content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'> <p>I just posted a big <a href="https://github.com/timbray/quamina">Quamina</a> PR representing months of work, brought on by the addition of a small basic regular-expression feature. This ramble doesn’t exactly have a smooth story arc but I’m posting it anyhow because I know there are people out there interested in state-machine engineering and they are my people.</p> <p>As far as I can tell, a couple of the problems I’m trying to solve haven’t been addressed before, at least not by anyone who published their findings. Partly because of that, I’m starting to wonder if all <a href="/ongoing/What/Technology/Quamina%20Diary/">these disorderly Quamina postings</a> might be worked into a small book or monograph or something. State machines are really freaking useful software constructs! So yeah, this is a war story not an essay, but if you like finite automata you’ll likely be interested in bits of it.</p> <h2 id='p-1'>The story thus far</h2> <p>Prior to beginning work on Regular Expressions, I’d already wired shell-style “<code>*</code>” wildcards into Quamina, which forced me to start working with NFAs and ε-transitions. The implementation wasn’t crushingly difficult, and the performance was… OK-ish.</p> <p>Which leads me to The Benchmark From Hell. I wondered how the wildcard functionality would work under heavy stress, so I pulled in a list of 12,959 five-letter strings from the Wordle source code, and inserted a “<code>*</code>” at a random position in each. Here are the first ten:</p> <blockquote><pre><code>aalii* *aargh aar*ti abaca* a*baci a*back ab*acs ab*aft abak*a</code></pre></blockquote> <p>I created an NFA for each and merged them together <a href="/ongoing/When/202x/2024/07/28/Union-of-Finite-Automata">as described here</a>. Building and merging the automata were plenty fast enough, and the merged NFA had 46,424 states, which felt reasonable. Matching strings against it ran at under ten thousand per second, which is pretty poor given that Quamina can do a million or two per second on patterns encoded in a DFA.</p> <p>But, I thought, still reasonably usable.</p> <h2 id='p-2'>The cursed “<code>?</code>”</h2> <p>Last year, my <a href="/ongoing/When/202x/2024/12/12/Quamina-Regular-Expression-Series">slow grind through the regexp features</a> had led me to the zero-or-one quantifier “<code>?</code>”. The state machine for these things is not rocket science; there’s a discussion with pictures in my recent <a href="/ongoing/When/202x/2025/07/07/Epsilon-Wrangling#p-3">Epsilon Wrangling</a>.</p> <p>So I implemented that and fired off the unit tests, most of which <a href="/ongoing/When/202x/2024/12/12/QRS-Parsing-Regular-Expressions#p-1">I didn’t have to write</a>, and they all failed. Not a surprise I guess.</p> <p>It turned out that the way I’d implemented ε-transitions for the wildcards <a href="/ongoing/When/202x/2024/07/28/Union-of-Finite-Automata#p-9">was partially wrong</a>, as in it worked for the tight-loop state-to-itself ε-transitions, but not for more general-purpose things like “<code>?</code>” requires.</p> <p>In fact, it turns out that merging NFAs is hard (DFAs are easy), and I found precious little help online. <a href="https://en.wikipedia.org/wiki/Thompson%27s_construction">Thompson’s construction</a> does give an answer: Make an otherwise-empty state with two ε-transitions, one to each of the automata, and it’ll do the right thing. Let’s call that a “splice state”. It’s easy to implement, so I did. Splicing is hardly “merging” in the Quamina sense, but still.</p> <p>Unfortunately, the performance was hideously bad, just a few matches per second while pegging the CPU. A glance at the final NFA was sobering; endless chains of splice states, some thousands long.</p> <p>At this point I became very unhappy and got stalled for months dealing with real-life issues while this problem lurked at the back of my mind, growling for attention occasionally.</p> <p>Eventually I let the growler out of the cave and started to think through approaches. But first…</p> <h2 id='p-4'>Worth solving?</h2> <p>Is it, really? What sane person is going to want to search for the union of thousands of regular expressions in general or wild-carded strings in particular?</p> <p>I didn’t think about this problem at all, because of my experience with Quamina’s parent, <a href="https://github.com/aws/event-ruler">Ruler</a>. When it became popular among several AWS and Amazon teams, people sometimes found it useful to match the union of not just thousands but a million or more different patterns. When you write software that anyone actually uses, don’t expect the people using it to share your opinions on what is and isn’t reasonable. So I wasn’t going to get any mental peace until I cracked this nut.</p> <p>I eventually decided that three approaches were worth trying:</p> <ol> <li><p>Figure out a way really to merge, not just splice, the wildcarded patterns, to produce a simpler automaton.</p></li> <li><p>Optimize the NFA-traversal code path.</p></li> <li><p>Any NFA can be transformed into a DFA, says computer-science theory. So do that, because Quamina is really fast at DFA-based matching.</p></li> </ol> <h2 id='p-5'>Nfa2Dfa</h2> <p>I ended up doing all of these things and haven’t entirely given up on any of them. The most intellectually-elegant was the transform-to-DFA approach, because if I did that, I could remove the fairly-complex NFA-traversal logic from Quamina.</p> <p>It turns out that the Net is rich with textbook extracts and YouTubes and slide-shows about how to do the NFA-to-DFA conversion. It ended up being quite a pleasing little chunk of code, only a couple hundred lines.</p> <p>The bad news: Converting each individual wildcard NFA to a DFA was amazingly fast, but then as I merged them in one by one, the number of automaton states started increasing explosively and the process slowed down so much that I never had the patience to let it finish. Finite-automata theory warns that this can happen, but it’s hard to characterize the cases where it does. I guess this one of them.</p> <p>Having said that, I haven’t discarded the <code>nfa2Dfa</code> code, because perhaps I ought to offer a Quamina option to apply this if you have some collection of patterns that you want to run really super fast and are willing to wait for a while for the transformation process to complete. Also, I may have missed opportunities to optimize the conversion; maybe it’s making more states than it needs to?</p> <h2 id='p-6'>Faster NFA traversal</h2> <p>Recently in <a href="/ongoing/When/202x/2025/07/07/Epsilon-Wrangling">Epsilon wrangling</a> I described how NFA traversal has to work, relying heavily on implementing a thing called an ε-closure.</p> <p>So I profiled the traversal process and discovered, unsurprisingly, that most of the time was going into memory allocation while computing those ε-closures. So now Quamina has an ε-closure cache and will only compute each one once.</p> <p>This helped a lot but not nearly enough, and the profiler was still telling me the pain was in Go’s allocation and garbage-collection machinery. Whittling away at this kind of stuff is not rocket science. The standard Go trick I’ve seen over and over is to keep all your data in slices, keep re-using them then chopping them back to <code>[:0]</code> for each request. After a while they’ll have grown to the point where all the operations are just copying bytes around, no allocation required.</p> <p>Which also helped, but the speed wasn’t close to what I wanted.</p> <h2 id='p-7'>Merging wildcard automata</h2> <p>I coded multiple ways to do this, and they kept failing. But I eventually found a way to build those automata so that any two of them, or any one of them and a DFA, can merged and generate dramatically fewer ε-transition chains. I’m not going to write this up here for two reasons: First of all, it’s not <em>that</em> interesting, and second, I worry that I may have to change the approach further as I go on implementing new regxp operators.</p> <p>In particular, at one point I was looking at the code while it wasn’t working, and I could see that if I added a particular conditional it would work, but I couldn’t think of a principled reason to do it. Obviously I’ll have to sort this out eventually. In the meantime, if you’re the sort of um special person who is now burning with curiosity, check out my branch from that PR and have a look at the <code>spinout</code> type.</p> <p>Anyhow, I added that conditional even though it puzzled me a bit, and now you can add wildcard patterns to Quamina at 80K/second, and my 12.9K wildcards generate an NFA with with almost 70K states, which can scan events at almost 400K/second. And that’s good enough to ship the <code>“?”</code> feature.</p> <p>By the way, I tried feeding that 70K-state automaton to the DFA converter, and gave up after it’d burned an hour of CPU and grown to occupy many GB of RAM.</p> <h2 id='p-8'>Next steps</h2> <p>Add “<code>+</code>” and “<code>*</code>”, and really hope I don’t have to redesign the NFA machinery again.</p> <p>Also, figure out the explanation for that puzzling <code>if</code> statement.</p> <h2 id='p-9'>And I should say…</h2> <p>Despite the very narrow not to say obsessive focus of this series, I’ve gotten a few bits and pieces of positive feedback. So there are a few people out there who care about this stuff. To all of you, thanks.</p> </div></content></entry> <entry> <title>Memory in Saskatchewan</title> <link href='https://www.tbray.org/ongoing/When/202x/2025/07/09/Saskatchewan' /> <link rel='replies' thr:count='9' type='application/xhtml+xml' href='/ongoing/When/202x/2025/07/09/Saskatchewan#comments' /> <id>https://www.tbray.org/ongoing/When/202x/2025/07/09/Saskatchewan</id> <published>2025-07-09T12:00:00-07:00</published> <updated>2025-07-16T10:11:34-07:00</updated> <category scheme='https://www.tbray.org/ongoing/What/' term='The World/Places/Saskatchewan' /> <category scheme='https://www.tbray.org/ongoing/What/' term='The World' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Places' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Saskatchewan' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Arts/Photos' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Arts' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Photos' /> <summary type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>I just came back from Canada’s <a href='https://en.wikipedia.org/wiki/Saskatchewan'>only rectangular province</a>. I was there to help out my 95-year-old mother while her main caregiver took vacation. It’s an unhappiness that my family has splashed itself across Canada in such a way that we have to get on an airplane (or take drives measured in days) to see each other, but that’s where we are. I came back with pictures and stories</div></summary> <content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'> <p>I just came back from Canada’s <a href="https://en.wikipedia.org/wiki/Saskatchewan">only rectangular province</a>. I was there to help out my 95-year-old mother while her main caregiver took vacation. It’s an unhappiness that my family has splashed itself across Canada in such a way that we have to get on an airplane (or take drives measured in days) to see each other, but that’s where we are. I came back with pictures and stories.</p> <p>Let me set the stage with a couple of photos. Everyone knows that Saskatchewan is flat and brown and empty, right?</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/07/09/TXT55665.png" alt="Flowers, intensely colored in near-black purple and yellow" /> <img src="https://www.tbray.org/ongoing/When/202x/2025/07/09/TXT55710.png" alt="Trees and lawns, behind a still body of water and somewhat reflected in it" /> <p>Mom lives in <a href="https://en.wikipedia.org/wiki/Regina,_Saskatchewan">Regina</a>, the provincial capital, a city built round a huge park that contains the Legislature (the flowers are from its front lawn), a sizeable lake, and an artificial mini-mountain (the water and trees are from its tip). Have no fear, I’ll get to some no-kidding prairie landscapes.</p> <h2 id='p-1'>Health-care drama</h2> <p>The night I arrived, after my Mom went to bed she got up again, tripped on something and fell hard. Her right arm was swollen, bruised, and painful. The skin and adjacent blood vessels of very old people become thin and fragile; her whole forearm was a bruise. I tried to get her to go to Emergency but she wasn’t having any of it: “You wait for hours and then they give you a pain-killer, which is constipating.” Since she could twist her wrist and wiggle her fingers and give my hand a firm grasp, I didn’t push too hard.</p> <p>A couple days later on Saturday she got her regular twice-a-week visit from the public <a href="https://www.saskatchewan.ca/residents/health/accessing-health-care-services/care-at-home-and-outside-the-hospital/home-care">HomeCare</a> nurse, a friendly and highly competent Nigerian immigrant, to check her meds and general condition. She looked at Mom’s wrist and said “Get her an appointment with her doctor, they’ll probably want an X-Ray.”</p> <p>I called up her doctor at opening time Monday. The guy who answered the phone said “Don’t have any appointments for a couple weeks but come on over, we’ll squeeze her in.” So we went in after morning coffee and waited less than an hour. The doctor looked at her arm for 45 seconds and said “I’m writing a prescription for an X-Ray” and there was a radiologist around the corner and she was in ten minutes later. The doctor called me back that afternoon and said “Your mother’s got a broken wrist, I got her an 8AM appointment tomorrow at Regina General’s Cast Clinic.”</p> <p>The doctor at the clinic looked at her wrist for another 45 seconds and said “Yeah, put on a cast” so they did and we were home by ten. I’d pessimistically overpaid a couple bucks for hospital parking.</p> <p>The reason I’m including this is because I notice that this space has plenty of American readers. Did you notice that the story entirely omits insurance companies and money (except parking)? In Canada your health-care comes with your taxes (granted, higher than Americans’) and while the system is far from perfect, it can fix up an old lady’s broken wrist pretty damn fucking quick without any bureaucratic bullshit. Also, Canada spends a huge amount less per head on health-care than the US does.</p> <p>And Mom told me not to forget that Saskatchewan is the birthplace of Canadian single-payer universal healthcare. <a href="https://en.wikipedia.org/wiki/Tommy_Douglas">Tommy Douglas</a>, the Social Democrat who made that happen, has been named <a href="https://en.wikipedia.org/wiki/The_Greatest_Canadian">The Greatest Canadian</a>.</p> <h2 id='p-2'>Gentle surface</h2> <p>Oh, did I say “flat and brown and empty”? Wrong, wrong, and wrong. The Prairies, in Canada and the US too, have textures and colors and hills and valleys, it’s just that the slopes are gentle. There are really flat parts and they make farmers’ lives easier, but more or less every square inch that’s not a town or a park is farmed. I took Mom for a drive out in the country southeast of Regina, from whence these views:</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/07/09/TXT55698.png" alt="A road leading slightly uphill, brilliant yellow canola on both sides" /> <img src="https://www.tbray.org/ongoing/When/202x/2025/07/09/TXT55700.png" alt="Yellow canola flowers under a blue sky" /> <div class='caption'><p>Note that in both shots we’re looking up a gentle slope. In the second, there’s farm infrastructure on the distant horizon.<br/>Also consider the color of the sky.</p></div> <p>In Canada that yellow-flowering crop is called “Canola”, which Wikipedia claims refers to a particular cultivar of <i>Brassica napus</i>, commonly known as rapeseed or just rape, so you can see why when Canada’s agribiz sector wanted to position its oil as the thing to use while cooking they went for the cultivar not the species name. I’m old enough to remember when farmers still said just “rapeseed”. Hmm, Wikipedia also claims that the OED claims this: The term “rape” derives from the Latin word for turnip, <i>rāpa</i> or <i>rāpum</i>, cognate with the Greek word ῥάφη, <i>rhaphe</i>.</p> <p>Let’s stick with canola.</p> <h2 id='p-4'>Pixelated color</h2> <p>After I’d taken those two canola-field shots I pulled out my Pixel and took another, but I’m not gonna share it because the Pixel decided to turn the sky from what I thought was a complex and interesting hue into its opinion of “what a blue sky looks like” only this sky didn’t.</p> <p>Maybe it’s just me, but I think Google’s camera app is becoming increasingly opinionated about color, and not in a good way. There are plenty of alternative camera apps, I should check them out.</p> <p>In case it’s not obvious, I love photographing Saskatchewan and think it generally looks pretty great, especially when you look up. On the province’s license plates it says “Land of living skies”, and no kidding.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/07/09/PXL_20250704_032320050.png" alt="Saskatchewan’s living skies" /> <img src="https://www.tbray.org/ongoing/When/202x/2025/07/09/PXL_20250704_032334240.png" alt="Saskatchewan’s living skies" /> <img src="https://www.tbray.org/ongoing/When/202x/2025/07/09/TXT55717.png" alt="Saskatchewan’s living skies"/> <div class='caption'><p>The first two are from the park behind Mom’s place,<br/>the third from that mini-mountain mentioned above.</p></div> <h2 id='p-6'>Experience and memory</h2> <p>My Mom’s doing well for a nonagenerian. She’s smart. When I visited early last fall and we talked about the US election I was bullish on Kamala Harris’s chances. She laughed at me and said “The Americans won’t elect a woman.” Well then.</p> <p>But she’s forgetful in the short term. I took her to the Legislature’s garden and to the top of the mini-mountain and for a drive out in the country and another adventure we’ll get to; she enjoyed them all. But maybe she won’t remember them.</p> <p>“Make memories” they say, but what if you show someone you love a good time and maybe they won’t remember it the next day? I’m gonna say it’s still worthwhile and has a lesson to teach about what matters. There endeth the lesson.</p> <h2 id='p-5'>The gallery</h2> <p>Indigenous people make up 17% of Regina’s population, the highest share in any significant Canadian city. By “indigenous” I mean the people that my ancestors stole the land from. It’s personal with me; Around 1900, my Dad’s family, Norwegian immigrants, took over some pretty great farmland southeast of Edmonton by virtue of “homesteading”, such a <em>nice</em> word isn’t it?</p> <p>Regina tries to honor its indigenous heritage and my favorite expression of that is its <a href="https://mackenzie.art">Mackenzie Art Gallery</a>, a lovely welcoming space in the <a href="https://www.saskatchewan.ca/government/directory?ou=a8e54600-77d6-4b7e-9702-f07a3dac1b47">T.C.Douglas building</a> (for “T.C.” read “Tommy”. (Did I mention him?) Mom and I walked around it and had lunch in its very decent café.</p> <p>Every time I’ve been there the big exhibitions in the big rooms have been indigenous-centered, and generally excellent. I try to go every time I visit and I’ve never been disappointed.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/07/09/PXL_20250708_172437441.png" alt="Indigenous art at Regina’s Mackenzie Gallery" /> <p>In 2025, anything I have to say about this piece would be superfluous.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/07/09/PXL_20250708_173041377.png" alt="Every American Flag Is A Warning Sign" /> <p>I love modern-art galleries, especially with big rooms full of big pieces, even if I don’t like all the art. Because it feels good to be in the presence of the work of people who are pouring out what they have to offer, especially at large scale. If the task wasn’t hard enough that failures are common then it wouldn’t be worthwhile, would it?</p> <p>They’re especially great when there’s someone I love there enjoying it with me. Here’s Mom.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/07/09/PXL_20250708_172836385.png" alt="Jean Bray considers indigenous art" /> <p>These days, any visit might be the last. I hope this wasn’t.</p> </div></content></entry> <entry> <title>QRS: Epsilon Wrangling</title> <link href='https://www.tbray.org/ongoing/When/202x/2025/07/07/Epsilon-Wrangling' /> <link rel='replies' thr:count='0' type='application/xhtml+xml' href='/ongoing/When/202x/2025/07/07/Epsilon-Wrangling#comments' /> <id>https://www.tbray.org/ongoing/When/202x/2025/07/07/Epsilon-Wrangling</id> <published>2025-07-07T12:00:00-07:00</published> <updated>2025-07-09T19:41:00-07:00</updated> <category scheme='https://www.tbray.org/ongoing/What/' term='Technology/Quamina Diary' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Technology' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Quamina Diary' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Technology/Software' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Software' /> <summary type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>I haven’t shipped any new features for <a href='https://github.com/timbray/quamina'>Quamina</a> in many months, partly due to a flow of real-life distractions, but also I’m up against tough performance problems in implementing <a href='/ongoing/When/202x/2024/12/12/Quamina-Regular-Expression-Series'>Regular Expressions at massive scale</a>. I’m still looking for a breakthrough, but have learned things about building and executing finite automata that I think are worth sharing. This piece has to do with <a href='https://en.wikipedia.org/wiki/Nondeterministic_finite_automaton#NFA_with_ε-moves'>epsilons</a>; anyone who has studied finite automata will know about them already, but I’ll offer background for those people to skip</div></summary> <content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'> <p>I haven’t shipped any new features for <a href="https://github.com/timbray/quamina">Quamina</a> in many months, partly due to a flow of real-life distractions, but also I’m up against tough performance problems in implementing <a href="/ongoing/When/202x/2024/12/12/Quamina-Regular-Expression-Series">Regular Expressions at massive scale</a>. I’m still looking for a breakthrough, but have learned things about building and executing finite automata that I think are worth sharing. This piece has to do with <a href="https://en.wikipedia.org/wiki/Nondeterministic_finite_automaton#NFA_with_ε-moves">epsilons</a>; anyone who has studied finite automata will know about them already, but I’ll offer background for those people to skip.</p> <p>I’ve written about this before in <a href="/ongoing/When/202x/2024/06/17/Epsilon-Love">Epsilon Love</a>. A commenter pointed out that the definition of “epsilon” in that piece is not quite right per standard finite-automata theory, but it’s still a useful in that it describes how epsilons support constructs like the shell-style “<code>*</code>”.</p> <h2 id='p-2'>Background</h2> <p>Finite automata come in two flavors: Deterministic (DFA) and Nondeterministic (NFA). DFAs move from state to state one input symbol at a time: it’s simple and easy to understand and to implement. NFAs have two distinguishing characteristics: First, when you’re in a state and an input symbol arrives, you can transfer to more than one other state. Second, a state can have “epsilon transitions” (let’s say “ε” for epsilon), which can happen any time at all while you’re in that state, input or no input.</p> <p>NFAs are more complicated to traverse (will discuss below) but you need them if you want to implement regular expressions with <code>.</code> and <code>?</code> and <code>*</code> and so on. You can turn any NFA into a DFA, and I’ll come back to that subject in a future piece.</p> <p>For implementing NFAs, I’ve been using <a href="https://en.wikipedia.org/wiki/Thompson%27s_construction">Thompson's construction</a>, where “Thompson” is <a href="https://en.wikipedia.org/wiki/Ken_Thompson">Ken Thompson</a>, co-parent of Unix. This technique is also nicely described by Russ Cox in <a href="https://swtch.com/~rsc/regexp/regexp1.html">Regular Expression Matching Can Be Simple And Fast</a>. You don’t need to learn it to understand this piece, but I’ll justify design choices by saying “per Thompson”.</p> <p>I’m going to discuss two specific issues today, ε-closures and a simpler NFA definition.</p> <h2 id='p-3'>ε-closures</h2> <p>To set the stage, consider this regexp: <nobr><code>A?B?C?X</code></nobr></p> <p>It should match “X” and “BX” and “ACX” and so on, but not “CAX” or “XX”. Thompson says that you implement <code>A?</code> with a transition to the next state on “A” and another ε-transition to that next state; because if you see an “A” you should transition, but then you can transition anyhow even if you don’t.</p> <p>The resulting NFA looks like this:</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/07/07/AcmBcmCcmX.png" alt="NFA matching A?B?C?X" /> <p> In finite-automaton math, states are usually represented by the letter “q” followed by a number (usually italicized and subscripted, like <i>q<sub>0</sub></i>, but not here, sorry). Note <code>q4</code>’s double circle which means it’s a goal state, i.e. if we get here we’ve matched the regexp. I should add that this was produced with <a href="https://draw.io">draw.io</a>, which seems to make this sort of thing easy. </p> <h2 id='p-5'>Back to that NFA</h2> <p>So, here’s a challenge: Sketch out the traversal code in your head. Think about the input strings “AX” and “BCX” and just “X” and how you’d get through the NFA to the Q4 goal state.</p> <p>The trick is what’s called the ε-closure. When you get to a state, before you look at the next input symbol, you have to set up to process it. In this case, you need to be able to transition on an A or B or C. So what you do is pull together the start state <code>q0</code> and also any other states you can reach from there through ε-transitions. In this case, the ε-closure for the start state is <code>{q0, q1, q2, q3}</code>.</p> <p>Suppose, then, that you see a “B” input symbol. You apply it to all the states in the ε-closure. Only <code>q1</code> matches, transitioning you to <code>q2</code>. Before you look at the next input symbol, you compute the ε-closure for <code>q2</code>, which turns out to be <code>{q2, q3}</code>. With this ε-closure, you can match “C” or “X”. If you get a “C”, you”ll step to <code>q3</code>, whose ε-closure is just itself, because “X” is the only path forward.</p> <p>So your NFA-traversal algorithm for one step becomes something like:</p> <ol> <li><p>Start with a list of states.</p></li> <li><p>Compute the ε-closure of that list.</p></li> <li><p>Read an input symbol.</p></li> <li><p>For each state in the ε-closure, see if you can traverse to another state.</p></li> <li><p>If so, add it to your output list of states.</p></li> <li><p>When you’re done, your output list of states is the input to this algorithm for the next step.</p></li> </ol> <h2 id='p-6'>Computation issues</h2> <p>Suppose your regular expression is <code>(A+BC?)+</code>. I’m not going to sketch out the NFA, but just looking at it tells you that it has to have loopbacks; once you’ve matched the parenthetized chunk you need to go back to a state where you can recognize another occurrence. For this regexp’s NFA, computing the ε-closures can lead you into an infinite loop. (Should be obvious, but I didn’t realize it until after the first time it happened.)</p> <p>You can have loops and you can also have dupes. In practice, it’s not that uncommon for a state to have more than one ε-transition, and for the targets of these transitions to overlap.</p> <p>So you need to watch for loops and to dedupe your output. I think the only way to avoid this is with a cookie-crumbs “where I’ve been” trail, either as a list or a hash table.</p> <p>Both of these are problematic because they require allocating memory, and that’s something you really don’t want to do when you’re trying to match patterns to events at Quamina’s historic rate of millions per second.</p> <p>I’ll dig into this problem in a future Quamina-Diary outing, but obviously, caching computed epsilon closures would avoid re-doing this computation.</p> <p>Anyhow, bear ε-closures in mind, because they’ll keep coming up as this series goes on.</p> <h2 id='p-7'>And finally, simplifying “NFA”</h2> <p>At the top of this piece, I offered the standard definition of NFAs: First, when you’re in a state and an input symbol arrives, you can transfer to more than one other state. Second, you can have ε-transitions. Based on my recent work, I think this definition is redundant. Because if you need to transfer to two different states on some input symbol, you can do that with ε-transitions.</p> <p>Here’s a mini-NFA that transfers from state <code>q0</code> on “A” to both <code>q1</code> and <code>q2</code>.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/07/07/Splice-1.png" alt="An NFA transferring to two different states on an input symbol" /> <p>And here’s how you can achieve the same effect with ε-transitions:</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/07/07/Splice-2.png" alt="Transferring to two destinations using ε-transitions" /> <p>In that NFA, in <code>qS</code> the “S” stands for “splice”, because it’s a state that exists to connect two threads of finite-automaton traversal.</p> <p>I’m pretty sure that this is more than just a mathematical equivalence. In my regexp implementation, so far at least, I’ve never encountered a need to do that first kind of dual transition. Furthermore, the “splice” structure is how Thompson implements the regular-expression “<code>|</code>” operator.</p> <p>So if you’re building an NFA, all the traversal stuff you need in a state is a simple map from input symbol to next state, and a list of ε-transitions.</p> <h2 id='p-8'>Next up</h2> <p>How my own implementation of NFA traversal collided head-on into the Benchmark From Hell and still hasn’t recovered.</p> </div></content></entry> <entry> <title>The Real GenAI Issue</title> <link href='https://www.tbray.org/ongoing/When/202x/2025/07/06/AI-Manifesto' /> <link rel='replies' thr:count='9' type='application/xhtml+xml' href='/ongoing/When/202x/2025/07/06/AI-Manifesto#comments' /> <id>https://www.tbray.org/ongoing/When/202x/2025/07/06/AI-Manifesto</id> <published>2025-07-06T12:00:00-07:00</published> <updated>2025-07-06T12:06:43-07:00</updated> <category scheme='https://www.tbray.org/ongoing/What/' term='Technology/AI' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Technology' /> <category scheme='https://www.tbray.org/ongoing/What/' term='AI' /> <summary type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>Last week I published a <a href='/ongoing/When/202x/2025/07/01/First-AI-Code'>featherweight narrative</a> about applying GenAI in a real-world context, to a tiny programming problem. Now I’m regretting that piece because I totally ignored the two central issues with AI: What it’s meant to do, and how much it really costs</div></summary> <content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'> <p>Last week I published a <a href="/ongoing/When/202x/2025/07/01/First-AI-Code">featherweight narrative</a> about applying GenAI in a real-world context, to a tiny programming problem. Now I’m regretting that piece because I totally ignored the two central issues with AI: What it’s meant to do, and how much it really costs.</p> <h2 id='p-1'>What genAI is for</h2> <p>The most important fact about genAI in the real world is that there’ve been literally <a href="https://finance.yahoo.com/news/how-nvidia-played-a-central-role-in-the-306-billion-ai-startup-boom-195741749.html?guccounter=1">hundreds of billions</a> of dollars invested in it; that link is just startups, and ignores a comparable torrent of cash pouring out of Big Tech.</p> <p>The business leaders pumping all this money of course don’t understand the technology. They’re doing this for exactly one reason: They think they can discard armies of employees and replace them with LLM services, at the cost of shipping shittier products. Do you think your management would spend that kind of money to help you with a quicker first draft or a summarized inbox?</p> <p>Adobe said the quiet part out loud: <a href="https://petapixel.com/2024/05/03/adobe-throws-photographers-under-the-bus-again-skip-the-photoshoot/">Skip the Photoshoot</a>. </p> <p>At this point someone will point out that previous technology waves have generated as much employment as they’ve eliminated. Maybe so, but that’s not what business leaders think they’re buying. They think they’re buying smaller payrolls.</p> <p>Maybe I’m overly sensitive, but thinking about these truths leads to a mental stench that makes me want to stay away from it.</p> <h2 id='p-2'>How much does genAI cost?</h2> <p>Well, I already mentioned all those hundreds of billions. But that’s pocket change. The investment community in general and Venture Capital in particular will whine and moan, but the people who are losing the money are people who can afford to.</p> <p>The first real cost is hypothetical: What if those business leaders are correct and they can gleefully dispose of millions of employees? If you think we’re already suffering from egregious levels of inequality, what happens when a big chunk of the middle class suddenly becomes professionally superfluous? I’m no economist so I’ll stop there, but you don’t have to be a rocket scientist to predict severe economic pain.</p> <p>Then there’s the other thing that nobody talks about, the massive greenhouse-gas load that all those data centers are going to be pumping out. This at a time when we we blow past one atmospheric-carbon metric after another and David Suzuki says <a href="https://www.ipolitics.ca/2025/07/02/its-too-late-david-suzuki-says-the-fight-against-climate-change-is-lost/">the fight against climate change is lost</a>, that we need to hunker down and work on survival at the local level.</p> <h2 id='p-3'>The real problem</h2> <p>It’s the people who are pushing it. Their business goals are quite likely, as a side-effect, to make the world a worse place, and they don’t give a fuck. Their technology will inevitably worsen the onrushing climate catastrophe, and they don’t give a fuck.</p> <p>It’s probably not as simple as “They’re just shitty people”<span class='dashes'> —</span> it’s not exactly easy to escape the exigencies of modern capitalism. But they are people who are doing shitty things.</p> <h2 id='p-4'>Is genAI useful?</h2> <p>Sorry, I’m having trouble even thinking about that now.</p> </div></content></entry> <entry> <title>My First GenAI Code</title> <link href='https://www.tbray.org/ongoing/When/202x/2025/07/01/First-AI-Code' /> <link rel='replies' thr:count='3' type='application/xhtml+xml' href='/ongoing/When/202x/2025/07/01/First-AI-Code#comments' /> <id>https://www.tbray.org/ongoing/When/202x/2025/07/01/First-AI-Code</id> <published>2025-07-01T12:00:00-07:00</published> <updated>2025-07-01T11:38:00-07:00</updated> <category scheme='https://www.tbray.org/ongoing/What/' term='Technology/AI' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Technology' /> <category scheme='https://www.tbray.org/ongoing/What/' term='AI' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Technology/Software' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Software' /> <summary type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>At the moment, we have no idea what the impact of genAI on software development is going to be. The impact of <em>anything</em> on coding is hard to measure systematically, so we rely on anecdata and the community’s eventual consensus. So, here’s my anecdata. Tl;dr: The AI was not useless</div></summary> <content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'> <p>At the moment, we have no idea what the impact of genAI on software development is going to be. The impact of <em>anything</em> on coding is hard to measure systematically, so we rely on anecdata and the community’s eventual consensus. So, here’s my anecdata. Tl;dr: The AI was not useless.</p> <h2 id='p-1'>The problem</h2> <p>My current work on <a href="/ongoing/What/Technology/Quamina%20Diary/">Quamina</a> involves dealing with collections of finite-automata states, which, in the Go programming language, are represented as slices of pointers to state instances:</p> <blockquote><p><code>[]*faState</code></p></blockquote> <p>The problem I was facing was deduping them, so that there would be only one instance corresponding to any particular collection. This is what, in Java, the <code>intern()</code> call does with strings.</p> <p>The algorithm isn’t rocket science:</p> <ol> <li><p>Dedupe the states, i.e. turn the collection into a set.</p></li> <li><p>For each set of states, generate a key.</p></li> <li><p>Keep a hash table of sets around, and use the key to see whether you’ve already got such a set, and if so return it. Otherwise, make a new entry in the hash table and return that.</p></li> </ol> <p>I’m out of touch with the undergrad CS curriculum, but this feels like a second-year assignment or thereabouts? Third?</p> <h2 id='p-2'>Enter Claude</h2> <p>So I prompted Claude thus:</p> <blockquote><p>I need Go code to provide a "intern"-like function for lists of pointers. For example, if I have several different []*int arrays, which may contain duplicates, I want to call intern() on each of them and get back a single canonical pointer which is de-duplicated and thus a set.</p></blockquote> <p>Claude did pretty well. It got the algorithm right, the code was idiomatic and usefully commented, and it also provided a decent unit test (but in a <code>main()</code> stanza rather than a proper Go test file). I didn’t try actually running it.</p> <p>The interesting part was the key computation. I, being lazy, had just done a Go <code>fmt.Sprintf("%p")</code> incantation to get a hex string representing each state’s address, sorted them, joined them, and that was the key.</p> <p>Claude worked with the pointers more directly.</p> <pre><code> // Sort by pointer address for consistent ordering sort.Slice(unique, func(i, j int) bool { return uintptr(unsafe.Pointer(unique[i])) < uintptr(unsafe.Pointer(unique[j])) })</code></pre> <p>Then it concatenated the raw bytes of the map addresses and lied to Go by claiming it was a string.</p> <pre><code> // Create key from pointer addresses key := make([]byte, 0, len(slice)*8) for _, ptr := range slice { addr := uintptr(unsafe.Pointer(ptr)) // Convert address to bytes for i := 0; i < 8; i++ { key = append(key, byte(addr>>(i*8))) } } return string(key)</code></pre> <p>This is an improvement in that the keys will be half the size of my string version. I didn’t copy-paste Claude’s code wholesale, just replaced ten or so lines of key construction.</p> <h2 id='p-3'>Take-away</h2> <p>I dunno. I thought the quality of the code was fine, wouldn’t have decomposed the functions in the same way but wouldn’t have objected on review. I was pleased with the algorithm, but then I would be since it was the same one I’d written, and, having said that, quite possibly that’s the only algorithm that anyone has used. It will be <em>super</em> interesting if someone responds to this write-up saying “You and Claude are fools, here’s a much better way.”</p> <p>Was it worth fifteen minutes of my time to ask Claude and get a slightly better key computation? Only if this ever turns out to be a hot code path and I don’t think anybody’s smart enough to know that in advance.</p> <p>Would I have saved time by asking Claude first? Tough to tell; Quamina’s data structures are a bit non-obvious and I would have had to go to a lot of prompting work to get it to emit code I could use directly. Also, since Quamina is low-level performance-critical infrastructure code, I’d be nervous about having any volume of code that I didn’t really <em>really</em> understand.</p> <p>I guess my take-away was that in this case, Claude knew the Go idioms and APIs better than I did; I’d never looked at the <a href="https://pkg.go.dev/unsafe">unsafe</a> package.</p> <p>Which reinforces my suspicion that genAI is going to be especially useful at helping generate code to talk to big complicated APIs that are hard to remember all of. Here’s an example: Any moderately competent Android developer could add a feature to an app where it strobes the flash and surges the vibration in sync with how fast you’re shaking the device back and forth, probably in an afternoon. But it would require a couple of dozen calls into the dense forest of Android APIs, and I suspect a genAI might get you there a lot faster by just filling the calls in as prompted.</p> <p>Reminder: This is just anecdata.</p> </div></content></entry> <entry> <title>Qobuz and Mac</title> <link href='https://www.tbray.org/ongoing/When/202x/2025/06/22/Qobuz-and-Others' /> <link rel='replies' thr:count='0' type='application/xhtml+xml' href='/ongoing/When/202x/2025/06/22/Qobuz-and-Others#comments' /> <id>https://www.tbray.org/ongoing/When/202x/2025/06/22/Qobuz-and-Others</id> <published>2025-06-22T12:00:00-07:00</published> <updated>2025-06-26T13:13:08-07:00</updated> <category scheme='https://www.tbray.org/ongoing/What/' term='Arts/Music' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Arts' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Music' /> <summary type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>Back in March I offered <a href='/ongoing/When/202x/2025/03/27/Music-Plus-Qobuz'>Latest Music (feat. Qobuz)</a>, describing all the ways I listen to music (Tl;dr: YouTube Music, Plex, Qobuz, record player). I stand by my opinions there but wanted to write more on two subjects: First Qobuz, because it suddenly got a lot better. And a recommendation, for people with fancy A/V setups, that you include a cheap Mac Mini</div></summary> <content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'> <p>Back in March I offered <a href="/ongoing/When/202x/2025/03/27/Music-Plus-Qobuz">Latest Music (feat. Qobuz)</a>, describing all the ways I listen to music (Tl;dr: YouTube Music, Plex, Qobuz, record player). I stand by my opinions there but wanted to write more on two subjects: First Qobuz, because it suddenly got a lot better. And a recommendation, for people with fancy A/V setups, that you include a cheap Mac Mini.</p> <h2 id='p-1'>Qobuz</h2> <p>That other piece had a list of the reasons to use Qobuz, but times have changed, so let’s revise it:</p> <ol> <li><p>It pays artists more per stream than any other service, by a wide margin.</p></li> <li><p>It seems to have as much music as anyone else.</p></li> <li><p>It’s album-oriented, and I appreciate artists curating their own music.</p></li> <li><p>Classical music is a first-class citizen.</p></li> <li><p>It’s actively curated; they highlight new music regularly, and pick a “record of the week”. To get a feel, check out <a href="https://www.qobuz.com/ca-en/magazine">Qobuz Magazine</a>; you don’t have to be a subscriber.</p></li> <li><p>It gives evidence of being built by people who love music.</p></li> <li><p>They’re obsessive about sound quality, which is great, but only makes a difference if you’re listening through quality speakers.</p></li> <li><p>A few weeks ago, the mobile app quality switched from adequate to excellent.</p></li> </ol> <h2 id='p-2'>That app</h2> <p>I want to side-trip a bit here, starting with a question. How long has it been since an app you use has added a feature that was genuinely excellent and let you do stuff you couldn’t before and didn’t get in your way and created no suspicion that it was strip-mining your life for profit? I’m here to tell you that this can still happen, and it’s a crushing criticism of my profession that it so rarely does.</p> <p>I’m talking about <a href="https://www.qobuz.com/ca-en/connect">Qobuz Connect</a>. I believe there are other music apps that can do this sort of stuff, but it feels like magic to me.</p> <p>It’s like this. I listen to music at home on an audiophile system with big speakers, in <a href="/ongoing/What/The%20World/Jaguar%20Diary/">our car</a>, and on <a href="/ongoing/When/201x/2019/08/06/Jeanneau-795">our boat</a>. The only app I touch is the <a href="https://play.google.com/store/apps/details?id=com.qobuz.music">Qobuz Android app</a>. The only time it’s actually receiving and playing the music itself is in the car, with the help of Android Auto. In the other scenarios it’s talking to Qobuz running on a Mac, which actually fetches the music and routes it to the audio system. Usually it figures out what player I want it to control automatically, although there’ve been a couple times when I drove away in the car and it got confused about where to send the music. Generally, it works great.</p> <p>The app’s music experience is rich and involving.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/06/22/Screenshot_20250622-230116.png" alt="Qobuz Android app screenshot" /> <p>It has New Releases and curated playlists and a personalized stream for me and a competent search function for those times I absolutely must listen to Deep Purple or Hania Rani or whoever.</p> <p>I get a chatty not-too-long email from Qobuz every Friday, plugging a few of the week’s new releases, with sideways and backward looks too. (This week: A Brian Wilson stream.) The app has so much stuff, especially among the themed streams, that I sometimes get lost. But somehow it’s not irritating; what’s on the screen remains musically interesting and you can always hit the app’s Home button.</p> <p>Qobuz has its own musical tastes that guide its curation. They’re not always compatible with mine<span class='dashes'> —</span> my tolerance for EDM and mainstream Hip-hop remains low. And I wish they were stronger on Americana. But the intersection is broad enough to provide plenty of enjoyable new-artist experiences. Let me share one with you: <a href="https://kwashibu.bandcamp.com/album/love-warrior-s-anthem">Kwashibu Area Band</a>, from Ghana.</p> <p>Oh, one complaint: Qobuz was eating my Pixel’s battery. So I poked around online and it’s a known problem; you have to use the Android preferences to stop it from running in the background. Huh? What was it doing in the background anyhow?! But it seems to work fine even when it’s not doing it.</p> <h2 id='p-3'>A Mac, you say?</h2> <p>The music you’re listening to is going to be stored on disk, or incoming from a streaming service. Maybe you want to serve some of the stored music out to listen to it in the car or wherever. There are a variety of audio products in the “Streamer” category that do some of these things in various combinations. A lot of them make fanciful claims about the technology inside and are thus expensive, you can easily spend thousands.</p> <p>But any reasonably modern computer can do all these things and more, plus it also can drive a big-screen display, plus it will probably run the software behind whatever next year’s New Audio Hotness is.</p> <p>At this point the harder-core geeks will adopt a superior tone of voice to say “I do all that stuff with FreeBSD and a bunch of open-source packages running on a potato!”</p> <p>More power to ’em. But I recommend a basic Apple Silicon based Mac Mini, M1 is fine, which you can get for like $300 used on eBay. And if you own a lot of music and video you can plug in a 5T USB drive for a few more peanuts. This will run Plex and Qobuz and almost any other imaginable streaming software. Plus you can plug it into your home-theater screen and it has a modern Web browser so you can also play anything from anywhere on the Web.</p> <p>I’ve been doing this for a while but I had one big gripe. When I wanted to stream music from the Mac, I needed to use a keyboard and mouse, so I keep one of each, Bluetooth-flavored, nearby. But since I got Qobuz running that’s become a very rare occurrence.</p> <h2 id='p-4'>You’re forgetting something</h2> <p>Oh, and yeah, there’s the record player. Playing it requires essentially no software at all, isn’t that great?</p> </div></content></entry> <entry> <title>Long Links</title> <link href='https://www.tbray.org/ongoing/When/202x/2025/06/21/Long-Links' /> <link rel='replies' thr:count='6' type='application/xhtml+xml' href='/ongoing/When/202x/2025/06/21/Long-Links#comments' /> <id>https://www.tbray.org/ongoing/When/202x/2025/06/21/Long-Links</id> <published>2025-06-21T12:00:00-07:00</published> <updated>2025-06-21T11:56:27-07:00</updated> <category scheme='https://www.tbray.org/ongoing/What/' term='The World' /> <category scheme='https://www.tbray.org/ongoing/What/' term='The World' /> <summary type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>“Wow, Tim, didn’t you do a <a href='/ongoing/When/202x/2025/05/06/Long-Links'>Long Links</a> just last month? Been spending too much time doomscrolling, have we?” Maybe. There sure are a lot of tabs jostling each other along the top of that browser. Many are hosting works that are both long and good. So here they are; you probably don’t have time for all of ’em but my hope is that one or two might reward your visit</div></summary> <content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'> <p>“Wow, Tim, didn’t you do a <a href="/ongoing/When/202x/2025/05/06/Long-Links">Long Links</a> just last month? Been spending too much time doomscrolling, have we?” Maybe. There sure are a lot of tabs jostling each other along the top of that browser. Many are hosting works that are both long and good. So here they are; you probably don’t have time for all of ’em but my hope is that one or two might reward your visit.</p> <p>Let’s start with a really important subject: Population growth oh actually these days it’s population shrinkage. For a short-sharp-shock-flavored introduction I recommend <a href="https://www.youtube.com/watch?v=Ufmu1WD2TSk">South Korea Is Over</a> which explains the brick wall societies with fertility rates way below the replacement rate of 2.1 children per woman per lifetime are hurtling toward. South Korea, of course, being the canonical example. But also Japan and Taiwan and Italy and Spain and so on.</p> <p>And, of course, the USA, where the numbers aren’t <em>that</em> much higher: <a href="https://www.macrotrends.net/global-metrics/countries/usa/united-states/fertility-rate">U.S. Fertility Rate (1950-2025)</a>. Even so, the population still grows (because of immigration), albeit at less than 1% per annum: <a href="https://www.macrotrends.net/global-metrics/countries/usa/united-states/population-growth-rate">U.S. Population Growth Rate</a>. If the MAGAs get their way and eventually stop all non-white immigration, the US will be in South Korea territory within a generation or two. </p> <p>A reasonable person might ask why. It’s not really complicated, as you can read here: <a href="https://www.nytimes.com/2025/06/15/opinion/birth-rate-parenting-natalism.html?unlocked_article_code=1.Pk8.OBam.dOi0UpP-8-DV&smid=url-share">A Bold Idea to Raise the Birthrate: Make Parenting Less Torturous</a>. From which I quote: “To date, no government policies have significantly improved their nation’s birthrates for a sustained period.” The essay argues convincingly that it’s down to two problems: Capitalism and sexism. Neither of which offers an easy fix. </p> <p>Speaking of the travails of late capitalism, here’s how bad it’s getting: <a href="https://www.nytimes.com/2025/03/01/opinion/crisis-working-homeless.html?unlocked_article_code=1.Qk8.jsTO.aUBSAMHw7Op2&smid=url-share">America Is Pushing Its Workers Into Homelessness</a>.</p> <p>For a refreshingly different take on the business world, here’s Avery Pennarun, CEO of Tailscale: <a href="https://apenwarr.ca/log/20250530">The evasive evitability of enshittification</a>. Not sure I buy what he’s saying, but still worth reading.</p> <p>Most people who visit these pages are geeks or geek-adjacent. If you’re one of those, and especially if you enjoy the small but vibrant genre of Comical Tech War Stories, I recommend <a href="https://yeet.cx/blog/lock-free-rust/">Lock-Free Rust: How to Build a Rollercoaster While It’s on Fire</a></p> <p>And here’s write-up on an AWS product which has one of the best explanations I’ve ever read of the different flavors modern databases come in: <a href="https://www.redshift-observatory.ch/white_papers/downloads/introduction_to_the_fundamentals_of_amazon_redshift.html">Introduction to the Fundamentals of Amazon Redshift</a></p> <p>Of course, the geek conversation these days is much taken up with the the impact of genAI as in “vibe coding”. To summarize the conversation: A few people, not obviously fools, are saying “This stuff seems to help me” and many others, also apparently sensible, are shouting back “You’re lying to yourself, it can’t be helping!” Here is some of the testimony: Kellan on <a href="https://laughingmeme.org//2025/05/25/vibe-coding-for-teams.html">Vibe coding for teams, thoughts to date</a>, Armin Ronacher on <a href="https://lucumr.pocoo.org/2025/6/12/agentic-coding/">Agentic Coding Recommendations</a>, Harper on <a href="https://harper.blog/2025/05/08/basic-claude-code/">Basic Claude Code</a>, and Klabnik on <a href="https://steveklabnik.com/writing/a-tale-of-two-claudes/">A tale of two Claudes</a></p> <p>I lean to believing narratives of personal experience, but on the other hand the skeptics make good points. Another random piece of evidence: Because I’m lazy, I tend to resist adopting technologies that have steep learning curves, which genAI currently does. On many occasions, this has worked out well because those technologies have turned out not to pay off very well. Am I a canary in the coal mine?</p> <h2 id='p-2'>*cough*</h2> <p>Since I introduced myself into the narrative, I’ll note that today is my 70th birthday. I am told that this means that my wisdom has now been maximized, so you’re safe in believing whatever you read in this space. I don’t have anything special to say to commemorate the occasion, so here’s a picture of my neighborhood’s network infrastructure, which outlines the form of a cathedral’s nave. I’m sure there’s a powerful metaphor lurking in there.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/06/21/TXT55659.png" alt="Many electrical and data wires festoon a back alley" /> <p>Oh, and here’s a photography Long Link: <a href="https://www.lux.camera/what-is-hdr/">What is HDR, anyway?</a> It’s actually a pitch for a nice-looking mobile camera app, but it offers real value on things that can affect the quality of your pictures.</p> <p>Regular readers will know that I’m fascinated by the many unsolved issues and open questions in cosmology, which are by definition the largest problems facing human consciousness. The ΛCDM-vs-MOND controversy, i.e. “Is there really dark matter or does gravity get weird starting at the outer edges of galaxies?”, offers great entertainment value. And, there is news!</p> <p>First of all, here’s a nice overview on the controversy: <a href="https://arxiv.org/pdf/2505.21638v1">Modified Newtonian Dynamics: Observational Successes and Failures</a>.</p> <p>Which points out that the behavior of “wide binary” star systems ought to help resolve the issue, but that people who study it keep coming up with contradictory findings. Here’s the latest, from Korean researchers: Press release <a href="http://www.sejongpr.ac.kr/sejongnewspaperview.do?currentPage=1&searchField=&searchValue=&boardType=3&pkid=73549&utm_source=beehiiv&utm_medium=newsletter&utm_campaign=mediamobilize&_bhlid=3e40dce99e536f4015a1dd2c6afd193a465d17ea">New method of measuring gravity with 3D velocities of wide binary stars is developed and confirms modified gravity</a> and peer-reviewed paper: <a href="https://iopscience.iop.org/article/10.3847/1538-4357/adce09">Low-acceleration Gravitational Anomaly from Bayesian 3D Modeling of Wide Binary Orbits: Methodology and Results with Gaia Data Release 3</a>. Spoiler: They think the gravity gets weird. I have a math degree but cosmology math is generally way over my head. Having said that, I think those South Koreans may be a bit out over their skis; I generally distrust heroic statistical methods. We’ll see.</p> <p>Let’s do politics. It turns out that the barbaric junta which oppresses the people of China does not limit its barbarism to its own geography: <a href="https://www.cbc.ca/news/politics/china-targets-dissidents-canada-1.7543745?cmp=rss">Followed, threatened and smeared — attacks by China against its critics in Canada are on the rise</a>.</p> <p>More politics: The MAGAs are always railing against “elites”. Here are two discussions of what they mean: <a href="https://www.theatlantic.com/ideas/archive/2025/04/class-money-finances/682301/">What the Comfort Class Doesn’t Get</a> and <a href="https://siderea.dreamwidth.org/1865048.html">When They Say Elites, They Mean Us</a>.</p> <p>The world’s biggest political issue <em>should</em> be the onrushing climate crisis. When Trump and his toadies are justly condemned and ridiculed by future historians, it is their malevolent cluelessness on this subject that may burn the hottest. Who knows, maybe they’ll pay attention to this: <a href="https://www.bloomberg.com/news/newsletters/2025-06-18/insurers-want-businesses-to-wake-up-to-costs-of-extreme-heat">Insurers Want Businesses to Wake Up to Costs of Extreme Heat</a>.</p> <h2 id='p-1'>The list of Long Links is too long</h2> <p>So I’ll try to end cheerfully.</p> <p>A graceful essay about an old camera and a dreamy picture: <a href="https://petapixel.com/2025/05/27/a-bridge-across-time-for-sebastiao-salgado/">A Bridge Across Time: For Sebastião Salgado</a></p> <p>Latin Wikipedia has 140,000 articles; consider the delightful discussion of <a href="https://la.wikipedia.org/wiki/Equus_asinus"><cite>Equus asinus</cite></a>.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/06/21/equus-asinus.png" alt="Asinus in opere tesselato Byzantino" /> <div class='caption'><p>Asinus in opere tesselato Byzantino</p></div> <p>Here’s a lovely little song from TORRES and Julien Baker: <a href="https://www.youtube.com/watch?v=TurU_Jn-LEg">The Only Marble I’ve Got Left</a>.</p> <p>Finally, a clear-eyed if lengthy essay on why and how to think: <a href="https://www.newyorker.com/culture/open-questions/should-you-question-everything">Should You Question Everything?</a></p> </div></content></entry> <entry> <title>June 2025 C2PA News</title> <link href='https://www.tbray.org/ongoing/When/202x/2025/06/17/More-C2PA' /> <link rel='replies' thr:count='1' type='application/xhtml+xml' href='/ongoing/When/202x/2025/06/17/More-C2PA#comments' /> <id>https://www.tbray.org/ongoing/When/202x/2025/06/17/More-C2PA</id> <published>2025-06-17T12:00:00-07:00</published> <updated>2025-06-19T09:20:16-07:00</updated> <category scheme='https://www.tbray.org/ongoing/What/' term='Technology/Identity' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Technology' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Identity' /> <summary type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>Things are happening in the C2PA world; here are a couple of useful steps forward, plus cheers and boos for Adobe. Plus a live working C2PA demo you can try out</div></summary> <content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'> <p>Things are happening in the C2PA world; here are a couple of useful steps forward, plus cheers and boos for Adobe. Plus a live working C2PA demo you can try out.</p> <p>Refresher: The <a href="https://c2pa.org/">C2PA</a> technology is driven by the <a href="https://contentauthenticity.org/">Content Authenticity Initiative</a> and usually marketed as “Content Credentials”. I’ve written before about it, an <a href="/ongoing/When/202x/2023/10/28/C2PA-Workflows">introduction in 2023</a> and a <a href="/ongoing/When/202x/2024/10/29/Lane-Provenance">progress report</a> last October.</p> <p>Let’s start with a picture.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/06/17/TXT55648.png" alt="A dark picture full of vague swirls and jiggly lights" /> <div class='caption'><p>I was standing with the camera by the ocean at dusk and accidentally left it in the “B” long-exposure setting, so this isn’t really a picture <em>of</em> anything but I thought it was kinda pretty.</p></div> <h2 id='p-1'>Validating Content Credentials</h2> <p>As I write this, there are now at least two C2PA-validator Chrome extensions: the <a href="https://chromewebstore.google.com/detail/contentlens-c2pa-validato/gdejpnjeepoffhkbcgnjdbkgpohdhmln?hl=en">ContentLens C2PA Validator</a> from <a href="https://www.contentlens.ai/">ContentLens</a> and <a href="https://chromewebstore.google.com/detail/c2pa-content-credentials/mjkaocdlpjmphfkjndocehcdhbigaafp?hl=en">C2PA Content Credentials</a> from <a href="https://www.digimarc.com/">Digimarc</a>.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/06/17/cc-readout.png" alt="C2PA verifier display" class="inline" /> <img src="https://www.tbray.org/ongoing/When/202x/2025/06/17/cc2-readout.png" alt="C2PA verifier display" class="inline" /> <p>If you install either of them, and then you click on that picture just above in Chrome to get the larger version, then you right-click on the larger picture, the menu will offer Content-Credentials validation.</p> <p>Doing this will produce a little “CR” logo at the top right corner, meaning that the C2PA data has been verified as being present and signed by a trusted certificate issuer, in this case Adobe.</p> <p>Then there’s a popup; the two extensions’ are on the right. They’re different, in interesting ways. Let’s walk through the second one.</p> <p>The little thumbnail at the top of the popup is what the image looked like when the C2PA was added. Not provided by the other verifier.</p> <p>The paragraph beginning “Displaying credentials…” says that the C2PA manifest was embedded in the JPG as opposed to stored out on the cloud; The cloud works fine, and is perhaps a good idea because the C2PA manifest can be quite large. I’m not clear on what the “watermark” is about.</p> <p>“Issued by Adobe” means that the Chrome extension verified the embedded C2PA against Adobe’s public key and can be confident that yes, this was really signed by them.</p> <p>“<b>Produced by</b> Timothy Bray” is interesting. How can it know? Well, it turns out that it used LinkedIn’s API to verify that I am <a href="https://www.linkedin.com/in/timbraysoftwareguy/">timbraysoftwareguy</a> over on LinkedIn. But it goes further; LinkedIn has an integration with <a href="https://www.clearme.com">Clear</a>, the airport-oriented identity provider. To get a Clear account you have to upload government-issued ID, it’s not trivial.</p> <p>So this short sentence expands to (take a deep breath) “The validator extension verified that Adobe said that LinkedIn said that Clear said that the government ID of the person who posted this says that he’s named Timothy Bray.”</p> <p>Note that the first extension’s popup also tells you that Adobe has verified what my LinkedIn and Instagram accounts are. This seems super-useful and I wonder why the other omits it.</p> <p>“<b>App or device used</b>…” is simple enough, but I’m not actually sure how it works; I guess Adobe has embedded a keypair in my Lightroom installation? If I’d taken the picture with a C2PA-equipped camera this is where that history would be displayed.</p> <p>“<b>AI tool used</b> None”. Interesting and useful, since Adobe provides plenty of genAI-powered tools. Of course, this relies on Lightroom telling the truth, but still.</p> <p>The “View More” button doesn’t currently work; it takes you to the interactive <a href="https://contentcredentials.org/verify/">contentcredentials.org/verify</a> page, which seems to fail in retrieving the JPG. If you download the picture then upload it into the verify page (go ahead, it’s free) that seems to work fine. In addition to the info on the popup, the verify page will tell you (nontechically i.e. vaguely) what I did to the picture with Lightroom.</p> <h2 id='p-3'>What’s good about this?</h2> <p>Well, it’s here and it works! There’s all this hype about how cool it will be when the C2PA includes info about what model of camera and lens it used and what the shutter speed was and so on, but eh, who cares really? What matters to me (and should matter to the world) is <em>provenance</em>: Who posted this thing?</p> <p>As I write this, supporters of Israel and Iran are <a href="https://www.404media.co/the-ai-slop-fight-between-iran-and-israel/?ref=daily-stories-newsletter">having an AI Slop Fight</a> with fake war photos and videos. In a C2PA-rich world, you could check; If some clip doesn’t have Content Credentials you should probably be suspicious, and if it does, it matters whether it was uploaded by someone at <a href="https://www.idf.il/en/">IDF.il</a> versus <a href="https://www.bbc.com">BBC.co.uk</a>.</p> <h2 id='p-2'>What’s wrong with this?</h2> <p>Look, I hate to nitpick. I’m overwhelmingly positive on this news, it’s an existence proof that C2PA can be made to work in the wild. My impression is that most of the money and muscle comes from Adobe; good on ’em. But there are things that would make it more useful, and usable by more Web sites. These are not listed in any particular order.</p> <h2 id='p-7'>Identity!</h2> <p>Adobe, it’s nice that you let me establish my identity with LinkedIn, Instagram, and Clear. But what I’d <em>really</em> like is if you could also verify and sign my Fediverse and Bluesky handles. And, Fediverse and ATProto developers, would you please, first of all, stop stripping C2PA manifests from uploaded photo EXIF, and secondly, add your own link to the C2PA chain saying something like “Originally posted by @[email protected].”</p> <p>Because having verifiable media provenance in the world of social media would be a strong tool against disinformation and slop.</p> <p>Oh, and another note to Adobe: When I export a photo, the embed-manifest also offers me the opportunity, under the heading “Web3”, to allow the image “be used for NFT creative attribution on supported marketplaces” where the supported marketplaces are Phantom and MetaMask. Seriously, folks, in 2025? Please get this scammy cryptoslime out of my face.</p> <h2 id='p-4'>Browsers please…</h2> <p>This was done with Chrome extensions. There are people working on extensions for Firefox and Safari, but they’re not here yet. Annoyingly, the extensions also don’t seem to work in mobile Chrome, which is where most people look at most media.</p> <p>I would love it if this were done directly and automatically by the browser. The major browsers aren’t perfect, but their creators are known to take security seriously, and I’d be much happier trusting one of them, rather than an extension from a company I’d never previously heard of.</p> <h2 id='p-8'>… or maybe JavaScript?</h2> <p>The next-best solution would be a nice JS package that just Does The Right Thing. It should work like the way I do fonts: If you look in the source for the page you are now reading, the splodge of JS at the top includes a couple of lines that mention “typekit.com”. Typekit (since acquired by Adobe) offers access to a huge selection of excellent fonts. Those JS invocations result in the text you are now reading being displayed in <a href="/ongoing/When/201x/2011/07/17/Tisa">FF Tisa Web Pro</a>.</p> <p>Which<span class='dashes'> —</span> this is important<span class='dashes'> —</span> is not free. And to be clear, I am willing to pay to get Content Credentials for the pictures on this blog. It feels exactly like paying a small fee for access to a professionally-managed font library. Operating a Content-Credentials service wouldn’t be free, it’d require running a server and wrangling certs. At scale, though, it should be pretty cheap.</p> <p>So here’s an offer: If someone launches a service that allows me to straightforwardly include the fact that this picture was sourced from tbray.org in my Content Credentials, my wallet is (modestly) open.</p> <p>By the way, the core JavaScript code is already under construction; here’s <a href="https://github.com/microsoft/c2pa-extension-validator">Microsoft</a> and the <a href="https://opensource.contentauthenticity.org/docs/introduction">Content Authority Initiative</a> itself. There’s also a Rust crate for server-side use, and a “c2patool” command-line utility based on it..</p> <h2 id='p-6'>Open-Source issues</h2> <p>You’ll notice that the right-click-for-Content-Credentials doesn’t work on the smaller version of the picture embedded in the text you are now reading; just the larger one. This is because the decades-old Perl-based <span class='o'>ongoing</span> publishing software runs the main-page pictures through <a href="https://imagemagick.org/index.php">ImageMagick</a>, which doesn’t do C2PA. I should find a way to route around this.</p> <p>In fact, it wouldn’t be rocket science for ImageMagick (or open-source packages generally) to write C2PA manifests and insert them in the media files they create. But how should they sign them? As noted, that requires a server that provides cert-based signatures, something that nobody would expect from even well-maintained open-source packages.</p> <p>I dunno, maybe someone should provide a managed-ImageMagick service that (for a small fee) offers signed-C2PA-manifest embedding?</p> <h2 id='p-9'>What’s next?</h2> <p>The work that needs to be done is nontrivial but, frankly, not that taxing. And the rewards would be high. Because it feels like a no-brainer that knowing who posted something is a big deal. Also the inverse: Knowing that you <em>don’t</em> know who posted it.</p> <p>Where is it an especially big deal? On social media, obviously. It’s really time for those guys to start climbing on board.</p> </div></content></entry> <entry> <title>AI Angst</title> <link href='https://www.tbray.org/ongoing/When/202x/2025/06/06/My-AI-Angst' /> <link rel='replies' thr:count='13' type='application/xhtml+xml' href='/ongoing/When/202x/2025/06/06/My-AI-Angst#comments' /> <id>https://www.tbray.org/ongoing/When/202x/2025/06/06/My-AI-Angst</id> <published>2025-06-06T12:00:00-07:00</published> <updated>2025-06-08T15:39:49-07:00</updated> <category scheme='https://www.tbray.org/ongoing/What/' term='Technology/AI' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Technology' /> <category scheme='https://www.tbray.org/ongoing/What/' term='AI' /> <summary type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>My input stream is full of it: Fear and loathing and cheerleading and prognosticating on what generative AI means and whether it’s Good or Bad and what we should be doing. All the channels: Blogs and peer-reviewed papers and social-media posts and business-news stories. So there’s lots of AI angst out there, but this is mine. I think the following is a bit unique because it focuses on cost, working backward from there. As for the genAI tech itself, I guess I’m a moderate; there is a there there, it’s not all slop. But first…</div></summary> <content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'> <p>My input stream is full of it: Fear and loathing and cheerleading and prognosticating on what generative AI means and whether it’s Good or Bad and what we should be doing. All the channels: Blogs and peer-reviewed papers and social-media posts and business-news stories. So there’s lots of AI angst out there, but this is mine. I think the following is a bit unique because it focuses on cost, working backward from there. As for the genAI tech itself, I guess I’m a moderate; there is a there there, it’s not all slop. But first…</p> <h2 id='p-5'>The rent is too damn high</h2> <p>I promise I’ll talk about genAI applications but let’s start with money. <em>Lots</em> of money, big numbers! For example, venture-cap startup money pouring into AI, which as of now apparently adds up to <a href="https://finance.yahoo.com/news/how-nvidia-played-a-central-role-in-the-306-billion-ai-startup-boom-195741749.html">$306 billion</a>. And that’s just startups; Among the giants, Google alone <a href="https://www.ciodive.com/news/google-cloud-generative-ai-data-center-capacity-buildouts/739357/">apparently plans $75B</a> in capital expenditure on AI infrastructure, and they represent maybe a quarter at most of cloud capex. You think those are big numbers? McKinsey offers <a href="https://www.mckinsey.com/industries/technology-media-and-telecommunications/our-insights/the-cost-of-compute-a-7-trillion-dollar-race-to-scale-data-centers">The cost of compute: A $7 trillion race to scale data centers</a>.</p> <p>Obviously, lots of people are wondering when and where the revenue will be to pay for it all. There’s one thing we know for sure: The pro-genAI voices are fueled by hundreds of billions of dollars worth of fear and desire; fear that it’ll never pay off and desire for a piece of the money. Can you begin to imagine the pressure for revenue that investors and executives and middle managers are under?</p> <p><a href="https://cosocial.ca/@timbray/114572118905328515">Here’s an example</a> of the kind of debate that ensues.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/06/06/Anil-MCP.png" alt="Anil Dash on Mastodon, on MCP vs the Fediverse" /> <div class='caption'><p>“MCP” is <a href="https://en.wikipedia.org/wiki/Model_Context_Protocol">Model Context Protocol</a>, used for communicating between LLM software and other systems and services.<br/>I have no opinion as to its quality or utility.</p></div> <p>I suggest that when you’re getting a pitch for genAI technology, you should have that greed and fear in the back of your mind. Or maybe at the front.</p> <h2 id='p-7'>And that’s just the money</h2> <p>For some reason, I don’t hear much any more about the environmental cost of genAI, the gigatons of carbon pouring out of the system, imperilling my children’s future. Let’s please not ignore that; let’s read things like <a href="https://www.eesi.org/articles/view/data-center-energy-needs-are-upending-power-grids-and-threatening-the-climate">Data Center Energy Needs Could Upend Power Grids and Threaten the Climate</a> and let’s make sure every freaking conversation about genAI acknowledges this grievous cost.</p> <p>Now let’s look at a few sectors where genAI is said to be a big deal: Coding, teaching, and professional communication. To keep things balanced, I’ll start in a space where I have kind things to say.</p> <h2 id='p-2'>Coding</h2> <p>Wow, is my tribe ever melting down. The pro- and anti-genAI factions are hurling polemical thunderbolts at each other, and I mean extra hot and pointy ones. For example, here are 5600 words entitled <a href="https://blog.glyph.im/2025/06/i-think-im-done-thinking-about-genai-for-now.html">I Think I’m Done Thinking About genAI For Now</a>. Well-written words, too.</p> <p>But, while I have a lot of sympathy for the contras and am sickened by some of the promoters, at the moment I’m mostly in tune with Thomas Ptacek’s <a href="https://fly.io/blog/youre-all-nuts/">My AI Skeptic Friends Are All Nuts</a>. It’s long and (fortunately) well-written and I (mostly) find it hard to disagree with.</p> <p>it’s as simple as this: I keep hearing talented programmers whose integrity I trust tell me “Yeah, LLMs are helping me get shit done.” The probability that they’re all lying or being fooled seems very low.</p> <p>Just to be clear, I note an absence of concern for cost and carbon in these conversations. Which is unacceptable. But let’s move on.</p> <p>It’s worth noting that I learned two useful things from Ptacek’s essay that I hadn’t really understood. First, the “agentic” architecture of programming tools: You ask the agent to create code and it asks the LLM, which will sometimes hallucinate; the agent will observe that it doesn’t compile or makes all the unit tests fail, discards it, and re-prompts. If it takes the agent module 25 prompts to generate code that while imperfect is at least correct, who cares?</p> <p>Second lesson, and to be fair this is just anecdata: It feels like the Go programming language is especially well-suited to LLM-driven automation. It’s small, has a large standard library, and a culture that has strong shared idioms for doing almost anything. Anyhow, we’ll find out if this early impression stands up to longer and wider industry experience.</p> <p>Turning our attention back to cost, let’s assume that eventually all or most developers become somewhat LLM-assisted. Are there enough of them, and will they pay enough, to cover all that investment? Especially given that models that are both open-source and excellent are certain to proliferate? Seems dubious.</p> <p>Suppose that, as Ptacek suggests, LLMs/agents allow us to automate the tedious low-intellectual-effort parts of our job. Should we be concerned about how junior developers learn to get past that “easy stuff” and on the way to senior skills? That seems a very good question, so…</p> <h2 id='p-10'>Learning</h2> <p>Quite likely you’ve already seen Jason Koebler’s <a href="https://www.404media.co/teachers-are-not-ok-ai-chatgpt/?ref=daily-stories-newsletter">Teachers Are Not OK</a>, a frankly horrifying survey of genAI’s impact on secondary and tertiary education. It is a tale of unrelieved grief and pain and wreckage. Since genAI isn’t going to go away and students aren’t going to stop being lazy, it seems like we’re going to re-invent the way people teach and learn.</p> <p>The stories of students furiously deploying genAI to avoid the effort of actually, you know, learning, are sad. Even sadder are those of genAI-crazed administrators leaning on faculty to become more efficient and “businesslike” by using it.</p> <p>I really don’t think there’s a coherent pro-genAI case to be made in the education context.</p> <h2 id='p-11'>Professional communication</h2> <p>If you want to use LLMs to automate communication with your family or friends or lovers, there’s nothing I can say that will help you. So let’s restrict this to conversation and reporting around work and private projects and voluntarism and so on.</p> <p>I’m pretty sure this is where the people who think they’re going to make big money with AI think it’s going to come from. If you’re interested in that thinking, <a href="https://docs.google.com/presentation/d/1Der8WWGeVxdOWx37bMV_nj9N1tUAVcvSSRa6qxKx75g/edit?slide=id.p1#slide=id.p1">here’s a sample</a>; a slide deck by a Keith Riegert for the book-publishing business which, granted, is a bit stagnant and a whole lot overconcentrated these days. I suspect scrolling through it will produce a strong emotional reaction for quite a few readers here. It’s also useful in that it talks specifically about costs.</p> <p>That is for corporate-branded output. What about personal or internal professional communication; by which I mean emails and sales reports and committee drafts and project pitches and so on? I’m pretty negative about this. If your email or pitch doc or whatever needs to be summarized, or if it has the colorless affectless error-prone polish of 2025’s LLMs, I would probably discard it unread. I already found the switch to turn off Gmail’s attempts to summarize my emails.</p> <p>What’s the genAI world’s equivalent of “Tl;dr”? I’m thinking “TA;dr” (A for AI) or “Tg;dr” (g for genAI) or just “LLM:dr”.</p> <p>And this vision of everyone using genAI to amplify their output and everyone else using it to summarize and filter their input feels simply perverse.</p> <p>Here’s what I think is <a href="https://infosec.exchange/@codinghorror/114606355212363074">an important finding</a>, ably summarized by Jeff Atwood:</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/06/06/Dare-Jeff.png" alt="Dare Obasanjo and Jeff Atwood on how to survive AI" /> <p>Seriously, since LLMs by design emit streams that are optimized for plausibility and for harmony with the model’s training base, in an AI-centric world there’s a powerful incentive to say things that are implausible, that are out of tune, that are, bluntly, weird. So there’s one upside.</p> <p>And let’s go back to cost. Are the prices in Riegert’s slide deck going to pay for trillions in capex? Another example: My family has a Google workplace account, and the price just went up from $6/user/month to $7. The announcement from Google emphasized that this was related to the added value provided by Gemini. Is $1/user/month gonna make this tech make business sense?</p> <h2 id='p-13'>What I can and can’t buy</h2> <p>I can sorta buy the premise that there are genAI productivity boosts to be had in the code space and maybe some other specialized domains. I can’t buy for a second that genAI is anything but toxic for anything education-related. On the business-communications side, it’s damn well gonna be tried because billions of dollars and many management careers depend on it paying off. We’ll see but I’m skeptical.</p> <p>On the money side? I don’t see how the math and the capex work. And all the time, I think about the carbon that’s poisoning the planet my children have to live on.</p> <p>I think that the best we can hope for is the eventual financial meltdown leaving a few useful islands of things that are actually useful at prices that make sense.</p> <p>And in a decade or so, I can see business-section stories about all the big data center shells that were never filled in, standing there empty, looking for another use. It’s gonna be tough, what can you do with buildings that have no windows?</p> </div></content></entry> <entry> <title>Union of Finite Automata</title> <link href='https://www.tbray.org/ongoing/When/202x/2024/07/28/Union-of-Finite-Automata' /> <link rel='replies' thr:count='0' type='application/xhtml+xml' href='/ongoing/When/202x/2024/07/28/Union-of-Finite-Automata#comments' /> <id>https://www.tbray.org/ongoing/When/202x/2024/07/28/Union-of-Finite-Automata</id> <published>2024-07-28T12:00:00-07:00</published> <updated>2025-06-02T11:49:20-07:00</updated> <category scheme='https://www.tbray.org/ongoing/What/' term='Technology/Quamina Diary' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Technology' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Quamina Diary' /> <summary type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>In building Quamina, I needed to compute the union of two finite automata (FAs). I remembered from some university course 100 years ago that this was possible in theory, so I went looking for the algorithm, but was left unhappy. The descriptions I found tended to be hyper-academic, loaded with mathematical notation that I found unhelpful, and didn’t describe an approach that I thought a reasonable programmer would reasonably take. The purpose of this <span class="o">ongoing</span> entry is to present a programmer-friendly description of the problem and of the algorithm I adopted, with the hope that some future developer, facing the same problem, will have a more satisfying search experience.<br/> <i>[Important update: There’s a serious error halfway through; see <a href='#p-9'>here</a>.]</i></div></summary> <content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'> <p>In building Quamina, I needed to compute the union of two finite automata (FAs). I remembered from some university course 100 years ago that this was possible in theory, so I went looking for the algorithm, but was left unhappy. The descriptions I found tended to be hyper-academic, loaded with mathematical notation that I found unhelpful, and didn’t describe an approach that I thought a reasonable programmer would reasonably take. The purpose of this <span class='o'>ongoing</span> entry is to present a programmer-friendly description of the problem and of the algorithm I adopted, with the hope that some future developer, facing the same problem, will have a more satisfying search experience.<br/> <i>[Important update: There’s a serious error halfway through; see <a href="#p-9">here</a>.]</i></p> <p>There is very little math in this discussion (a few subscripts), and no circles-and-arrows pictures. But it does have working Go code.</p> <h2 id='p-1'>Finite automata?</h2> <p>I’m not going to rehash the theory of FAs (often called state machines). In practice the purpose of an FA is to match (or fail to match) some input against some pattern. What the software does when the input matches the pattern (or doesn’t) isn’t relevant to our discussion today. Usually the inputs are strings and the patterns are regular expressions or equivalent. In practice, you compile a pattern into an FA, and then you go through the input, character by character, trying to traverse the FA to find out whether it matches the input.</p> <p>An FA has a bunch of states, and for each state there can be a list of input symbols that lead to transitions to other states. What exactly I mean by “input symbol” turns out to be interesting and affects your choice of algorithm, but let’s ignore that for now.</p> <p>The following statements apply:</p> <ol> <li><p>One state is designated as the “start state” because, well, that’s where you start.</p></li> <li><p>Some states are called “final”, and reaching them means you’ve matched one or more patterns. In Quamina’s FAs, each state has an extra field (usually empty) saying “if you got here you matched P*, yay!”, where P* is a list of labels for the (possibly more than one) patterns you matched.</p></li> <li><p>It is possible that you’re in a state and for some particular input, you transition to more than one other state. If this is true, your FA is <em>nondeterministic</em>, abbreviated NFA.</p></li> <li><p>It is possible that a state can have one or more “epsilon transitions”, ones that you can just take any time, not requiring any particular input. (I wrote about this in <a href="/ongoing/When/202x/2024/06/17/Epsilon-Love">Epsilon Love</a>.) Once again, if this is true, you’ve got an NFA. If neither this statement nor the previous are true, it’s a <em>deterministic</em> finite automaton, DFA.</p></li> </ol> <p>The discussion here works for NFAs, but lots of interesting problems can be solved with DFAs, which are simpler and faster, and this algorithm works there too.</p> <h2 id='p-2'>Union?</h2> <p>If I have <code>FA1</code> that matches “foo” and <code>FA2</code> that matches “bar”, then their union, <code>FA1 ∪ FA2</code>, matches both “foo” and “bar”. In practice Quamina often computes the union of a large number of FAs, but it does so a pair at a time, so we’re only going to worry about the union of two FAs.</p> <h2 id='p-3'>The academic approach</h2> <p>There are plenty of Web pages and YouTubes covering this. Most of them are full of Greek characters and math symbols. They go like this:</p> <ol> <li><p>You have two FAs, call them <code>A</code> and <code>B</code>. <code>A</code> has states <code>A<sub>1</sub></code>, … <code>A<sub>maxA</sub></code>, <code>B</code> has <code>B<sub>1</sub></code>, … <code>B<sub>maxB</sub></code></p></li> <li><p>The union contains all the states in <code>A</code>, all the states in <code>B</code>, and the “product” of <code>A</code> and <code>B</code>, which is to say states you could call <code>A<sub>1</sub>B<sub>1</sub></code>, <code>A<sub>1</sub>B<sub>2</sub></code>, <code>A<sub>2</sub>B<sub>1</sub></code>, <code>A<sub>2</sub>B<sub>2</sub></code>, … <code>A<sub>maxA</sub>B<sub>maxB</sub></code>.</p></li> <li><p>For each state <code>A<sub>X</sub>B<sub>Y</sub></code>, you work out its transitions by looking at the transitions of the two states being combined. For some input symbol, if <code>A<sub>X</sub></code> has a transition to <code>A<sub>XX</sub></code> but <code>B<sub>Y</sub></code> has no transition, then the combined state just has the A transition. The reverse for an input where <code>B<sub>Y</sub></code> has a transition but <code>A<sub>X</sub></code> doesn’t. And if <code>A<sub>X</sub></code> transitions to <code>A<sub>XX</sub></code> and <code>B<sub>Y</sub></code> transitions to <code>B<sub>YY</sub></code>, then the transition is to <code>A<sub>XX</sub>B<sub>YY</sub></code>.</p></li> <li><p>Now you’ll have a lot of states, and it usually turns out that many of them aren’t reachable. But there are plenty of algorithms to filter those out. You’re done, you’ve computed the union and <code>A<sub>1</sub>B<sub>1</sub></code> is its start state!</p></li> </ol> <h2 id='p-4'>Programmer-think</h2> <p>If you’re like me, the idea of computing all the states, then throwing out the unreachable ones, feels wrong. So here’s what I suggest, and has worked well in practice for Quamina:</p> <ol> <li><p>First, merge <code>A<sub>1</sub></code> and <code>B<sub>1</sub></code> to make your new start state <code>A<sub>1</sub>B<sub>1</sub></code>. Here’s how:</p></li> <li><p>If an input symbol causes no transitions in either <code>A<sub>1</sub></code> or <code>B<sub>1</sub></code>, it also doesn’t cause any in <code>A<sub>1</sub>B<sub>1</sub></code>.</p></li> <li><p>If an input symbol causes a transition in <code>A<sub>1</sub></code> to <code>A<sub>X</sub></code> but no transition in <code>B<sub>1</sub></code>, then you adopt <code>A<sub>X</sub></code> into the union, and any other <code>A</code> states it points to, and any they point to, and so on.</p></li> <li><p>And of course if <code>B<sub>1</sub></code> has a transition to <code>B<sub>Y</sub></code> but <code>A<sub>1</sub></code> doesn’t transition, you flip it the other way, adopting <code>B<sub>Y</sub></code> and its descendents.</p></li> <li><p>And if <code>A<sub>1</sub></code> transitions to <code>A<sub>X</sub></code> and <code>B<sub>1</sub></code> transitions to <code>B<sub>Y</sub></code>, then you adopt a new state <code>A<sub>X</sub>B<sub>Y</sub></code>, which you compute recursively the way you just did for <code>A<sub>1</sub>B<sub>1</sub></code>. So you’ll never compute anything that’s not reachable.</p></li> </ol> <p>I could stop there. I think that’s enough for a competent developers to get the idea? But it turns out there are a few details, some of them interesting. So, let’s dig in.</p> <h2 id='p-5'>“Input symbol”?</h2> <p>The academic discussion of FAs is very abstract on this subject, which is fair enough, because when you’re talking about how to build, or traverse, or compute the union of FAs, the algorithm doesn’t depend very much on what the symbols actually are. But when you’re writing code, it turns out to matter a lot.</p> <p>In practice, I’ve done a lot of work with FAs over the years, and I’ve only ever seen four things used as input symbols to drive them. They are:</p> <ul> <li><p>Unicode “characters” represented by code points, integers in the range 0…1,114,111 inclusive.</p></li> <li><p>UTF-8 bytes, which have values in the range 0…244 inclusive.</p></li> <li><p>UTF-16 values, unsigned 16-bit integers. I’ve only ever seen this used in Java programs because that’s what its native <code>char</code> type is. You probably don’t want to do this.</p></li> <li><p>Enum values, small integers with names, which tend to come in small collections.</p></li> </ul> <p>As I said, this is all I’ve seen, but 100% of the FAs that I’ve seen automatically generated and subject to set-arithmetic operations like Union are based on UTF-8. And that’s what Quamina uses, so that’s what I’m going to use in the rest of this discussion.</p> <h2 id='p-7'>Code starts here</h2> <p>This comes from Quamina’s <a href="https://github.com/timbray/quamina/blob/main/nfa.go">nfa.go</a>. We’re going to look at the function <code>mergeFAStates</code>, which implements the merge-two-states logic described above.</p> <p>Lesson: This process can lead to a lot of wasteful work. Particularly if either or both of the states transition on ranges of values like <code>0…9</code> or <code>a…z</code>. So we only want to do the work merging any pair of states once, and we want there only to be one merged value. Thus we start with a straightforward memo-ization.</p> <div class="tbc"><pre> <span class="kd">func</span><span class="w"> </span><span class="nx">mergeFAStates</span><span class="p">(</span><span class="nx">state1</span><span class="p">,</span><span class="w"> </span><span class="nx">state2</span><span class="w"> </span><span class="o">*</span><span class="nx">faState</span><span class="p">,</span><span class="w"> </span><span class="nx">keyMemo</span><span class="w"> </span><span class="kd">map</span><span class="p">[</span><span class="nx">faStepKey</span><span class="p">]</span><span class="o">*</span><span class="nx">faState</span><span class="p">)</span><span class="w"> </span><span class="o">*</span><span class="nx">faState</span><span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="c1">// try to memo-ize</span> <span class="w"> </span><span class="nx">mKey</span><span class="w"> </span><span class="o">:=</span><span class="w"> </span><span class="nx">faStepKey</span><span class="p">{</span><span class="nx">state1</span><span class="p">,</span><span class="w"> </span><span class="nx">state2</span><span class="p">}</span> <span class="w"> </span><span class="nx">combined</span><span class="p">,</span><span class="w"> </span><span class="nx">ok</span><span class="w"> </span><span class="o">:=</span><span class="w"> </span><span class="nx">keyMemo</span><span class="p">[</span><span class="nx">mKey</span><span class="p">]</span> <span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="nx">ok</span><span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nx">combined</span> <span class="w"> </span><span class="p">}</span> </pre> <p>Now some housekeeping. Remember, I noted above that any state might contain a signal saying that arriving here means you’ve matched pattern(s). This is called <code>fieldTransitions</code>, and the merged state obviously has to match all the things that either of the merged states match. Of course, in the vast majority of cases neither merged state matched anything and so this is a no-op.</p> <pre> <span class="w"> </span><span class="nx">fieldTransitions</span><span class="w"> </span><span class="o">:=</span><span class="w"> </span><span class="nb">append</span><span class="p">(</span><span class="nx">state1</span><span class="p">.</span><span class="nx">fieldTransitions</span><span class="p">,</span><span class="w"> </span><span class="nx">state2</span><span class="p">.</span><span class="nx">fieldTransitions</span><span class="o">...</span><span class="p">)</span></pre> <p>Since our memo-ization attempt came up empty, we have to allocate an empty structure for the new merged state, and add it to the memo-izer.</p> <pre> <span class="w"> </span><span class="nx">combined</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="o">&</span><span class="nx">faState</span><span class="p">{</span><span class="nx">table</span><span class="p">:</span><span class="w"> </span><span class="nx">newSmallTable</span><span class="p">(),</span><span class="w"> </span><span class="nx">fieldTransitions</span><span class="p">:</span><span class="w"> </span><span class="nx">fieldTransitions</span><span class="p">}</span> <span class="w"> </span><span class="nx">keyMemo</span><span class="p">[</span><span class="nx">mKey</span><span class="p">]</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="nx">combined</span></pre> <p>Here’s where it gets interesting. The algorithm talks about looking at the inputs that cause transitions in the states we’re merging. How do you find them? Well, in the case where you’re transitioning on UTF-8 bytes, since there are only 244 values, why not do the simplest thing that could possibly work and just check each byte value?</p> <p>Every Quamina state contains a table that encodes the byte transitions, which operates like the Go construct <code>map[byte]state</code>. Those tables are implemented in <a href="/ongoing/When/202x/2022/06/25/Small-Tables">a compact data structure optimized for fast traversal</a>. But for doing this kind of work, it’s easy to “unpack” them into a fixed-sized table; in Go, <code>[244]state</code>. Let’s do that for the states we’re merging and for the new table we’re building.</p> <pre><span class="w"> </span><span class="nx">u1</span><span class="w"> </span><span class="o">:=</span><span class="w"> </span><span class="nx">unpackTable</span><span class="p">(</span><span class="nx">state1</span><span class="p">.</span><span class="nx">table</span><span class="p">)</span> <span class="w"> </span><span class="nx">u2</span><span class="w"> </span><span class="o">:=</span><span class="w"> </span><span class="nx">unpackTable</span><span class="p">(</span><span class="nx">state2</span><span class="p">.</span><span class="nx">table</span><span class="p">)</span> <span class="w"> </span><span class="kd">var</span><span class="w"> </span><span class="nx">uComb</span><span class="w"> </span><span class="nx">unpackedTable</span></pre> <p><code>uComb</code> is where we’ll fill in the merged transitions.</p> <p>Now we’ll run through all the possible input values; <code>i</code> is the byte value, <code>next1</code> and <code>next2</code> are the transitions on that value. In practice, <code>next1</code> and <code>next2</code> are going to be null most of the time.</p> <pre><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="nx">i</span><span class="p">,</span><span class="w"> </span><span class="nx">next1</span><span class="w"> </span><span class="o">:=</span><span class="w"> </span><span class="k">range</span><span class="w"> </span><span class="nx">u1</span><span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="nx">next2</span><span class="w"> </span><span class="o">:=</span><span class="w"></span><span class="nx"> u2</span><span class="p">[</span><span class="nx">i</span><span class="p">]</span></pre> <p>Here’s where we start building up the new transitions in the unpacked array <code>uComb</code>.</p> <p>For many values of <code>i</code>, you can avoid actually merging the states to create a new one. If the transition is the same in both input FAs, or if either of them are null, or if the transitions for this value of <code>i</code> are the same as for the last value. This is all about avoiding unnecessary work and the <code>switch</code>/<code>case</code> structure is the result of a bunch of profiling and optimization.</p> <pre><span class="w"> </span><span class="k">switch</span><span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="nx">next1</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nx">next2</span><span class="p">:</span><span class="w"> </span><span class="c1">// no need to merge</span> <span class="w"> </span><span class="nx">uComb</span><span class="p">[</span><span class="nx">i</span><span class="p">]</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="nx">next1</span> <span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="nx">next2</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="kc">nil</span><span class="p">:</span><span class="w"> </span><span class="c1">// u1 must be non-nil</span> <span class="w"> </span><span class="nx">uComb</span><span class="p">[</span><span class="nx">i</span><span class="p">]</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="nx">next1</span> <span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="nx">next1</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="kc">nil</span><span class="p">:</span><span class="w"> </span><span class="c1">// u2 must be non-nil</span> <span class="w"> </span><span class="nx">uComb</span><span class="p">[</span><span class="nx">i</span><span class="p">]</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="nx">next2</span> <span class="w"> </span><span class="k">case</span><span class="w"> </span><span class="nx">i</span><span class="w"> </span><span class="p">></span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="nx">next1</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nx">u1</span><span class="p">[</span><span class="nx">i</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="w"> </span><span class="o">&&</span><span class="w"> </span><span class="nx">next2</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="nx">u2</span><span class="p">[</span><span class="nx">i</span><span class="o">-</span><span class="mi">1</span><span class="p">]:</span><span class="w"> </span><span class="c1">// dupe of previous step - happens a lot</span> <span class="w"> </span><span class="nx">uComb</span><span class="p">[</span><span class="nx">i</span><span class="p">]</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="nx">uComb</span><span class="p">[</span><span class="nx">i</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span></pre> <p>If none of these work, we haven’t been able to avoid merging the two states. We do that by a recursive call to invoke all the logic we just discussed.</p> <p>There is a complication. The automaton might be nondeterministic, which means that there might be more than one transition for some byte value. So the data structure actually behaves like <code>map[byte]*faNext</code>, where <code>faNext</code> is a wrapper for a list of states you can transition to.</p> <p>So here we’ve got a nested loop to recurse for each possible combination of transitioned-to states that can occur on this byte value. In a high proportion of cases the FA is deterministic, so there’s only one state from each FA being merged and this nested loop collapses to a single recursive call.</p> <pre><span class="w"> </span><span class="k">default</span><span class="p">:</span><span class="w"> </span><span class="c1">// have to recurse & merge</span> <span class="w"> </span><span class="kd">var</span><span class="w"> </span><span class="nx">comboNext</span><span class="w"> </span><span class="p">[]</span><span class="o">*</span><span class="nx">faState</span> <span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="nx">_</span><span class="p">,</span><span class="w"> </span><span class="nx">nextStep1</span><span class="w"> </span><span class="o">:=</span><span class="w"> </span><span class="k">range</span><span class="w"> </span><span class="nx">next1</span><span class="p">.</span><span class="nx">states</span><span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="nx">_</span><span class="p">,</span><span class="w"> </span><span class="nx">nextStep2</span><span class="w"> </span><span class="o">:=</span><span class="w"> </span><span class="k">range</span><span class="w"> </span><span class="nx">next2</span><span class="p">.</span><span class="nx">states</span><span class="w"> </span><span class="p">{</span> <span class="w"> </span><span class="nx">comboNext</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="nb">append</span><span class="p">(</span><span class="nx">comboNext</span><span class="p">,</span><span class="w"> </span><span class="nx">mergeFAStates</span><span class="p">(</span><span class="nx">nextStep1</span><span class="p">,</span><span class="w"> </span><span class="nx">nextStep2</span><span class="p">,</span><span class="w"> </span><span class="nx">keyMemo</span><span class="p">))</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="nx">uComb</span><span class="p">[</span><span class="nx">i</span><span class="p">]</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="o">&</span><span class="nx">faNext</span><span class="p">{</span><span class="nx">states</span><span class="p">:</span><span class="w"> </span><span class="nx">comboNext</span><span class="p">}</span> <span class="w"> </span><span class="p">}</span> <span class="w"> </span><span class="p">}</span></pre> <p>We’ve filled up the unpacked state-transition table, so we’re almost done. First, we have to compress it into its optimized-for-traversal form.</p> <pre><span class="w"> </span><span class="nx">combined</span><span class="p">.</span><span class="nx">table</span><span class="p">.</span><span class="nx">pack</span><span class="p">(</span><span class="o">&</span><span class="nx">uComb</span><span class="p">)</span></pre> <p>Remember, if the FA is nondeterministic, each state can have “epsilon” transitions which you can follow any time without requiring any particular input. The merged state needs to contain all the epsilon transitions from each input state.</p> <pre><span class="w"> </span><span class="nx">combined</span><span class="p">.</span><span class="nx">table</span><span class="p">.</span><span class="nx">epsilon</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="nb">append</span><span class="p">(</span><span class="nx">state1</span><span class="p">.</span><span class="nx">table</span><span class="p">.</span><span class="nx">epsilon</span><span class="p">,</span><span class="w"> </span><span class="nx">state2</span><span class="p">.</span><span class="nx">table</span><span class="p">.</span><span class="nx">epsilon</span><span class="o">...</span><span class="p">)</span> <span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="nx">combined</span> <span class="p">}</span></pre> </div> <p>And, we’re done. I mean, we are once all those recursive calls have finished crawling through the states being merged.</p> <h2 id='p-9'>Oops</h2> <p>The discussion of epsilons above is wrong, in a way that’s harder to reproduce than you might think. The discussion is still correct for DFA’s and (weirdly) (I think) (not sure why yet) the shell-style “wildcard” <code>*</code> operator, which means <code>.*</code> in a regular expression.</p> <p>It’s not clear that in general there’s a way to merge (Quamina-style) two NFA states when either or both of them have epsilon transitions. Per the academic literature, the right way to get the union of two NFAs is to have an empty branch state with two epsilon transitions, one to each NFA. So you traverse the two in parallel.</p> <p>It took me a a whole lot of pain to figure this out and I haven’t entirely worked out the best implementation. I promise more regular-expressions-at-scale walls of text and code in this space when I do.</p> <p>I write this because when you type “merge nondeterministic finite automata” into Web search, the blog you are now reading is dangerously high in the search results.</p> <h2 id='p-8'>Is that efficient?</h2> <p>As I said above, this is an example of a “simplest thing that could possibly work” design. Both the recursion and the unpack/pack sequence are kind of code smells, suggesting that this could be a pool of performance quicksand.</p> <p>But apparently not. I ran a benchmark where I added 4,000 patterns synthesized from the Wordle word-list; each of them looked like this:</p> <p><code>{"allis": { "biggy": [ "ceils", "daisy", "elpee", "fumet", "junta", … </code> (195 more).</p> <p>This produced a <em>huge</em> deterministic FA with about 4.4 million states, with the addition of these hideous worst-case patterns running at 500/second. Good enough for rock ’n’ roll.</p> <p>How about nondeterministic FAs? I went back to that Wordle source and, for each of its 12,959 words, added a pattern with a random wildcard; here are three of them:</p> <p><code>{"x": [ {"shellstyle": "f*ouls" } ] }<br/> {"x": [ {"shellstyle": "pa*sta" } ] }<br/> {"x": [ {"shellstyle": "utter*" } ] }</code></p> <p>This produced an NFA with 46K states, the addition process ran at 70K patterns/second. </p> <p>Sometimes the simplest thing that could possibly work, works.</p> </div></content></entry> <entry> <title>Perfectly Different Colors</title> <link href='https://www.tbray.org/ongoing/When/202x/2025/05/31/Colors' /> <link rel='replies' thr:count='3' type='application/xhtml+xml' href='/ongoing/When/202x/2025/05/31/Colors#comments' /> <id>https://www.tbray.org/ongoing/When/202x/2025/05/31/Colors</id> <published>2025-05-31T12:00:00-07:00</published> <updated>2025-06-02T08:51:38-07:00</updated> <category scheme='https://www.tbray.org/ongoing/What/' term='Arts/Photos' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Arts' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Photos' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Arts/Photos/Cameras' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Cameras' /> <summary type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>This considers how two modern cameras handle a difficult color challenge, illustrated by photos of a perfect rose and a piano</div></summary> <content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'> <p>This considers how two modern cameras handle a difficult color challenge, illustrated by photos of a perfect rose and a piano.</p> <p>We moved into our former place in January 1997 and, that summer, discovered the property included this slender little rose that only had a couple blossoms every year, but they were perfection, beautifully shaped and in a unique shade of red I’d never seen anywhere else (and still haven’t). Having no idea of its species, we’ve always called it “our perfect rose”.</p> <p>So when <a href="/ongoing/When/202x/2025/02/28/Moved">we moved</a> last year, we took the rose with us. It seems to like the new joint, has a blossom out and two more on the way and it’s still May.</p> <p>I was looking at it this morning and it occurred to me that its color might be an interesting challenge to the two fine cameras I use regularly, namely a Google Pixel 7 and a Fujifilm X-T5.</p> <p>First the pictures.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/05/31/PXL_20250531_185139866.png" alt="The “perfect” rose." /> <img src="https://www.tbray.org/ongoing/When/202x/2025/05/31/TXT55657.png" alt="The “perfect” rose" /> <h2 id='p-2'>Limitations</h2> <p>First of all, let’s agree that this comparison is horribly flawed. To start with, by the time the pixels have made it from the camera to your screen, they’ve been through Lightroom, possibly a social-media-software uploader and renderer, and then your browser (or mobile app) and screen contribute their opinions. Thus the colors are likely to vary a lot depending where you are and what you’re using.</p> <p>Also, it’s hard to get really comparable shots out of the Pixel and Fuji; their lenses and processors and underlying architectures are really different. I was going to disclose the reported shutter speeds, aperture, and ISO values, but they are so totally non-comparable that I decided that’d be actively harmful. I’ll just say that I tried to let each do its best.</p> <p>I post-processed both, but limited that to cropping; nothing about the color or exposure was touched.</p> <p>And having said all that, I think the exercise retains interest.</p> <h2 id='p-1'>Which?</h2> <p>The Pixel is above, the Fuji below.</p> <p>The Pixel is wrong. The Fuji is… not bad. The blossom’s actual color, to my eye, has a little more orange than I see in the photo; but only a little. The Pixel subtracts the orange and introduces a suggestion of violet that the blossom, to my eye, entirely lacks.</p> <p>Also, the Pixel is artificially sharpening up the petals; in reality, the contrast was low and the shading nuanced; just as presented by the X-T5.</p> <p>Is the Pixel’s rendering a consequence of whatever its sensor is? Or of the copious amount of processing that contributes to Google’s widely-admired (by me too) “computational photography”? I certainly have no idea. And in fact, most of the pictures I share come from my Android because the best camera (this is always true) is the one you have with you. For example…</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/05/31/PXL_20250531_032232026.png" alt="Grand piano by itself in an old church" /> <div class='caption'><p>That same evening we took in a concert put on by the local Chopin Society featuring 89-year-old <a href="MikhailVoskresensky">Mikhail Voskresensky</a>, who plays really fast and loud in an old super-romantic style, just the thing for the music: Very decent Beethoven and Mozart, kind of aimless Grieg, and the highlight, a lovely take on Chopin’s Op. 58 Sonata, then a <cite>Nocturne</cite> in the encores.</p> <p>Anyhow, I think the Camera I Had With Me did fine. This is <a href="https://www.thecathedral.ca/programs/architecture-heritage">Vancouver’s oldest still-standing building</a>, Christ Church Cathedral, an exquisite space for the eyes and ears.</p></div> <p>Maybe I’ll do a bit more conscious color-correction on the Pixel shots in future (although I didn’t on the piano). Doesn’t mean it’s not a great camera.</p> </div></content></entry> <entry> <title>Comparing Numbers Badly</title> <link href='https://www.tbray.org/ongoing/When/202x/2025/05/30/Number-Comparison-Representation' /> <link rel='replies' thr:count='4' type='application/xhtml+xml' href='/ongoing/When/202x/2025/05/30/Number-Comparison-Representation#comments' /> <id>https://www.tbray.org/ongoing/When/202x/2025/05/30/Number-Comparison-Representation</id> <published>2025-05-30T12:00:00-07:00</published> <updated>2025-05-30T16:15:25-07:00</updated> <category scheme='https://www.tbray.org/ongoing/What/' term='Language' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Language' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Technology/Math' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Technology' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Math' /> <summary type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>This is just a gripe about two differently bad ways to compare numbers. They share a good alternative</div></summary> <content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'> <p>This is just a gripe about two differently bad ways to compare numbers. They share a good alternative.</p> <h2 id='p-1'>“Order of magnitude”</h2> <p>Typically sloppy usages: “AI increases productivity by an order of magnitude”, “Revenue from recorded music is orders of magnitude smaller than back in the Eighties”.</p> <p>Everyone reading this probably already knows that “order of magnitude” has a precise meeting: Multiply or divide by ten. But clearly, the people who write news stories and marketing spiels either don’t, or are consciously using the idioms to lie. In particular, they are trying to say “more than” or “less than” in a dramatic and impressive-sounding way.</p> <p>Consider that first example. It is saying that AI delivers a ten-times gain in productivity. If they’d actually said “ten times” people would be more inclined to ask “What units?” and “How did you measure?” This phrase makes me think that its author is probably lying.</p> <p>The second example is even more pernicious. Since “orders” is plural, they are claiming at least two orders of magnitude, i.e. that revenue is down by <em>at least</em> a factor of a hundred. The difference between two, three, and four orders of magnitude is huge! I’d probably argue that the phrase “order<b>s</b> of magnitude” should probably never be used. In this case, I highly doubt that the speaker has any data, and that they’re just trying to say that the revenue is down really a lot.</p> <p>The solution is simple: Say “by a factor of ten” or “ten times as high” or “at least 100 times less.” Assuming your claim is valid, it will be easily understood; Almost everyone has a decent intuitive understanding of what a ten-times or hundred-times difference feels like.</p> <h2 id='p-2'>“Percent”</h2> <p>What actually got me started reading this was reading a claim that some business’s “revenue increased by 250%.” Let’s see. If the revenue were one million and it increased by 10%, it’d be 1.1 million. If it increased by 100% it’d be two million. 200% is three million. So what they meant by 250% is that the revenue increased by a factor of 3.5. It is <em>so much</em> easier to understand “3.5 times” than 250%. Furthermore, I bet a lot of people intuitively feel that 250% means “2.5 times”, which is just wrong.</p> <p>I think quoting percentages is clear and useful for values less than 100. There is nothing wrong with talking about a 20% increase or 75% decrease.</p> <p>So, same solution: For percentages past 100, don’t use them, just say “by a factor of X”. Once again, people have an instant (and usually correct) gut feel for what a 3.5-times increase feels like.</p> <h2 id='p-3'>“But English is a living language!”</h2> <p>Not just living, but also squirmy and slutty, open to both one-night stands and permanent relationships with neologisms no matter how ugly and imports from other dialects no matter how sketchy. Which is to say, there’s nothing I can do to keep “orders of magnitude” from being used to mean “really a lot”.</p> <p>In fact, it’s only a problem when you’re trying to communicate a numeric difference. But that’s an important application of human language.</p> <p>Perversely, I guess you could argue that these bad idioms are useful in helping you detect statements that are probably either ignorant or just lies. Anyhow, now you know that when I hear them, I hear patterns that make me inclined to disbelieve. And I bet I’m not the only one.</p> </div></content></entry> <entry> <title>CL XLVI: Happy Colors</title> <link href='https://www.tbray.org/ongoing/When/202x/2025/05/27/Happy-Colors' /> <link rel='replies' thr:count='0' type='application/xhtml+xml' href='/ongoing/When/202x/2025/05/27/Happy-Colors#comments' /> <id>https://www.tbray.org/ongoing/When/202x/2025/05/27/Happy-Colors</id> <published>2025-05-27T12:00:00-07:00</published> <updated>2025-05-28T21:58:08-07:00</updated> <category scheme='https://www.tbray.org/ongoing/What/' term='The World/Cottage Life' /> <category scheme='https://www.tbray.org/ongoing/What/' term='The World' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Cottage Life' /> <summary type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>Last weekend we were at our cabin on <a href='https://en.wikipedia.org/wiki/Keats_Island_(British_Columbia)'>Keats Island</a> and I came away with two <a href='/ongoing/What/The%20World/Cottage%20Life/'>cottage-life</a> pictures I wanted to write about. To write cheery stuff actually, a rare pleasure in these dark days. Both have a story but this first one’s simple</div></summary> <content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'> <p>Last weekend we were at our cabin on <a href="https://en.wikipedia.org/wiki/Keats_Island_(British_Columbia)">Keats Island</a> and I came away with two <a href="/ongoing/What/The%20World/Cottage%20Life/">cottage-life</a> pictures I wanted to write about. To write cheery stuff actually, a rare pleasure in these dark days. Both have a story but this first one’s simple.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/05/27/PXL_20250525_212106021.png" alt="Evergreen branches in spring with the new life showing" /> <p>It’s just an ordinary evergreen tree, not very tall, nothing special about it. But spring’s here! So at the end of each branch there’s a space where the needles are new and shout their youth in light green, a fragile color as compared to the soberly rich shade of the middle-aged needles further up the branch. Probably a metaphor for something complicated but I just see a tree getting on with the springtime business of tree-ness. Good on it.</p> <p>Now a longer story. What happened was, we had an extra-low tide. Tide is a big deal, we get 17 vertical feet at the extremes which can cause problems for boats and docks and if you happen to arrive with several days worth of supplies at low tide well it sucks to be you, because you’re gonna be toting everything up that much further.</p> <p>But I digress.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/05/27/PXL_20250525_172750708.png" alt="Purple sea stars hide among dark rocks" /> <p>I went for a walk at low tide because you see things that are usually mostly hidden. For example these <a href="https://en.wikipedia.org/wiki/Starfish">starfish</a>, also known as sea stars or even “asteroids”. No, really, check that link.</p> <p>These are <a href="https://en.wikipedia.org/wiki/Pisaster_ochraceus"><i>Pisaster ochraceus</i></a>, distinguished by that pleasing violet color. Have a close look. They’re intertidal creatures hiding from the unaccustomed light and air. The important thing is that they’re more or less whole, which is to say free of <a href="https://en.wikipedia.org/wiki/Sea_star_wasting_disease">wasting disease</a>, of which there’s been a major epizootic in recent years. The disease isn’t subtle, it makes their arms melt away into purple goo; extremely gross.</p> <p>Plus, ecologies being what they are, there are downstream effects. Sea stars predate on sea urchins only recently they haven’t been because wasting disease. It turns out that sea urchins eat the kelp that baby shrimp trying to grow up hide in. Fewer stars, more urchins, less prawns. Which means that the commercial prawn-fishers have been coming up empty and going out of business.</p> <p>Anyhow, seeing a cluster of disease-free stars is nice, whether you’re in the seafood business or you just like the stars for their own sake, as I do.</p> <p>And light-green needles too. And spring. Enjoy it while you can.</p> </div></content></entry> <entry> <title>The Lens of Spring</title> <link href='https://www.tbray.org/ongoing/When/202x/2025/05/17/Springtime-Lens' /> <link rel='replies' thr:count='3' type='application/xhtml+xml' href='/ongoing/When/202x/2025/05/17/Springtime-Lens#comments' /> <id>https://www.tbray.org/ongoing/When/202x/2025/05/17/Springtime-Lens</id> <published>2025-05-17T12:00:00-07:00</published> <updated>2025-05-18T11:53:07-07:00</updated> <category scheme='https://www.tbray.org/ongoing/What/' term='The World/Economics' /> <category scheme='https://www.tbray.org/ongoing/What/' term='The World' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Economics' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Arts/Photos/Cameras' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Arts' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Photos' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Cameras' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Arts/Photos' /> <summary type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>Back in the early days of this blog, I used to publish posts that were mostly pictures of plants and flowers. Especially at this time of year. I think that energy went into Twitter and now the Fediverse, where it’s so easy to take a picture and post it right then. This week I got a freshly-repaired lens back from the shop and it put me in the mood to get closer to the botanical frenzy springing at us from every direction. Herewith four pix of two plants, one of a lens, and more thoughts on a familiar subject: Whether it’s better to repair than to replace</div></summary> <content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'> <p>Back in the early days of this blog, I used to publish posts that were mostly pictures of plants and flowers. Especially at this time of year. I think that energy went into Twitter and now the Fediverse, where it’s so easy to take a picture and post it right then. This week I got a freshly-repaired lens back from the shop and it put me in the mood to get closer to the botanical frenzy springing at us from every direction. Herewith four pix of two plants, one of a lens, and more thoughts on a familiar subject: Whether it’s better to repair than to replace.</p> <p>The lens, by the way, was the <a href="https://www.fujifilm-x.com/en-ca/products/lenses/xf18-55mmf28-4-r-lm-ois/">Fuji 18-55</a> oops its full name is “Fujinon XF18-55mmF2.8-4 R LM OIS” so there. I <a href="/ongoing/When/201x/2013/03/06/Fuji-X-E1-in-Tokyo">bought it</a> in March of 2013 and have dropped it more than once; I have retained 1,432 pictures taken with it over the years. But then it stopped working.</p> <p>More words on that later, but pictures first.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/05/17/TXT55621.png" alt="A yellow Fru Dagmar Hastrup rose blossom" /> <div class='caption'><p>Roses have names and this one is “Fru Dagmar Hastrup”. Therein <a href="/ongoing/When/200x/2008/06/26/Yellow-Rugosa">lies a tale</a> that is either 17 or 111 years old, depending how you count.</p></div> <p>That’s the first picture I took with the repaired 18-55. But then I thought that the whole point of this basic zoom was that you could go wide to capture big things, or long to, well, zoom in on ’em. So I went out front.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/05/17/TXT55626.png" alt="Looking up into the branches of a large deciduous tree" /> <div class='caption'><p>Trees have names too. This is a <a href="https://en.wikipedia.org/wiki/Fraxinus_americana">White Ash</a> (<i>Fraxinus americana</i>).</p></div> <p>That ash is one of the trees lining the street we <a href="/ongoing/When/202x/2025/02/28/Moved">moved onto last October</a>. It’s really immense. Let’s crank the zoom way wide and capture most of it. Doing this reveals really great geometry, so let’s subtract the color and add some <a href="https://nikcollection.dxo.com/nik-silver-efex/">Silver Efex</a> sizzle.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/05/17/TXT55625-Edit.png" alt="Black and white rendition of the spreading branches of a large tree" /> <p>And then we can zoom back in.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/05/17/TXT55628.png" alt="The first fork in the trunk of a large tree, with moss and outgrowths" /> <p>The closer you get, the better it looks.</p> <h2 id='p-1'>Fixing that lens</h2> <p>I like quirky fast compact opinionated prime lenses just as much as the next photoenthusiast, but a decent midrange zoom is just too useful not to have. I could’ve replaced this one with the new-fangled <a href="https://www.fujifilm-x.com/en-ca/products/lenses/xf16-50mmf28-48-r-lm-wr/">16-50mm</a> (also has a long complicated Real Name but never mind). That would cost me extra money and <a href="https://www.youtube.com/watch?v=1rLcCkilADY&t=3s">might not even be better</a>.</p> <p>So I poked around on the Fujifilm Web site and sure enough, they offer repair as a service, just package it up and mail it in. A few days after doing so I got an email quoting me a price and asking for approval, which I granted. You shouldn’t be surprised. Way back in 2011 I wrote <a href="/ongoing/When/201x/2011/10/20/Worth-Repairing">Worth Fixing</a>, the exemplar of which was a different excellent lens. And then just last year my <a href="/ongoing/When/202x/2024/06/01/Parable-of-the-Sofa">Parable of the Sofa</a> touched a few nerves. So I didn’t think very hard about it.</p> <p>But then I realized I hadn’t even checked whether the price was reasonable. So I <a href="https://www.ebay.com/sch/i.html?_nkw=xf18-55">turned to eBay</a> and, well, I could have got a mint-condition secondhand 18-55 for less than the cost of the repair. Not a lot less, but still. Oh well. If it were reasonable to care about a single instance of a standardized commercial product, I’d care about that lens.</p> <p>Anyhow, it works pretty well. Showing its age, but still reasonably handsome.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/05/17/PXL_20250518_040716981.png" alt="Fujifilm x-T5 camera with the 18-55mm lens attached" /> <p>If I live long enough maybe I’ll take another thousand pictures with it.</p> </div></content></entry> <entry> <title>Long Links</title> <link href='https://www.tbray.org/ongoing/When/202x/2025/05/06/Long-Links' /> <link rel='replies' thr:count='5' type='application/xhtml+xml' href='/ongoing/When/202x/2025/05/06/Long-Links#comments' /> <id>https://www.tbray.org/ongoing/When/202x/2025/05/06/Long-Links</id> <published>2025-05-06T12:00:00-07:00</published> <updated>2025-05-08T14:22:54-07:00</updated> <category scheme='https://www.tbray.org/ongoing/What/' term='The World' /> <category scheme='https://www.tbray.org/ongoing/What/' term='The World' /> <summary type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>Another <cite>Long Links</cite> curation (the 31<sup>st</sup>!); substantial pieces of reading (or watching or listening) that you probably don’t have time to take in all of. One or two, though, might reward your attention. The usual assortmet of music, geekery, and cosmology</div></summary> <content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'> <p>Another <cite>Long Links</cite> curation (the 31<sup>st</sup>!); substantial pieces of reading (or watching or listening) that you probably don’t have time to take in all of. One or two, though, might reward your attention. The usual assortmet of music, geekery, and cosmology.</p> <h2 id='p-1'>Galactic clusters</h2> <p>Ever heard of <a href="https://en.wikipedia.org/wiki/Laniakea_Supercluster">Laniakea</a>? Neither had I. It’s another word for our home. This 7-minute YouTube video, <a href="https://www.youtube.com/watch?v=Ayj4p3WFxGk">The Laniakea supercluster of galaxies</a>, is graceful and mind-expanding; highly recommended.</p> <h2 id='p-2'>Atom Heart Mother</h2> <p>I was sitting up late, pretty mellow, and Google Music showed me <a href="https://www.youtube.com/watch?v=RqcNqRA07yQ">Atom Heart Mother</a> as performed by Japanese tribute band Pink Floyd Trips in 2016. It woke me right up. The Japanese hipsters are instrumentally strong and use keyboards for the acoustic-instrument parts. As for the vocals, well, oh my oh my, definitely next level. Good stuff.</p> <p>Which made me curious about other performances of <cite>Atom Heart Mother</cite>. Turns out Floyd recorded <a href="https://www.youtube.com/watch?v=jWR-aI1qtEU">a 1971 performance</a>, coincidentally also from Japan. Obviously they’re competent, but they’re just four guys and the keyboard technology was way more primitive back then, so they’re at a disadvantage compared to the resources they had in the studio when recording it, or the technology deployed by PF Trips. A lot of the visuals are of the band arriving in and traveling around Japan, which is OK, because their performances in that era weren’t particularly visually stimulating. Credit to Gilmour for hitting the high notes (albeit with some electronic assist), but once again, he’s at a disadvantage compared to the awesome Japanese singers.</p> <p>The arrangement is quite a bit different than the original on the eponymous album and, within the limitations, is good.</p> <p>There’s a cover by “Pussycherry et l'Orchestre d'harmonie de Clermont Ferrand” which I abandoned partway through because the orchestra just isn’t very good, clumsy and harsh. There is a nice little cello part though.</p> <p>I will link to <a href="https://www.youtube.com/watch?v=0ra6B5evR2o">Orchestre Philharmonique de Radio France with Ron Geesin at the Théâtre du Chatelet</a>, once again an orchestra and a chorus. Ron Geesin is the guy that Floyd hired to do all the orchestral stuff after they’d recorded the basic tracks and went on tour. The orchestra is way better but disappointingly equals neither Geesin’s original take on the album, nor PF Trips. And the big choir doesn’t come close to those two Japanese women.</p> <p>There are more performances out there, but I had to go to bed.</p> <h2 id='p-3'>C2PA C2PA C2PA</h2> <p>I have <a href="/ongoing/What/Technology/Identity/">written quite a bit</a> about <a href="https://c2pa.org/">C2PA</a> and other “Content Authenticity” initiative stuff. Recently, Adobe has released more C2PA-enabling technology in several of its apps, and there is commentary from <a href="https://www.dpreview.com/opinion/6029161962/adobe-content-authenticity-credentials-app-public-beta-ai-training">DPReview</a> and <a href="https://petapixel.com/2025/04/24/why-photographers-should-care-about-the-new-content-authenticity-app/">PetaPixel</a>.</p> <p>If you care about this stuff like I do you’ll probably enjoy reading both pieces. But they (mostly) miss what I think is the key point. The biggest value offered by this stuff is establishing provenance, and the most important place to establish provenance is on social media. Knowing that a pic on Fedi or Bluesky was first uploaded by <code>@[email protected]</code> is highly useful in helping people decide whether it’s real or not, and would not require a major technical leap from any social-media provider.</p> <h2 id='p-4'>Less attention</h2> <p>Joan Westerberg’s excellent <a href="https://www.joanwestenberg.com/notes-from-the-exit-why-i-left-the-attention-economy/">Notes from the Exit: Why I Left the Attention Economy</a> is full of passion and truth. About stepping off the “content creator” treadmill, she writes:</p> <blockquote><p>Leaving the attention economy doesn’t mean vanishing. It means choosing to matter to fewer people, more deeply. It means owning the means of distribution. It means publishing like a human being instead of a content mill. It means you stop playing to the house odds and start building your own game.</p></blockquote> <p>And the rest is just as good. For what it’s worth, what she’s describing is what I’ve been trying to do in this space for the last 22 years.</p> <!-- <h2 id='p-5'>Monochromicity</h2> <p><a href="https://www.culture-critic.com/p/why-is-the-world-losing-color">Why is the world losing color?</a> is the question from Culture-critic.com. There’s no metaphor here, they’re talking about color literally, as in how and why monochrome color palettes are crowding out vibrant ones.</p>--> <h2 id='p-6'>Defective outlook</h2> <p>I don’t read <cite>The Register</cite> often enough; for many years they’ve been full of fresh takes and exhibited a usefully belligerant attitude. For example, <a href="https://www.theregister.com/2025/03/31/opinion_column_big_tech/">When even Microsoft can’t understand its own Outlook, big tech is stuck in a swamp of its own making</a> excoriates “the weird cruft that happens when Microsoft saws bits of our limbs off to make us fit into whatever profit center is running strategy today.” I actually disagree with some of the article, as I often do with the <cite>Reg</cite>, but I enjoyed reading it anyhow.</p> <h2 id='p-7'>A billion times a second</h2> <p>Time to put on your hardcore-geek hat and look at <a href="https://www.amazon.science/publications/formally-verified-cloud-scale-authorization">Formally verified cloud-scale authorization</a>. A group at AWS replaced a single heavily-used API call implementation with formally-verified code, simultaneously making it smaller and faster. The link is to an overview piece, the full PDF is <a href="https://assets.amazon.science/bb/40/22ac44f84f6d8eb625ac9666a00f/formally-verified-cloud-scale-authorization.pdf">here</a>.</p> <p>These are not lightweight technologies and this was not a cheap project; a lot of people did a lot of work and these are not junior people. But when what you’re working on is this call:</p> <blockquote><p><code>Answer evaluate(List<Policy> ps, Request r)</code></p></blockquote> <p>That call is at the core of where AWS grants or denies access by anything to anything, and it’s called more than a billion times a second. That’s billion with a B. A situation where this kind of investment isn’t merely justifiable, it’s a no-brainer. I know a couple of the people on the authors list, and I offer all of them my congratulations. Strong work!</p> <h2 id='p-8'>Decarbonization at sea</h2> <p>Regular readers know that my family has a boat, that we’re trying to <a href="/ongoing/When/202x/2020/01/19/Decarbonization">decarbonize our lives</a>, and that the boat has been the hardest part of that.</p> <p>So, I pay close attention to the latest news from the electric-boat scene. I’m starting to gain confidence that in a single-digit number of years we’ll be using a quieter, cheaper, more environmentally praiseworthy vessel of some sort. So, in case anybody has similar worries, here are snapshots from a few of the more viable electric-boat startups: <a href="https://www.navierboat.com/about">Navier</a>, <a href="https://www.torqeedo.com/en/home">Torqueedo</a>, <a href="https://xshore.com/us/">X Shore</a>, <a href="https://candela.com">Candela</a>. Also, here’s <a href="https://www.aqua-superpower.com">Aqua superPower</a>, which wants to bring dockside charging to the electric-boat scene. And finally, here is the <a href="https://electrek.co/guides/electric-boats/">Electric boats</a> category from the always-useful <cite>electrek</cite> electric-mobility site.</p> </div></content></entry> <entry> <title>Censoring Social Media</title> <link href='https://www.tbray.org/ongoing/When/202x/2025/04/28/Censoring-Social-Media' /> <link rel='replies' thr:count='5' type='application/xhtml+xml' href='/ongoing/When/202x/2025/04/28/Censoring-Social-Media#comments' /> <id>https://www.tbray.org/ongoing/When/202x/2025/04/28/Censoring-Social-Media</id> <published>2025-04-28T12:00:00-07:00</published> <updated>2025-05-05T12:18:53-07:00</updated> <category scheme='https://www.tbray.org/ongoing/What/' term='The World/Social Media' /> <category scheme='https://www.tbray.org/ongoing/What/' term='The World' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Social Media' /> <summary type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>In mid-April <a href='https://techcrunch.com/2025/04/23/government-censorship-comes-to-bluesky-but-not-its-third-party-apps-yet/'>we learned</a> about Bluesky censoring accounts as demanded by the government of Türkiye. While I haven’t seen coverage of who the account-holders were and what they said, the action followed on protests against Turkish autocrat Erdoğan for ordering the arrest of an opposition leader<span class="dashes"> —</span> typical behavior by a thin-skinned Führer-wannabe. This essay concerns how we might think about censorship, its mechanics, and how the ecosystems built around ActivityPub and ATproto can implement and/or fight it</div></summary> <content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'> <p>In mid-April <a href="https://techcrunch.com/2025/04/23/government-censorship-comes-to-bluesky-but-not-its-third-party-apps-yet/">we learned</a> about Bluesky censoring accounts as demanded by the government of Türkiye. While I haven’t seen coverage of who the account-holders were and what they said, the action followed on protests against Turkish autocrat Erdoğan for ordering the arrest of an opposition leader<span class='dashes'> —</span> typical behavior by a thin-skinned Führer-wannabe. This essay concerns how we might think about censorship, its mechanics, and how the ecosystems built around ActivityPub and ATproto can implement and/or fight it.</p> <p>That link above is to TechCrunch’s write-up of the situation, which is good. There’s going to be overlap between that and this but neither piece is a subset of the other, so you might want to read TechCrunch too.</p> <h2 id='p-1'>Censorship goals and non-goals</h2> <p>How, as the community of people who live and converse online, should we want our decentralized social media to behave?</p> <p>I’m restricting this to <em>decentralized</em> social media because the issues around censorship differ radically between a service owned and controlled by a profit-seeking corporation, and an ecosystem of interoperating providers who may not be in it for the money.</p> <p>So, from the decentralized point of view, what should be the core censorship goals? As Mencken said, “For every complex problem there is an answer that is clear, simple, and wrong.” Here are two of those:</p> <ol> <li><p>No censorship. Let people say what they will and the contest of ideas proceed. Freedom of speech must be absolute.</p></li> <li><p>Suppress any material which is illegal in the jurisdiction where the human participant is located. Stop there, because making policy in this area is not the domain of of social-media providers.</p></li> </ol> <h2 id='p-2'>“Free speech”?</h2> <p>The absolutists’ position is at least internally consistent. But it has two fatal flaws, one generic and one specific. In general, a certain proportion of people are garbage and will post terrible, hateful, damaging things that make the online experience somewhere in the range between unpleasant and intolerable, to the extent that many who deserve to be heard will be driven away.</p> <p>And specifically, history teaches us that certain narratives are dangerous to civic sanity and human life: Naziism, revanchism, hypernationalism, fomenting ethnic hatred, and so on.</p> <p>Another way to put this: Everyone has a basic right to free speech, but nobody has a right to be listened to.</p> <p>So, the Free Speech purists can now please show themselves out. (Disclosure: I didn’t mean that “please”.)</p> <h2 id='p-3'>“Rule of law”?</h2> <p>I can get partially behind this. If you’re running a social-media service in a civilized democratic country and posting X is against the law, you’d better think carefully about allowing X. (Not saying that civil disobedience is always wrong, just that you need to think about it.)</p> <p>But mostly no. The legalist approach suffers from positive and negative failures. Negative, as in censoring-is-wrong: I really DGAF about Turkish legal restrictions, because they’re more or less whatever Erdoğan says they are, and Erdoğan is a tinpot tyrant. Similarly, on Trump’s current trajectory it’ll soon be illegal to express anti-Netanyahu sentiment in the USA.</p> <p>Positive, as in not-censoring is wrong: Lolicon is legal in Japan and treated like <a href="https://en.wikipedia.org/wiki/CSAM">CSAM</a> elsewhere. Elsewhere is right, Japan is wrong. Another example: Anti-trans hate is increasingly cheerled by conservative culture warriors all over the place and <a href="https://www.bbc.com/news/articles/crldey0z00ro">is now the official policy of the British government</a>. Sir Keir Starmer would probably be suspended from <a href="https://cosocial.ca">my Mastodon instance</a> and invited to find somewhere else, except for somewhere else would be mass-defederated if it tolerated foolish bigots like Starmer.</p> <h2 id='p-4'>How Bluesky does it</h2> <p>(I should maybe say “How ATproto does it” but this seems more reader-friendly.) It’s not as though they pushed some button and silenced the hated-by-Erdoğan accounts. In fact, it’s subtle and complicated. For details, see <a href="https://fediversereport.com/bluesky-censorship-and-country-based-moderation/">Bluesky, censorship and country-based moderation</a> by Laurens Hof at <cite>The Fediverse Report</cite>. Seriously, if you think you might have an opinion about Bluesky and what they’re doing, go read Hof before you share it.</p> <p>Having said that, I think I can usefully offer a short form. Bluesky supports the use of multiple composable moderation services, and client software can decide which of them to subscribe to. It provides a central moderation service aimed at stopping things like CSAM and genocide-cheerleading that’s designed to operate at the scale of the whole network, which seems good to me.</p> <p>It also offers “geographic moderation labelers”, which can attach “forbidden” signals to posts which are being read by people in particular areas. That’s what they did in this case; the Erdoğan-hated accounts had those labels attached to their posts, but only for people who are in Türkiye.</p> <p>The default Bluesky client software subscribes to the geographic labeler and does as it’s told, which made Erdoğan and his toadies happy.</p> <p>But anyone can write Bluesky client software, and there’s nothing in the technology that requires clients to subscribe to or follow the instructions of any moderation service. One alternate client, <a href="https://deer.social">Deer.social</a>, is a straightforward fork of the default, but with the geographic moderation removed. (It may have other features but looks about like basic Bluesky to me.)</p> <h2 id='p-5'>How the Fediverse does it</h2> <p>(I should maybe say “How ActivityPub does it” or “How Mastodon does it” but…) Each instance does its own moderation and (this is important) makes its own decision as to which other instances to federate with. There are plenty of sites out there running Fediverse software that are full of CSAM and Lolicon and Nazis and so on. But the “mainstream” instances have universally defederated them, so it’s rare to run across that stuff. I never do.</p> <p>To make things easy, there are “shared block-lists” that try to keep up-to-date on the malignant instances. It’s early days yet but I think this will be a growth area.</p> <p>Most moderation is based on “reporting”<span class='dashes'> —</span> if you see something you think is abusive or breaks the rules, you can hit the “report” button, and the moderators for your instance and the source instance will get messaged and can decide what to do about it.</p> <p>The effect is that there is a shared culture across a few thousand “mainstream” instances that leads, in my opinion, to a pretty pleasing atmosphere and low abuse level. We have a problem in that it’s still too easy to for a bad person to post abusive stuff in a way that is <a href="/ongoing/When/202x/2024/07/30/Invisible-Attackers">hard for moderators to see</a>, but <a href="https://social.growyourown.services/@FediTips/114149382005729304">it’s being worked on</a> and I’m optimistic.</p> <h2 id='p-6'>Dealing with Erdoğan: Bluesky</h2> <p>So, suppose we want our social-media services to route around Erdoğan’s attempts to silence his political opponents. I do. How effective would Bluesky and the Fediverse be at that?</p> <p>Bluesky makes it easy: Just use an alternate client. Yay! Except for, most people don’t and won’t and shouldn’t have to. Boo!</p> <p>Still I dunno, in a place where the politics is hot, the word might get out on the grapevine and a lot of people could give another client a try. Maybe? Back in the day a <em>lot</em> of people used alternate Twitter clients, until Twitter stomped those out. I’m not smart enough to predict whether this could really be effective at routing round Erdoğan. I lean pessimistic though.</p> <p>Wait, what about the Bluesky Web interface? Who needs a client anyhow! No luck; it turns out that that’s a big fat React app with mostly the same code that’s in the mobile apps. Oh well.</p> <p>Anyhow, this ignores the real problem. Which is that if Erdoğan’s goons notice that people are dodging the censorship they’ll go nuclear on Bluesky (the company) and tell them to just stop displaying those people’s posts and to do it right fucking now.</p> <p>If that doesn’t work, they have a lot of options, starting with just blocking access to bsky.app, and extending to arresting any in-country staff or, even better, their families. And throwing them in an unheated basement. I dunno, a courageous and smart company might be able to fight back, but it wouldn’t be a good situation.</p> <p>And that’s a problem, because even though the ATproto is by design decentralized, in practice there’s only one central service that routes the firehose of posts globally. So my bet would be that Erdoğan wins.</p> <h2 id='p-7'>Dealing with Erdoğan: Fediverse</h2> <p>This is a very different picture. Block access to the app and a lot of people won’t notice because they use the browser, connecting to one of the thousands of Fediverse instances, desktop or mobile, and it’ll work fine. OK, how about finding out which instances the people they’re trying to ban are on, and going after those instances? If the instance is in a rule-of-law democracy, the Turks would probably be told to go pound sand.</p> <p>OK, so what if the Turks ferociously attacked the home servers of the Thought Criminals? No problemo, they’d migrate to a more resilient instance and, since this is the Fediverse, their followers might never notice, they’d just come along with them.</p> <p>Pretty quickly the Erdoğan gang are gonna end up playing whack-a-mole. In fact I think it’s going to be really, really hard in general for oppressive governments to censor the Fediverse. Not impossible; the people who operate the <a href="https://en.wikipedia.org/wiki/Great_Firewall">Great Firewall</a> would probably find a way.</p> <p>When Bluesky progresses to the point that there isn’t a single essential company at the center of everything, it should be censorship-resilient too, for the same reasons.</p> <h2 id='p-8'>Take-aways</h2> <p>I think that, to resist misguided censorship by misguided governments, we need (at least) these things:</p> <ol> <li><p>A service with no central choke-points, but rather a large number of independent co-operating nodes.</p></li> <li><p>Accounts, and the follower relationships between them, are not tied to any single node.</p></li> </ol> <p>Clearly these conditions are necessary; we don’t know yet whether or not they’re sufficient. But I’m generally optimistic that decentralized social media has the potential to offer a pretty decent level of censorship resistance.</p> </div></content></entry> <entry> <title>Southsiders</title> <link href='https://www.tbray.org/ongoing/When/202x/2025/05/04/Southsiders' /> <link rel='replies' thr:count='2' type='application/xhtml+xml' href='/ongoing/When/202x/2025/05/04/Southsiders#comments' /> <id>https://www.tbray.org/ongoing/When/202x/2025/05/04/Southsiders</id> <published>2025-05-04T12:00:00-07:00</published> <updated>2025-05-05T11:21:34-07:00</updated> <category scheme='https://www.tbray.org/ongoing/What/' term='Sports/Soccer' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Sports' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Soccer' /> <category scheme='https://www.tbray.org/ongoing/What/' term='The World/Places/Vancouver' /> <category scheme='https://www.tbray.org/ongoing/What/' term='The World' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Places' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Vancouver' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Arts/Photos' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Arts' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Photos' /> <summary type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>Ever been to a soccer match and noticed the “supporters section”, full of waving flags and drummers and wild enthusiasm? Last Saturday I went there. And marched in their parade, even. I could claim it was anthropology research. But maybe it’s just old guys wanna have fun. Which I did. Not sure if I will again</div></summary> <content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'> <p>Ever been to a soccer match and noticed the “supporters section”, full of waving flags and drummers and wild enthusiasm? Last Saturday I went there. And marched in their parade, even. I could claim it was anthropology research. But maybe it’s just old guys wanna have fun. Which I did. Not sure if I will again.</p> <p>For the rest of this piece, when I say “football” I mean fútbol as in soccer, because that‘s what everyone on the scene says.</p> <h2 id='p-1'>Background</h2> <p><a href="https://www.mlssoccer.com">MLS</a> (for Major League Soccer) is the top-level football league in North America and, depending on whose ratings you believe, the 9<sup>th</sup> or 10<sup>th</sup> strongest league in the world. At the moment, the <a href="https://www.whitecapsfc.com">Vancouver Whitecaps</a> are the strongest team in MLS and are <a href="https://www.concacaf.com/rankings/club/">ranked #2 in Concacaf</a> which means North and Central America. That may become #1 if they win the win the <a href="https://www.concacaf.com/champions-cup/">Champions Cup Final on June 1<sup>st</sup> in Mexico City</a>, against #1-ranked <a href="https://cfcruzazul.com">Cruz Azul</a>.</p> <p>Who knows if these good times will last, but for the moment it means they’re kind of a big deal here my home town. I’ve become a fan, because the Whitecaps are fun to watch.</p> <p>Mind you, the team is for sale and will probably be snapped up by a Yankee billionaire and relocated to Topeka or somewhere.</p> <p>When I’ve been to Whitecaps games, I’ve always been entertained by the raucous energy coming out of the supporters section. They provide a background roar, shout co-ordinated insults at the other team and referee, have a drum section, and feature a waving forest of flags.</p> <h2 id='p-2'>Southsiders</h2> <p>They’re called that because they inhabit the south end of the stadium, behind the goal that the Whitecaps attack in the second half. Check out the <a href="https://vancouversouthsiders.ca">Web site</a>.</p> <p>So, on a manic impulse, I joined up. It didn’t cost much and got me a big-ass scarf with “Vancouver” on one side and “Southsiders” on the other. Which I picked up, along with a shiny new membership card, at <a href="https://www.dublincalling.com/vancouver/home">Dublin Calling</a>, a perfectly decent sports bar where the membership card gets you a discount. I have to say that the Southsiders people were friendly, efficient, and welcoming.</p> <p>My son was happy to come along; we got to the bar long enough before The Parade to have a beer and perfectly OK bar food at what, especially with the discount, seemed a fair price. This matters because the food and beer at the stadium is exorbitantly priced slop.</p> <h2 id='p-6'>Alternatives</h2> <p>Since I wrote this, I learned that there are actually <a href="https://www.whitecapsfc.com/matchday/supporter-groups">four different fan clubs</a>. Especially, check out <a href="https://vssg.ca">Vancouver Sisters</a>.</p> <h2 id='p-3'>The Parade</h2> <p>Forty-five minutes before game time, the fans leave Dublin Calling a couple hundred strong and march to the stadium, chanting dopey chants and singing dopey songs and generally having good clean fun. It’s a family affair.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/05/04/PXL_20250504_004756238.png" alt="Southsiders parade" /> <p>Note: Kid on Dad’s shoulders. Flags. Spectators, and here’s a thing: When you’re in a loud cheerful parade, everybody smiles at you. Well, except for the drivers stuck at an intersection. Since we’re Canadian we’re polite, so we stop the parade at red lights. Sometimes, anyhow.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/05/04/PXL_20250504_005058831.png" alt="Southsiders parade" /> <p>Note: Maximal fan. Scarves held aloft (this happens a lot). Blue smoke. Flags in Whitecaps blue and Canada red.</p> <p>When the parade gets to the stadium, everyone kneels.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/05/04/PXL_20250504_005738243.png" alt="Southsider parade kneels" /> <img src="https://www.tbray.org/ongoing/When/202x/2025/05/04/PXL_20250504_005802321.png" alt="Southsider parade kneels" /> <p>After a bit, someone starts a slow quiet chant, then they wind it up and up until everyone explodes to their feet and leaps around madly. That’s all then, time to pile into the stadium.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/05/04/PXL_20250504_010531982.png" alt="Inside BC Place stadium" /> <p>Which is visually impressive on with the lid open on a sunny day.</p> <h2 id='p-4'>Indoor fun</h2> <p>The Southsiders section is General Admission, pick anywhere to stand. And I mean stand, there’s no sitting down while the game’s on. There’s a big flag propped up every half-dozen seats or so you can grab and wave when the spirit moves you. There’s a guy on a podium down at the front, facing the crowd, and he co-ordinates the cheers and songs and… He. Never. Stops.</p> <p>The Southsiders gleefully howl in joy at every good Whitecaps move and with rage at every adverse whistle, have stylized moves like for example whenever the opposing keeper launches a big goal kick everyone yells “You fat bastard!” No, I don’t know why.</p> <p>When I shared that I was going to do this crazy thing people wondered if it was safe, would I get vomited on, was there violence, and so on. In the event it was perfectly civilized as long as you don’t mind a lot of noise and shouting. The beer-drinking was steady but I didn’t see anyone who seemed the worse for the wear. If it weren’t for all the colorful obscenity I’d be comfy bringing a kid along.</p> <p>The crowd is a little whiter than usual for Vancouver, mostly pretty young, male dominated, with a visible gay faction. Nothing special.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/05/04/PXL_20250504_024141039.png" alt="View from the Southsiders section at BC Place" /> <p>Note: Canadian and rainbow flags. Somewhat obstructed view; the flags are out because a goal has just been scored, you can see the smoke from the fireworks. The opposing goal is a long way away.</p> <p>What’s good: Being right on top of any goals scored at the near end. The surges of shared emotion concerning the action in the game.</p> <p>What’s bad: Standing all through the game. The action at the other end is too far away. The songs and chants grow wearing after a while.</p> <h2 id='p-5'>The game</h2> <p>The Whitecaps won, which was nice. It was pretty close, actually, against a team that shouldn’t be much of a threat. But then, most of Vancouver’s best players were out in healing-from-injury or resting-from-overwork mode. I still think the Whitecaps are substandard at working the ball through the middle of the field, but do well at both ends; At the moment <a href="https://www.mlssoccer.com/standings/">the stats</a> seem to say that they’re on top both at scoring and preventing goals.</p> <p>Here’s what to do if you’re watching a game: If either Pedro Vite (#45) or Jayden Nelson (#7) get the ball, lean in and focus. Both those guys are lightning in a bottle. I’ve enjoyed watching this team more than any other Vancouver sports franchise ever. It probably can’t last.</p> <p>Will I do the Southsiders section again? Maybe. I suspect I’ll enjoy their energy and edge just as much even when I’m not in the section, plus I’ll get to sit down. We’ll see.</p> <p>My son and I had fun. No regrets.</p> </div></content></entry> <entry> <title>CL XLV: Island Spring</title> <link href='https://www.tbray.org/ongoing/When/202x/2025/04/21/Happy-Island-Spring' /> <link rel='replies' thr:count='1' type='application/xhtml+xml' href='/ongoing/When/202x/2025/04/21/Happy-Island-Spring#comments' /> <id>https://www.tbray.org/ongoing/When/202x/2025/04/21/Happy-Island-Spring</id> <published>2025-04-21T12:00:00-07:00</published> <updated>2025-04-24T12:02:55-07:00</updated> <category scheme='https://www.tbray.org/ongoing/What/' term='The World/Cottage Life' /> <category scheme='https://www.tbray.org/ongoing/What/' term='The World' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Cottage Life' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Arts/Photos' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Arts' /> <category scheme='https://www.tbray.org/ongoing/What/' term='Photos' /> <summary type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>Join me for a walk through a rain forest on a corner of a small island. This is to remind everyone that even in a world full of bad news, the trees are still there. From the slopes leading down to the sea they reach up for sunshine and rain, offering no objections to humans walking in the tall quiet spaces between them</div></summary> <content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'> <p>Join me for a walk through a rain forest on a corner of a small island. This is to remind everyone that even in a world full of bad news, the trees are still there. From the slopes leading down to the sea they reach up for sunshine and rain, offering no objections to humans walking in the tall quiet spaces between them.</p> <p>[The island is <a href="https://en.wikipedia.org/wiki/Keats_Island_(British_Columbia)">Keats Island</a>, where we’ve <a href="/ongoing/What/The%20World/Cottage%20Life/">had a cabin since 2008</a>. It’s mostly just trees and cabins, you can buy an oceanfront mansion for millions or a basic Place That Needs Work for much less (as we did) or you can <a href="https://bcparks.ca/plumper-cove-marine-park">camp cheap</a>. Come on over sometime.]</p> <p>On the path up from the water to the cabin there’s this camellia that was unhappy at our home in the city, its flowers always stained brown even as they opened. So we brought it to the island and now look at it!</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/04/21/PXL_20250418_211131388.png" alt="Camellia bush with many white and gold blossoms" /> <p>One interior shot. On this recent visit I wired up this desk, a recent hand-me-down from old friend <a href="https://en.wikipedia.org/wiki/Tamara_Munzner">Tamara</a>.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/04/21/PXL_20250419_193220121.png" alt="A desk with a computer and outboard monitor and really great views" /> <p>When I got it all wired up I texted her “Now I write my masterpiece” but instead I wrote that one <a href="/ongoing/When/202x/2025/04/16/Decentralized-Schemes">about URI schemes</a>, no masterpiece but I was happy with it. And anyhow, it’s lovely space to sit and tap a keyboard.</p> <p>Now the forest walk.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/04/21/PXL_20250420_190132412.png" alt="Pacific Northwest rain forest" /> <p>These are rain forests and they are happy in their own way when it rains but I’m a <em>Homo sapiens</em>, we evolved in a sunny part of the world and my eyes welcome all those photons.</p> <p>In 2008 I was told that the island had been logged “100 years ago”. So most of these are probably in the Young-Adult tree demographic, but there are a few of the real old giants still to be seen.</p> <p>Sometimes the trees seem to dance with each other.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/04/21/TXT55561.png" alt="Tall bare tree trunks seem to dance" /> <img src="https://www.tbray.org/ongoing/When/202x/2025/04/21/TXT55554.png" alt="Tall bare tree trunks seem to dance" /> <p>Both of those pictures feature (but not exclusively) <i>Acer macrophyllum</i>, the bigleaf Maple, the only deciduous tree I know of that can compete for sun with the towering Cedar/Fir/Hemlock evergreens. It’s beautiful both naked (as here) and in its verdant midsummer raiment.</p> <p>But sometimes when you dance too hard you can fall over. He are two different photographic takes on a bigleaf that seems to have lost its grip and is leaning on a nearby hemlock.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/04/21/PXL_20250420_185053570.png" alt="Tall trees leaning together" /> <img src="https://www.tbray.org/ongoing/When/202x/2025/04/21/TXT55572.png" alt="Tall trees leaning together" /> <p>And sometimes you can just totally lose it.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/04/21/TXT55552.png" alt="Nurse log rolled, laying a tree trunk flat" /> <p>It is very common in these forests to see a tree growing out of a fallen log; these are called “nurse logs”. It turns out to be a high-risk arboreal lifestyle, as we see here. It must have been helluva drama when the nurse rolled.</p> <p>I’m about done and will end as I began, with a flower.</p> <img src="https://www.tbray.org/ongoing/When/202x/2025/04/21/TXT55560.png" alt="Small pink blossom, a bit tattered, the background out of focus" /> <p>This is the blossom of a salmonberry (<i>Rubus spectabilis</i>) a member of the rose family. It has berries in late summer but they’re only marginally edible.</p> <p>It’s one of the first blossoms you see in the forest depths as spring struggles free of the shackles of the northwest winter.</p> <p>Go hug a tree sometime soon, it really does help.</p> </div></content></entry> </feed>
{ "accept-ranges": "bytes", "cf-cache-status": "DYNAMIC", "cf-ray": "96808862954ffa13-ORD", "connection": "keep-alive", "content-length": "187105", "content-security-policy": "frame-ancestors 'self';", "content-type": "application/atom+xml", "date": "Thu, 31 Jul 2025 22:29:07 GMT", "etag": "\"2dae1-63b3e566dcfb8\"", "last-modified": "Thu, 31 Jul 2025 19:06:24 GMT", "server": "cloudflare", "strict-transport-security": "max-age=31536000; includeSubdomains; preload", "x-content-type-options": "nosniff" }
{ "meta": { "type": "atom", "version": "1.0" }, "language": "en-us", "title": "ongoing by Tim Bray", "description": "ongoing fragmented essay by Tim Bray", "copyright": "All content written by Tim Bray and photos by Tim Bray Copyright Tim Bray, some rights reserved, see /ongoing/misc/Copyright", "url": "https://www.tbray.org/ongoing/", "self": "https://www.tbray.org/ongoing/ongoing.atom", "published": null, "updated": "2025-07-31T19:06:23.000Z", "generator": { "label": "Generated from XML source code using Perl, Expat, Emacs, Mysql, Ruby, and ImageMagick. Industrial-strength technology, baby.", "version": null, "url": "/misc/Colophon" }, "image": { "title": null, "url": "rsslogo.jpg" }, "authors": [ { "name": "Tim Bray", "email": null, "url": null } ], "categories": [], "items": [ { "id": "https://www.tbray.org/ongoing/When/202x/2025/07/29/DeGoogling", "title": "De-Google Project Update", "description": "I introduced this family project in the spring of 2024. I won’t reproduce those arguments for why we’re working on this, but in the current climate I feel like I hardly need to. Since that post, our aversion to Google dependency has only grown stronger. Progress has been non-zero but not fast", "url": "https://www.tbray.org/ongoing/When/202x/2025/07/29/DeGoogling", "published": "2025-07-29T19:00:00.000Z", "updated": "2025-07-31T19:06:18.000Z", "content": "<p>I\n <a href=\"/ongoing/When/202x/2024/03/09/DeGoogling\">introduced this family project</a> in the spring of 2024.\n I won’t reproduce those arguments for why we’re working on this, but in the current climate I feel like I hardly need to.\n Since that post, our aversion to Google dependency has only grown stronger. Progress has been non-zero but not fast.</p>\n <p>Here’s the table, with progress notes below.</p>\n <table>\n <tr valign=\"top\"><th>Need</th><th>Supplier</th><th>Alternatives</th></tr>\n <tr valign=\"top\">\n\t<td><a href=\"/ongoing/When/202x/2024/03/09/DeGoogling#p-3\">Office</a></td>\n\t<td class=\"unhappy\">Google Workspace</td>\n\t<td>Proton?</td>\n </tr>\n <tr valign=\"top\">\n\t<td><a href=\"/ongoing/When/202x/2024/03/09/DeGoogling#p-17\">Data sharing</a></td>\n\t<td class=\"happy\">Dropbox</td>\n <td></td></tr>\n <tr valign=\"top\">\n\t<td><a href=\"/ongoing/When/202x/2024/03/09/DeGoogling#p-17\">Photos</a></td>\n\t<td class=\"unhappy\">Google Photos</td>\n <td>Dropbox?</td></tr>\n <tr valign=\"top\">\n\t<td><a href=\"/ongoing/When/202x/2024/03/09/DeGoogling#p-16\">Video meetings</a></td>\n\t<td class=\"unhappy\">Google\n\tMeet</td>\n <td>Jitsi, Signal?</td></tr>\n <tr valign=\"top\">\n\t<td><a href=\"/ongoing/When/202x/2024/03/09/DeGoogling#p-10\">Maps</a></td>\n\t<td class=\"unhappy\">Google Maps</td>\n <td>Magic Earth, Here, something OSM-based?</td></tr>\n <tr valign=\"top\">\n\t<td><a href=\"/ongoing/When/202x/2024/03/09/DeGoogling#p-4\">Browser</a></td>\n\t<td class=\"happy\">Safari, Firefox, Vivaldi, LibreWolf</td>\n <td></td></tr>\n <tr valign=\"top\">\n\t<td><a href=\"/ongoing/When/202x/2024/03/09/DeGoogling#p-12\">Search</a></td>\n\t<td class=\"unhappy\">Google</td>\n <td>Bing-based options, Kagi?</td></tr>\n <tr valign=\"top\">\n\t<td><a href=\"/ongoing/When/202x/2024/03/09/DeGoogling#p-5\">Chat</a></td>\n\t<td class=\"happy\">Signal</td>\n <td></td></tr>\n <tr valign=\"top\">\n\t<td><a href=\"/ongoing/When/202x/2024/03/09/DeGoogling#p-6\">Photo editing</a></td>\n\t<td class=\"neutral\">Adobe\n\tLightroom & Nik</td>\n <td>Capture One, Darktable, ?</td></tr>\n <tr valign=\"top\">\n\t<td><a href=\"/ongoing/When/202x/2024/03/09/DeGoogling#p-7\">In-car interface</a></td>\n\t<td class=\"neutral\">Google Android Auto</td>\n <td>Automaker software</td></tr>\n <tr valign=\"top\">\n\t<td><a href=\"/ongoing/When/202x/2024/03/09/DeGoogling#p-8\">Play my music</a></td>\n\t<td class=\"happy\">Plex, USB</td>\n <td></td></tr>\n <tr valign=\"top\">\n\t<td><a href=\"/ongoing/When/202x/2024/03/09/DeGoogling#p-9\">Discover music</a></td>\n\t<td class=\"happy\">Qobuz</td>\n\t<td></td></tr>\n <tr valign=\"top\">\n\t<td><a href=\"/ongoing/When/202x/2024/03/09/DeGoogling#p-13\">TV</a></td>\n\t<td class=\"neutral\">Roku, Apple, migration</td>\n <td></td></tr>\n </table>\n <p>Pink indicates a strong desire to get off the incumbent service, green means we’re happy-ish with what we’re using, and blue\n means that, happy or not, it’s not near the top of the priority list.</p>\n <p>I’ll reproduce the metrics we care about when looking to replace Google products, some combination of:</p>\n <ol>\n <li><p>Not ad-supported</p></li>\n <li><p>Not VC-funded</p></li>\n <li><p>Not Google, Microsoft, or Amazon</p></li>\n </ol>\n <p>The list used to include “Open Source” but I decided that while that’s good, it’s less important than the other three criteria.</p>\n <p>Now let’s walk down the chart.</p>\n <h2 id=\"p-3\">Office</h2>\n <p>This is going to be a wrenching transition; we’ve been running the family on Google stuff forever, and I anticipate\n muscle-memory pain. But increasingly, using Google apps feels like being in enemy territory. And, as I said last time, I\n will not be sorry to shake the dust of Google Drive and Docs from my heels, I find them clumsy and am \n always having trouble finding something that I know is in there.</p>\n <p>While I haven’t dug in seriously yet, I keep hearing reasonably-positive things about Proton, and nothing substantive to\n scare me away. Wish us luck.</p>\n <h2 id=\"p-17\">Data sharing (progress!)</h2>\n <p>Dropbox is, eh, OK. It doesn’t seem actively evil, there’s no advertising, and the price is low.</p>\n <h2 id=\"p-21\">Photos</h2>\n <p>We’re a four-Android family including a couple of prolific photographers, and everything just gets pumped into Google and\n then it fills up and then they want more money. If we could configure the phones to skip Google and go straight to Dropbox,\n that would be a step forward.</p>\n <h2 id=\"p-16\">Video meetings</h2>\n <p>Google meet isn’t painful but I totally suspect it of data-mining what should be private conversations. I’m getting the\n feeling that the technical difficulty of videoconferencing is going steadily down, so I’m reasonably optimistic that\n something a little less evil will come along with a fair price.</p>\n <h2 id=\"p-10\">Maps</h2>\n <p>The fear and loathing that \n <a href=\"/ongoing/When/201x/2017/06/29/Fear-Google-Reviews\">I started feeling in 2017</a> grows only stronger. But replacements\n aren’t obvious.\n It’s a pity, maps\n and directions and reviews feel like a natural monopoly that should be a public utility or something, rather than a corporate moat.</p>\n <h2 id=\"p-4\">Browser (progress!)</h2>\n <p>Chrome has seriously started making my flesh crawl; once again, enemy territory. Fortunately, there are lots of good options.\n Even people like us who have multiple lives we need to keep separate can find enough better browsers out there.</p>\n <p>Maybe I’ll have a look at one of the new genAI-company browsers ha ha just kidding.</p>\n <h2 id=\"p-12\">Search</h2>\n <p>The reports on Kagi keep being positive and giving it a try is definitely on the To-Do list.</p>\n <h2 id=\"p-5\">Chat</h2>\n <p>Signal is the only sane choice at this point in history for personal use.</p>\n <h2 id=\"p-6\">Photo editing</h2>\n <p>Adobe’s products are good, and I’m proficient and happy with Lightroom, but they are definitely suffering from bad genAI\n craziness. Also the price is becoming unreasonable.</p>\n <p>I’ve had a few Lightroom software failures in recent months and if that\n becomes a trend, looking seriously at the alternatives will move to the top of the priority list.</p>\n <h2 id=\"p-7\">In-car interface</h2>\n <p>It’s tough, Android Auto is a truly great product. I think I’m stuck here for now, particularly given that I plan to be\n driving a <a href=\"/ongoing/What/The%20World/Jaguar%20Diary/\">2019-model-year car</a> for the foreseeable future. Also, it\n supports my music apps.</p>\n <h2 id=\"p-9\">Discover music and play mine (progress!)</h2>\n <p>Progress here. I’ve almost completely stopped using YouTube Music in favor of Plex and Qobuz. Really no downside; YTM has\n more or less completely lost the ability to suggest good new stuff.</p>\n <h2 id=\"p-13\">TV</h2>\n <p>Video continues morphing itself into Cable TV redux. We have an old Roku box that works fine and I think I’ve managed to find\n its don’t-spy-on-us settings. We’ll keep subscribing to Apple+ as long as they keep shipping great shows. I have zero regrets\n about having\n <a href=\"/ongoing/When/202x/2025/03/06/Canceled-Prime\">left Prime behind</a>.</p>\n <p>As for the rest, we’ve become migrants,\n exclusively month-at-a-time subscriptions for the purpose of watching some serial or sports league, unsubscribe after the season\n finale or championship game. The good news is that I\n haven’t encountered much friction in unsubscribing, just a certain amount of earnest pleading.</p>\n <h2 id=\"p-20\">Looking forward</h2>\n <p>I have yet to confront any of the really hard parts of this project, but the sense of urgency is increasing. Let’s see.</p>", "image": null, "media": [], "authors": [ { "name": "Tim Bray", "email": null, "url": null } ], "categories": [ { "label": "The World/Life Online/De-Google", "term": "The World/Life Online/De-Google", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "The World", "term": "The World", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Life Online", "term": "Life Online", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "De-Google", "term": "De-Google", "url": "https://www.tbray.org/ongoing/What/" } ] }, { "id": "https://www.tbray.org/ongoing/When/202x/2025/07/21/Automaton-merge-war", "title": "QRS: Finite-state Struggles", "description": "I just posted a big Quamina PR representing months of work, brought on by the addition of a small basic regular-expression feature. This ramble doesn’t exactly have a smooth story arc but I’m posting it anyhow because I know there are people out there interested in state-machine engineering and they are my people", "url": "https://www.tbray.org/ongoing/When/202x/2025/07/21/Automaton-merge-war", "published": "2025-07-21T19:00:00.000Z", "updated": "2025-07-22T16:10:25.000Z", "content": "<p>I just posted a big\n <a href=\"https://github.com/timbray/quamina\">Quamina</a> PR representing months of work, brought on\n by the addition of a small basic regular-expression feature. This ramble doesn’t exactly have a smooth story arc but I’m\n posting it anyhow because I know there are people\n out there interested in state-machine engineering and they are my people.</p>\n <p>As far as I can tell, a couple of the problems I’m trying to solve\n haven’t been addressed before, at least not by anyone who published their findings.\n Partly because of that, I’m starting to wonder if all\n <a href=\"/ongoing/What/Technology/Quamina%20Diary/\">these disorderly Quamina postings</a> might\n be worked into a small book or monograph or something. State machines are really freaking useful software constructs!\n So yeah, this is a war story not an essay, but if you like finite automata you’ll likely be interested in bits of it.</p>\n <h2 id=\"p-1\">The story thus far</h2>\n <p>Prior to beginning work on Regular Expressions, I’d already wired shell-style “<code>*</code>” wildcards into Quamina, which\n forced me to start working with NFAs and ε-transitions. The implementation wasn’t crushingly difficult, and\n the performance was… OK-ish.</p>\n <p>Which leads me to The Benchmark From Hell.\n I wondered how the wildcard functionality would work under heavy stress, so I pulled in a list of 12,959 five-letter strings\n from the Wordle source code, and inserted a “<code>*</code>” at a random position in each. Here are the first ten:</p>\n <blockquote><pre><code>aalii*\n*aargh\naar*ti\nabaca*\na*baci\na*back\nab*acs\nab*aft\nabak*a</code></pre></blockquote>\n <p>I created an NFA for each and merged them together\n <a href=\"/ongoing/When/202x/2024/07/28/Union-of-Finite-Automata\">as described here</a>. Building and merging the automata were\n plenty fast enough, and the merged NFA had 46,424 states, which felt reasonable.\n Matching strings against it ran at under ten thousand per second, which is pretty poor given that Quamina can do a million or\n two per second on patterns encoded in a DFA.</p>\n <p>But, I thought, still reasonably usable.</p>\n <h2 id=\"p-2\">The cursed “<code>?</code>”</h2>\n <p>Last year, my\n <a href=\"/ongoing/When/202x/2024/12/12/Quamina-Regular-Expression-Series\">slow grind through the regexp features</a> had led me\n to the zero-or-one quantifier “<code>?</code>”. The state machine for these things is not rocket science; there’s a discussion\n with pictures in my recent\n <a href=\"/ongoing/When/202x/2025/07/07/Epsilon-Wrangling#p-3\">Epsilon Wrangling</a>.</p>\n <p>So I implemented that and fired off the unit tests, most of which\n <a href=\"/ongoing/When/202x/2024/12/12/QRS-Parsing-Regular-Expressions#p-1\">I didn’t have to write</a>, and they all failed.\n Not a surprise I guess.</p>\n <p>It turned out that the way I’d implemented ε-transitions for the wildcards\n <a href=\"/ongoing/When/202x/2024/07/28/Union-of-Finite-Automata#p-9\">was partially wrong</a>, as in it worked for the tight-loop\n state-to-itself ε-transitions, but not for more general-purpose things like “<code>?</code>” requires.</p>\n <p>In fact, it turns out that merging NFAs is hard (DFAs are easy), and I found precious little help online.\n <a href=\"https://en.wikipedia.org/wiki/Thompson%27s_construction\">Thompson’s construction</a> does give an answer: Make an\n otherwise-empty state with two ε-transitions, one to each of the automata, and it’ll do the right thing. Let’s call that\n a “splice state”. It’s easy to implement, so I did. Splicing is hardly “merging” in the Quamina sense, but still.</p>\n <p>Unfortunately, the performance was hideously bad, just a few matches per second while pegging the CPU.\n A glance at the final NFA was sobering; endless chains of splice states, some thousands long.</p>\n <p>At this point\n I became very unhappy and got stalled for months dealing with real-life issues while this problem lurked at the back\n of my mind, growling for attention occasionally.</p>\n <p>Eventually I let the growler out of the cave and started to think through approaches. But first…</p>\n <h2 id=\"p-4\">Worth solving?</h2>\n <p>Is it, really? What sane person is going to want to search for the union of thousands of regular expressions in general or\n wild-carded strings in particular?</p>\n <p>I didn’t think about this problem at all, because of my experience with Quamina’s parent,\n <a href=\"https://github.com/aws/event-ruler\">Ruler</a>. When it became popular among several AWS and Amazon teams, people\n sometimes found it useful to match the union of not just thousands but a million or more different patterns. When you write\n software that anyone actually uses, don’t expect the people using it to share your opinions on what is and isn’t\n reasonable. So I wasn’t going to get any mental peace until I cracked this nut.</p>\n <p>I eventually decided that three approaches were worth trying:</p>\n <ol>\n <li><p>Figure out a way really to merge, not just splice, the wildcarded patterns, to produce a simpler automaton.</p></li>\n <li><p>Optimize the NFA-traversal code path.</p></li>\n <li><p>Any NFA can be transformed into a DFA, says computer-science theory. So do that, because Quamina is really fast at\n DFA-based matching.</p></li>\n </ol>\n <h2 id=\"p-5\">Nfa2Dfa</h2>\n <p>I ended up doing all of these things and haven’t entirely given up on any of them.\n The most intellectually-elegant was the transform-to-DFA approach, because if I did that, I could remove the fairly-complex\n NFA-traversal logic from Quamina.</p>\n <p>It turns out that the Net is rich with textbook extracts and YouTubes and slide-shows about how to do the NFA-to-DFA\n conversion. It ended up being quite a pleasing little chunk of code, only a couple hundred lines.</p>\n <p>The bad news: Converting each individual wildcard NFA to a DFA was amazingly fast, but then as I merged them in one by one,\n the number of automaton states started increasing explosively and the process slowed down so much that I never had the patience\n to let it finish. Finite-automata theory warns that this can happen, but it’s hard to characterize the cases where it does.\n I guess this one of them.</p>\n <p>Having said that, I haven’t discarded the <code>nfa2Dfa</code> code, because perhaps I ought to offer a Quamina option to\n apply this if you have some collection of patterns that you want to run really super fast and are willing to wait for a while\n for the transformation process to complete. Also, I may have missed opportunities to optimize the conversion; maybe it’s making\n more states than it needs to?</p>\n <h2 id=\"p-6\">Faster NFA traversal</h2>\n <p>Recently in\n <a href=\"/ongoing/When/202x/2025/07/07/Epsilon-Wrangling\">Epsilon wrangling</a> I described how NFA traversal has to work,\n relying heavily on implementing a thing called an ε-closure.</p>\n <p>So I profiled the traversal process and discovered, unsurprisingly, that most of the time was going into memory allocation\n while computing those ε-closures. So now Quamina has an ε-closure cache and will only compute each one once.</p>\n <p>This helped a lot but not nearly enough, and the profiler was still telling me the pain was in Go’s allocation and\n garbage-collection machinery. Whittling away at this kind of stuff is not rocket science. The standard Go trick I’ve seen over\n and over is to keep all your data in slices, keep re-using them then chopping them back to <code>[:0]</code>\n for each request. After a while they’ll have grown to the\n point where all the operations are just copying bytes around, no allocation required.</p>\n <p>Which also helped, but the speed wasn’t close to what I wanted.</p>\n <h2 id=\"p-7\">Merging wildcard automata</h2>\n <p>I coded multiple ways to do this, and they kept failing. But I eventually found a way to build those\n automata so that any two of them, or any one of them and a DFA, can merged and generate dramatically\n fewer ε-transition chains. I’m not going to write this up here for two reasons: First of all, it’s not <em>that</em>\n interesting, and second, I worry that I may have to change the approach further as I go on implementing new regxp operators.</p>\n <p>In particular, at one point I was looking at the code while it wasn’t working, and I could see that if I added a particular\n conditional it would work, but I couldn’t think of a principled reason to do it. Obviously I’ll have to sort this out\n eventually. In the meantime, if you’re the sort of um special person who is now burning with curiosity, check out my branch from\n that PR and have a look at the <code>spinout</code> type.</p>\n <p>Anyhow, I added that conditional even though it puzzled me a bit, and now you can add wildcard patterns to Quamina at 80K/second,\n and my 12.9K wildcards generate an NFA with with almost 70K states, which can scan events at almost 400K/second. And that’s good\n enough to ship the <code>“?”</code> feature.</p>\n <p>By the way, I tried feeding that 70K-state automaton to the DFA converter, and gave up after it’d burned an hour of CPU and\n grown to occupy many GB of RAM.</p>\n <h2 id=\"p-8\">Next steps</h2>\n <p>Add “<code>+</code>” and “<code>*</code>”, and really hope I don’t have to redesign the NFA machinery again.</p>\n <p>Also, figure out the explanation for that puzzling <code>if</code> statement.</p>\n <h2 id=\"p-9\">And I should say…</h2>\n <p>Despite the very narrow not to say obsessive focus of this series, I’ve gotten a few bits and pieces of positive feedback. So\n there are a few people out there who care about this stuff. To all of you, thanks.</p>", "image": null, "media": [], "authors": [ { "name": "Tim Bray", "email": null, "url": null } ], "categories": [ { "label": "Technology/Quamina Diary", "term": "Technology/Quamina Diary", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Technology", "term": "Technology", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Quamina Diary", "term": "Quamina Diary", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Technology/Software", "term": "Technology/Software", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Software", "term": "Software", "url": "https://www.tbray.org/ongoing/What/" } ] }, { "id": "https://www.tbray.org/ongoing/When/202x/2025/07/09/Saskatchewan", "title": "Memory in Saskatchewan", "description": "I just came back from Canada’s only rectangular province. I was there to help out my 95-year-old mother while her main caregiver took vacation. It’s an unhappiness that my family has splashed itself across Canada in such a way that we have to get on an airplane (or take drives measured in days) to see each other, but that’s where we are. I came back with pictures and stories", "url": "https://www.tbray.org/ongoing/When/202x/2025/07/09/Saskatchewan", "published": "2025-07-09T19:00:00.000Z", "updated": "2025-07-16T17:11:34.000Z", "content": "<p>I just came back from Canada’s\n <a href=\"https://en.wikipedia.org/wiki/Saskatchewan\">only rectangular province</a>. I was there to help out my 95-year-old\n mother while her main \n caregiver took vacation. It’s an unhappiness that my family has splashed itself across Canada in such a way that we have to get\n on an airplane (or take drives measured in days) to see each other, but that’s where we are. I came back with pictures and\n stories.</p>\n <p>Let me set the stage with a couple of photos. Everyone knows that Saskatchewan is flat and brown and empty, right?</p>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/07/09/TXT55665.png\" alt=\"Flowers, intensely colored in near-black purple and yellow\"></img>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/07/09/TXT55710.png\" alt=\"Trees and lawns, behind a still body of water and somewhat reflected in it\"></img>\n <p>Mom lives in\n <a href=\"https://en.wikipedia.org/wiki/Regina,_Saskatchewan\">Regina</a>, the provincial capital, a city built round a huge\n park that contains the Legislature (the flowers are from its front lawn), a sizeable lake, and an artificial\n mini-mountain (the water and trees are from its tip).\n Have no fear, I’ll get to some no-kidding prairie landscapes.</p>\n <h2 id=\"p-1\">Health-care drama</h2>\n <p>The night I arrived, after my Mom went to bed she got up again, tripped on something and fell hard. Her right arm was\n swollen, bruised, and painful. The skin and adjacent blood vessels of very old people become thin and fragile; her whole\n forearm was a bruise. I tried to get her to go to Emergency but she wasn’t having any of it: “You wait for hours and then they\n give you a pain-killer, which is constipating.” Since she could twist her wrist and wiggle her fingers and give my hand a firm\n grasp, I didn’t push too hard.</p>\n <p>A couple days later on Saturday she got her regular twice-a-week visit from the public\n <a href=\"https://www.saskatchewan.ca/residents/health/accessing-health-care-services/care-at-home-and-outside-the-hospital/home-care\">HomeCare</a>\n nurse, a friendly and highly competent Nigerian immigrant, to check her meds and\n general condition.\n She looked at Mom’s wrist and said “Get her an appointment with her doctor, they’ll probably want an X-Ray.”</p>\n <p>I called up her doctor at opening time Monday. The guy who answered the phone said\n “Don’t have any appointments for a couple weeks but come on over, we’ll squeeze her in.” So we went in after morning coffee and\n waited less than an hour.\n The doctor looked at her arm for 45 seconds and said “I’m writing a prescription for an X-Ray” and there was a\n radiologist around the corner and she was in ten minutes later. The doctor called me back that afternoon and said “Your\n mother’s got a broken wrist, I got her an 8AM appointment tomorrow at Regina General’s Cast Clinic.”</p>\n <p>The doctor at the clinic looked at her wrist for another 45 seconds and said “Yeah, put on a cast” so they did and we were\n home by ten. I’d pessimistically overpaid a couple bucks for hospital parking.</p>\n <p>The reason I’m including this is because I notice that this space has plenty of American readers. Did you notice that the\n story entirely omits insurance companies and money (except parking)? In Canada your health-care comes with your taxes (granted,\n higher than Americans’) and while the system is far from perfect, it can fix up an old lady’s broken wrist pretty damn fucking\n quick without any bureaucratic bullshit. Also, Canada spends a huge amount less per head on health-care than the US does.</p>\n <p>And Mom told me not to forget that Saskatchewan is the birthplace of Canadian single-payer universal healthcare.\n <a href=\"https://en.wikipedia.org/wiki/Tommy_Douglas\">Tommy Douglas</a>, the Social Democrat who made that happen, has been\n named\n <a href=\"https://en.wikipedia.org/wiki/The_Greatest_Canadian\">The Greatest Canadian</a>.</p>\n <h2 id=\"p-2\">Gentle surface</h2>\n <p>Oh, did I say “flat and brown and empty”? Wrong, wrong, and wrong. The Prairies, in Canada and the US too, have textures and\n colors and hills and valleys, it’s just that the slopes are gentle. There are really flat parts and they make farmers’ lives easier, but\n more or less every square inch that’s not a town or a park is farmed.\n I took Mom for a drive out in the country southeast of Regina, from whence these views:</p>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/07/09/TXT55698.png\" alt=\"A road leading slightly uphill, brilliant yellow canola on both sides\"></img>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/07/09/TXT55700.png\" alt=\"Yellow canola flowers under a blue sky\"></img>\n <div class=\"caption\"><p>Note that in both shots we’re looking up a gentle slope. In the second, there’s farm infrastructure on\n the distant horizon.<br></br>Also consider the color of the sky.</p></div>\n <p>In Canada that yellow-flowering crop is called “Canola”, which Wikipedia claims refers to a particular cultivar of \n <i>Brassica napus</i>, commonly known as rapeseed or just rape, so you can see why when Canada’s\n agribiz sector wanted to position its oil as the thing to use while cooking they went for the cultivar not the species\n name. I’m old enough to remember when farmers still said just “rapeseed”. Hmm, Wikipedia also claims that the OED claims this:\n The term “rape” derives from the Latin word for turnip, <i>rāpa</i> or <i>rāpum</i>, cognate with the Greek word ῥάφη,\n <i>rhaphe</i>.</p>\n <p>Let’s stick with canola.</p>\n <h2 id=\"p-4\">Pixelated color</h2>\n <p>After I’d taken those two canola-field shots I pulled out my Pixel and took another, but I’m not gonna share it because the\n Pixel decided to turn the sky from what I thought was a complex and interesting hue into its opinion of “what a blue sky looks\n like” only this sky didn’t.</p>\n <p>Maybe it’s just me, but I think Google’s camera app is becoming increasingly opinionated about color, and not in a good\n way. There are plenty of alternative camera apps, I should check them out.</p>\n <p>In case it’s not obvious, I love photographing Saskatchewan and think it generally looks pretty great, especially when you\n look up. On the province’s license plates it says “Land of living skies”, and no kidding.</p> \n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/07/09/PXL_20250704_032320050.png\" alt=\"Saskatchewan’s living skies\"></img>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/07/09/PXL_20250704_032334240.png\" alt=\"Saskatchewan’s living skies\"></img>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/07/09/TXT55717.png\" alt=\"Saskatchewan’s living skies\"></img>\n <div class=\"caption\"><p>The first two are from the park behind Mom’s place,<br></br>the third from that mini-mountain mentioned\n above.</p></div>\n <h2 id=\"p-6\">Experience and memory</h2>\n <p>My Mom’s doing well for a nonagenerian. She’s smart. When I visited early last fall and we talked about the US election I was\n bullish on Kamala Harris’s chances. She laughed at me and said “The Americans won’t elect a woman.” Well then.</p>\n <p>But she’s forgetful in the short term. I took her to the Legislature’s\n garden and to the top of the mini-mountain and for a drive out in the country and another adventure we’ll get to; she\n enjoyed them all. But maybe she won’t remember them.</p>\n <p>“Make memories” they say, but what if you show someone you love a good time and maybe they won’t remember it the\n next day? I’m gonna say it’s still worthwhile and has a lesson to teach about what matters. There endeth the lesson.</p>\n <h2 id=\"p-5\">The gallery</h2>\n <p>Indigenous people make up 17% of Regina’s population, the highest share in any significant Canadian city. By “indigenous” I\n mean the people that my ancestors stole the land from. It’s personal with me; Around 1900, my Dad’s family, Norwegian\n immigrants, took over some pretty\n great farmland southeast of Edmonton by virtue of “homesteading”, such a <em>nice</em> word isn’t it?</p>\n <p>Regina tries to honor its indigenous heritage and my favorite expression of that is its\n <a href=\"https://mackenzie.art\">Mackenzie Art Gallery</a>, a lovely welcoming space in the\n <a href=\"https://www.saskatchewan.ca/government/directory?ou=a8e54600-77d6-4b7e-9702-f07a3dac1b47\">T.C.Douglas building</a> (for\n “T.C.” read “Tommy”. (Did I mention him?) Mom and I walked around it and had lunch in its very decent café.</p>\n <p>Every time I’ve been there the big exhibitions in the big rooms have been indigenous-centered, and generally excellent.\n I try to go every time I visit and I’ve never been disappointed.</p>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/07/09/PXL_20250708_172437441.png\" alt=\"Indigenous art at Regina’s Mackenzie Gallery\"></img>\n <p>In 2025, anything I have to say about this piece would be superfluous.</p>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/07/09/PXL_20250708_173041377.png\" alt=\"Every American Flag Is A Warning Sign\"></img>\n <p>I love modern-art galleries, especially with big rooms full of big pieces, even if I don’t like all the art.\n Because it feels good to be in the presence of the work of people who are pouring out\n what they have to offer, especially at large scale. If the task wasn’t hard enough that failures\n are common then it wouldn’t be worthwhile, would it?</p>\n <p>They’re especially great when there’s someone I love there enjoying it with me. Here’s Mom.</p>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/07/09/PXL_20250708_172836385.png\" alt=\"Jean Bray considers indigenous art\"></img>\n <p>These days, any visit might be the last. I hope this wasn’t.</p>", "image": null, "media": [], "authors": [ { "name": "Tim Bray", "email": null, "url": null } ], "categories": [ { "label": "The World/Places/Saskatchewan", "term": "The World/Places/Saskatchewan", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "The World", "term": "The World", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Places", "term": "Places", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Saskatchewan", "term": "Saskatchewan", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Arts/Photos", "term": "Arts/Photos", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Arts", "term": "Arts", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Photos", "term": "Photos", "url": "https://www.tbray.org/ongoing/What/" } ] }, { "id": "https://www.tbray.org/ongoing/When/202x/2025/07/07/Epsilon-Wrangling", "title": "QRS: Epsilon Wrangling", "description": "I haven’t shipped any new features for Quamina in many months, partly due to a flow of real-life distractions, but also I’m up against tough performance problems in implementing Regular Expressions at massive scale. I’m still looking for a breakthrough, but have learned things about building and executing finite automata that I think are worth sharing. This piece has to do with epsilons; anyone who has studied finite automata will know about them already, but I’ll offer background for those people to skip", "url": "https://www.tbray.org/ongoing/When/202x/2025/07/07/Epsilon-Wrangling", "published": "2025-07-07T19:00:00.000Z", "updated": "2025-07-10T02:41:00.000Z", "content": "<p>I haven’t shipped any new features for\n <a href=\"https://github.com/timbray/quamina\">Quamina</a> in many months, partly due to a flow of real-life distractions, but\n also I’m up against tough performance problems in implementing\n <a href=\"/ongoing/When/202x/2024/12/12/Quamina-Regular-Expression-Series\">Regular Expressions at massive scale</a>.\n I’m still looking for a breakthrough, but have learned things about building and executing finite automata\n that I think are worth sharing. This piece has to do with\n <a href=\"https://en.wikipedia.org/wiki/Nondeterministic_finite_automaton#NFA_with_ε-moves\">epsilons</a>; anyone who has studied\n finite automata will know about them already, but I’ll offer background for those people to skip.</p>\n <p>I’ve written about this before in\n <a href=\"/ongoing/When/202x/2024/06/17/Epsilon-Love\">Epsilon Love</a>. A commenter pointed out that the definition of “epsilon”\n in that piece is not quite right per standard finite-automata theory, but it’s still a useful in that it describes how\n epsilons support constructs like the shell-style “<code>*</code>”.</p>\n <h2 id=\"p-2\">Background</h2>\n <p>Finite automata come in two flavors: Deterministic (DFA) and Nondeterministic (NFA). DFAs move from state to state one input\n symbol at a time: it’s simple and easy to understand and to implement.\n NFAs have two distinguishing characteristics: First, when you’re in a\n state and an input symbol arrives, you can transfer to more than one other state. Second, a state can have “epsilon transitions”\n (let’s say “ε” for epsilon), which can happen any time at all while you’re in that state, input or no input.</p>\n <p>NFAs are more complicated to traverse (will discuss below) but you need them if you want to\n implement regular expressions with <code>.</code> and <code>?</code> and <code>*</code> and so on. You can turn any NFA into a\n DFA, and I’ll come back to that subject in a future piece.</p>\n <p>For implementing NFAs, I’ve been using\n <a href=\"https://en.wikipedia.org/wiki/Thompson%27s_construction\">Thompson's construction</a>, where\n “Thompson” is\n <a href=\"https://en.wikipedia.org/wiki/Ken_Thompson\">Ken Thompson</a>, co-parent of Unix. This technique is also nicely\n described by Russ Cox in \n <a href=\"https://swtch.com/~rsc/regexp/regexp1.html\">Regular Expression Matching Can Be Simple And Fast</a>. You don’t need to\n learn it to understand this piece, but I’ll justify design\n choices by saying “per Thompson”.</p>\n <p>I’m going to discuss two specific issues today, ε-closures and a simpler NFA definition.</p>\n <h2 id=\"p-3\">ε-closures</h2>\n <p>To set the stage, consider this regexp: <nobr><code>A?B?C?X</code></nobr></p>\n <p>It should match “X” and “BX” and “ACX” and so on, but not “CAX” or “XX”.\n Thompson says that you implement <code>A?</code> with a\n transition to the next state on “A” and another ε-transition to that next state; because if you see an “A” you should transition,\n but then you can transition anyhow even if you don’t.</p>\n <p>The resulting NFA looks like this:</p>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/07/07/AcmBcmCcmX.png\" alt=\"NFA matching A?B?C?X\"></img>\n <p> In finite-automaton\n math, states are usually represented by the letter “q” followed by a number (usually italicized and subscripted, like\n <i>q<sub>0</sub></i>, but not here, sorry). Note <code>q4</code>’s double circle which means it’s\n a goal state, i.e. if we get here we’ve matched the regexp.\n I should add that this was produced with\n <a href=\"https://draw.io\">draw.io</a>, which seems to make this sort of thing easy.\n </p>\n <h2 id=\"p-5\">Back to that NFA</h2>\n <p>So, here’s a challenge: Sketch out the traversal code in your head. Think about the input strings “AX” and “BCX” and just “X”\n and how you’d get through the NFA to the Q4 goal state.</p>\n <p>The trick is what’s called the ε-closure. When you get to a state, before you look at the next input symbol, you have to set\n up to process it. In this case, you need to be able to transition on an A or B or C. So what you do is pull together the\n start state <code>q0</code> and also any other states you can reach from there through ε-transitions. In this case, the ε-closure\n for the start state is <code>{q0, q1, q2, q3}</code>.</p>\n <p>Suppose, then, that you see a “B” input symbol. You apply it to all the states in the ε-closure. Only <code>q1</code> matches,\n transitioning you to\n <code>q2</code>. Before you look at the next input symbol, you compute the ε-closure for <code>q2</code>, which turns\n out to be <code>{q2, q3}</code>. With this ε-closure, you can match “C” or “X”. If you get a “C”, you”ll step to\n <code>q3</code>, whose ε-closure is just itself, because “X” is the only path forward.</p>\n <p>So your NFA-traversal algorithm for one step becomes something like:</p>\n <ol>\n <li><p>Start with a list of states.</p></li>\n <li><p>Compute the ε-closure of that list.</p></li>\n <li><p>Read an input symbol.</p></li>\n <li><p>For each state in the ε-closure, see if you can traverse to another state.</p></li>\n <li><p>If so, add it to your output list of states.</p></li>\n <li><p>When you’re done, your output list of states is the input to this algorithm for the next step.</p></li>\n </ol>\n <h2 id=\"p-6\">Computation issues</h2>\n <p>Suppose your regular expression is <code>(A+BC?)+</code>. I’m not going to sketch out the NFA, but just looking at it tells\n you that it has to have loopbacks; once you’ve matched the parenthetized chunk you need to go back to a state where you can\n recognize another occurrence.\n For this regexp’s NFA, computing the ε-closures can lead you into an infinite loop. (Should be obvious, but I didn’t realize it until\n after the first time it happened.)</p>\n <p>You can have loops and you can also have dupes. In practice, it’s not that uncommon for a state to have more than one\n ε-transition, and for the targets of these transitions to overlap.</p>\n <p>So you need to watch for loops and to dedupe your output. I think the only way to avoid this is with a cookie-crumbs\n “where I’ve been” trail, either as a list or a hash table.</p> \n <p>Both of these are problematic because they require allocating memory, and that’s something you really don’t want to do when\n you’re trying to match patterns to events at Quamina’s historic rate of millions per second.</p>\n <p>I’ll dig into this problem in a future Quamina-Diary outing, but obviously, caching computed\n epsilon closures would avoid re-doing this computation.</p>\n <p>Anyhow, bear ε-closures in mind, because they’ll keep coming up as this series goes on.</p>\n <h2 id=\"p-7\">And finally, simplifying “NFA”</h2>\n <p>At the top of this piece, I offered the standard definition of NFAs: First, when you’re in a\n state and an input symbol arrives, you can transfer to more than one other state. Second, you can have ε-transitions.\n Based on my recent work, I think this definition is redundant. Because if you need to transfer to two different states on some\n input symbol, you can do that with ε-transitions.</p>\n <p>Here’s a mini-NFA that transfers from state <code>q0</code> on “A” to both <code>q1</code> and <code>q2</code>.</p>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/07/07/Splice-1.png\" alt=\"An NFA transferring to two different states on an input symbol\"></img>\n <p>And here’s how you can achieve the same effect with ε-transitions:</p>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/07/07/Splice-2.png\" alt=\"Transferring to two destinations using ε-transitions\"></img>\n <p>In that NFA, in <code>qS</code> the “S” stands for “splice”, because it’s a state that exists to connect\n two threads of finite-automaton traversal.</p>\n <p>I’m pretty sure that this is more than just a mathematical equivalence. In my regexp implementation, so far at least,\n I’ve never encountered a need to do that first kind of dual transition. Furthermore, the “splice” structure is how Thompson\n implements the regular-expression “<code>|</code>” operator.</p>\n <p>So if you’re building an NFA, all the traversal stuff you need in a state is a simple map from input symbol to next state,\n and a list of ε-transitions.</p>\n <h2 id=\"p-8\">Next up</h2>\n <p>How my own implementation of NFA traversal collided head-on into the Benchmark From Hell and still hasn’t recovered.</p>", "image": null, "media": [], "authors": [ { "name": "Tim Bray", "email": null, "url": null } ], "categories": [ { "label": "Technology/Quamina Diary", "term": "Technology/Quamina Diary", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Technology", "term": "Technology", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Quamina Diary", "term": "Quamina Diary", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Technology/Software", "term": "Technology/Software", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Software", "term": "Software", "url": "https://www.tbray.org/ongoing/What/" } ] }, { "id": "https://www.tbray.org/ongoing/When/202x/2025/07/06/AI-Manifesto", "title": "The Real GenAI Issue", "description": "Last week I published a featherweight narrative about applying GenAI in a real-world context, to a tiny programming problem. Now I’m regretting that piece because I totally ignored the two central issues with AI: What it’s meant to do, and how much it really costs", "url": "https://www.tbray.org/ongoing/When/202x/2025/07/06/AI-Manifesto", "published": "2025-07-06T19:00:00.000Z", "updated": "2025-07-06T19:06:43.000Z", "content": "<p>Last week I published a\n <a href=\"/ongoing/When/202x/2025/07/01/First-AI-Code\">featherweight narrative</a> about applying GenAI in a real-world context, to\n a tiny programming problem. Now I’m regretting that piece because I totally ignored the two central issues with\n AI: What it’s meant to do, and how much it really costs.</p>\n <h2 id=\"p-1\">What genAI is for</h2>\n <p>The most important fact about genAI in the real world is that there’ve been literally\n <a href=\"https://finance.yahoo.com/news/how-nvidia-played-a-central-role-in-the-306-billion-ai-startup-boom-195741749.html?guccounter=1\">hundreds\n of billions</a> of dollars invested in it; that link is just startups, and ignores a comparable torrent of cash pouring out of Big\n Tech.</p> \n <p>The business leaders pumping all this money of course don’t understand the technology. They’re doing this for exactly one\n reason: They think they can discard armies of employees and replace them with LLM services, at the cost of\n shipping shittier products. Do you think your management would spend that kind of money to help you with a quicker first draft or\n a summarized inbox?</p>\n <p>Adobe said the quiet part out loud:\n <a href=\"https://petapixel.com/2024/05/03/adobe-throws-photographers-under-the-bus-again-skip-the-photoshoot/\">Skip the\n Photoshoot</a>. </p>\n <p>At this point someone will point out that previous technology waves have generated as much employment as they’ve eliminated.\n Maybe so, but that’s not what business leaders think they’re buying. They think they’re buying smaller payrolls.</p>\n <p>Maybe I’m overly sensitive, but thinking about these truths leads to a mental stench that makes me want to stay away from\n it.</p>\n <h2 id=\"p-2\">How much does genAI cost?</h2>\n <p>Well, I already mentioned all those hundreds of billions. But that’s pocket change. The investment community in general and\n Venture Capital in particular will whine and moan, but the people who are losing the money are people who can afford to.</p>\n <p>The first real cost is hypothetical: What if those business leaders are correct and they can gleefully dispose of millions of\n employees? If you think we’re already suffering from egregious levels of inequality, what happens when a big chunk of the\n middle class suddenly becomes professionally superfluous? I’m no economist so I’ll stop there, but you don’t have to be a\n rocket scientist to predict severe economic pain.</p>\n <p>Then there’s the other thing that nobody talks about, the massive greenhouse-gas load that all those data centers are going\n to be pumping out. This at a time when we we blow past one atmospheric-carbon metric after another and David Suzuki says\n <a href=\"https://www.ipolitics.ca/2025/07/02/its-too-late-david-suzuki-says-the-fight-against-climate-change-is-lost/\">the\n fight against climate change is lost</a>, that we need to hunker down and work on survival at the local level.</p>\n <h2 id=\"p-3\">The real problem</h2>\n <p>It’s the people who are pushing it. Their business goals are quite likely, as a side-effect, to make\n the world a worse place, and they don’t give a fuck. Their technology will inevitably worsen the onrushing climate catastrophe,\n and they don’t give a fuck.</p>\n <p>It’s probably not as simple as “They’re just shitty people”<span class=\"dashes\"> —</span> it’s not exactly easy to escape the\n exigencies of modern capitalism. But they are people who are doing shitty things.</p>\n <h2 id=\"p-4\">Is genAI useful?</h2>\n <p>Sorry, I’m having trouble even thinking about that now.</p>", "image": null, "media": [], "authors": [ { "name": "Tim Bray", "email": null, "url": null } ], "categories": [ { "label": "Technology/AI", "term": "Technology/AI", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Technology", "term": "Technology", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "AI", "term": "AI", "url": "https://www.tbray.org/ongoing/What/" } ] }, { "id": "https://www.tbray.org/ongoing/When/202x/2025/07/01/First-AI-Code", "title": "My First GenAI Code", "description": "At the moment, we have no idea what the impact of genAI on software development is going to be. The impact of anything on coding is hard to measure systematically, so we rely on anecdata and the community’s eventual consensus. So, here’s my anecdata. Tl;dr: The AI was not useless", "url": "https://www.tbray.org/ongoing/When/202x/2025/07/01/First-AI-Code", "published": "2025-07-01T19:00:00.000Z", "updated": "2025-07-01T18:38:00.000Z", "content": "<p>At the moment, we have no idea what the impact of genAI on software development is going to be. The impact of\n <em>anything</em> on coding\n is hard to measure systematically, so we rely on anecdata and the community’s eventual consensus.\n So, here’s my anecdata. Tl;dr: The AI was not useless.</p>\n <h2 id=\"p-1\">The problem</h2>\n <p>My current work on\n <a href=\"/ongoing/What/Technology/Quamina%20Diary/\">Quamina</a> involves dealing with collections of finite-automata states,\n which, in the Go programming language, are represented as slices of pointers to state instances:</p>\n <blockquote><p><code>[]*faState</code></p></blockquote>\n <p>The problem I was facing was deduping them, so that there would be only one instance corresponding to any particular\n collection. This is what, in Java, the <code>intern()</code> call does with strings.</p>\n <p>The algorithm isn’t rocket science:</p>\n <ol>\n <li><p>Dedupe the states, i.e. turn the collection into a set.</p></li>\n <li><p>For each set of states, generate a key.</p></li>\n <li><p>Keep a hash table of sets around, and use the key to see whether you’ve already got such a set, and if so return\n it. Otherwise, make a new entry in the hash table and return that.</p></li>\n </ol>\n <p>I’m out of touch with the undergrad CS curriculum, but this feels like a second-year assignment or thereabouts? Third?</p>\n <h2 id=\"p-2\">Enter Claude</h2>\n <p>So I prompted Claude thus:</p>\n <blockquote><p>I need Go code to provide a \"intern\"-like function for lists of pointers. For example, if I have several\n different []*int arrays, which may contain duplicates, I want to call intern() on each of them and get back a single canonical\n pointer which is de-duplicated and thus a set.</p></blockquote>\n <p>Claude did pretty well. It got the algorithm right, the code was idiomatic and usefully commented, and it also provided a\n decent unit test (but in a <code>main()</code> stanza rather than a proper Go test file).\n I didn’t try actually running it.</p>\n <p>The interesting part was the key computation. I, being lazy, had just done a Go <code>fmt.Sprintf(\"%p\")</code>\n incantation to get a hex string representing each state’s address, sorted them, joined them, and that was the key.</p>\n <p>Claude worked with the pointers more directly.</p>\n <pre><code>\t// Sort by pointer address for consistent ordering\n\tsort.Slice(unique, func(i, j int) bool {\n\t\treturn uintptr(unsafe.Pointer(unique[i])) < uintptr(unsafe.Pointer(unique[j]))\n\t})</code></pre>\n <p>Then it concatenated the raw bytes of the map addresses and lied to Go by claiming it was a string.</p>\n <pre><code>\t// Create key from pointer addresses\n\tkey := make([]byte, 0, len(slice)*8)\n\tfor _, ptr := range slice {\n\t\taddr := uintptr(unsafe.Pointer(ptr))\n\t\t// Convert address to bytes\n\t\tfor i := 0; i < 8; i++ {\n\t\t\tkey = append(key, byte(addr>>(i*8)))\n\t\t}\n\t}\n\treturn string(key)</code></pre>\n\t<p>This is an improvement in that the keys will be half the size of my string version.\n\tI didn’t copy-paste Claude’s code wholesale, just replaced ten or so lines of key construction.</p>\n <h2 id=\"p-3\">Take-away</h2>\n <p>I dunno. I thought the quality of the code was fine, wouldn’t have decomposed the functions in the same way but wouldn’t have\n objected on review. I was pleased with the algorithm, but then I would be since it was the same one I’d written, and, having\n said that, quite possibly that’s the only algorithm that anyone has used. It will be <em>super</em> interesting if someone\n responds to this write-up saying “You and Claude are fools, here’s a much better way.”</p>\n <p>Was it worth fifteen minutes of my time to ask Claude and get a slightly better key computation?\n Only if this ever turns out\n to be a hot code path and I don’t think anybody’s smart enough to know that in advance.</p>\n <p>Would I have saved time by asking Claude first? Tough to tell; Quamina’s data structures are a bit non-obvious and I would\n have had to go to a lot of prompting work to get it to emit code I could use directly.\n Also, since Quamina is low-level performance-critical infrastructure code, I’d be nervous about having any volume of code\n that I didn’t really <em>really</em> understand.</p>\n <p>I guess my take-away was that in this case, Claude knew the Go idioms and APIs better than I did; I’d never looked at the\n <a href=\"https://pkg.go.dev/unsafe\">unsafe</a> package.</p>\n <p>Which reinforces my\n suspicion that genAI is going to be especially useful at helping generate code to talk to big complicated\n APIs that are hard to remember all of. Here’s an example: Any moderately competent Android developer could add a feature to an\n app where it strobes the flash and surges the vibration in sync with how fast you’re shaking the device back and forth,\n probably in an afternoon. But it would require a couple of dozen calls into the dense forest of Android APIs, and I suspect a\n genAI might get you there a lot faster by just filling the calls in as prompted.</p>\n <p>Reminder: This is just anecdata.</p>", "image": null, "media": [], "authors": [ { "name": "Tim Bray", "email": null, "url": null } ], "categories": [ { "label": "Technology/AI", "term": "Technology/AI", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Technology", "term": "Technology", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "AI", "term": "AI", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Technology/Software", "term": "Technology/Software", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Software", "term": "Software", "url": "https://www.tbray.org/ongoing/What/" } ] }, { "id": "https://www.tbray.org/ongoing/When/202x/2025/06/22/Qobuz-and-Others", "title": "Qobuz and Mac", "description": "Back in March I offered Latest Music (feat. Qobuz), describing all the ways I listen to music (Tl;dr: YouTube Music, Plex, Qobuz, record player). I stand by my opinions there but wanted to write more on two subjects: First Qobuz, because it suddenly got a lot better. And a recommendation, for people with fancy A/V setups, that you include a cheap Mac Mini", "url": "https://www.tbray.org/ongoing/When/202x/2025/06/22/Qobuz-and-Others", "published": "2025-06-22T19:00:00.000Z", "updated": "2025-06-26T20:13:08.000Z", "content": "<p>Back in March I offered\n <a href=\"/ongoing/When/202x/2025/03/27/Music-Plus-Qobuz\">Latest Music (feat. Qobuz)</a>, describing all the ways I listen to\n music (Tl;dr: YouTube Music, Plex, Qobuz, record player). I stand by my opinions there but wanted to write more on two subjects:\n First Qobuz, because it suddenly got a lot better. And a recommendation, for people with fancy A/V setups, that you include a cheap\n Mac Mini.</p>\n <h2 id=\"p-1\">Qobuz</h2>\n <p>That other piece had a list of the reasons to use Qobuz, but times have changed, so let’s revise it:</p>\n <ol>\n <li><p>It pays artists more per stream than any other service, by a wide margin.</p></li>\n <li><p>It seems to have as much music as anyone else.</p></li>\n <li><p>It’s album-oriented, and I appreciate artists curating their own music.</p></li>\n <li><p>Classical music is a first-class citizen.</p></li>\n <li><p>It’s actively curated; they highlight new\n music regularly, and pick a “record of the week”. To get a feel, check out\n <a href=\"https://www.qobuz.com/ca-en/magazine\">Qobuz Magazine</a>; you don’t have to be a subscriber.</p></li>\n <li><p>It gives evidence of being built by people who love music.</p></li>\n <li><p>They’re obsessive about sound quality, which is great, but only makes a difference if you’re listening through quality\n speakers.</p></li>\n <li><p>A few weeks ago, the mobile app quality switched from adequate to\n excellent.</p></li>\n </ol>\n <h2 id=\"p-2\">That app</h2>\n <p>I want to side-trip a bit here, starting with a question. How long has it been since an app you use has added a feature that\n was genuinely excellent and let you do stuff you couldn’t before and didn’t get in your way and created no suspicion that it was\n strip-mining your life for profit? I’m here to tell you that this can still happen, and it’s a crushing criticism\n of my profession that it so rarely does.</p>\n <p>I’m talking about\n <a href=\"https://www.qobuz.com/ca-en/connect\">Qobuz Connect</a>. I believe there are other music apps that can do this sort of\n stuff, but it feels like magic to me.</p>\n <p>It’s like this. I listen to music at home on an audiophile system with big speakers, in\n <a href=\"/ongoing/What/The%20World/Jaguar%20Diary/\">our car</a>, and on\n <a href=\"/ongoing/When/201x/2019/08/06/Jeanneau-795\">our boat</a>. The only app I touch is the\n <a href=\"https://play.google.com/store/apps/details?id=com.qobuz.music\">Qobuz Android app</a>. The only time it’s actually\n receiving and playing the music itself is in the car, with the help of Android Auto. In the other scenarios it’s talking to\n Qobuz running on a Mac, which actually fetches the music and routes it to the audio system.\n Usually it figures out what player I want it to control automatically, although there’ve been a couple\n times when I drove away in the car and it got confused about where to send the music. Generally, it works great.</p>\n <p>The app’s music experience is rich and involving.</p>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/06/22/Screenshot_20250622-230116.png\" alt=\"Qobuz Android app screenshot\"></img>\n <p>It has New Releases and curated playlists and a personalized stream for\n me and a competent search function for those times I absolutely must listen to Deep Purple or Hania Rani or\n whoever.</p>\n <p>I get a chatty not-too-long email from Qobuz every Friday, plugging a few of the week’s new releases, with sideways and\n backward looks too. (This week: A Brian Wilson stream.) The app has so much stuff, especially among the themed streams, that I\n sometimes get lost. But somehow it’s not irritating; what’s on the screen remains musically interesting and you can always hit\n the app’s Home button.</p>\n <p>Qobuz has its own musical tastes that guide its curation. They’re not always compatible with\n mine<span class=\"dashes\"> —</span> my tolerance for EDM and mainstream Hip-hop remains low. And I wish they were\n stronger on Americana. But the intersection is broad enough to provide plenty of enjoyable new-artist experiences. Let me share\n one with you:\n <a href=\"https://kwashibu.bandcamp.com/album/love-warrior-s-anthem\">Kwashibu Area Band</a>, from Ghana.</p>\n <p>Oh, one complaint: Qobuz was eating my Pixel’s battery. So I poked around online and it’s a known problem; you have to use the\n Android preferences to stop it from running in the background. Huh? What was it doing in the background anyhow?! But it seems to\n work fine even when it’s not doing it.</p>\n <h2 id=\"p-3\">A Mac, you say?</h2>\n <p>The music you’re listening to is going to be stored on disk, or incoming from a streaming service. Maybe you want to serve\n some of the stored music out to listen to it in the car or wherever. There are a variety of audio products in the\n “Streamer” category that do some of these things in various combinations. A lot of them make fanciful claims about the\n technology inside and are thus expensive, you can easily spend thousands.</p>\n <p>But any reasonably modern computer can do all these things and more, plus it also can drive a big-screen display, plus it will\n probably run the software behind whatever next year’s New Audio Hotness is.</p>\n <p>At this point the harder-core geeks will adopt a superior tone of voice to say “I do all that stuff with FreeBSD and a bunch of\n open-source packages running on a potato!”</p>\n <p>More power to ’em. But I recommend a basic Apple Silicon based Mac Mini, M1 is fine, which you can get for like $300 used on\n eBay. And if you own a lot of music and video you can plug in a 5T USB drive for a few more peanuts. This will run Plex and\n Qobuz and almost any other imaginable streaming software. Plus you can plug it into your home-theater screen and it has a modern\n Web browser so you can also play anything from anywhere on the Web.</p>\n <p>I’ve been doing this for a while but I had one big gripe. When I wanted to stream music from the Mac, I needed to use a\n keyboard and mouse, so I keep one of each, Bluetooth-flavored, nearby. But since I got Qobuz running that’s become a very rare\n occurrence.</p>\n <h2 id=\"p-4\">You’re forgetting something</h2>\n <p>Oh, and yeah, there’s the record player. Playing it requires essentially no software at all, isn’t that great?</p>", "image": null, "media": [], "authors": [ { "name": "Tim Bray", "email": null, "url": null } ], "categories": [ { "label": "Arts/Music", "term": "Arts/Music", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Arts", "term": "Arts", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Music", "term": "Music", "url": "https://www.tbray.org/ongoing/What/" } ] }, { "id": "https://www.tbray.org/ongoing/When/202x/2025/06/21/Long-Links", "title": "Long Links", "description": "“Wow, Tim, didn’t you do a Long Links just last month? Been spending too much time doomscrolling, have we?” Maybe. There sure are a lot of tabs jostling each other along the top of that browser. Many are hosting works that are both long and good. So here they are; you probably don’t have time for all of ’em but my hope is that one or two might reward your visit", "url": "https://www.tbray.org/ongoing/When/202x/2025/06/21/Long-Links", "published": "2025-06-21T19:00:00.000Z", "updated": "2025-06-21T18:56:27.000Z", "content": "<p>“Wow, Tim, didn’t you do a \n <a href=\"/ongoing/When/202x/2025/05/06/Long-Links\">Long Links</a> just last month? Been spending too much time doomscrolling,\n have we?” Maybe. There sure are a lot of tabs jostling each other along the top of that browser. Many\n are hosting works that are both long and good. So here they are; you probably don’t have time for all of ’em but my hope\n is that one or two might reward your visit.</p>\n <p>Let’s start with a really important subject: Population growth oh actually these days it’s population shrinkage.\n For a short-sharp-shock-flavored introduction I recommend\n <a href=\"https://www.youtube.com/watch?v=Ufmu1WD2TSk\">South Korea Is Over</a>\n which explains the brick wall societies with fertility rates way below the replacement rate of 2.1 children per woman per\n lifetime are hurtling toward. South Korea, of course, being the canonical example. But also Japan and Taiwan and Italy and Spain\n and so on.</p>\n <p>And, of course, the USA, where the numbers aren’t <em>that</em> much higher:\n <a href=\"https://www.macrotrends.net/global-metrics/countries/usa/united-states/fertility-rate\">U.S. Fertility Rate\n (1950-2025)</a>. Even so, the population still grows (because of immigration), albeit at less than 1% per annum:\n <a href=\"https://www.macrotrends.net/global-metrics/countries/usa/united-states/population-growth-rate\">U.S. Population Growth\n Rate</a>. If the MAGAs get their way and eventually stop all non-white immigration, the US will be in South Korea\n territory within a generation or two. </p> \n <p>A reasonable person might ask why. It’s not really complicated, as you can read here:\n <a href=\"https://www.nytimes.com/2025/06/15/opinion/birth-rate-parenting-natalism.html?unlocked_article_code=1.Pk8.OBam.dOi0UpP-8-DV&smid=url-share\">A Bold Idea to Raise the Birthrate: Make Parenting Less Torturous</a>.\n From which I quote: “To date, no government policies have significantly improved their nation’s birthrates for a sustained\n period.” The essay argues convincingly that it’s down to two problems: Capitalism and sexism. Neither of which offers an easy\n fix. </p>\n <p>Speaking of the travails of late capitalism, here’s how bad it’s getting:\n <a href=\"https://www.nytimes.com/2025/03/01/opinion/crisis-working-homeless.html?unlocked_article_code=1.Qk8.jsTO.aUBSAMHw7Op2&smid=url-share\">America\n Is Pushing Its Workers Into Homelessness</a>.</p>\n <p>For a refreshingly different take on the business world, here’s Avery Pennarun, CEO of Tailscale: \n <a href=\"https://apenwarr.ca/log/20250530\">The evasive evitability of enshittification</a>. Not sure I buy what he’s saying, but\n still worth reading.</p>\n <p>Most people who visit these pages are geeks or geek-adjacent. If you’re one of those, and especially if you enjoy the small\n but vibrant genre of Comical Tech War Stories, I recommend\n <a href=\"https://yeet.cx/blog/lock-free-rust/\">Lock-Free Rust: How to Build a Rollercoaster\n While It’s on Fire</a></p>\n <p>And here’s write-up on an AWS product which has one of the best explanations I’ve ever read of the different flavors modern\n databases come in: <a href=\"https://www.redshift-observatory.ch/white_papers/downloads/introduction_to_the_fundamentals_of_amazon_redshift.html\">Introduction to the Fundamentals of Amazon Redshift</a></p>\n <p>Of course, the geek conversation these days is much taken up with the the impact of genAI as in “vibe coding”. To\n summarize the conversation: A few people, not obviously fools, are saying “This stuff seems to help me” and many others, also\n apparently sensible, are shouting back “You’re lying to yourself, it can’t be helping!” Here is some of the testimony: \n Kellan on <a href=\"https://laughingmeme.org//2025/05/25/vibe-coding-for-teams.html\">Vibe\n coding for teams, thoughts to date</a>, Armin Ronacher on\n <a href=\"https://lucumr.pocoo.org/2025/6/12/agentic-coding/\">Agentic Coding Recommendations</a>,\n Harper on <a href=\"https://harper.blog/2025/05/08/basic-claude-code/\">Basic Claude Code</a>, and \n Klabnik on \n <a href=\"https://steveklabnik.com/writing/a-tale-of-two-claudes/\">A tale of two Claudes</a></p>\n <p>I lean to believing narratives of personal experience, but on the other hand the skeptics make good points. Another\n random piece of evidence: Because I’m lazy, I tend to resist adopting technologies that have steep learning curves, which genAI\n currently does. On many occasions, this has worked out well because those technologies have turned out not to pay off very\n well. Am I a canary in the coal mine?</p>\n <h2 id=\"p-2\">*cough*</h2>\n <p>Since I introduced myself into the narrative, I’ll note that today is my 70th birthday. I am told that this means\n that my wisdom has now been maximized, so you’re safe in believing whatever you read in this space. I don’t have anything\n special to say to commemorate the occasion,\n so here’s a picture of my neighborhood’s network infrastructure, which outlines the form of a\n cathedral’s nave. I’m sure there’s a powerful metaphor lurking in there.</p>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/06/21/TXT55659.png\" alt=\"Many electrical and data wires festoon a back alley\"></img> \n <p>Oh, and here’s a photography Long Link: <a href=\"https://www.lux.camera/what-is-hdr/\">What is HDR, anyway?</a>\n It’s actually a pitch for a nice-looking mobile camera app, but it offers real value on things that can\n affect the quality of your pictures.</p>\n <p>Regular readers will know that I’m fascinated by the many unsolved issues and open questions in cosmology, which are by\n definition the largest problems facing human consciousness. The ΛCDM-vs-MOND controversy, i.e. “Is there really dark\n matter or does gravity get weird starting at the outer edges of galaxies?”, offers great entertainment value. And, there is\n news!</p>\n <p>First of all, here’s a nice overview on the controversy:\n <a href=\"https://arxiv.org/pdf/2505.21638v1\">Modified Newtonian Dynamics: Observational Successes and Failures</a>.</p>\n <p>Which points out that the behavior of “wide binary” star systems ought to help resolve the issue, but that people who\n study it keep coming up with contradictory findings. Here’s the latest, from Korean researchers: Press release\n <a href=\"http://www.sejongpr.ac.kr/sejongnewspaperview.do?currentPage=1&searchField=&searchValue=&boardType=3&pkid=73549&utm_source=beehiiv&utm_medium=newsletter&utm_campaign=mediamobilize&_bhlid=3e40dce99e536f4015a1dd2c6afd193a465d17ea\">New method of measuring gravity with 3D velocities of wide binary stars is developed and confirms modified gravity</a>\n and peer-reviewed paper:\n <a href=\"https://iopscience.iop.org/article/10.3847/1538-4357/adce09\">Low-acceleration Gravitational Anomaly\n from Bayesian 3D Modeling of Wide Binary Orbits: Methodology and Results with Gaia Data Release 3</a>.\n Spoiler: They think the gravity gets weird. I have a math degree but cosmology math is generally way over my head. Having said\n that, I think those South Koreans may be a bit out over their skis; I generally distrust heroic statistical methods. We’ll\n see.</p>\n <p>Let’s do politics. It turns out that the barbaric junta which oppresses the people of China does not limit its barbarism\n to its own geography: \n <a href=\"https://www.cbc.ca/news/politics/china-targets-dissidents-canada-1.7543745?cmp=rss\">Followed, threatened and smeared\n — attacks by China against its critics in Canada are on the rise</a>.</p>\n <p>More politics: The MAGAs are always railing against “elites”. Here are two discussions of what they mean:\n <a href=\"https://www.theatlantic.com/ideas/archive/2025/04/class-money-finances/682301/\">What the Comfort Class Doesn’t\n Get</a> and <a href=\"https://siderea.dreamwidth.org/1865048.html\">When They Say Elites, They Mean Us</a>.</p>\n <p>The world’s biggest political issue <em>should</em> be the onrushing climate crisis. When Trump and his toadies\n are justly condemned and ridiculed by future historians, it is their malevolent cluelessness on this subject that\n may burn the hottest. Who knows, maybe they’ll pay attention to this:\n <a href=\"https://www.bloomberg.com/news/newsletters/2025-06-18/insurers-want-businesses-to-wake-up-to-costs-of-extreme-heat\">Insurers Want Businesses to Wake Up to Costs of Extreme Heat</a>.</p>\n <h2 id=\"p-1\">The list of Long Links is too long</h2>\n <p>So I’ll try to end cheerfully.</p>\n <p>A graceful essay about an old camera and a dreamy picture:\n <a href=\"https://petapixel.com/2025/05/27/a-bridge-across-time-for-sebastiao-salgado/\">A Bridge Across Time: For\n Sebastião Salgado</a></p>\n <p>Latin Wikipedia has 140,000 articles; consider the delightful discussion of \n <a href=\"https://la.wikipedia.org/wiki/Equus_asinus\"><cite>Equus asinus</cite></a>.</p>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/06/21/equus-asinus.png\" alt=\"Asinus in opere tesselato Byzantino\"></img>\n <div class=\"caption\"><p>Asinus in opere tesselato Byzantino</p></div>\n <p>Here’s a lovely little song from TORRES and Julien Baker:\n <a href=\"https://www.youtube.com/watch?v=TurU_Jn-LEg\">The Only Marble I’ve Got Left</a>.</p>\n <p>Finally, a clear-eyed if lengthy essay on why and how to think: \n <a href=\"https://www.newyorker.com/culture/open-questions/should-you-question-everything\">Should You Question\n Everything?</a></p>", "image": null, "media": [], "authors": [ { "name": "Tim Bray", "email": null, "url": null } ], "categories": [ { "label": "The World", "term": "The World", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "The World", "term": "The World", "url": "https://www.tbray.org/ongoing/What/" } ] }, { "id": "https://www.tbray.org/ongoing/When/202x/2025/06/17/More-C2PA", "title": "June 2025 C2PA News", "description": "Things are happening in the C2PA world; here are a couple of useful steps forward, plus cheers and boos for Adobe. Plus a live working C2PA demo you can try out", "url": "https://www.tbray.org/ongoing/When/202x/2025/06/17/More-C2PA", "published": "2025-06-17T19:00:00.000Z", "updated": "2025-06-19T16:20:16.000Z", "content": "<p>Things are happening in the C2PA world; here are a couple of useful steps forward, plus cheers and boos for Adobe.\n Plus a live working C2PA demo you can try out.</p>\n <p>Refresher: The\n <a href=\"https://c2pa.org/\">C2PA</a> technology is driven by the\n <a href=\"https://contentauthenticity.org/\">Content Authenticity Initiative</a> and usually marketed as “Content Credentials”.\n I’ve written before about it, an \n <a href=\"/ongoing/When/202x/2023/10/28/C2PA-Workflows\">introduction in 2023</a> and a\n <a href=\"/ongoing/When/202x/2024/10/29/Lane-Provenance\">progress report</a> last October.</p>\n <p>Let’s start with a picture.</p>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/06/17/TXT55648.png\" alt=\"A dark picture full of vague swirls and jiggly lights\"></img>\n <div class=\"caption\"><p>I was standing with the camera by the ocean at dusk and accidentally left it in the “B” long-exposure\n setting, so this isn’t really a picture <em>of</em> anything but I thought it was kinda pretty.</p></div>\n <h2 id=\"p-1\">Validating Content Credentials</h2>\n <p>As I write this, there are now at least two C2PA-validator Chrome extensions: the\n <a href=\"https://chromewebstore.google.com/detail/contentlens-c2pa-validato/gdejpnjeepoffhkbcgnjdbkgpohdhmln?hl=en\">ContentLens\n C2PA Validator</a> from\n <a href=\"https://www.contentlens.ai/\">ContentLens</a> and\n <a href=\"https://chromewebstore.google.com/detail/c2pa-content-credentials/mjkaocdlpjmphfkjndocehcdhbigaafp?hl=en\">C2PA Content\n Credentials</a> from\n <a href=\"https://www.digimarc.com/\">Digimarc</a>.</p>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/06/17/cc-readout.png\" alt=\"C2PA verifier display\" class=\"inline\"></img>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/06/17/cc2-readout.png\" alt=\"C2PA verifier display\" class=\"inline\"></img>\n <p>If you install either of them, and then you click on that picture just above in Chrome to get the larger version, then you\n right-click on the larger picture, the menu will offer Content-Credentials validation.</p>\n <p>Doing this will produce a little\n “CR” logo at the top right corner, meaning that the C2PA data has been\n verified as being present and signed by a trusted certificate issuer, in this case Adobe.</p>\n <p>Then there’s a popup; the two extensions’ are on the right. They’re different, in interesting ways. Let’s walk through the\n second one.</p> \n <p>The little thumbnail at the top of the popup is what the image looked like when the C2PA was added. Not provided by the other\n verifier.</p>\n <p>The paragraph beginning “Displaying credentials…” says that the C2PA manifest was embedded in the JPG as opposed to stored\n out on the \n cloud; The cloud works fine, and is perhaps a good idea because the C2PA manifest can be quite large. I’m not clear on what the\n “watermark” is about.</p>\n <p>“Issued by Adobe” means that the Chrome extension verified the embedded C2PA against Adobe’s public key and can be\n confident that yes, this was really signed by them.</p>\n <p>“<b>Produced by</b> Timothy Bray” is interesting. How can it know? Well, it turns out that it used LinkedIn’s API to verify\n that I am\n <a href=\"https://www.linkedin.com/in/timbraysoftwareguy/\">timbraysoftwareguy</a> over on LinkedIn. But it goes further; LinkedIn\n has an integration with\n <a href=\"https://www.clearme.com\">Clear</a>, the airport-oriented identity provider. To get a Clear account you have to upload\n government-issued ID, it’s not trivial.</p>\n <p>So this short sentence expands to (take a deep breath) “The validator extension verified that Adobe said that\n LinkedIn said that Clear said that the government ID of the person who posted this says that he’s named Timothy Bray.”</p>\n <p>Note that the first extension’s popup also tells you that Adobe has verified what my LinkedIn and Instagram accounts\n are. This seems super-useful and I wonder why the other omits it.</p>\n <p>“<b>App or device used</b>…” is simple enough, but I’m not actually sure how it works; I guess Adobe has embedded a keypair\n in my Lightroom installation? If I’d taken the picture with a C2PA-equipped camera this is where that history would be\n displayed.</p>\n <p>“<b>AI tool used</b> None”. Interesting and useful, since Adobe provides plenty of genAI-powered tools. Of course, this\n relies on Lightroom telling the truth, but still.</p>\n <p>The “View More” button doesn’t currently work; it takes you to the interactive\n <a href=\"https://contentcredentials.org/verify/\">contentcredentials.org/verify</a> page,\n which seems to fail in retrieving the JPG. If you download the picture then upload it into the verify page (go ahead, it’s\n free) \n that seems to work fine. In addition to the info on the popup, the verify page will tell you (nontechically i.e. vaguely) what I\n did to the picture with Lightroom.</p>\n <h2 id=\"p-3\">What’s good about this?</h2>\n <p>Well, it’s here and it works! There’s all this hype about how cool it will be when the C2PA includes info about what model\n of camera and lens it used and what the shutter speed was and so on, but eh, who cares really? What matters to me (and \n should matter to the world) is <em>provenance</em>: Who posted this thing?</p>\n <p>As I write this, supporters of Israel and Iran are\n <a href=\"https://www.404media.co/the-ai-slop-fight-between-iran-and-israel/?ref=daily-stories-newsletter\">having an AI Slop\n Fight</a> with fake war photos and videos.\n In a C2PA-rich world, you could check; If some clip doesn’t have Content Credentials you should\n probably be suspicious, and if it does, it matters whether it was uploaded by someone at\n <a href=\"https://www.idf.il/en/\">IDF.il</a> versus\n <a href=\"https://www.bbc.com\">BBC.co.uk</a>.</p>\n <h2 id=\"p-2\">What’s wrong with this?</h2>\n <p>Look, I hate to nitpick. I’m overwhelmingly positive on this news, it’s an existence proof that C2PA can be made to work in\n the wild.\n My impression is that most of the money and muscle comes from Adobe; good on ’em.\n But there are things that would make it more useful, and usable by more Web sites. These are not listed in\n any particular order.</p>\n <h2 id=\"p-7\">Identity!</h2>\n <p>Adobe, it’s nice that you let me establish my identity with LinkedIn, Instagram, and Clear. But what I’d\n <em>really</em> like is if you could also verify and sign my Fediverse and Bluesky handles. And, Fediverse and ATProto\n developers, would you please, first of all, stop stripping C2PA manifests from uploaded photo EXIF, and secondly, add your own\n link to the C2PA chain saying something like “Originally posted by @[email protected].”</p>\n <p>Because having verifiable media provenance in the world of social media would be a strong tool against disinformation\n and slop.</p>\n <p>Oh, and another note to Adobe: When I export a photo, the embed-manifest also offers me the opportunity, under the heading\n “Web3”, to allow the image “be used for NFT creative attribution on supported marketplaces” where the supported marketplaces are\n Phantom and MetaMask. Seriously, folks, in 2025? Please get this scammy cryptoslime out of my face.</p>\n <h2 id=\"p-4\">Browsers please…</h2>\n <p>This was done with Chrome extensions. There are people working on extensions for Firefox and\n Safari, but they’re not here yet. Annoyingly, the extensions also don’t seem to work in mobile Chrome, which is where most\n people look at most media.</p>\n <p>I would love it if this were done directly and automatically by the browser.\n The major browsers aren’t perfect, but their creators are known to take security seriously, and I’d be much happier trusting\n one of them, rather than an extension from a company I’d never previously heard of.</p>\n <h2 id=\"p-8\">… or maybe JavaScript?</h2>\n <p>The next-best solution would be a nice JS package that just Does The Right\n Thing. It should work like the way I do fonts: If you look in the source for the page you are now reading, the splodge of JS at\n the top includes a couple of lines \n that mention “typekit.com”. Typekit (since acquired by Adobe) offers access to a huge selection of excellent fonts.\n Those JS invocations result in the text you are now reading being displayed in\n <a href=\"/ongoing/When/201x/2011/07/17/Tisa\">FF Tisa Web Pro</a>.</p>\n <p>Which<span class=\"dashes\"> —</span> this is important<span class=\"dashes\"> —</span> is not free. And to be clear, I am\n willing to pay to get Content Credentials for the pictures on this blog. It feels exactly like paying a small fee for access to\n a professionally-managed font library.\n Operating a Content-Credentials service wouldn’t be free, it’d require running a\n server and wrangling certs. At scale, though, it should be pretty cheap.</p>\n <p>So here’s an offer: If someone launches a service that allows me to straightforwardly include the\n fact that this picture was sourced from tbray.org in my Content Credentials, my wallet is (modestly) open.</p>\n <p>By the way, the core JavaScript code is already under construction; here’s \n <a href=\"https://github.com/microsoft/c2pa-extension-validator\">Microsoft</a> and the\n <a href=\"https://opensource.contentauthenticity.org/docs/introduction\">Content Authority Initiative</a> itself.\n There’s also a Rust crate for server-side use, and a “c2patool” command-line utility based on it..</p>\n <h2 id=\"p-6\">Open-Source issues</h2>\n <p>You’ll notice that the right-click-for-Content-Credentials doesn’t work on the smaller version of the picture embedded in the\n text you are now reading; just the larger one. This is because the decades-old Perl-based <span class=\"o\">ongoing</span>\n publishing software runs the main-page pictures through\n <a href=\"https://imagemagick.org/index.php\">ImageMagick</a>, which doesn’t do C2PA. I should find a way to route around this.</p>\n <p>In fact, it wouldn’t be rocket science for ImageMagick (or open-source packages generally) to write C2PA manifests and insert\n them in the media files they create. But how should they sign them? As noted, that requires a server that provides cert-based\n signatures, something that nobody would expect from even well-maintained open-source packages.</p>\n <p>I dunno, maybe someone should provide a managed-ImageMagick service that (for a small fee) offers signed-C2PA-manifest\n embedding?</p>\n <h2 id=\"p-9\">What’s next?</h2>\n <p>The work that needs to be done is nontrivial but, frankly, not that taxing. And the rewards would be high.\n Because it feels like a no-brainer that knowing who posted something is a big deal. Also the inverse: Knowing that you\n <em>don’t</em> know who posted it.</p>\n <p>Where is it an especially big deal? On social media, obviously. It’s really time for those guys to start climbing on board.</p>", "image": null, "media": [], "authors": [ { "name": "Tim Bray", "email": null, "url": null } ], "categories": [ { "label": "Technology/Identity", "term": "Technology/Identity", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Technology", "term": "Technology", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Identity", "term": "Identity", "url": "https://www.tbray.org/ongoing/What/" } ] }, { "id": "https://www.tbray.org/ongoing/When/202x/2025/06/06/My-AI-Angst", "title": "AI Angst", "description": "My input stream is full of it: Fear and loathing and cheerleading and prognosticating on what generative AI means and whether it’s Good or Bad and what we should be doing. All the channels: Blogs and peer-reviewed papers and social-media posts and business-news stories. So there’s lots of AI angst out there, but this is mine. I think the following is a bit unique because it focuses on cost, working backward from there. As for the genAI tech itself, I guess I’m a moderate; there is a there there, it’s not all slop. But first…", "url": "https://www.tbray.org/ongoing/When/202x/2025/06/06/My-AI-Angst", "published": "2025-06-06T19:00:00.000Z", "updated": "2025-06-08T22:39:49.000Z", "content": "<p>My input stream is full of it: Fear and loathing and cheerleading and prognosticating on what generative AI means and whether\n it’s Good or Bad and what we should be doing. All the channels: Blogs and peer-reviewed papers and social-media posts and\n business-news stories. So there’s lots of AI angst out there, but this is mine.\n I think the following is a bit unique because it focuses on cost, working backward from there. As for the\n genAI tech itself, I guess I’m a moderate; there is a there there, it’s not all slop. But first…</p>\n <h2 id=\"p-5\">The rent is too damn high</h2>\n <p>I promise I’ll talk about genAI applications but let’s start with money. <em>Lots</em> of money, big numbers! For example,\n venture-cap startup money pouring into AI, which as of now apparently adds up to\n <a href=\"https://finance.yahoo.com/news/how-nvidia-played-a-central-role-in-the-306-billion-ai-startup-boom-195741749.html\">$306\n billion</a>. And that’s just startups; Among the giants, Google alone\n <a href=\"https://www.ciodive.com/news/google-cloud-generative-ai-data-center-capacity-buildouts/739357/\">apparently plans\n $75B</a> in capital expenditure on AI\n infrastructure, and they represent maybe a quarter at most of cloud capex. You think those are big numbers? McKinsey offers\n <a href=\"https://www.mckinsey.com/industries/technology-media-and-telecommunications/our-insights/the-cost-of-compute-a-7-trillion-dollar-race-to-scale-data-centers\">The cost of compute: A $7 trillion race to scale data centers</a>.</p>\n <p>Obviously, lots of people are\n wondering when and where the revenue will be to pay for it all. There’s one thing we know for sure:\n The pro-genAI voices are fueled by hundreds of billions of dollars worth of fear and desire; fear that it’ll\n never pay off and desire for a piece of the money. Can you begin to imagine the pressure for revenue that investors and\n executives and middle managers are under?</p>\n <p><a href=\"https://cosocial.ca/@timbray/114572118905328515\">Here’s an example</a> of the kind of debate that ensues.</p>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/06/06/Anil-MCP.png\" alt=\"Anil Dash on Mastodon, on MCP vs the Fediverse\"></img>\n <div class=\"caption\"><p>“MCP” is\n <a href=\"https://en.wikipedia.org/wiki/Model_Context_Protocol\">Model Context Protocol</a>, used for communicating between LLM\n software and other systems and services.<br></br>I have no opinion as to its quality or utility.</p></div>\n <p>I suggest that when you’re getting a pitch for genAI technology, you should have that greed and\n fear in the back of your mind. Or maybe at the front.</p>\n <h2 id=\"p-7\">And that’s just the money</h2>\n <p>For some reason, I don’t hear much any more about the environmental cost of genAI, the gigatons of carbon pouring out of the\n system, imperilling my children’s future. Let’s please not ignore that; let’s read things like\n <a href=\"https://www.eesi.org/articles/view/data-center-energy-needs-are-upending-power-grids-and-threatening-the-climate\">Data\n Center Energy Needs Could Upend Power Grids and Threaten the Climate</a> and let’s make sure every freaking conversation about\n genAI acknowledges this grievous cost.</p>\n <p>Now let’s look at a few sectors where genAI is said to be a big deal: Coding, teaching, and professional\n communication. To keep things balanced, I’ll start in a space where I have kind things to say.</p>\n <h2 id=\"p-2\">Coding</h2>\n <p>Wow, is my tribe ever melting down. The pro- and anti-genAI factions are hurling polemical thunderbolts at each\n other, and I mean extra hot and pointy ones. For example, here are 5600 words entitled\n <a href=\"https://blog.glyph.im/2025/06/i-think-im-done-thinking-about-genai-for-now.html\">I Think I’m Done Thinking About genAI\n For Now</a>. Well-written words, too.</p>\n <p>But, while I have a lot of sympathy for the contras and am sickened by some of the promoters, at the moment\n I’m mostly in tune with Thomas Ptacek’s\n <a href=\"https://fly.io/blog/youre-all-nuts/\">My AI Skeptic Friends Are All Nuts</a>. It’s long and (fortunately) well-written\n and I (mostly) find it hard to disagree with.</p>\n <p>it’s as simple as this: I keep hearing talented programmers\n whose integrity I trust tell me “Yeah, LLMs are helping me get shit done.” The probability that they’re all lying or being\n fooled seems very low.</p>\n <p>Just to be clear, I note an absence of concern for cost and carbon in these conversations. Which is unacceptable. But let’s\n move on.</p>\n <p>It’s worth noting that I learned two useful things from Ptacek’s essay that I hadn’t really understood. First, the “agentic”\n architecture of programming tools: You ask the agent to create code and it asks the LLM, which will sometimes \n hallucinate; the agent will observe that it doesn’t compile or makes all the unit tests fail, discards it, and re-prompts. If\n it takes the agent module 25 prompts to generate code that while imperfect is at least correct, who cares?</p>\n <p>Second lesson, and to be fair this is just anecdata: It feels like the Go programming language is especially well-suited to\n LLM-driven automation. It’s small, has a large standard library, and a culture that has strong shared idioms for doing almost\n anything. Anyhow, we’ll find out if this early impression stands up to longer and wider industry experience.</p>\n <p>Turning our attention back to cost, let’s assume that eventually all or most developers become somewhat LLM-assisted. Are\n there enough of them, and will they pay enough, to cover all that investment? Especially given that models that are both\n open-source and excellent are certain to proliferate? Seems dubious.</p>\n <p>Suppose that, as Ptacek suggests, LLMs/agents allow us to automate the tedious low-intellectual-effort parts of our\n job. Should we be concerned about how junior developers learn to get past that “easy stuff” and on the way to senior skills?\n That seems a very good question, so…</p>\n <h2 id=\"p-10\">Learning</h2>\n <p>Quite likely you’ve already seen Jason Koebler’s\n <a href=\"https://www.404media.co/teachers-are-not-ok-ai-chatgpt/?ref=daily-stories-newsletter\">Teachers Are Not OK</a>, a\n frankly horrifying survey of genAI’s impact on secondary and tertiary education. It is a tale of unrelieved grief and pain\n and wreckage. Since genAI isn’t going to go away and students aren’t going to stop being lazy, \n it seems like we’re going to re-invent the way people teach and learn.</p>\n <p>The stories of students furiously deploying genAI to avoid the effort of actually, you know,\n learning, are sad. Even sadder are those of genAI-crazed administrators leaning on faculty to become more efficient and\n “businesslike” by using it.</p> \n <p>I really don’t think there’s a coherent pro-genAI case to be made in the education context.</p>\n <h2 id=\"p-11\">Professional communication</h2>\n <p>If you want to use LLMs to automate communication with your family or friends or lovers, there’s nothing I can say that will\n help you. So let’s restrict this to conversation and reporting around work and private projects and voluntarism and so on.</p>\n <p>I’m\n pretty sure this is where the people who think they’re going to make big money with AI think it’s going to come from.\n If you’re interested in that thinking,\n <a href=\"https://docs.google.com/presentation/d/1Der8WWGeVxdOWx37bMV_nj9N1tUAVcvSSRa6qxKx75g/edit?slide=id.p1#slide=id.p1\">here’s\n a sample</a>; a slide deck by a Keith Riegert for the book-publishing business which, granted, is a bit stagnant and a whole lot\n overconcentrated these days. I suspect scrolling through it will produce a strong emotional reaction for quite a few readers here.\n It’s also useful in that it talks specifically about costs.</p>\n <p>That is for corporate-branded output. What about personal or internal professional communication; by which I mean emails and\n sales reports and committee drafts and project pitches and so on? I’m pretty negative about this. If your email or pitch\n doc or whatever needs to be summarized, or if it has the colorless affectless error-prone polish of 2025’s LLMs, I would\n probably discard it unread.\n I already found the switch to turn off Gmail’s attempts to summarize my emails.</p>\n <p>What’s the genAI world’s equivalent of “Tl;dr”? I’m thinking “TA;dr” (A for AI)\n or “Tg;dr” (g for genAI) or just “LLM:dr”.</p>\n <p>And this vision of everyone using genAI to amplify their output and everyone else using it to summarize and filter\n their input feels simply perverse.</p>\n <p>Here’s what I think is \n <a href=\"https://infosec.exchange/@codinghorror/114606355212363074\">an important finding</a>, ably summarized by Jeff Atwood:</p> \n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/06/06/Dare-Jeff.png\" alt=\"Dare Obasanjo and Jeff Atwood on how to survive AI\"></img>\n <p>Seriously, since LLMs by design emit streams that are optimized for plausibility and for harmony with the model’s\n training base, in an AI-centric world there’s a powerful incentive to say things that are implausible, that are out of tune,\n that are, bluntly, weird. So there’s one upside.</p>\n <p>And let’s go back to cost. Are the prices in Riegert’s slide deck going to pay for trillions in capex?\n Another example: My family has a Google workplace account, and the price just went up from $6/user/month to\n $7. The announcement from Google emphasized that this was related to the added value provided by Gemini. Is $1/user/month gonna\n make this tech make business sense?</p>\n <h2 id=\"p-13\">What I can and can’t buy</h2>\n <p>I can sorta buy the premise that there are genAI productivity boosts to be had in the code space and maybe some other\n specialized domains. I can’t buy for a second that genAI is anything but toxic for anything education-related. On the\n business-communications side, it’s damn well gonna be tried because billions of dollars and many management careers depend on\n it paying off. We’ll see but I’m skeptical.</p>\n <p>On the money side? I don’t see how the math and the capex work. And all the time, I think about the carbon that’s poisoning\n the planet my children have to live on.</p>\n <p>I think that the best we can hope for is the eventual financial meltdown leaving a few useful islands of things that\n are actually useful at prices that make sense.</p>\n <p>And in a decade or so, I can see business-section stories about all the big data center shells that were never filled in,\n standing there empty, looking for another use. It’s gonna be tough, what can you do with buildings that have no windows?</p>", "image": null, "media": [], "authors": [ { "name": "Tim Bray", "email": null, "url": null } ], "categories": [ { "label": "Technology/AI", "term": "Technology/AI", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Technology", "term": "Technology", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "AI", "term": "AI", "url": "https://www.tbray.org/ongoing/What/" } ] }, { "id": "https://www.tbray.org/ongoing/When/202x/2024/07/28/Union-of-Finite-Automata", "title": "Union of Finite Automata", "description": "In building Quamina, I needed to compute the union of two finite automata (FAs). I remembered from some university course 100 years ago that this was possible in theory, so I went looking for the algorithm, but was left unhappy. The descriptions I found tended to be hyper-academic, loaded with mathematical notation that I found unhelpful, and didn’t describe an approach that I thought a reasonable programmer would reasonably take. The purpose of this ongoing entry is to present a programmer-friendly description of the problem and of the algorithm I adopted, with the hope that some future developer, facing the same problem, will have a more satisfying search experience. [Important update: There’s a serious error halfway through; see here.]", "url": "https://www.tbray.org/ongoing/When/202x/2024/07/28/Union-of-Finite-Automata", "published": "2024-07-28T19:00:00.000Z", "updated": "2025-06-02T18:49:20.000Z", "content": "<p>In building Quamina, I needed to compute the union of two finite automata (FAs). I remembered from some university course 100 years\n ago that this was possible in theory, so I went looking for the algorithm, but was left unhappy.\n The descriptions I found tended to be hyper-academic, loaded with mathematical notation that I found unhelpful, and\n didn’t describe an approach that I thought a reasonable programmer would reasonably take. The purpose of this <span class=\"o\">ongoing</span> entry is to present a \n programmer-friendly description of the problem and of the algorithm I adopted, with the hope that some future developer, facing\n the same problem, will have a more satisfying search experience.<br></br>\n <i>[Important update: There’s a serious error halfway through; see <a href=\"#p-9\">here</a>.]</i></p>\n <p>There is very little math in this discussion (a few subscripts), and no\n circles-and-arrows pictures. But it does have working Go code.</p>\n <h2 id=\"p-1\">Finite automata?</h2>\n <p>I’m not going to rehash the theory of FAs (often called state machines). In practice the purpose of an FA is to match (or\n fail to match) some\n input against some pattern. What the software does when the input matches the pattern (or doesn’t) isn’t relevant to\n our discussion today. \n Usually the inputs are strings and the patterns are regular expressions or equivalent. In practice, you compile a pattern\n into an FA, and then you go through the input, character by character, trying to traverse the FA to find out whether it matches\n the input.</p>\n <p>An FA has a bunch of states, and for each state\n there can be a list of input symbols that lead to transitions to other states. What exactly I mean by “input symbol” turns out to be\n interesting and affects your choice of algorithm, but let’s ignore that for now.</p>\n <p>The following statements apply:</p>\n <ol>\n <li><p>One state is designated as the “start state” because, well, that’s where you start.</p></li>\n <li><p>Some states are called “final”, and reaching them means you’ve matched one or more patterns. In Quamina’s FAs, each\n state has an extra field (usually empty) saying “if you got here you matched P*, yay!”, where P* is a list of labels for the\n (possibly more than one) patterns you matched.</p></li>\n <li><p>It is possible that you’re in a state and for some particular input, you transition to more than one other state. If\n this is true, your FA is <em>nondeterministic</em>, abbreviated NFA.</p></li>\n <li><p>It is possible that a state can have one or more “epsilon transitions”, ones that you can just take any time, not requiring\n any particular input. (I wrote about this in\n <a href=\"/ongoing/When/202x/2024/06/17/Epsilon-Love\">Epsilon Love</a>.)\n Once again, if this is true, you’ve got an NFA. If neither this statement nor the previous are true, it’s\n a <em>deterministic</em> finite automaton, DFA.</p></li>\n </ol>\n <p>The discussion here works for NFAs, but lots of interesting problems can be solved with DFAs, which are simpler and faster,\n and this algorithm works there too.</p>\n <h2 id=\"p-2\">Union?</h2>\n <p>If I have <code>FA1</code> that matches “foo” and <code>FA2</code> that matches “bar”, then their union,\n <code>FA1 ∪ FA2</code>, matches both “foo” \n and “bar”. In practice Quamina often computes the union of a large number of FAs, but it does so a pair at a time, so we’re\n only going to worry about the union of two FAs.</p>\n <h2 id=\"p-3\">The academic approach</h2>\n <p>There are plenty of Web pages and YouTubes covering this. Most of them are full of Greek characters and math symbols. They go\n like this:</p> \n <ol>\n <li><p>You have two FAs, call them <code>A</code> and <code>B</code>. <code>A</code> has states <code>A<sub>1</sub></code>, …\n <code>A<sub>maxA</sub></code>, <code>B</code> has <code>B<sub>1</sub></code>, … <code>B<sub>maxB</sub></code></p></li>\n <li><p>The union contains all the states in <code>A</code>, all the states in <code>B</code>, and the “product” of\n <code>A</code> and <code>B</code>, which is to say states you could call <code>A<sub>1</sub>B<sub>1</sub></code>,\n <code>A<sub>1</sub>B<sub>2</sub></code>, <code>A<sub>2</sub>B<sub>1</sub></code>, <code>A<sub>2</sub>B<sub>2</sub></code>,\n … <code>A<sub>maxA</sub>B<sub>maxB</sub></code>.</p></li>\n <li><p>For each state <code>A<sub>X</sub>B<sub>Y</sub></code>, you work out its transitions by looking at the transitions of\n the two states being combined. For some input symbol, if <code>A<sub>X</sub></code> has a transition to\n <code>A<sub>XX</sub></code> but <code>B<sub>Y</sub></code> has no transition, then the combined state just has the A\n transition. The reverse for an input where <code>B<sub>Y</sub></code> has a transition but <code>A<sub>X</sub></code>\n doesn’t. And if <code>A<sub>X</sub></code> transitions to <code>A<sub>XX</sub></code> and <code>B<sub>Y</sub></code> transitions to\n <code>B<sub>YY</sub></code>, then the transition is to <code>A<sub>XX</sub>B<sub>YY</sub></code>.</p></li>\n <li><p>Now you’ll have a lot of states, and it usually turns out that many of them aren’t reachable. But there are plenty of\n algorithms to filter those out. You’re done, you’ve computed the union and <code>A<sub>1</sub>B<sub>1</sub></code> is its\n start state!</p></li>\n </ol>\n <h2 id=\"p-4\">Programmer-think</h2>\n <p>If you’re like me, the idea of computing all the states, then throwing out the unreachable ones, feels wrong. So here’s\n what I suggest, and has worked well in practice for Quamina:</p>\n <ol>\n <li><p>First, merge <code>A<sub>1</sub></code> and <code>B<sub>1</sub></code> to make your new start state\n <code>A<sub>1</sub>B<sub>1</sub></code>. Here’s how:</p></li> \n <li><p>If an input symbol causes no transitions in either <code>A<sub>1</sub></code> or <code>B<sub>1</sub></code>, it also\n doesn’t cause any in <code>A<sub>1</sub>B<sub>1</sub></code>.</p></li>\n <li><p>If an input symbol causes a transition in <code>A<sub>1</sub></code> to <code>A<sub>X</sub></code> but no transition\n in <code>B<sub>1</sub></code>, then you adopt <code>A<sub>X</sub></code> into the union, and any other <code>A</code> states\n it points to, and any they point to, and so on.</p></li>\n <li><p>And of course if <code>B<sub>1</sub></code> has a transition to <code>B<sub>Y</sub></code> but\n <code>A<sub>1</sub></code> doesn’t transition, you flip it the other way, adopting <code>B<sub>Y</sub></code> and its\n descendents.</p></li>\n <li><p>And if <code>A<sub>1</sub></code> transitions to <code>A<sub>X</sub></code> and <code>B<sub>1</sub></code> transitions\n to <code>B<sub>Y</sub></code>, then you adopt a new state <code>A<sub>X</sub>B<sub>Y</sub></code>, which you compute\n recursively the way you just did for <code>A<sub>1</sub>B<sub>1</sub></code>. So you’ll never compute anything that’s not\n reachable.</p></li>\n </ol>\n <p>I could stop there. I think that’s enough for a competent developers to get the idea? But it turns out there\n are a few details, some of them interesting. So, let’s dig in.</p>\n <h2 id=\"p-5\">“Input symbol”?</h2>\n <p>The academic discussion of FAs is very abstract on this subject, which is fair enough, because when you’re talking about how\n to build, or traverse, or compute the union of FAs, the algorithm doesn’t depend very much on what the symbols actually are. But\n when you’re writing code, it turns out to matter a lot.</p>\n <p>In practice, I’ve done a lot of work with FAs over the years, and I’ve only ever seen four things used as input symbols\n to drive them. They are:</p>\n <ul>\n <li><p>Unicode “characters” represented by code points, integers in the range 0…1,114,111 inclusive.</p></li>\n <li><p>UTF-8 bytes, which have values in the range 0…244 inclusive.</p></li>\n <li><p>UTF-16 values, unsigned 16-bit integers. I’ve only ever seen this used in Java programs because that’s what\n its native <code>char</code> type is. You probably don’t want to do this.</p></li>\n <li><p>Enum values, small integers with names, which tend to come in small collections.</p></li>\n </ul>\n <p>As I said, this is all I’ve seen, but 100% of the FAs that I’ve seen automatically generated and subject to\n set-arithmetic operations like Union are based on UTF-8. And that’s what Quamina uses, so that’s what I’m going to use in the\n rest of this discussion.</p>\n <h2 id=\"p-7\">Code starts here</h2>\n <p>This comes from Quamina’s\n <a href=\"https://github.com/timbray/quamina/blob/main/nfa.go\">nfa.go</a>. We’re going to look at the function\n <code>mergeFAStates</code>, which implements the merge-two-states logic described above.</p>\n <p>Lesson: This process can lead to a lot of wasteful work. Particularly if either or both of the states transition on ranges of\n values like <code>0…9</code> or <code>a…z</code>. So we only want to do the work merging any pair of states once, and we want\n there only to be one merged value. Thus we start with a straightforward memo-ization.</p>\n <div class=\"tbc\"><pre>\n<span class=\"kd\">func</span><span class=\"w\"> </span><span class=\"nx\">mergeFAStates</span><span class=\"p\">(</span><span class=\"nx\">state1</span><span class=\"p\">,</span><span class=\"w\"> </span><span class=\"nx\">state2</span><span class=\"w\"> </span><span class=\"o\">*</span><span class=\"nx\">faState</span><span class=\"p\">,</span><span class=\"w\"> </span><span class=\"nx\">keyMemo</span><span class=\"w\"> </span><span class=\"kd\">map</span><span class=\"p\">[</span><span class=\"nx\">faStepKey</span><span class=\"p\">]</span><span class=\"o\">*</span><span class=\"nx\">faState</span><span class=\"p\">)</span><span class=\"w\"> </span><span class=\"o\">*</span><span class=\"nx\">faState</span><span class=\"w\"> </span><span class=\"p\">{</span>\n<span class=\"w\"> </span><span class=\"c1\">// try to memo-ize</span>\n<span class=\"w\"> </span><span class=\"nx\">mKey</span><span class=\"w\"> </span><span class=\"o\">:=</span><span class=\"w\"> </span><span class=\"nx\">faStepKey</span><span class=\"p\">{</span><span class=\"nx\">state1</span><span class=\"p\">,</span><span class=\"w\"> </span><span class=\"nx\">state2</span><span class=\"p\">}</span>\n<span class=\"w\"> </span><span class=\"nx\">combined</span><span class=\"p\">,</span><span class=\"w\"> </span><span class=\"nx\">ok</span><span class=\"w\"> </span><span class=\"o\">:=</span><span class=\"w\"> </span><span class=\"nx\">keyMemo</span><span class=\"p\">[</span><span class=\"nx\">mKey</span><span class=\"p\">]</span>\n<span class=\"w\"> </span><span class=\"k\">if</span><span class=\"w\"> </span><span class=\"nx\">ok</span><span class=\"w\"> </span><span class=\"p\">{</span>\n<span class=\"w\"> </span><span class=\"k\">return</span><span class=\"w\"> </span><span class=\"nx\">combined</span>\n<span class=\"w\"> </span><span class=\"p\">}</span>\n</pre>\n <p>Now some housekeeping. Remember, I noted above that any state might contain a signal saying that arriving here\n means you’ve matched pattern(s). This is called <code>fieldTransitions</code>, and the merged state obviously has to \n match all the things that either of the merged states match. Of course, in the vast majority of cases neither merged state\n matched anything and so this is a no-op.</p>\n<pre>\n<span class=\"w\"> </span><span class=\"nx\">fieldTransitions</span><span class=\"w\"> </span><span class=\"o\">:=</span><span class=\"w\"> </span><span class=\"nb\">append</span><span class=\"p\">(</span><span class=\"nx\">state1</span><span class=\"p\">.</span><span class=\"nx\">fieldTransitions</span><span class=\"p\">,</span><span class=\"w\"> </span><span class=\"nx\">state2</span><span class=\"p\">.</span><span class=\"nx\">fieldTransitions</span><span class=\"o\">...</span><span class=\"p\">)</span></pre>\n <p>Since our memo-ization attempt came up empty, we have to allocate an empty structure for the new merged state, and add it to the\n memo-izer.</p>\n <pre>\n<span class=\"w\"> </span><span class=\"nx\">combined</span><span class=\"w\"> </span><span class=\"p\">=</span><span class=\"w\"> </span><span class=\"o\">&</span><span class=\"nx\">faState</span><span class=\"p\">{</span><span class=\"nx\">table</span><span class=\"p\">:</span><span class=\"w\"> </span><span class=\"nx\">newSmallTable</span><span class=\"p\">(),</span><span class=\"w\"> </span><span class=\"nx\">fieldTransitions</span><span class=\"p\">:</span><span class=\"w\"> </span><span class=\"nx\">fieldTransitions</span><span class=\"p\">}</span>\n<span class=\"w\"> </span><span class=\"nx\">keyMemo</span><span class=\"p\">[</span><span class=\"nx\">mKey</span><span class=\"p\">]</span><span class=\"w\"> </span><span class=\"p\">=</span><span class=\"w\"> </span><span class=\"nx\">combined</span></pre>\n <p>Here’s where it gets interesting. The algorithm talks about looking at the inputs that cause transitions in the states we’re\n merging. How do you find them? Well, in the case where you’re transitioning on UTF-8 bytes, since there are only 244 values,\n why not do the simplest thing that could possibly work and just check each byte value?</p>\n <p>Every Quamina state contains a table that encodes the byte transitions, which operates like the Go construct\n <code>map[byte]state</code>. Those tables are implemented in\n <a href=\"/ongoing/When/202x/2022/06/25/Small-Tables\">a compact data structure optimized for fast traversal</a>. But for doing this\n kind of work, it’s easy to “unpack” them into a fixed-sized table; in Go, <code>[244]state</code>. Let’s do that for the states\n we’re merging and for the new table we’re building.</p>\n<pre><span class=\"w\"> </span><span class=\"nx\">u1</span><span class=\"w\"> </span><span class=\"o\">:=</span><span class=\"w\"> </span><span class=\"nx\">unpackTable</span><span class=\"p\">(</span><span class=\"nx\">state1</span><span class=\"p\">.</span><span class=\"nx\">table</span><span class=\"p\">)</span>\n<span class=\"w\"> </span><span class=\"nx\">u2</span><span class=\"w\"> </span><span class=\"o\">:=</span><span class=\"w\"> </span><span class=\"nx\">unpackTable</span><span class=\"p\">(</span><span class=\"nx\">state2</span><span class=\"p\">.</span><span class=\"nx\">table</span><span class=\"p\">)</span>\n<span class=\"w\"> </span><span class=\"kd\">var</span><span class=\"w\"> </span><span class=\"nx\">uComb</span><span class=\"w\"> </span><span class=\"nx\">unpackedTable</span></pre>\n<p><code>uComb</code> is where we’ll fill in the merged transitions.</p>\n<p>Now we’ll run through all the possible input values; <code>i</code> is the byte value, <code>next1</code> and <code>next2</code>\nare the transitions on that value. In practice, <code>next1</code> and <code>next2</code> are going to be null most of the time.</p>\n<pre><span class=\"w\"> </span><span class=\"k\">for</span><span class=\"w\"> </span><span class=\"nx\">i</span><span class=\"p\">,</span><span class=\"w\"> </span><span class=\"nx\">next1</span><span class=\"w\"> </span><span class=\"o\">:=</span><span class=\"w\"> </span><span class=\"k\">range</span><span class=\"w\"> </span><span class=\"nx\">u1</span><span class=\"w\"> </span><span class=\"p\">{</span>\n<span class=\"w\"> </span><span class=\"nx\">next2</span><span class=\"w\"> </span><span class=\"o\">:=</span><span class=\"w\"></span><span class=\"nx\"> u2</span><span class=\"p\">[</span><span class=\"nx\">i</span><span class=\"p\">]</span></pre>\n <p>Here’s where we start building up the new transitions in the unpacked array <code>uComb</code>.</p>\n <p>For many values of <code>i</code>, you can avoid actually merging the states to create a new one. If the transition is the\n same in both input FAs, or if either of them are null, or if the transitions for this value of <code>i</code> are the same as\n for the last value. This is all about avoiding unnecessary work and the <code>switch</code>/<code>case</code> structure is the\n result of a bunch of profiling and optimization.</p>\n<pre><span class=\"w\"> </span><span class=\"k\">switch</span><span class=\"w\"> </span><span class=\"p\">{</span>\n<span class=\"w\"> </span><span class=\"k\">case</span><span class=\"w\"> </span><span class=\"nx\">next1</span><span class=\"w\"> </span><span class=\"o\">==</span><span class=\"w\"> </span><span class=\"nx\">next2</span><span class=\"p\">:</span><span class=\"w\"> </span><span class=\"c1\">// no need to merge</span>\n<span class=\"w\"> </span><span class=\"nx\">uComb</span><span class=\"p\">[</span><span class=\"nx\">i</span><span class=\"p\">]</span><span class=\"w\"> </span><span class=\"p\">=</span><span class=\"w\"> </span><span class=\"nx\">next1</span>\n<span class=\"w\"> </span><span class=\"k\">case</span><span class=\"w\"> </span><span class=\"nx\">next2</span><span class=\"w\"> </span><span class=\"o\">==</span><span class=\"w\"> </span><span class=\"kc\">nil</span><span class=\"p\">:</span><span class=\"w\"> </span><span class=\"c1\">// u1 must be non-nil</span>\n<span class=\"w\"> </span><span class=\"nx\">uComb</span><span class=\"p\">[</span><span class=\"nx\">i</span><span class=\"p\">]</span><span class=\"w\"> </span><span class=\"p\">=</span><span class=\"w\"> </span><span class=\"nx\">next1</span>\n<span class=\"w\"> </span><span class=\"k\">case</span><span class=\"w\"> </span><span class=\"nx\">next1</span><span class=\"w\"> </span><span class=\"o\">==</span><span class=\"w\"> </span><span class=\"kc\">nil</span><span class=\"p\">:</span><span class=\"w\"> </span><span class=\"c1\">// u2 must be non-nil</span>\n<span class=\"w\"> </span><span class=\"nx\">uComb</span><span class=\"p\">[</span><span class=\"nx\">i</span><span class=\"p\">]</span><span class=\"w\"> </span><span class=\"p\">=</span><span class=\"w\"> </span><span class=\"nx\">next2</span>\n<span class=\"w\"> </span><span class=\"k\">case</span><span class=\"w\"> </span><span class=\"nx\">i</span><span class=\"w\"> </span><span class=\"p\">></span><span class=\"w\"> </span><span class=\"mi\">0</span><span class=\"w\"> </span><span class=\"o\">&&</span><span class=\"w\"> </span><span class=\"nx\">next1</span><span class=\"w\"> </span><span class=\"o\">==</span><span class=\"w\"> </span><span class=\"nx\">u1</span><span class=\"p\">[</span><span class=\"nx\">i</span><span class=\"o\">-</span><span class=\"mi\">1</span><span class=\"p\">]</span><span class=\"w\"> </span><span class=\"o\">&&</span><span class=\"w\"> </span><span class=\"nx\">next2</span><span class=\"w\"> </span><span class=\"o\">==</span><span class=\"w\"> </span><span class=\"nx\">u2</span><span class=\"p\">[</span><span class=\"nx\">i</span><span class=\"o\">-</span><span class=\"mi\">1</span><span class=\"p\">]:</span><span class=\"w\"> </span><span class=\"c1\">// dupe of previous step - happens a lot</span>\n<span class=\"w\"> </span><span class=\"nx\">uComb</span><span class=\"p\">[</span><span class=\"nx\">i</span><span class=\"p\">]</span><span class=\"w\"> </span><span class=\"p\">=</span><span class=\"w\"> </span><span class=\"nx\">uComb</span><span class=\"p\">[</span><span class=\"nx\">i</span><span class=\"o\">-</span><span class=\"mi\">1</span><span class=\"p\">]</span></pre>\n <p>If none of these work, we haven’t been able to avoid merging the two states. We do that by a recursive call to invoke\n all the logic we just discussed.</p>\n <p>There is a complication. The automaton might be nondeterministic, which means that there might be more than one transition\n for some byte value. So the data structure actually behaves like <code>map[byte]*faNext</code>, where <code>faNext</code> is a\n wrapper for a list of states you can transition to.</p>\n <p>So here we’ve got a nested loop to recurse for each possible combination of transitioned-to states that can occur on this\n byte value. In a high proportion of cases the FA is deterministic, so there’s only one state from each FA being merged and this\n nested loop collapses to a single recursive call.</p>\n<pre><span class=\"w\"> </span><span class=\"k\">default</span><span class=\"p\">:</span><span class=\"w\"> </span><span class=\"c1\">// have to recurse & merge</span>\n<span class=\"w\"> </span><span class=\"kd\">var</span><span class=\"w\"> </span><span class=\"nx\">comboNext</span><span class=\"w\"> </span><span class=\"p\">[]</span><span class=\"o\">*</span><span class=\"nx\">faState</span>\n<span class=\"w\"> </span><span class=\"k\">for</span><span class=\"w\"> </span><span class=\"nx\">_</span><span class=\"p\">,</span><span class=\"w\"> </span><span class=\"nx\">nextStep1</span><span class=\"w\"> </span><span class=\"o\">:=</span><span class=\"w\"> </span><span class=\"k\">range</span><span class=\"w\"> </span><span class=\"nx\">next1</span><span class=\"p\">.</span><span class=\"nx\">states</span><span class=\"w\"> </span><span class=\"p\">{</span>\n<span class=\"w\"> </span><span class=\"k\">for</span><span class=\"w\"> </span><span class=\"nx\">_</span><span class=\"p\">,</span><span class=\"w\"> </span><span class=\"nx\">nextStep2</span><span class=\"w\"> </span><span class=\"o\">:=</span><span class=\"w\"> </span><span class=\"k\">range</span><span class=\"w\"> </span><span class=\"nx\">next2</span><span class=\"p\">.</span><span class=\"nx\">states</span><span class=\"w\"> </span><span class=\"p\">{</span>\n<span class=\"w\"> </span><span class=\"nx\">comboNext</span><span class=\"w\"> </span><span class=\"p\">=</span><span class=\"w\"> </span><span class=\"nb\">append</span><span class=\"p\">(</span><span class=\"nx\">comboNext</span><span class=\"p\">,</span><span class=\"w\"> </span><span class=\"nx\">mergeFAStates</span><span class=\"p\">(</span><span class=\"nx\">nextStep1</span><span class=\"p\">,</span><span class=\"w\"> </span><span class=\"nx\">nextStep2</span><span class=\"p\">,</span><span class=\"w\"> </span><span class=\"nx\">keyMemo</span><span class=\"p\">))</span>\n<span class=\"w\"> </span><span class=\"p\">}</span>\n<span class=\"w\"> </span><span class=\"p\">}</span>\n<span class=\"w\"> </span><span class=\"nx\">uComb</span><span class=\"p\">[</span><span class=\"nx\">i</span><span class=\"p\">]</span><span class=\"w\"> </span><span class=\"p\">=</span><span class=\"w\"> </span><span class=\"o\">&</span><span class=\"nx\">faNext</span><span class=\"p\">{</span><span class=\"nx\">states</span><span class=\"p\">:</span><span class=\"w\"> </span><span class=\"nx\">comboNext</span><span class=\"p\">}</span>\n<span class=\"w\"> </span><span class=\"p\">}</span>\n<span class=\"w\"> </span><span class=\"p\">}</span></pre>\n <p>We’ve filled up the unpacked state-transition table, so we’re almost done. First, we have to compress it into its\n optimized-for-traversal form.</p>\n<pre><span class=\"w\"> </span><span class=\"nx\">combined</span><span class=\"p\">.</span><span class=\"nx\">table</span><span class=\"p\">.</span><span class=\"nx\">pack</span><span class=\"p\">(</span><span class=\"o\">&</span><span class=\"nx\">uComb</span><span class=\"p\">)</span></pre>\n <p>Remember, if the FA is nondeterministic, each state can have “epsilon” transitions which you can follow any time without\n requiring any particular input. The merged state needs to contain all the epsilon transitions from each input state.</p>\n<pre><span class=\"w\"> </span><span class=\"nx\">combined</span><span class=\"p\">.</span><span class=\"nx\">table</span><span class=\"p\">.</span><span class=\"nx\">epsilon</span><span class=\"w\"> </span><span class=\"p\">=</span><span class=\"w\"> </span><span class=\"nb\">append</span><span class=\"p\">(</span><span class=\"nx\">state1</span><span class=\"p\">.</span><span class=\"nx\">table</span><span class=\"p\">.</span><span class=\"nx\">epsilon</span><span class=\"p\">,</span><span class=\"w\"> </span><span class=\"nx\">state2</span><span class=\"p\">.</span><span class=\"nx\">table</span><span class=\"p\">.</span><span class=\"nx\">epsilon</span><span class=\"o\">...</span><span class=\"p\">)</span>\n\n<span class=\"w\"> </span><span class=\"k\">return</span><span class=\"w\"> </span><span class=\"nx\">combined</span>\n<span class=\"p\">}</span></pre>\n </div>\n <p>And, we’re done. I mean, we are once all those recursive calls have finished crawling through the states being merged.</p>\n <h2 id=\"p-9\">Oops</h2>\n <p>The discussion of epsilons above is wrong, in a way that’s harder to reproduce than you might think.\n The discussion is still\n correct for DFA’s and (weirdly) (I think) (not sure why yet) the shell-style “wildcard” <code>*</code> operator, which means\n <code>.*</code> in a regular expression.</p> \n <p>It’s not clear that in general there’s a way to merge (Quamina-style) two NFA states when either or both of them have epsilon transitions.\n Per the\n academic literature, the right way to get the union of two NFAs is to have an empty branch state with two epsilon transitions,\n one to each NFA. So you traverse the two in parallel.</p>\n <p>It took me a a whole lot of pain to figure this out and I haven’t entirely worked out the best implementation. I promise more\n regular-expressions-at-scale walls of text and code in this space when I do.</p>\n <p>I write this because when you type “merge nondeterministic finite automata” into Web search, the blog you are now reading is\n dangerously high in the search results.</p>\n <h2 id=\"p-8\">Is that efficient?</h2>\n <p>As I said above, this is an example of a “simplest thing that could possibly work” design. Both the recursion and the\n unpack/pack sequence are kind of code smells, suggesting that this could be a pool of performance quicksand.</p>\n <p>But apparently not. I ran a benchmark where I added 4,000 patterns synthesized from the Wordle\n word-list; each of them looked like this:</p>\n <p><code>{\"allis\": { \"biggy\": [ \"ceils\", \"daisy\", \"elpee\", \"fumet\", \"junta\", … </code> (195 more).</p>\n <p>This produced a <em>huge</em> deterministic FA with about 4.4 million states, with the addition of these hideous worst-case\n patterns running at 500/second. Good enough for rock ’n’ roll.</p>\n <p>How about nondeterministic FAs? I went back to that Wordle source and, for each of its 12,959 words, added a pattern with a\n random wildcard; here are three of them:</p>\n <p><code>{\"x\": [ {\"shellstyle\": \"f*ouls\" } ] }<br></br>\n{\"x\": [ {\"shellstyle\": \"pa*sta\" } ] }<br></br>\n{\"x\": [ {\"shellstyle\": \"utter*\" } ] }</code></p>\n <p>This produced an NFA with 46K states, the addition process ran at 70K patterns/second.\n </p>\n <p>Sometimes the simplest thing that could possibly work, works.</p>", "image": null, "media": [], "authors": [ { "name": "Tim Bray", "email": null, "url": null } ], "categories": [ { "label": "Technology/Quamina Diary", "term": "Technology/Quamina Diary", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Technology", "term": "Technology", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Quamina Diary", "term": "Quamina Diary", "url": "https://www.tbray.org/ongoing/What/" } ] }, { "id": "https://www.tbray.org/ongoing/When/202x/2025/05/31/Colors", "title": "Perfectly Different Colors", "description": "This considers how two modern cameras handle a difficult color challenge, illustrated by photos of a perfect rose and a piano", "url": "https://www.tbray.org/ongoing/When/202x/2025/05/31/Colors", "published": "2025-05-31T19:00:00.000Z", "updated": "2025-06-02T15:51:38.000Z", "content": "<p>This considers how two modern cameras handle a difficult color challenge, illustrated by photos of a perfect rose and a piano.</p>\n <p>We moved into our former place in January 1997 and, that summer, discovered the property included this slender little rose\n that only had a couple blossoms every year, but they were perfection, beautifully shaped and in a unique shade of red I’d\n never seen anywhere else (and still haven’t). Having no idea of its species, we’ve always called it “our perfect rose”.</p>\n <p>So when\n <a href=\"/ongoing/When/202x/2025/02/28/Moved\">we moved</a> last year, we took the rose with us. It seems to\n like the new joint, has a blossom out and two more on the way and it’s still May.</p>\n <p>I was looking at it this morning and it occurred to me that its color might be an interesting challenge to the two fine cameras I use\n regularly, namely a Google Pixel 7 and a Fujifilm X-T5.</p>\n <p>First the pictures.</p>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/05/31/PXL_20250531_185139866.png\" alt=\"The “perfect” rose.\"></img>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/05/31/TXT55657.png\" alt=\"The “perfect” rose\"></img>\n <h2 id=\"p-2\">Limitations</h2>\n <p>First of all, let’s agree that this comparison is horribly flawed. To start with, by the time the pixels have made it from\n the camera to your screen, they’ve been through Lightroom, possibly a social-media-software uploader and renderer, and then\n your browser (or mobile app) and screen contribute their opinions.\n Thus the colors are likely to vary a lot depending where you are and what you’re using.</p>\n <p>Also, it’s hard to get really comparable shots out of the Pixel and Fuji; their lenses and processors and underlying\n architectures are really different. I was going to disclose the reported shutter speeds, aperture, and ISO values, but they are\n so totally non-comparable that I decided that’d be actively harmful. I’ll just say that I tried to let each do its best.</p>\n <p>I post-processed both, but limited that to cropping; nothing about the color or exposure was touched.</p>\n <p>And having said all that, I think the exercise retains interest.</p>\n <h2 id=\"p-1\">Which?</h2>\n <p>The Pixel is above, the Fuji below.</p>\n <p>The Pixel is wrong. The Fuji is… not bad. The blossom’s actual color, to my eye, has a little more orange than I see in the\n photo; but only a little. The Pixel subtracts the orange and introduces a suggestion of violet that the blossom, to\n my eye, entirely lacks.</p>\n <p>Also, the Pixel is artificially sharpening up the petals; in reality, the contrast was low and the shading nuanced; just as\n presented by the X-T5.</p>\n <p>Is the Pixel’s rendering a consequence of whatever its sensor is? Or of the copious amount of processing that\n contributes to Google’s widely-admired (by me too) “computational photography”? I certainly have no idea. And in fact,\n most of the pictures I share come from my Android because the best camera (this is always true) is the one you have with\n you. For example…</p>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/05/31/PXL_20250531_032232026.png\" alt=\"Grand piano by itself in an old church\"></img>\n <div class=\"caption\"><p>That same evening we took in a concert put on by the local Chopin Society featuring 89-year-old\n <a href=\"MikhailVoskresensky\">Mikhail Voskresensky</a>, who plays really fast and loud in an old super-romantic style, just the\n thing for the music: Very decent Beethoven and Mozart, kind of aimless Grieg, and the highlight, a lovely take on Chopin’s\n Op. 58 Sonata, then a <cite>Nocturne</cite> in the encores.</p>\n <p>Anyhow, I think the Camera I Had With Me did fine. This is\n <a href=\"https://www.thecathedral.ca/programs/architecture-heritage\">Vancouver’s oldest still-standing\n building</a>, Christ Church Cathedral, an exquisite space for the eyes and ears.</p></div>\n <p>Maybe I’ll do a bit more conscious color-correction on the Pixel shots in future (although I didn’t on the piano). Doesn’t\n mean it’s not a great camera.</p>", "image": null, "media": [], "authors": [ { "name": "Tim Bray", "email": null, "url": null } ], "categories": [ { "label": "Arts/Photos", "term": "Arts/Photos", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Arts", "term": "Arts", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Photos", "term": "Photos", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Arts/Photos/Cameras", "term": "Arts/Photos/Cameras", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Cameras", "term": "Cameras", "url": "https://www.tbray.org/ongoing/What/" } ] }, { "id": "https://www.tbray.org/ongoing/When/202x/2025/05/30/Number-Comparison-Representation", "title": "Comparing Numbers Badly", "description": "This is just a gripe about two differently bad ways to compare numbers. They share a good alternative", "url": "https://www.tbray.org/ongoing/When/202x/2025/05/30/Number-Comparison-Representation", "published": "2025-05-30T19:00:00.000Z", "updated": "2025-05-30T23:15:25.000Z", "content": "<p>This is just a gripe about two differently bad ways to compare numbers. They share a good alternative.</p>\n <h2 id=\"p-1\">“Order of magnitude”</h2>\n <p>Typically sloppy usages: “AI increases productivity by an order of magnitude”, “Revenue from recorded music is orders of\n magnitude smaller than back in the Eighties”.</p>\n <p>Everyone reading this probably already knows that “order of magnitude” has a precise meeting: Multiply or divide by \n ten. But clearly, the people who write news stories and marketing spiels either don’t, or are consciously using the idioms to\n lie. In particular, they are trying to say “more than” or “less than” in a dramatic and impressive-sounding way.</p>\n <p>Consider that first example. It is saying that AI delivers a ten-times gain in productivity. If they’d actually said “ten\n times” people would be more inclined to ask “What units?” and “How did you measure?” This phrase makes me think that its author\n is probably lying.</p>\n <p>The second example is even more pernicious. Since “orders” is plural, they are claiming at least two orders of magnitude,\n i.e. that revenue is down by <em>at least</em> a factor of a hundred. The difference between two, three, and four orders of\n magnitude is huge! I’d probably argue that the phrase “order<b>s</b> of magnitude” should probably\n never be used. In this case, I highly doubt that the speaker has any data, and that they’re just trying to say that the\n revenue is down really a lot.</p>\n <p>The solution is simple: Say “by a factor of ten” or “ten times as high” or “at least 100 times less.” Assuming your claim is\n valid, it will be easily understood; Almost everyone has a decent intuitive understanding of what a ten-times or hundred-times\n difference feels like.</p>\n <h2 id=\"p-2\">“Percent”</h2>\n <p>What actually got me started reading this was reading a claim that some business’s “revenue increased by 250%.”\n Let’s see. If the revenue were one million and it increased by 10%, it’d be 1.1 million. If it increased by 100% it’d be two\n million. 200% is three million. So what they meant by 250% is that the revenue increased by a factor of 3.5. It is <em>so\n much</em> easier to understand “3.5 times” than 250%. Furthermore, I bet a lot of people intuitively feel that 250% means “2.5\n times”, which is just wrong.</p>\n <p>I think quoting percentages is clear and useful for values less than 100. There is nothing wrong with talking about a 20%\n increase or 75% decrease.</p>\n <p>So, same solution: For percentages past 100, don’t use them, just say “by a factor of X”. Once again, people have an instant\n (and usually correct) gut feel for what a 3.5-times increase feels like.</p>\n <h2 id=\"p-3\">“But English is a living language!”</h2>\n <p>Not just living, but also squirmy and slutty, open to both one-night stands and permanent relationships with neologisms no\n matter how ugly and\n imports from other dialects no matter how sketchy. Which is to say, there’s nothing I can do to keep “orders of magnitude” from\n being used to mean “really a lot”.</p>\n <p>In fact, it’s only a problem when you’re trying to communicate a numeric difference. But that’s an important application of\n human language.</p>\n <p>Perversely, I guess you could argue that these\n bad idioms are useful in helping you detect statements that are probably either ignorant or just lies. Anyhow, now you know that\n when I hear them, I hear patterns that make me inclined to disbelieve. And I bet I’m not the only one.</p>", "image": null, "media": [], "authors": [ { "name": "Tim Bray", "email": null, "url": null } ], "categories": [ { "label": "Language", "term": "Language", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Language", "term": "Language", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Technology/Math", "term": "Technology/Math", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Technology", "term": "Technology", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Math", "term": "Math", "url": "https://www.tbray.org/ongoing/What/" } ] }, { "id": "https://www.tbray.org/ongoing/When/202x/2025/05/27/Happy-Colors", "title": "CL XLVI: Happy Colors", "description": "Last weekend we were at our cabin on Keats Island and I came away with two cottage-life pictures I wanted to write about. To write cheery stuff actually, a rare pleasure in these dark days. Both have a story but this first one’s simple", "url": "https://www.tbray.org/ongoing/When/202x/2025/05/27/Happy-Colors", "published": "2025-05-27T19:00:00.000Z", "updated": "2025-05-29T04:58:08.000Z", "content": "<p>Last weekend we were at our cabin on\n <a href=\"https://en.wikipedia.org/wiki/Keats_Island_(British_Columbia)\">Keats Island</a> and I came away with two\n <a href=\"/ongoing/What/The%20World/Cottage%20Life/\">cottage-life</a> pictures I\n wanted to write about. To write cheery stuff actually, a rare pleasure in these dark days. Both have a story but this first one’s\n simple.</p>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/05/27/PXL_20250525_212106021.png\" alt=\"Evergreen branches in spring with the new life showing\"></img>\n <p>It’s just an ordinary evergreen tree, not very tall, nothing special about it. But spring’s here! So at the end of each branch\n there’s a space where the needles are new and shout their youth in light green, a fragile color as compared to the soberly rich \n shade of the middle-aged needles further up the branch. Probably a metaphor for something complicated but I just see a tree\n getting on with the springtime business of tree-ness. Good on it.</p>\n <p>Now a longer story.\n What happened was, we had an extra-low tide. Tide is a big deal, we get 17 vertical feet at the extremes which can cause\n problems for boats and docks and if you happen to arrive with several days worth of supplies at low tide well it sucks to be\n you, because you’re gonna be toting everything up that much further.</p>\n <p>But I digress.</p>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/05/27/PXL_20250525_172750708.png\" alt=\"Purple sea stars hide among dark rocks\"></img>\n <p>I went for a walk at low tide because you see things that are usually mostly hidden. For example these\n <a href=\"https://en.wikipedia.org/wiki/Starfish\">starfish</a>, also known as sea stars or even “asteroids”. No, really, check\n that link.</p>\n <p>These are\n <a href=\"https://en.wikipedia.org/wiki/Pisaster_ochraceus\"><i>Pisaster ochraceus</i></a>, distinguished by that pleasing violet color.\n Have a close look. They’re intertidal creatures hiding from the unaccustomed light and air. The important thing is that\n they’re more or less whole, which is to say free of\n <a href=\"https://en.wikipedia.org/wiki/Sea_star_wasting_disease\">wasting disease</a>, of which there’s been a major epizootic in\n recent years. The disease isn’t subtle, it makes their arms melt away into purple goo; extremely gross.</p>\n <p>Plus, ecologies being what they are, there are downstream effects. Sea stars predate on sea urchins only recently they\n haven’t been because wasting disease. It turns out that sea urchins eat the kelp that baby shrimp trying to grow up hide in.\n Fewer stars, more urchins, less prawns. Which means that the commercial prawn-fishers have been coming up\n empty and going out of business.</p>\n <p>Anyhow, seeing a cluster of disease-free stars is nice, whether you’re in the seafood business or you just like\n the stars for their own sake, as I do.</p>\n <p>And light-green needles too. And spring. Enjoy it while you can.</p>", "image": null, "media": [], "authors": [ { "name": "Tim Bray", "email": null, "url": null } ], "categories": [ { "label": "The World/Cottage Life", "term": "The World/Cottage Life", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "The World", "term": "The World", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Cottage Life", "term": "Cottage Life", "url": "https://www.tbray.org/ongoing/What/" } ] }, { "id": "https://www.tbray.org/ongoing/When/202x/2025/05/17/Springtime-Lens", "title": "The Lens of Spring", "description": "Back in the early days of this blog, I used to publish posts that were mostly pictures of plants and flowers. Especially at this time of year. I think that energy went into Twitter and now the Fediverse, where it’s so easy to take a picture and post it right then. This week I got a freshly-repaired lens back from the shop and it put me in the mood to get closer to the botanical frenzy springing at us from every direction. Herewith four pix of two plants, one of a lens, and more thoughts on a familiar subject: Whether it’s better to repair than to replace", "url": "https://www.tbray.org/ongoing/When/202x/2025/05/17/Springtime-Lens", "published": "2025-05-17T19:00:00.000Z", "updated": "2025-05-18T18:53:07.000Z", "content": "<p>Back in the early days of this blog, I used to publish posts that were mostly pictures of plants and flowers. Especially at this\n time of year. I think that energy went into Twitter and now the Fediverse, where it’s so easy to take a picture and post it\n right then. This week I got a freshly-repaired lens back from the shop and it put me in the mood to get closer to the\n botanical frenzy springing at us from every direction. Herewith four pix of two plants, one of a lens, and more thoughts on a\n familiar subject: Whether it’s better to repair than to replace.</p>\n <p>The lens, by the way, was the\n <a href=\"https://www.fujifilm-x.com/en-ca/products/lenses/xf18-55mmf28-4-r-lm-ois/\">Fuji 18-55</a> oops its full name is\n “Fujinon XF18-55mmF2.8-4 R LM OIS” so there. I\n <a href=\"/ongoing/When/201x/2013/03/06/Fuji-X-E1-in-Tokyo\">bought it</a> in March of 2013 and have dropped it more than once; I\n have retained 1,432 pictures taken with it over the years. But then it stopped working.</p>\n <p>More words on that later, but pictures first.</p>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/05/17/TXT55621.png\" alt=\"A yellow Fru Dagmar Hastrup rose blossom\"></img>\n <div class=\"caption\"><p>Roses have names and this one is “Fru Dagmar Hastrup”. Therein\n <a href=\"/ongoing/When/200x/2008/06/26/Yellow-Rugosa\">lies a tale</a> that is either 17 or 111 years old, depending how you\n count.</p></div>\n <p>That’s the first picture I took with the repaired 18-55. But then I thought that the whole point of this basic zoom was that\n you could go wide to capture big things, or long to, well, zoom in on ’em. So I went out front.</p>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/05/17/TXT55626.png\" alt=\"Looking up into the branches of a large deciduous tree\"></img>\n <div class=\"caption\"><p>Trees have names too. This is a\n <a href=\"https://en.wikipedia.org/wiki/Fraxinus_americana\">White Ash</a> (<i>Fraxinus americana</i>).</p></div>\n <p>That ash is one of the trees lining the street we\n <a href=\"/ongoing/When/202x/2025/02/28/Moved\">moved onto last October</a>. It’s really immense. Let’s crank the zoom way wide and\n capture most of it. Doing this reveals really great geometry, so let’s subtract the color and add some\n <a href=\"https://nikcollection.dxo.com/nik-silver-efex/\">Silver Efex</a> sizzle.</p>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/05/17/TXT55625-Edit.png\" alt=\"Black and white rendition of the spreading branches of a large tree\"></img>\n <p>And then we can zoom back in.</p>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/05/17/TXT55628.png\" alt=\"The first fork in the trunk of a large tree, with moss and outgrowths\"></img>\n <p>The closer you get, the better it looks.</p>\n <h2 id=\"p-1\">Fixing that lens</h2>\n <p>I like quirky fast compact opinionated prime lenses just as much as the next photoenthusiast, but a decent midrange zoom\n is just too useful not to have. I could’ve replaced this one with the new-fangled\n <a href=\"https://www.fujifilm-x.com/en-ca/products/lenses/xf16-50mmf28-48-r-lm-wr/\">16-50mm</a> (also has a long complicated\n Real Name but never mind). That would cost me extra money and\n <a href=\"https://www.youtube.com/watch?v=1rLcCkilADY&t=3s\">might not even be better</a>.</p>\n <p>So I poked around on the Fujifilm Web site and sure enough, they offer repair as a service, just package it up and mail it\n in. A few days after doing so I got an email quoting me a price and asking for approval, which I granted.\n You shouldn’t be surprised. Way back in 2011 I wrote\n <a href=\"/ongoing/When/201x/2011/10/20/Worth-Repairing\">Worth Fixing</a>, the exemplar of which was a different excellent lens.\n And then just last year my\n <a href=\"/ongoing/When/202x/2024/06/01/Parable-of-the-Sofa\">Parable of the Sofa</a> touched a few\n nerves. So I didn’t think very hard about it.</p>\n <p>But then I realized I hadn’t even checked whether the price was reasonable. So I\n <a href=\"https://www.ebay.com/sch/i.html?_nkw=xf18-55\">turned to eBay</a> and, well, I could have got a mint-condition\n secondhand 18-55 for less than the cost of the repair. Not a lot less, but still. Oh well. If it were reasonable to care\n about a single instance of a standardized commercial product, I’d care about that lens.</p>\n <p>Anyhow, it works pretty well. Showing its age, but still reasonably handsome.</p>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/05/17/PXL_20250518_040716981.png\" alt=\"Fujifilm x-T5 camera with the 18-55mm lens attached\"></img>\n <p>If I live long enough maybe I’ll take another thousand pictures with it.</p>", "image": null, "media": [], "authors": [ { "name": "Tim Bray", "email": null, "url": null } ], "categories": [ { "label": "The World/Economics", "term": "The World/Economics", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "The World", "term": "The World", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Economics", "term": "Economics", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Arts/Photos/Cameras", "term": "Arts/Photos/Cameras", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Arts", "term": "Arts", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Photos", "term": "Photos", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Cameras", "term": "Cameras", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Arts/Photos", "term": "Arts/Photos", "url": "https://www.tbray.org/ongoing/What/" } ] }, { "id": "https://www.tbray.org/ongoing/When/202x/2025/05/06/Long-Links", "title": "Long Links", "description": "Another Long Links curation (the 31st!); substantial pieces of reading (or watching or listening) that you probably don’t have time to take in all of. One or two, though, might reward your attention. The usual assortmet of music, geekery, and cosmology", "url": "https://www.tbray.org/ongoing/When/202x/2025/05/06/Long-Links", "published": "2025-05-06T19:00:00.000Z", "updated": "2025-05-08T21:22:54.000Z", "content": "<p>Another <cite>Long Links</cite> curation (the 31<sup>st</sup>!); substantial pieces of reading (or watching or listening)\n that you probably don’t have time to take in all of. One or two, though, might reward your attention. The usual assortmet of\n music, geekery, and cosmology.</p>\n <h2 id=\"p-1\">Galactic clusters</h2>\n <p>Ever heard of\n <a href=\"https://en.wikipedia.org/wiki/Laniakea_Supercluster\">Laniakea</a>? Neither had I. It’s another word for our home.\n This 7-minute YouTube video,\n <a href=\"https://www.youtube.com/watch?v=Ayj4p3WFxGk\">The Laniakea supercluster of galaxies</a>, is graceful and mind-expanding;\n highly recommended.</p>\n <h2 id=\"p-2\">Atom Heart Mother</h2>\n <p>I was sitting up late, pretty mellow, and Google Music showed me\n <a href=\"https://www.youtube.com/watch?v=RqcNqRA07yQ\">Atom Heart Mother</a> as performed by Japanese tribute band\n Pink Floyd Trips in 2016. It woke me right up. The Japanese\n hipsters are instrumentally strong and use keyboards for the acoustic-instrument parts. As for the vocals, well, oh my oh\n my, definitely \n next level. Good stuff.</p>\n <p>Which made me curious about other performances of <cite>Atom Heart Mother</cite>. Turns out Floyd recorded\n <a href=\"https://www.youtube.com/watch?v=jWR-aI1qtEU\">a 1971 performance</a>, coincidentally also from Japan.\n Obviously they’re competent, but they’re just four guys and the keyboard technology was way more primitive back then, so they’re\n at a disadvantage compared to the resources they had in the studio when recording it, or the technology deployed by\n PF Trips. A lot of the visuals are of the band arriving in and traveling around Japan, which is OK, because their\n performances in that era weren’t particularly visually stimulating. Credit to Gilmour for hitting the high notes (albeit with\n some electronic assist), but once\n again, he’s at a disadvantage compared to the awesome Japanese singers.</p>\n <p>The arrangement is quite a bit different than the original on the eponymous album and, within the limitations, is good.</p>\n <p>There’s a cover by “Pussycherry et l'Orchestre d'harmonie de Clermont Ferrand” which I abandoned partway through because the\n orchestra just isn’t very good, clumsy and harsh. There is a nice little cello part though.</p>\n <p>I will link to\n <a href=\"https://www.youtube.com/watch?v=0ra6B5evR2o\">Orchestre Philharmonique de Radio France with Ron Geesin at the Théâtre du\n Chatelet</a>, once again an orchestra and a chorus. Ron Geesin is the guy that Floyd hired to do all the orchestral stuff after\n they’d recorded the basic tracks and went on tour. The orchestra is way better but disappointingly equals neither Geesin’s\n original take on the album, nor PF Trips. And the big choir doesn’t come close to those two Japanese women.</p>\n <p>There are more performances out there, but I had to go to bed.</p>\n <h2 id=\"p-3\">C2PA C2PA C2PA</h2>\n <p>I have\n <a href=\"/ongoing/What/Technology/Identity/\">written quite a bit</a> about\n <a href=\"https://c2pa.org/\">C2PA</a> and other “Content Authenticity” initiative stuff. Recently, Adobe has released more\n C2PA-enabling technology in several of its apps, and there is commentary from\n <a href=\"https://www.dpreview.com/opinion/6029161962/adobe-content-authenticity-credentials-app-public-beta-ai-training\">DPReview</a>\n and\n <a href=\"https://petapixel.com/2025/04/24/why-photographers-should-care-about-the-new-content-authenticity-app/\">PetaPixel</a>.</p>\n <p>If you care about this stuff like I do you’ll probably enjoy reading both pieces. But they (mostly) miss what I think is the key\n point. The biggest value offered by this stuff is establishing provenance, and the most important place to establish provenance\n is on social media. Knowing that a pic on Fedi or Bluesky was first uploaded by <code>@[email protected]</code> is highly\n useful in helping people decide whether it’s real or not, and would not require a major technical leap from any social-media\n provider.</p>\n <h2 id=\"p-4\">Less attention</h2>\n <p>Joan Westerberg’s excellent\n <a href=\"https://www.joanwestenberg.com/notes-from-the-exit-why-i-left-the-attention-economy/\">Notes from the Exit: Why I Left\n the Attention Economy</a> is full of passion and truth. About stepping off the “content creator” treadmill, she writes:</p>\n <blockquote><p>Leaving the attention economy doesn’t mean vanishing. It means choosing to matter to fewer people, more\n deeply. It means owning the means of distribution. It means publishing like a human being instead of a content mill. It means\n you stop playing to the house odds and start building your own game.</p></blockquote>\n <p>And the rest is just as good. For what it’s worth, what she’s describing is what I’ve been trying to do in this space for the\n last 22 years.</p>\n \n <h2 id=\"p-6\">Defective outlook</h2>\n <p>I don’t read <cite>The Register</cite> often enough; for many years they’ve been full of fresh takes and exhibited a usefully\n belligerant attitude. For example,\n <a href=\"https://www.theregister.com/2025/03/31/opinion_column_big_tech/\">When even Microsoft can’t understand its own Outlook,\n big tech is stuck in a swamp of its own making</a> excoriates “the weird cruft that happens when Microsoft saws bits of our\n limbs off to make us fit into whatever profit center is running strategy today.” I actually disagree with some of the \n article, as I often do with the <cite>Reg</cite>, but I enjoyed reading it anyhow.</p>\n <h2 id=\"p-7\">A billion times a second</h2>\n <p>Time to put on your hardcore-geek hat and look at\n <a href=\"https://www.amazon.science/publications/formally-verified-cloud-scale-authorization\">Formally verified cloud-scale\n authorization</a>. A group at AWS replaced a single heavily-used API call implementation with formally-verified code,\n simultaneously making it smaller and faster. The link is to an overview piece, the full PDF is\n <a href=\"https://assets.amazon.science/bb/40/22ac44f84f6d8eb625ac9666a00f/formally-verified-cloud-scale-authorization.pdf\">here</a>.</p>\n <p>These are not lightweight technologies and this was not a cheap project; a lot of people did a lot of work and these are not\n junior people. But when what you’re working on is this call:</p>\n <blockquote><p><code>Answer evaluate(List<Policy> ps, Request r)</code></p></blockquote>\n <p>That call is at the core of where AWS grants or denies access by anything to anything, and it’s called more than a billion\n times a second. That’s billion with a B. A situation where this kind of investment isn’t merely justifiable, it’s a no-brainer.\n I know a couple of the people on the authors list, and I offer all of them my congratulations. Strong work!</p>\n <h2 id=\"p-8\">Decarbonization at sea</h2>\n <p>Regular readers know that my family has a boat, that we’re trying to\n <a href=\"/ongoing/When/202x/2020/01/19/Decarbonization\">decarbonize our lives</a>, and that the boat has been the hardest part\n of that.</p>\n <p>So, I pay close attention to the latest news from the electric-boat scene. I’m starting to gain confidence that in a\n single-digit number of years we’ll be using a quieter, cheaper, more environmentally praiseworthy vessel of some sort. So, in\n case anybody has similar worries, here are snapshots from a few of the more viable electric-boat startups:\n <a href=\"https://www.navierboat.com/about\">Navier</a>,\n <a href=\"https://www.torqeedo.com/en/home\">Torqueedo</a>,\n <a href=\"https://xshore.com/us/\">X Shore</a>,\n <a href=\"https://candela.com\">Candela</a>. Also, here’s\n <a href=\"https://www.aqua-superpower.com\">Aqua superPower</a>, which wants to bring dockside charging to the electric-boat\n scene.\n And finally, here is the\n <a href=\"https://electrek.co/guides/electric-boats/\">Electric boats</a> category from the always-useful <cite>electrek</cite>\n electric-mobility site.</p>", "image": null, "media": [], "authors": [ { "name": "Tim Bray", "email": null, "url": null } ], "categories": [ { "label": "The World", "term": "The World", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "The World", "term": "The World", "url": "https://www.tbray.org/ongoing/What/" } ] }, { "id": "https://www.tbray.org/ongoing/When/202x/2025/04/28/Censoring-Social-Media", "title": "Censoring Social Media", "description": "In mid-April we learned about Bluesky censoring accounts as demanded by the government of Türkiye. While I haven’t seen coverage of who the account-holders were and what they said, the action followed on protests against Turkish autocrat Erdoğan for ordering the arrest of an opposition leader — typical behavior by a thin-skinned Führer-wannabe. This essay concerns how we might think about censorship, its mechanics, and how the ecosystems built around ActivityPub and ATproto can implement and/or fight it", "url": "https://www.tbray.org/ongoing/When/202x/2025/04/28/Censoring-Social-Media", "published": "2025-04-28T19:00:00.000Z", "updated": "2025-05-05T19:18:53.000Z", "content": "<p>In mid-April \n <a href=\"https://techcrunch.com/2025/04/23/government-censorship-comes-to-bluesky-but-not-its-third-party-apps-yet/\">we\n learned</a> about Bluesky censoring accounts as demanded by the government of Türkiye. While I haven’t seen\n coverage of who the account-holders were and what they said, the action followed on protests against Turkish autocrat Erdoğan \n for ordering the arrest of an opposition leader<span class=\"dashes\"> —</span> typical behavior by a\n thin-skinned Führer-wannabe. This essay concerns how we might think about censorship, its mechanics, and how the ecosystems\n built around ActivityPub and ATproto can implement and/or fight it.</p>\n <p>That link above is to TechCrunch’s write-up of the situation, which is good. There’s going to be overlap between that and\n this but neither piece is a subset of the other, so you might want to read TechCrunch too.</p>\n <h2 id=\"p-1\">Censorship goals and non-goals</h2>\n <p>How, as the community of people who live and converse online, should we want our decentralized social media to behave?</p>\n <p>I’m\n restricting this to <em>decentralized</em> social media because the issues around censorship differ radically between \n a service owned and controlled by a profit-seeking corporation, and an ecosystem\n of interoperating providers who may not be in it for the money.</p>\n <p>So, from the decentralized point of view, what should be the core censorship goals? As Mencken said, “For every complex\n problem there is an answer that is clear, simple, and wrong.” Here are two of those:</p>\n <ol>\n <li><p>No censorship. Let people say what they will and the contest of ideas proceed. Freedom of speech must be\n absolute.</p></li>\n <li><p>Suppress any material which is illegal in the jurisdiction where the human participant is located. Stop there,\n because making policy in \n this area is not the domain of of social-media providers.</p></li>\n </ol>\n <h2 id=\"p-2\">“Free speech”?</h2>\n <p>The absolutists’ position is at least internally consistent. But it has two fatal flaws, one generic and one\n specific. In general, a certain proportion of people are garbage and will post terrible, hateful, damaging things that make\n the online experience somewhere in the range between unpleasant and intolerable, to the extent that many who deserve to be heard will\n be driven away.</p>\n <p>And specifically, history teaches us that certain narratives are dangerous to civic sanity and human life: Naziism, revanchism,\n hypernationalism, fomenting ethnic hatred, and so on.</p>\n <p>Another way to put this: Everyone has a basic right to free speech, but nobody has a right to be listened to.</p>\n <p>So, the Free Speech purists can now please show themselves out. (Disclosure: I didn’t mean that “please”.)</p>\n <h2 id=\"p-3\">“Rule of law”?</h2>\n <p>I can get partially behind this. If you’re running a social-media service in a civilized democratic country and posting\n X is against the law, you’d better think carefully about allowing X. (Not saying that civil disobedience is always wrong, just\n that you need to think about it.)</p>\n <p>But mostly no. The legalist approach suffers from positive and negative failures. Negative, as in censoring-is-wrong: I really\n DGAF about Turkish legal restrictions, because they’re more or less whatever Erdoğan says they are, and Erdoğan is a tinpot\n tyrant. Similarly, on Trump’s current trajectory it’ll soon be illegal to express anti-Netanyahu sentiment in the USA.</p>\n <p>Positive, as in not-censoring is wrong: Lolicon is legal in Japan and treated like\n <a href=\"https://en.wikipedia.org/wiki/CSAM\">CSAM</a> elsewhere. Elsewhere is right, Japan\n is wrong. Another example: Anti-trans hate is increasingly cheerled by conservative culture warriors all over the place and \n <a href=\"https://www.bbc.com/news/articles/crldey0z00ro\">is now the official policy of the British government</a>. Sir Keir\n Starmer would probably be suspended from\n <a href=\"https://cosocial.ca\">my Mastodon instance</a> and invited to find somewhere else, except for somewhere else would be\n mass-defederated if it tolerated foolish bigots like Starmer.</p>\n <h2 id=\"p-4\">How Bluesky does it</h2>\n <p>(I should maybe say “How ATproto does it” but this seems more reader-friendly.) It’s not as though they pushed some button\n and silenced the hated-by-Erdoğan accounts. In fact, it’s subtle and complicated. \n For details, see\n <a href=\"https://fediversereport.com/bluesky-censorship-and-country-based-moderation/\">Bluesky, censorship and country-based\n moderation</a> by Laurens Hof at <cite>The Fediverse Report</cite>. Seriously, if you think you might have an opinion about\n Bluesky and what they’re doing, go read Hof before you share it.</p>\n <p>Having said that, I think I can usefully offer a short form. Bluesky supports the use of multiple composable\n moderation services, and client software can decide which of them to subscribe to. It provides a central moderation service\n aimed at stopping things like CSAM and genocide-cheerleading that’s designed to operate at the scale of the whole network, which\n seems good to me.</p>\n <p>It also offers “geographic moderation labelers”, which can attach “forbidden” signals to posts which are being read by people\n in particular areas. That’s what they did in this case; the Erdoğan-hated accounts had those labels\n attached to their posts, but only for people who are in Türkiye.</p>\n <p>The default Bluesky client software subscribes to the geographic labeler and does as it’s told, which made Erdoğan and his\n toadies happy.</p>\n <p>But anyone can write Bluesky client software, and there’s nothing in the technology that requires clients to subscribe to or\n follow the instructions of any moderation service. One alternate client,\n <a href=\"https://deer.social\">Deer.social</a>, is a straightforward fork of the default, but with the geographic\n moderation removed. (It may have other features but looks about like basic Bluesky to me.)</p>\n <h2 id=\"p-5\">How the Fediverse does it</h2>\n <p>(I should maybe say “How ActivityPub does it” or “How Mastodon does it” but…) Each instance does its own moderation and\n (this is important) makes its own decision as to which other instances to federate with. There are plenty of sites out there\n running Fediverse software that are full of CSAM and Lolicon and Nazis and so on. But the “mainstream” instances have\n universally defederated them, so it’s rare to run across that stuff. I never do.</p>\n <p>To make things easy, there are “shared block-lists” that try to keep up-to-date on the malignant instances. It’s early days\n yet but I think this will be a growth area.</p>\n <p>Most moderation is based on “reporting”<span class=\"dashes\"> —</span> if you see something you think is abusive or breaks the\n rules, you can hit the “report” button, and the moderators for your instance and the source instance will get messaged and can\n decide what to do about it.</p>\n <p>The effect is that there is a shared culture across a few thousand “mainstream” instances that leads, in my opinion, to a\n pretty pleasing atmosphere and low abuse level. We have a problem in that it’s still too easy to for a bad person to post\n abusive stuff in a way that is\n <a href=\"/ongoing/When/202x/2024/07/30/Invisible-Attackers\">hard for moderators to see</a>, but\n <a href=\"https://social.growyourown.services/@FediTips/114149382005729304\">it’s being worked on</a> and I’m\n optimistic.</p>\n <h2 id=\"p-6\">Dealing with Erdoğan: Bluesky</h2>\n <p>So, suppose we want our social-media services to route around Erdoğan’s attempts to silence his political opponents. I do.\n How effective would Bluesky and the Fediverse be at that?</p>\n <p>Bluesky makes it easy: Just use an alternate client. Yay! Except for, most people don’t and won’t and shouldn’t have\n to. Boo!</p>\n <p>Still I dunno, in a place where the politics is hot, the word might get out on the grapevine and a lot of people could give\n another client a try. Maybe? Back in the day a <em>lot</em> of people used alternate Twitter clients, until Twitter stomped those\n out. I’m not smart enough to predict whether this could really be effective at routing round Erdoğan. I lean pessimistic\n though.</p>\n <p>Wait, what about the Bluesky Web interface? Who needs a client anyhow! No luck; it turns out that that’s a\n big fat React app with mostly the same code that’s in the mobile apps. Oh well.</p>\n <p>Anyhow, this ignores the real problem. Which is that if Erdoğan’s goons notice that people are dodging the censorship they’ll\n go nuclear on Bluesky (the company) and tell them to just stop displaying those people’s posts and to do it right fucking\n now.</p>\n <p>If that doesn’t work, they have a lot of options, starting with just blocking access to bsky.app, and extending to arresting any\n in-country staff or, even better, their families. And throwing them in an unheated basement. I dunno, a courageous and\n smart company might be able to fight back, but it wouldn’t be a good situation.</p>\n <p>And that’s a problem, because even though the ATproto is by design decentralized, in practice there’s only one central\n service that routes the firehose of posts globally. So my bet would be that Erdoğan wins.</p>\n <h2 id=\"p-7\">Dealing with Erdoğan: Fediverse</h2>\n <p>This is a very different picture. Block access to the app and a lot of people won’t notice because they use the browser,\n connecting to one of the thousands of Fediverse instances,\n desktop or mobile, and it’ll work fine. \n OK, how about finding out which instances the people they’re trying to ban\n are on, and going after those instances? If the instance is in a rule-of-law democracy, the Turks\n would probably be told to go pound sand.</p>\n <p>OK, so what if the Turks ferociously attacked the home servers of the Thought Criminals? No problemo, they’d migrate\n to a more resilient instance and, since this is the Fediverse, their followers might never notice, they’d just come along with\n them.</p>\n <p>Pretty quickly the Erdoğan gang are gonna end up playing whack-a-mole.\n In fact I think it’s going to be really, really hard in general for oppressive governments to censor the Fediverse. Not\n impossible; the people who operate the\n <a href=\"https://en.wikipedia.org/wiki/Great_Firewall\">Great Firewall</a> would probably find a way.</p>\n <p>When Bluesky progresses to the point that there isn’t a single essential company at the center of everything, it\n should be censorship-resilient too, for the same reasons.</p>\n <h2 id=\"p-8\">Take-aways</h2>\n <p>I think that, to resist misguided censorship by misguided governments, we need (at least) these things:</p>\n <ol>\n <li><p>A service with no central choke-points, but rather a large number of independent co-operating nodes.</p></li>\n <li><p>Accounts, and the follower relationships between them, are not tied to any single node.</p></li>\n </ol>\n <p>Clearly these conditions are necessary; we don’t know yet whether or not they’re sufficient.\n But I’m generally optimistic that decentralized social media has the potential to offer a pretty decent level of censorship\n resistance.</p>", "image": null, "media": [], "authors": [ { "name": "Tim Bray", "email": null, "url": null } ], "categories": [ { "label": "The World/Social Media", "term": "The World/Social Media", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "The World", "term": "The World", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Social Media", "term": "Social Media", "url": "https://www.tbray.org/ongoing/What/" } ] }, { "id": "https://www.tbray.org/ongoing/When/202x/2025/05/04/Southsiders", "title": "Southsiders", "description": "Ever been to a soccer match and noticed the “supporters section”, full of waving flags and drummers and wild enthusiasm? Last Saturday I went there. And marched in their parade, even. I could claim it was anthropology research. But maybe it’s just old guys wanna have fun. Which I did. Not sure if I will again", "url": "https://www.tbray.org/ongoing/When/202x/2025/05/04/Southsiders", "published": "2025-05-04T19:00:00.000Z", "updated": "2025-05-05T18:21:34.000Z", "content": "<p>Ever been to a soccer match and noticed the “supporters section”, full of waving flags and drummers and wild enthusiasm?\n Last Saturday I went there. And marched in their parade, even. I could claim it was anthropology research. But maybe it’s just\n old guys wanna have fun. Which I did. Not sure if I will again.</p>\n <p>For the rest of this piece, when I say “football” I mean fútbol as in soccer, because that‘s what everyone on the scene says.</p>\n <h2 id=\"p-1\">Background</h2>\n <p><a href=\"https://www.mlssoccer.com\">MLS</a> (for Major League Soccer) is the top-level football league in North America and,\n depending on whose ratings you believe, the 9<sup>th</sup> or 10<sup>th</sup> strongest league in the world.\n At the moment, the\n <a href=\"https://www.whitecapsfc.com\">Vancouver Whitecaps</a> are the strongest team in MLS and are\n <a href=\"https://www.concacaf.com/rankings/club/\">ranked #2 in Concacaf</a> which means North and Central America.\n That may become #1 if they win the\n win the <a href=\"https://www.concacaf.com/champions-cup/\">Champions Cup Final on June 1<sup>st</sup> in Mexico City</a>, against\n #1-ranked\n <a href=\"https://cfcruzazul.com\">Cruz Azul</a>.</p>\n <p>Who knows if these good times will last, but for\n the moment it means they’re kind of a big deal here my home town.\n I’ve become a fan, because the Whitecaps are fun to watch.</p>\n <p>Mind you, the team is for sale and will probably be snapped up by a Yankee billionaire and relocated to Topeka or somewhere.</p>\n <p>When I’ve been to Whitecaps games, I’ve always been entertained by the raucous energy coming out of the supporters section. They\n provide a background roar, shout co-ordinated insults at the other team and referee, have a drum section, and feature a waving\n forest of flags.</p>\n <h2 id=\"p-2\">Southsiders</h2>\n <p>They’re called that because they inhabit the south end of the stadium, behind the goal that the Whitecaps attack\n in the second half. Check out the\n <a href=\"https://vancouversouthsiders.ca\">Web site</a>.</p>\n <p>So, on a manic impulse, I joined up. It didn’t cost much and got me a big-ass scarf with “Vancouver” on one side and\n “Southsiders” on the other. \n Which I picked up, along with a shiny new membership card, at\n <a href=\"https://www.dublincalling.com/vancouver/home\">Dublin Calling</a>, a perfectly decent sports bar where the membership\n card gets you a discount. I have to say that the Southsiders people were friendly, efficient, and welcoming.</p>\n <p>My son was happy to come along; we got to the bar long enough before The Parade to have a beer and perfectly OK bar food at\n what, especially with the discount, seemed a fair price. This matters because the food and beer at the stadium is exorbitantly\n priced slop.</p>\n <h2 id=\"p-6\">Alternatives</h2>\n <p>Since I wrote this, I learned that there are actually\n <a href=\"https://www.whitecapsfc.com/matchday/supporter-groups\">four different fan clubs</a>. Especially, check out\n <a href=\"https://vssg.ca\">Vancouver Sisters</a>.</p>\n <h2 id=\"p-3\">The Parade</h2>\n <p>Forty-five minutes before game time, the fans leave Dublin Calling a couple hundred strong and march to the stadium,\n chanting dopey chants and singing dopey songs and generally having good clean fun.\n It’s a family affair.</p>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/05/04/PXL_20250504_004756238.png\" alt=\"Southsiders parade\"></img>\n <p>Note: Kid on Dad’s shoulders. Flags. Spectators, and here’s a thing: When you’re in a loud cheerful parade, everybody smiles\n at you. Well, except for the drivers stuck at an intersection. Since we’re Canadian we’re polite, so we stop the parade at red\n lights. Sometimes, anyhow.</p>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/05/04/PXL_20250504_005058831.png\" alt=\"Southsiders parade\"></img>\n <p>Note: Maximal fan. Scarves held aloft (this happens a lot). Blue smoke. Flags in Whitecaps blue and Canada red.</p>\n <p>When the parade gets to the stadium, everyone kneels.</p>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/05/04/PXL_20250504_005738243.png\" alt=\"Southsider parade kneels\"></img>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/05/04/PXL_20250504_005802321.png\" alt=\"Southsider parade kneels\"></img> \n <p>After a bit, someone starts a slow quiet chant, then they wind it up and up until everyone explodes to their feet and\n leaps around madly. That’s all then, time to pile into the stadium.</p>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/05/04/PXL_20250504_010531982.png\" alt=\"Inside BC Place stadium\"></img>\n <p>Which is visually impressive on with the lid open on a sunny day.</p>\n <h2 id=\"p-4\">Indoor fun</h2>\n <p>The Southsiders section is General Admission, pick anywhere to stand. And I mean stand, there’s no sitting down while the\n game’s on. There’s a big flag propped up every half-dozen seats or so you can grab and wave when the spirit moves you.\n There’s a guy on a podium down at the front, facing the crowd, and he co-ordinates the cheers and songs and…\n He. Never. Stops.</p>\n <p>The Southsiders gleefully howl in joy at every good Whitecaps move and with rage at every adverse whistle, have\n stylized moves like for example whenever the opposing keeper launches a big goal kick everyone yells “You fat bastard!” No, I\n don’t know why.</p>\n <p>When I shared that I was going to do this crazy thing people wondered if it was safe, would I get vomited on, was there\n violence, and so on. In the event it was perfectly civilized as long as you don’t mind a lot of noise and shouting. The\n beer-drinking was steady but I didn’t see anyone who seemed the worse for the wear.\n If it weren’t for all the colorful obscenity I’d be comfy bringing a kid along.</p>\n <p>The crowd is a little whiter than usual for Vancouver, mostly pretty young, male dominated, with a visible gay\n faction. Nothing special.</p>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/05/04/PXL_20250504_024141039.png\" alt=\"View from the Southsiders section at BC Place\"></img>\n <p>Note: Canadian and rainbow flags. Somewhat obstructed view; the flags are out because a goal has just been scored, you can\n see the smoke from the fireworks. The opposing goal is a long way away.</p>\n <p>What’s good: Being right on top of any goals scored at the near end. The surges of shared emotion concerning the action in\n the game.</p>\n <p>What’s bad: Standing all through the game. The action at the other end is too far away. The songs and chants grow wearing\n after a while.</p>\n <h2 id=\"p-5\">The game</h2>\n <p>The Whitecaps won, which was nice. It was pretty close, actually, against a team that shouldn’t be much of a threat.\n But then, most of Vancouver’s best players were out in healing-from-injury or resting-from-overwork mode.\n I still think the Whitecaps are substandard at working the ball through the middle of the field, but do well at both ends; At\n the moment <a href=\"https://www.mlssoccer.com/standings/\">the stats</a> seem to say that they’re on top\n both at scoring and preventing goals.</p>\n <p>Here’s what to do if you’re watching a game: If either Pedro Vite (#45) or Jayden Nelson (#7) get the ball, lean in and\n focus. Both those guys are lightning in a bottle. I’ve enjoyed watching this team more than any other Vancouver sports franchise\n ever. It probably can’t last.</p>\n <p>Will I do the Southsiders section again? Maybe. I suspect I’ll enjoy their energy and edge just as much\n even when I’m not in the section, plus I’ll get to sit down. We’ll see.</p>\n <p>My son and I had fun. No regrets.</p>", "image": null, "media": [], "authors": [ { "name": "Tim Bray", "email": null, "url": null } ], "categories": [ { "label": "Sports/Soccer", "term": "Sports/Soccer", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Sports", "term": "Sports", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Soccer", "term": "Soccer", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "The World/Places/Vancouver", "term": "The World/Places/Vancouver", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "The World", "term": "The World", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Places", "term": "Places", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Vancouver", "term": "Vancouver", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Arts/Photos", "term": "Arts/Photos", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Arts", "term": "Arts", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Photos", "term": "Photos", "url": "https://www.tbray.org/ongoing/What/" } ] }, { "id": "https://www.tbray.org/ongoing/When/202x/2025/04/21/Happy-Island-Spring", "title": "CL XLV: Island Spring", "description": "Join me for a walk through a rain forest on a corner of a small island. This is to remind everyone that even in a world full of bad news, the trees are still there. From the slopes leading down to the sea they reach up for sunshine and rain, offering no objections to humans walking in the tall quiet spaces between them", "url": "https://www.tbray.org/ongoing/When/202x/2025/04/21/Happy-Island-Spring", "published": "2025-04-21T19:00:00.000Z", "updated": "2025-04-24T19:02:55.000Z", "content": "<p>Join me for a walk through a rain forest on a corner of a small island.\n This is to remind everyone that even in a world full of bad news, the trees are still there. \n From the slopes leading down to the sea they reach up for sunshine and rain,\n offering no objections to humans walking\n in the tall quiet spaces between them.</p>\n <p>[The island is\n <a href=\"https://en.wikipedia.org/wiki/Keats_Island_(British_Columbia)\">Keats Island</a>, where we’ve\n <a href=\"/ongoing/What/The%20World/Cottage%20Life/\">had a cabin since 2008</a>. It’s mostly just trees and cabins, you can buy an\n oceanfront mansion for millions or a basic Place That Needs Work for much less (as we did) or you can\n <a href=\"https://bcparks.ca/plumper-cove-marine-park\">camp cheap</a>. Come on over sometime.]</p>\n <p>On the path up from the water to the cabin there’s this camellia that was unhappy at our home in the city, its flowers\n always stained brown even as they opened. So we brought it to the island and now look at it!</p>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/04/21/PXL_20250418_211131388.png\" alt=\"Camellia bush with many white and gold blossoms\"></img>\n <p>One interior shot. On this recent visit I wired up this desk, a recent hand-me-down from old friend\n <a href=\"https://en.wikipedia.org/wiki/Tamara_Munzner\">Tamara</a>.</p>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/04/21/PXL_20250419_193220121.png\" alt=\"A desk with a computer and outboard monitor and really great views\"></img>\n <p>When I got it all wired up I texted her “Now I write my masterpiece” but\n instead I wrote that one\n <a href=\"/ongoing/When/202x/2025/04/16/Decentralized-Schemes\">about URI schemes</a>, no masterpiece but I was happy with it. And\n anyhow, it’s lovely space to sit and tap a keyboard.</p>\n <p>Now the forest walk.</p>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/04/21/PXL_20250420_190132412.png\" alt=\"Pacific Northwest rain forest\"></img>\n <p>These are rain forests and they are happy in their own way when it rains but I’m a <em>Homo sapiens</em>, we evolved in a\n sunny part of the world and my eyes welcome all those photons.</p>\n <p>In 2008 I was told that the island had been logged “100 years ago”. So most of these are probably in the Young-Adult tree\n demographic, but there are a few of the real old giants still to be seen.</p> \n <p>Sometimes the trees seem to dance with each other.</p>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/04/21/TXT55561.png\" alt=\"Tall bare tree trunks seem to dance\"></img>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/04/21/TXT55554.png\" alt=\"Tall bare tree trunks seem to dance\"></img>\n <p>Both of those pictures feature (but not exclusively) <i>Acer macrophyllum</i>, the bigleaf Maple, the only deciduous tree I\n know of that can compete for sun with the towering Cedar/Fir/Hemlock evergreens. It’s beautiful both naked (as here) and in its\n verdant midsummer raiment.</p>\n <p>But sometimes when you dance too hard you can fall over. He are two different photographic takes on a bigleaf that seems to\n have lost its grip and is leaning on a nearby hemlock.</p>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/04/21/PXL_20250420_185053570.png\" alt=\"Tall trees leaning together\"></img>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/04/21/TXT55572.png\" alt=\"Tall trees leaning together\"></img>\n <p>And sometimes you can just totally lose it.</p>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/04/21/TXT55552.png\" alt=\"Nurse log rolled, laying a tree trunk flat\"></img>\n <p>It is very common in these forests to see a tree growing out of a fallen log; these are called “nurse logs”. It turns out to\n be a high-risk arboreal lifestyle, as we see here. It must have been helluva drama when the nurse rolled.</p>\n <p>I’m about done and will end as I began, with a flower.</p>\n <img src=\"https://www.tbray.org/ongoing/When/202x/2025/04/21/TXT55560.png\" alt=\"Small pink blossom, a bit tattered, the background out of focus\"></img>\n <p>This is the blossom of a salmonberry (<i>Rubus spectabilis</i>) a member of the rose family. It has berries in late summer\n but they’re only marginally edible.</p>\n <p>It’s one of the first blossoms you see in the forest depths as spring struggles free of the shackles of the northwest\n winter.</p>\n <p>Go hug a tree sometime soon, it really does help.</p>", "image": null, "media": [], "authors": [ { "name": "Tim Bray", "email": null, "url": null } ], "categories": [ { "label": "The World/Cottage Life", "term": "The World/Cottage Life", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "The World", "term": "The World", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Cottage Life", "term": "Cottage Life", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Arts/Photos", "term": "Arts/Photos", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Arts", "term": "Arts", "url": "https://www.tbray.org/ongoing/What/" }, { "label": "Photos", "term": "Photos", "url": "https://www.tbray.org/ongoing/What/" } ] } ] }