<?xml version='1.0' encoding='UTF-8'?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
  <channel>
    <title>Andrew's Blog</title>
    <link>https://sheep.horse/</link>
    <description>A blog about stuff</description>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>python-feedgen</generator>
    <language>en</language>
    <lastBuildDate>Sat, 07 Nov 2026 18:06:26 +0000</lastBuildDate>
    <item>
      <title>Hoba Meteorite, Namibia</title>
      <link>https://sheep.horse/2026/5/hoba_meteorite%2C_namibia.html</link>
      <description><![CDATA[<p>This is not really a travel blog but we have been traveling and my camera roll is ponderous  with photos from around the world. I plan to post some of the more exciting or picturesque shots over the coming months.</p>
<p><span class="importantmarginnote"><img alt="Map of Northern Namiba showing the location of the Hoba Meteorite. The red ribbon is our approximate route." src="https://sheep.horse/2026/5/hoba-meteorite-map.avif"></span>We spent almost three weeks driving around Namibia in a rented Ford Ranger. I could start by highlighting the amazing desert scenes or the famous Etosha National Park and its astounding animal population, but when we saw a dot on our paper map labelled as an intact meteorite we knew we had to go even though it added three hours onto a long days driving.</p>
<p>The young service station attendant in Grootfontein was overjoyed that we were visiting his city and seemed quite disappointed that we were just passing through on the way to the meteorite.</p>
<p>"Is it cool or is it just a big rock?", I enquired.</p>
<p>"It is just a big rock" was the somewhat grumpy reply.</p>
<p>He was not wrong, but what a rock.</p>
<figure class="fullwidth"><img alt="The Hoba Meteorite in all its metallic glory" src="https://sheep.horse/2026/5/hoba-meteorite.avif"><figcaption>The Hoba Meteorite in all its metallic glory</figcaption>
</figure>
<p>The Hoba Meteorite is actually one of the more expensive attractions in Namibia but for N$250<label class="margin-toggle sidenote-number" for="sidenote1"></label><input class="margin-toggle" id="sidenote1" type="checkbox"><span class="sidenote">about US$15 at 2026 exchange rates</span> you get entry and a (mandatory) guide for the short walk. Unlike the guy who pumped our diesel, our guide was overjoyed that we were so excited to see her rock and immediately spouted all sorts of interesting trivia.</p>
<p>Apparently a museum in New York tried to buy the meteorite in the 1960's but the deal fell through when they realized that they couldn't transport such a solid chunk of iron and nickel. Quite an admission of defeat considering that one museum in New York managed to Indiana Jones a whole Egyptian temple into one of their galleries. </p>
<p>The flattened shape and relatively slow and shallow trajectory of the meteorite allowed it to "glide" into its current position about 80 thousand years ago. Of course, being such an unique artifact and the largest hunk of space rock on the planet means that the site is protected and you can only take photos from behind a barrier.</p>
<p>Nah, just kidding. The guide practically ordered us to stand on top of the thing.</p>
<figure class="fullwidth"><img alt="Your author standing on the meteorite." src="https://sheep.horse/2026/5/standing-on-hoba-meteorite.avif"><figcaption>Your author standing on the meteorite.</figcaption>
</figure>
<p>Somewhat disappointingly I did not develop strange powers after contact with the meteorite. But on the plus side neither did it crack open to reveal a murderous alien. </p>
<p>The 3 hour detour in the hot sun was well worth it, especially since we also got to see this cool dung beetle on the side of the road.</p>
<figure><img alt="I have depth - I can like meteorites **and** dung beetles" src="https://sheep.horse/2026/5/dung-beetle.avif"><figcaption>I have depth - I can like meteorites <strong>and</strong> dung beetles</figcaption>
</figure>]]></description>
      <guid isPermaLink="false">https://sheep.horse/2026/5/hoba_meteorite%2C_namibia.html</guid>
      <pubDate>Tue, 26 May 2026 03:53:28 +0000</pubDate>
    </item>
    <item>
      <title>Parsing XML EXIF from .avif files (plus a rant)</title>
      <link>https://sheep.horse/2026/6/parsing_xml_exif_from_.avif_files_%28plus_a_rant%29.html</link>
      <description><![CDATA[<p><span class="importantmarginnote"><img alt="This quite large image compresses down to just 120k with a nice alpha channel in a nice demonstration of the strengths of avif." src="https://sheep.horse/2026/6/avif_logo.avif"></span></p>
<p>Avif files are the new hotness, and to be honest they are pretty good. Basically a replacement for both jpeg and png with better compression and (finally!) support for alpha channels in lossy images. It's a similar idea to webp but with a more modern codec. Sounds great!</p>
<p>I decided to start compressing some of my photos for this blog in avif as an experiment. And things were looking great until I realized that the code that strips exif data out of my images did not handle avif at all. Looking around, it seems that not many python packages do, since avif is relatively recent.</p>
<p>Long story short, I wrote my own parser for the HEIF container format that avif uses. You can find it <a href="https://github.com/andrewstephens75/gensite/blob/dev/gensite/avif_exif/avif_image.py">here in the gensite repository</a> - I am not publishing it as a separate module because it is very low-end and probably does bad things if the image is malformed.</p>
<p>But all the complexity is wrapped up in a simple API.</p>
<div class="codehilite"><pre><span></span><span class="c1"># open the image file and remove the exif location data</span>
<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">imagePath</span><span class="p">,</span> <span class="s2">"r+b"</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
    <span class="n">t</span> <span class="o">=</span> <span class="n">avif_image</span><span class="o">.</span><span class="n">AvifImage</span><span class="p">(</span><span class="n">f</span><span class="p">)</span>
    <span class="n">t</span><span class="o">.</span><span class="n">scan</span><span class="p">()</span>
    <span class="n">t</span><span class="o">.</span><span class="n">overwriteSensitiveXmlData</span><span class="p">()</span>
</pre></div>


<hr>
<p>And now the rant.</p>
<p>The HEIF container format<label class="margin-toggle sidenote-number" for="sidenote1"></label><input class="margin-toggle" id="sidenote1" type="checkbox"><span class="sidenote">Just to compound the drama, HEIF is essentially the same thing as Apple's HEIC format, renamed because of reasons.</span> is ridiculous. Look, I get that these things are put together over years of committee meetings with input from different companies with different priorities so some amount of cruft is expected. But this is really pushing it - for a modern format they had the opportunity to produce something future-proof and sane. They failed - I am not sure if HEIF is the silliest binary format I have encountered but it ranks.</p>
<p>Firstly, the blocks are somewhat self-describing, with a 4 byte size and 4 byte name header. Sensible, except they then immediately break this by having a magic number to label blocks that are too big for 4 bytes so some block headers have an extra 8 bytes. The self-describing headers cannot even describe themselves, breaking in a way that cannot even be backwards compatible with older software.</p>
<p>The format is riddled with these types of decisions. Weird little boxes with variable length structures that depend on the values of version numbers that you just have to know. Lots of extra complexity to shave a couple of bytes from a container format designed to store multimegabyte image files. </p>
<p>Oh, and the locations of different types of data in the container are stored in different boxes than the corresponding types, so you have to iterate through two different types of boxes if you want to build a complete index of the contents. The boxes are all variable length anyway - why not just store everything together?</p>
<p>My favorite little detail is that strings are encoded as null-terminated in variable length structures. Empty strings are just encoded as a single null character. But if the string happens to be the last member of a structure it is legal to <em>not encode it at all</em>, just denote an empty string by ending the structure early by declaring its length to be one byte shorter.</p>
<p>It makes so little sense and the official standard that documents this mess costs 250 Euros. I reversed engineered it with the help of some C++ code<label class="margin-toggle sidenote-number" for="sidenote2"></label><input class="margin-toggle" id="sidenote2" type="checkbox"><span class="sidenote">I used the very clear and helpful code in <a href="https://github.com/strukturag/libheif">libheif</a></span> for the lower price of just my sanity.</p>
<p>Finally, after you have parsed all the headers and boxes and variable arrays, you are now in a position to read the exif data. Surely that is in a sensible format:</p>
<div class="codehilite"><pre><span></span><span class="nt">&lt;x:xmpmeta</span><span class="w"> </span><span class="na">xmlns:x=</span><span class="s">"adobe:ns:meta/"</span><span class="w"> </span><span class="na">x:xmptk=</span><span class="s">"XMP Core 6.0.0"</span><span class="nt">&gt;</span>
<span class="w">   </span><span class="nt">&lt;rdf:RDF</span><span class="w"> </span><span class="na">xmlns:rdf=</span><span class="s">"http://www.w3.org/1999/02/22-rdf-syntax-ns#"</span><span class="nt">&gt;</span>
<span class="w">      </span><span class="nt">&lt;rdf:Description</span><span class="w"> </span><span class="na">rdf:about=</span><span class="s">""</span>
<span class="w">            </span><span class="na">xmlns:exif=</span><span class="s">"http://ns.adobe.com/exif/1.0/"</span>
<span class="w">            </span><span class="na">xmlns:xmp=</span><span class="s">"http://ns.adobe.com/xap/1.0/"</span>
<span class="w">            </span><span class="na">xmlns:tiff=</span><span class="s">"http://ns.adobe.com/tiff/1.0/"</span>
<span class="w">            </span><span class="na">xmlns:exifEX=</span><span class="s">"http://cipa.jp/exif/1.0/"</span>
<span class="w">            </span><span class="na">xmlns:mwg-rs=</span><span class="s">"http://www.metadataworkinggroup.com/schemas/regions/"</span>
<span class="w">            </span><span class="na">xmlns:stArea=</span><span class="s">"http://ns.adobe.com/xmp/sType/Area#"</span>
<span class="w">            </span><span class="na">xmlns:apple-fi=</span><span class="s">"http://ns.apple.com/faceinfo/1.0/"</span>
<span class="w">            </span><span class="na">xmlns:stDim=</span><span class="s">"http://ns.adobe.com/xap/1.0/sType/Dimensions#"</span>
<span class="w">            </span><span class="na">xmlns:photoshop=</span><span class="s">"http://ns.adobe.com/photoshop/1.0/"</span><span class="nt">&gt;</span>
<span class="w">         </span><span class="nt">&lt;exif:CompositeImage&gt;</span>2<span class="nt">&lt;/exif:CompositeImage&gt;</span>
<span class="w">         </span><span class="nt">&lt;exif:WhiteBalance&gt;</span>0<span class="nt">&lt;/exif:WhiteBalance&gt;</span>
...<span class="w"> </span>another<span class="w"> </span>7k<span class="w"> </span>of<span class="w"> </span>this
</pre></div>


<p>What was the point of all that binary soup when you are just going to embed a mass of <em>pretty-printed XML</em> anyway?</p>
<p>Sorry, just needed to get that off my chest. </p>]]></description>
      <guid isPermaLink="false">https://sheep.horse/2026/6/parsing_xml_exif_from_.avif_files_%28plus_a_rant%29.html</guid>
      <pubDate>Wed, 03 Jun 2026 16:11:37 +0000</pubDate>
    </item>
    <item>
      <title>Sossusvlei and Surroundings, Namibia</title>
      <link>https://sheep.horse/2026/6/sossusvlei_and_surroundings%2C_namibia.html</link>
      <description><![CDATA[<p><span class="importantmarginnote"><img alt="Rough map of Namibia" src="https://sheep.horse/2026/6/south_west_namibia_map.avif"></span>Another entry in my not-a-travel-blog - this time sketching out the start of our Namibia odyssey. We flew into Windhoek and picked up our rental - a large Ford Ranger. After a much too short lesson on how drive a 4wd vehicle, what to expect on Namibian roads, and a long checklist of things not covered by insurance we were on the road.</p>
<figure><img alt="Our Ford Ranger near some rocks. This stretch of road is pretty good." src="https://sheep.horse/2026/6/ford_ranger_on_the_road_in_namibia.avif"><figcaption>Our Ford Ranger near some rocks. This stretch of road is pretty good.</figcaption>
</figure>
<p>I was initially quite nervous about driving in Namibia but it is not as bad as it might first appear. There were only a couple of places that we actually needed the 4wd, what is more important in ground clearance - once off the main roads you are on generally well-graded but often rutted gravel. Although Namibia is largely desert it actually rains heavily quite often but only long enough to wash out the road-graders' careful work and leave muddy lakes where the middle of the road should be. Nevertheless we made it to our destination, a lodge close to the Namib-Naukluft National Park, home of the Sossusvlei salt/clay pan. </p>
<figure class="fullwidth"><img alt="Sunset over the Namib-Naukluft National Park." src="https://sheep.horse/2026/6/sunset.avif"><figcaption>Sunset over the Namib-Naukluft National Park.</figcaption>
</figure>
<p><span class="importantmarginnote"><img alt="The start of the Olive Trail" src="https://sheep.horse/2026/6/start_of_olive_trail.avif"><br>The Olive Trail is well (if a little alarmingly) signposted.</span>But first we decided to try something different and do the Olive Trail at the nearby Naukluft Mountains. Roughly 10km long, the Olive Trail was a great introduction to Namibia. The first part is a climb up to a plateau with amazing views then the track plunges into a narrow gully for a winding return.</p>
<p>One section of the gully was occupied by a troop of baboons who eyed us from their high ground on the gully wall. I wasn't particularly happy to see them but they caused us no trouble as we passed beneath them.</p>
<figure><img alt="A platoon of baboons looms near some blooms to (one assumes) smell the fumes. " src="https://sheep.horse/2026/6/baboons.avif"><figcaption>A platoon of baboons looms near some blooms to (one assumes) smell the fumes. </figcaption>
</figure>
<p>Near the end of the gully the floor is completely flooded and one must clamber around the walls using chains affixed meters up the sides. </p>
<figure><img alt="We had been advised by the ranger to take the right hand chain, this turned out to be good advice but neither side was particularly easy." src="https://sheep.horse/2026/6/flooded_gully_floor.avif"><figcaption>We had been advised by the ranger to take the right hand chain, this turned out to be good advice but neither side was particularly easy.</figcaption>
</figure>
<p>The next day we went to Sossusvlei, one of the picture postcard destinations in Namibia. The red dunes, white clay, and black trees make quite a sight.</p>
<figure><img alt="Technically speaking this is the nearby Deadvlei, which is actually a little more spectacular." src="https://sheep.horse/2026/6/deadvlei.avif"><figcaption>Technically speaking this is the nearby Deadvlei, which is actually a little more spectacular.</figcaption>
</figure>
<p>The roads through the park are great but to get to Sossusvlei proper you must cross about a kilometer of very soft sand. We had been forewarned and had gotten our tires deflated at the entrance to the park. The secret is just to keep moving forward and make no sudden turns as the sand turns your steering directives into vague suggestions. There is no danger, all you are risking is a small fee and some ill-concealed amusement from the rangers if you get stuck. We passed more than one vehicle being rescued by park staff but made it out and back without too much trouble.</p>
<figure><img alt="Yes, we got (briefly) rained on in the desert." src="https://sheep.horse/2026/6/rainbow_near_deadvlei.avif"><figcaption>Yes, we got (briefly) rained on in the desert.</figcaption>
</figure>]]></description>
      <guid isPermaLink="false">https://sheep.horse/2026/6/sossusvlei_and_surroundings%2C_namibia.html</guid>
      <pubDate>Mon, 22 Jun 2026 20:29:55 +0000</pubDate>
    </item>
    <item>
      <title>Voyage of the Marigold is Now Available on Itch.io</title>
      <link>https://sheep.horse/2026/7/voyage_of_the_marigold_is_now_available_on_itch.io.html</link>
      <description><![CDATA[<p>Voyage of the Marigold, my StarTrek-esque game of commanding a starship on a dangerous mission, is now available on Itch.io. There are no updates to the game itself, and the version on Sheep.Horse is still the preferred version.</p>
<iframe frameborder="0" src="https://itch.io/embed/4789724" width="552" height="167">&lt;a href="https://andrewstephens.itch.io/voyage-of-the-marigold"&gt;Voyage of the Marigold by andrewstephens&lt;/a&gt;</iframe>

<p><a href="https://andrewstephens.itch.io/voyage-of-the-marigold">Play Voyage of the Marigold on Itch.io</a></p>
<p>I have very mixed feelings about services like Itch.io. Itch.io seems like a well run site - not too much advertising and fairly user friendly. That said, I am always very leery of "free" services that host content for you. As soon as you hand over your game, or posts, or pictures to an other company, they effectively become at least part owners of your ideas.</p>
<p>Itch.io seems fine now, but sooner or later they will be squeezed for cash or be bought out and things will change. This usually takes the form of plastering advertising over everything and ruining the user experience. Itch has been around for a while, long enough to outlast several more annoying competitors, so hopefully they will manage to resist the lure of advertising for a few more years.</p>
<p>The one real issue I have with Itch is that they really want to host the game themselves rather than let you just have a page with links to your external site. I can completely understand why they do this but I would prefer to have the option.</p>
<p>If I am so against these kinds of services, why am I uploading my game there now?</p>
<p>Itch.io has a massive reach into the demographic that plays browser games, as well as some nifty tools like forums and ratings. I have been advised that games on Itch see more traffic that self-hosted games. In craven terms - Itch promises engagement. Feel free to click on the above link and smash that Rate This Game button. Or not.</p>
<p>So far I haven't seen a huge crowd of players, but its been less than 24 hours.</p>
<p>The other thing that Itch provides is a nice community of developers - there is a game jam next month that I want to enter that is run entirely on Itch's platform. Uploading my old game is somewhat of a trial balloon to see what is involved before I have to do it while time limited.</p>
<p>Sheep.Horse will still be the primary host for all my projects but if Itch.io seems to really generate increased interest then I will start copying future games there as well.</p>]]></description>
      <guid isPermaLink="false">https://sheep.horse/2026/7/voyage_of_the_marigold_is_now_available_on_itch.io.html</guid>
      <pubDate>Sat, 18 Jul 2026 22:47:10 +0000</pubDate>
    </item>
    <item>
      <title>Let's See How itch.io Is Working Out For Me</title>
      <link>https://sheep.horse/2026/7/let%27s_see_how_itch.io_is_working_out_for_me.html</link>
      <description><![CDATA[<p>Just under a week ago I published my old game on itch.io for the first time as an experiment. I have always been told that itch really helps with engagement and discovery.</p>
<p>Lets see how it is going.</p>
<figure><img alt="A graph clipped from the itch.io dashboard showing a quite distinct drop off after the initial excitement!" src="https://sheep.horse/2026/7/itch_io_dashboard_graph.avif"><figcaption>A graph clipped from the itch.io dashboard showing a quite distinct drop off after the initial excitement!</figcaption>
</figure>
<p>As you can see, VotM got played 13 times during the last week. Admittedly this is more that it usually gets played here at sheep.horse but with no comments and no likes I am beginning to suspect that itch.io is not significantly better than self-hosting for games.</p>
<p>Of course, it may be that the hip young audience that frequents itch.io is not interested in a fairly old-fashioned Star Trek game. The game jam I want to participate in starts in a couple of weeks, so we will see if I can crack the secret to itch stardom then.</p>]]></description>
      <guid isPermaLink="false">https://sheep.horse/2026/7/let%27s_see_how_itch.io_is_working_out_for_me.html</guid>
      <pubDate>Sat, 25 Jul 2026 03:47:38 +0000</pubDate>
    </item>
    <item>
      <title>Impolite Spiders</title>
      <link>https://sheep.horse/2026/8/impolite_spiders.html</link>
      <description><![CDATA[<figure><img alt="I spent ages in Blender modeling this ugly spider so enjoy." src="https://sheep.horse/2026/8/impolite_spider.avif"><figcaption>I spent ages in Blender modeling this ugly spider so enjoy.</figcaption>
</figure>
<p>For years now I have been aghast at the terribly impolite behavior of some bots who spider my site. It is extremely common to see many successive requests to the same URL, often a dozen or so within a second from the same IP address. All these requests succeed so why does the bot repeat them?</p>
<p>I chalked it up to the bot creators being idiots but a couple of weeks ago I sat down to write a spider for a private project and ran into some of the same issues. My spider doesn’t make repeated requests for a single host because I am sensible but I now I see why these bots behave this way. </p>
<p>It is not as easy as I thought and perhaps I owe the bot creators an apology.</p>
<p>Here is how writing spider starts.</p>
<figure><img alt="The simplest spider is a queue of URLs and a processor. The processor loops; taking the next item off the queue, requesting the contents of the URL, and (if successful) parsing the results into the database. Any discovered URLs are feed onto the back of the queue." src="https://sheep.horse/2026/8/spider_design_diagram_1.avif"><figcaption>The simplest spider is a queue of URLs and a processor. The processor loops; taking the next item off the queue, requesting the contents of the URL, and (if successful) parsing the results into the database. Any discovered URLs are feed onto the back of the queue.</figcaption>
</figure>
<p>One important step that I missed out here is that the processor must check the database for URLs that you have already spidered. We don’t want to add the same URL to the queue 50 times just because 50 other pages refer to it. Remember we are trying to be nice here. We also want to avoid endless loops in the quite common situation where two pages link to each other.</p>
<p>But assuming we have dealt with that we will run into a second problem. This design is slow. Really slow. The issue is that each request can take seconds during which our spider is effectively doing nothing but waiting.</p>
<figure><img alt="Here we have multiple processors asynchronously pulling URLs off the queue and making requests. Each request takes the same amount of time but the overall throughput is many times faster." src="https://sheep.horse/2026/8/spider_design_diagram_2.avif"><figcaption>Here we have multiple processors asynchronously pulling URLs off the queue and making requests. Each request takes the same amount of time but the overall throughput is many times faster.</figcaption>
</figure>
<p>This all sounds great and works fine - except that now your spider is no longer polite. Depending on how your database works, it is possible (and actually very likely) that multiple copies of the same URL will be added to the queue from multiple processors. Such a design can really hammer a server without trying too hard. This can be solved by carefully locking your datastructures while checking for existing records but this slows things down.</p>
<p>This is the stage that I suspect these impolite bots have reached. They have some multi-process architecture that doesn’t properly check for existing records in a safe way. Because requests are cheap and performing needless requests only slows them down slightly, the operators do not care that they bots slam sites. They don’t pay for the chaos they cause.</p>
<p>Remember when I said I might owe those bot creators an apology. They are not getting one, because fuck them.</p>
<p>Here are some of the considerations that these bots developers should be taking into account:</p>
<p>Just because you have twenty thousand different URLs from somebodyelses.server.com doesn’t mean that you should hit that server with your 128 processor bot. Some mechanism needs to be in place to rate limit request to a single server. Even limiting the rate to once a second per host would go a long way to making these bots nicer.</p>
<p>Other issues I came across while writing my own bot were quite subtle. You really need to normalize your URLs as encounter them. The following hostnames are all equivalent so simple string matching doesn't suffice:</p>
<style>
  table.urls {
    border-spacing: 0px;
    border-collapse: collapse;
  }

  table.urls td {
    border-bottom: solid black 1px;
    padding: 0.5em
  }

  table.urls td.hostname {
    font-family: monospace;
  }

  table.urls th {
    border-bottom: solid black 2px;
    padding: 0.5em;
    font-size: larger;
  }
</style>

<table class="urls">
    <thead><tr><th>Hostname</th><th>Notes</th></tr></thead>
    <tbody>
        <tr><td class="hostname">example.com</td><td>If only it was always so simple.</td></tr>
        <tr><td class="hostname">Example.com</td><td>Hostname are not supposed to have capital letters but you will find plenty in the wild.</td></tr>
        <tr><td class="hostname">example.com.</td><td>The rarely seen but valid trailing dot.</td></tr>
    </tbody><tbody>
</tbody></table>

<p>This doesn’t include the dozens of ways to encode the path, or domains resolving to the same address, or punycode. It is a mess.</p>
<p>Finally, it is pretty common to have multiple hostnames redirecting to a single server via <code>301 Moved Permanently</code> or similar mechanism. It would be impolite to spider a site 3 times just because it had 3 names.</p>
<p>Despite these difficulties, some of which have no real solution and must be dealt using heuristics, it is important to ensure that any bot you deploy is nice enough not to affect the sites you spider. Anything less is not just rude but causes actual pain for site owners.</p>]]></description>
      <guid isPermaLink="false">https://sheep.horse/2026/8/impolite_spiders.html</guid>
      <pubDate>Fri, 07 Aug 2026 22:16:41 +0000</pubDate>
    </item>
    <item>
      <title>Borneo - Animals (no spiders)</title>
      <link>https://sheep.horse/2026/8/borneo_-_animals_%28no_spiders%29.html</link>
      <description><![CDATA[<p>Recently we visited Borneo, third largest island on the planet and home to some amazing wildlife and geography. There is too much to describe in a short blog post so I am taking the easy way out by just publishing some of the better pictures I took as we squelched our way through various rain forests. I was particularly taken with the spiders of Borneo but I am saving those for a later post.</p>
<p>These are in no particular order.</p>
<p><as-album id="album">
<a href="https://sheep.horse/2026/8/borneo_pictures/orangutan.avif"><img alt="Everyone comes to Borneo for the orangutans but not everyone is lucky enough to get such a great view of them in the wild. This picture was taken through a monoscope, which is why it is a bit fuzzy. The rain forests are filled with amazing sights but actually taking photos in the misty conditions is challenging." src="https://sheep.horse/2026/8/borneo_pictures/thumbs/orangutan.avif"></a>
<a href="https://sheep.horse/2026/8/borneo_pictures/IMG_6373.avif"><img alt="There are some animals that just seems to be crying out for a photo." src="https://sheep.horse/2026/8/borneo_pictures/thumbs/IMG_6373.avif"></a>
<a href="https://sheep.horse/2026/8/borneo_pictures/green_lizard.avif"><img alt="This guy was actually in a bush just outside the park office. We didn't have to go far to see cool stuff." src="https://sheep.horse/2026/8/borneo_pictures/thumbs/green_lizard.avif"></a>
<a href="https://sheep.horse/2026/8/borneo_pictures/leech.avif"><img alt="We had been warned about the leeches and thought we were well prepared. We were wrong. These little bastards were everywhere. They have the most amazing means of locomotion - climbing end-over-end up clothing (even slippery rain coats) until they find an opening. Despite appearing squishy, they are remarkably squash-resilient." src="https://sheep.horse/2026/8/borneo_pictures/thumbs/leech.avif"></a>
<a href="https://sheep.horse/2026/8/borneo_pictures/lantern_bugs.avif"><img alt="Lantern Bugs, chilling on a tree outside one of the caves we visited." src="https://sheep.horse/2026/8/borneo_pictures/thumbs/lantern_bugs.avif"></a>
<a href="https://sheep.horse/2026/8/borneo_pictures/frog.avif"><img alt="I believe this is a Dark-Eared Tree Frog." src="https://sheep.horse/2026/8/borneo_pictures/thumbs/frog.avif"></a>
<a href="https://sheep.horse/2026/8/borneo_pictures/frog2.avif"><img alt="The frogs were very photogenic and very plentiful considering the number of large, well-fed-looking snakes we saw hanging around (literally hanging in the case of the tree snakes). I didn't get any good pictures of them though." src="https://sheep.horse/2026/8/borneo_pictures/thumbs/frog2.avif"></a>
<a href="https://sheep.horse/2026/8/borneo_pictures/bats_streaming_out_of_cave.avif"><img alt="One of the coolest things we saw was the millions of bats streaming out of Deer Cave in Mulu National Park. Most evening millions of small bats stream out of the cave into the darkening skies. Each bat is nearly silent but there are so many that the roar of their wings is audible as they travel hundreds of feet above the audience." src="https://sheep.horse/2026/8/borneo_pictures/thumbs/bats_streaming_out_of_cave.avif"></a>
<a href="https://sheep.horse/2026/8/borneo_pictures/cricket.avif"><img alt="This cricket was just chillin' around the park entrance." src="https://sheep.horse/2026/8/borneo_pictures/thumbs/cricket.avif"></a>
<a href="https://sheep.horse/2026/8/borneo_pictures/IMG_5692.avif"><img alt="I don't have anything to say about this lizard except that it had really nice eyes." src="https://sheep.horse/2026/8/borneo_pictures/thumbs/IMG_5692.avif"></a>
<a href="https://sheep.horse/2026/8/borneo_pictures/caterpillar.avif"><img alt="I could post many more pictures of caterpillars and worms." src="https://sheep.horse/2026/8/borneo_pictures/thumbs/caterpillar.avif"></a>
<a href="https://sheep.horse/2026/8/borneo_pictures/flatworm.avif"><img alt="These flatworms had the most beautifully smooth gliding motion. A lot of these photos were taken on the walkways where insects are easy to see on the wooden railings." src="https://sheep.horse/2026/8/borneo_pictures/thumbs/flatworm.avif"></a>
<a href="https://sheep.horse/2026/8/borneo_pictures/lizard.avif"><img alt="This one was pretty big - we actually saw an even bigger example on another day but the photo turned out pretty boring." src="https://sheep.horse/2026/8/borneo_pictures/thumbs/lizard.avif"></a>
<a href="https://sheep.horse/2026/8/borneo_pictures/horned_frog.avif"><img alt="I don't know why this horned frog looks so grumpy - perhaps I had just woken it up." src="https://sheep.horse/2026/8/borneo_pictures/thumbs/horned_frog.avif"></a>
<a href="https://sheep.horse/2026/8/borneo_pictures/stick_insect2.avif"><img alt="Borneo has the best stick insects." src="https://sheep.horse/2026/8/borneo_pictures/thumbs/stick_insect2.avif"></a>
<a href="https://sheep.horse/2026/8/borneo_pictures/stick_insect.avif"><img alt="See what I mean? It is hard to imagine a stickier insect." src="https://sheep.horse/2026/8/borneo_pictures/thumbs/stick_insect.avif"></a>
<a href="https://sheep.horse/2026/8/borneo_pictures/two_frogs.avif"><img alt="More frogs." src="https://sheep.horse/2026/8/borneo_pictures/thumbs/two_frogs.avif"></a>
<a href="https://sheep.horse/2026/8/borneo_pictures/blue_lizard.avif"><img alt="I really should have written down what all these lizards are at the time." src="https://sheep.horse/2026/8/borneo_pictures/thumbs/blue_lizard.avif"></a></as-album></p>
<p></p>]]></description>
      <guid isPermaLink="false">https://sheep.horse/2026/8/borneo_-_animals_%28no_spiders%29.html</guid>
      <pubDate>Wed, 12 Aug 2026 12:04:10 +0000</pubDate>
    </item>
    <item>
      <title>Borneo - Spiders</title>
      <link>https://sheep.horse/2026/8/borneo_-_spiders.html</link>
      <description><![CDATA[<p>First, a warning. This post contains pictures of spiders. Big spiders. If this worries you, perhaps consider reading something else - I suggest my previous post: <a href="https://sheep.horse/2026/8/borneo_-_animals_%28no_spiders%29.html">Borneo - No Spiders</a>.</p>
<p>We stayed at two very different parks in Borneo. Danum Valley, one of the oldest rain forests in the world, is famous for its orangutan population. Mulu National Park is more mountainous, with famous caves.  </p>
<p>Danum Valley in particular is very wild and we needed a guide anytime we left the lodge. In addition to leeches, there were all manner of other creepy-crawlies (not to mention larger animals) that seemed determined to feast on our flesh. Mulu was more built up but still provided plenty of interesting insect life.</p>
<p>It would be wrong to suggest that either park was covered in spiders, we saw none around either lodge. But there were certainly big spiders to be found without looking very hard out in the forests or caves.</p>
<p>These are the best photos I took with my cell phone. The biggest spiders came out during the night so getting well lit photos was a bit of a problem.</p>
<p><as-album>
<a href="https://sheep.horse/2026/8/borneo_spiders/spider_web.avif"><img alt="Most of the spiders pictured here are hunting spiders but there are some spider webs in the forest. Here is a rare shot of a spider in daylight with one of our guides." src="https://sheep.horse/2026/8/borneo_spiders/thumbs/spider_web.avif"></a>
<a href="https://sheep.horse/2026/8/borneo_spiders/cave_spider_with_hand.avif"><img alt="We visited a few caves in Borneo and these cave spiders were everywhere. This is not close to the biggest specimen we saw but they are harmless enough." src="https://sheep.horse/2026/8/borneo_spiders/thumbs/cave_spider_with_hand.avif"></a>
<a href="https://sheep.horse/2026/8/borneo_spiders/spider_on_rock.avif"><img alt="A closer view of a cave spider. These ones feast on the large cave crickets that populate the caverns." src="https://sheep.horse/2026/8/borneo_spiders/thumbs/spider_on_rock.avif"></a>
<a href="https://sheep.horse/2026/8/borneo_spiders/cave_spider.avif"><img alt="Another cave spider. These guys don't seem to mind the light and are easy to photograph." src="https://sheep.horse/2026/8/borneo_spiders/thumbs/cave_spider.avif"></a>
<a href="https://sheep.horse/2026/8/borneo_spiders/leaf_litter_spider.avif"><img alt="We saw relatively few spiders outside during the day - they tend to stay quite well hidden." src="https://sheep.horse/2026/8/borneo_spiders/thumbs/leaf_litter_spider.avif"></a>
<a href="https://sheep.horse/2026/8/borneo_spiders/hairy_spider.avif"><img alt="This hairy fellow was pretending to be a piece of wooden railing. There was no shortage of food for them - ants, termites, and all sorts of crawling insects abound." src="https://sheep.horse/2026/8/borneo_spiders/thumbs/hairy_spider.avif"></a>
<a href="https://sheep.horse/2026/8/borneo_spiders/log_spider.avif"><img alt="The biggest spiders come out at night. Most of them were pretty chill." src="https://sheep.horse/2026/8/borneo_spiders/thumbs/log_spider.avif"></a>
<a href="https://sheep.horse/2026/8/borneo_spiders/leaf_spider.avif"><img alt="It is hard to tell from the photo but these are very large leaves and that is a large spider." src="https://sheep.horse/2026/8/borneo_spiders/thumbs/leaf_spider.avif"></a>
<a href="https://sheep.horse/2026/8/borneo_spiders/IMG_6399.avif"><img alt="I am usually OK with spiders and none of the others really scared me. This one was terrifying though - nothing good is that color and right from the start it assumed quite a threatening posture. This was as close as I dared go." src="https://sheep.horse/2026/8/borneo_spiders/thumbs/IMG_6399.avif"></a>
<a href="https://sheep.horse/2026/8/borneo_spiders/tree_trunk_blank.avif"><img alt="Usually even the biggest spiders just sat there as I took a photo, but very occasionally they would move disconcertingly quickly." src="https://sheep.horse/2026/8/borneo_spiders/thumbs/tree_trunk_spider.avif"></a>
</as-album></p>]]></description>
      <guid isPermaLink="false">https://sheep.horse/2026/8/borneo_-_spiders.html</guid>
      <pubDate>Mon, 17 Aug 2026 19:04:09 +0000</pubDate>
    </item>
    <item>
      <title>as-album - A Web Component Because Sometimes You Just Want To Post Pictures</title>
      <link>https://sheep.horse/2026/8/as-album_-_a_web_component_because_sometimes_you_j.html</link>
      <description><![CDATA[<p>When I first conceived sheep.horse<label class="margin-toggle sidenote-number" for="sidenote1"></label><input class="margin-toggle" id="sidenote1" type="checkbox"><span class="sidenote">Ten years ago!</span>, I had the idea that I was going to set the world ablaze with only my white-hot rhetoric, forgoing the flashy Javascript heavy techniques that were <em>en vogue</em> back then. Obviously, I failed<label class="margin-toggle sidenote-number" for="sidenote2"></label><input class="margin-toggle" id="sidenote2" type="checkbox"><span class="sidenote">See my statistics page for proof.</span> but this site has remained mostly Javascript-free and mostly text.</p>
<p>I have been traveling and my iPhone is brimming with interesting pictures of faraway lands and cool animals. Until now my blogging workflow has not really supported just displaying a bunch of images. I could use a 3rd-party site to display my photos but that would go against the host-it-yourself ethos that made me start this site in the first place.</p>
<p><span class="importantmarginnote">The best demo of as-album is my recent blog posts on the animals of Borneo.<br><a href="https://sheep.horse/2026/8/borneo_-_animals_%28no_spiders%29.html">Borneo - Animals (no spiders)</a><br><a href="https://sheep.horse/2026/8/borneo_-_spiders.html">Borneo - Spiders</a></span>You may have noticed that a few of my most recent posts contain a photo album control, allowing you to flick through a set of thumbnails. This is as-album, a simple web component that is now part of this site's template.</p>
<p>as-album is designed to fit in with the design goals of sheep.horse.</p>
<ul>
<li>Minimal javascript - as-album is less that 200 lines of js.</li>
<li>Progressive Enhancement with sensible fallbacks - users with javascript disabled just see a grid of clickable thumbnails hyperlinks pointing to the full sized images. </li>
<li>Low bandwidth - only the thumbnails are required. The full sized images are only downloaded when the user requests to see them. Nobody wants to download 50Mb worth of images on first page load.</li>
<li>Still plenty of text - each image has an (optional) caption.</li>
<li>Really simple to use.</li>
</ul>
<figure><img alt="Here is how it looks without support for javascript web components. Old school but still pretty usable." src="https://sheep.horse/2026/8/as-album-no-javascript.avif"><figcaption>Here is how it looks without support for javascript web components. Old school but still pretty usable.</figcaption>
</figure>
<figure><img alt="Here is the full experience, well integrated into the page with a simple UI." src="https://sheep.horse/2026/8/as-album-with-javascript.avif"><figcaption>Here is the full experience, well integrated into the page with a simple UI.</figcaption>
</figure>
<p>And here is how it looks while authoring the page:</p>
<div class="codehilite"><pre><span></span><span class="nt">&lt;as-album</span><span class="w"> </span><span class="na">id=</span><span class="s">"album"</span><span class="nt">&gt;</span>
<span class="w">    </span><span class="nt">&lt;a</span><span class="w"> </span><span class="na">href=</span><span class="s">"borneo_pictures/orangutan.avif"</span><span class="nt">&gt;&lt;img</span><span class="w"> </span><span class="na">alt=</span><span class="s">"Everyone comes to Borneo ..."</span><span class="w"> </span><span class="na">src=</span><span class="s">"borneo_pictures/thumbs/orangutan.avif"</span><span class="w"> </span><span class="nt">/&gt;&lt;/a&gt;</span>
<span class="w">    </span><span class="nt">&lt;a</span><span class="w"> </span><span class="na">href=</span><span class="s">"borneo_pictures/IMG_6373.avif"</span><span class="nt">&gt;&lt;img</span><span class="w"> </span><span class="na">alt=</span><span class="s">"There are some animals ..."</span><span class="w"> </span><span class="na">src=</span><span class="s">"borneo_pictures/thumbs/IMG_6373.avif"</span><span class="w"> </span><span class="nt">/&gt;&lt;/a&gt;</span>
<span class="w">    </span><span class="nt">&lt;a</span><span class="w"> </span><span class="na">href=</span><span class="s">"borneo_pictures/green_lizard.avif"</span><span class="nt">&gt;&lt;img</span><span class="w"> </span><span class="na">alt=</span><span class="s">"This guy was actually in a bush just outside ..."</span><span class="w"> </span><span class="na">src=</span><span class="s">"borneo_pictures/thumbs/green_lizard.avif"</span><span class="w"> </span><span class="nt">/&gt;&lt;/a&gt;</span>
<span class="w">    </span>...
<span class="nt">&lt;/as-album&gt;</span>
</pre></div>


<p>Actually, my static site builder processes markdown so it really starts off looking like this:</p>
<div class="codehilite"><pre><span></span><span class="nt">&lt;as-album</span><span class="w"> </span><span class="na">id=</span><span class="s">"album"</span><span class="nt">&gt;</span>
[![Everyone<span class="w"> </span>comes<span class="w"> </span>to<span class="w"> </span>Borneo<span class="w"> </span>...](borneo_pictures/thumbs/orangutan.avif)](borneo_pictures/orangutan.avif)
[![There<span class="w"> </span>are<span class="w"> </span>some<span class="w"> </span>animals<span class="w"> </span>...](borneo_pictures/thumbs/IMG_6373.avif)](borneo_pictures/IMG_6373.avif)
[![This<span class="w"> </span>guy<span class="w"> </span>was<span class="w"> </span>actually<span class="w"> </span>in<span class="w"> </span>a<span class="w"> </span>bush<span class="w"> </span>just<span class="w"> </span>outside<span class="w"> </span>...](borneo_pictures/thumbs/green_lizard.avif)](borneo_pictures/green_lizard.avif)
<span class="nt">&lt;/as-album&gt;</span>
</pre></div>


<p>Of course, this is all generated by a script (along with the thumbnails) so displaying a bunch of pictures is now longer a chore, either for me or my (hypothetical) readers.</p>
<p>As with everything sheep.horse related, the source-code is available in the <a href="https://github.com/andrewstephens75/gensite/blob/dev/template/default/resources/as-album.js">gensite github repository</a>. </p>]]></description>
      <guid isPermaLink="false">https://sheep.horse/2026/8/as-album_-_a_web_component_because_sometimes_you_j.html</guid>
      <pubDate>Tue, 25 Aug 2026 23:00:08 +0000</pubDate>
    </item>
    <item>
      <title>inkJam2026 - My First Game Jam</title>
      <link>https://sheep.horse/2026/9/inkjam2026_-_my_first_game_jam.html</link>
      <description><![CDATA[<p><span class="importantmarginnote"><img alt="Ink Jam 2026 Logo with the slogan Let That Sink In" src="https://sheep.horse/2026/9/inkjam2026_logo.avif"></span>Recently I completed in my first game jam, where people complete games within a strict time limit to a certain theme. inkJam is one such jam for games writing in the ink language, this year the theme was "Let That Sink In".</p>
<p>I chose to take that very literally. You can play my game right now in your browser:</p>
<p><a href="https://sheep.horse/that_sink/">Play That Sink here.</a></p>
<p>or <a href="https://andrewstephens.itch.io/that-sink">Play That Sink on itch.io</a> (exactly the same game)</p>
<p><span class="importantmarginnote">You can see the official results and play all the other games on the <a href="https://itch.io/jam/inkjam-2026/results">inkjam results page</a>.</span>The competition is over. <em>That Sink</em> came fifth equal out of a field of twenty, which I consider a great result. The top two games in particular are very polished.</p>
<p>Overall I am very happy with the way <em>That Sink</em> came together. All up, it took me about 15-18 hours to complete over about 5 days, including the art work. </p>
<p><span class="importantmarginnote"><img alt="This map and associated scribbles are the only notes I made during development." src="https://sheep.horse/2026/9/that_sink_notes.avif"></span>My method for things like this is to write the first couple of paragraphs to set the tone, then start doodling. These are the only notes I made during development. I didn't even have any puzzles mapped out. Once I had the general plot in place (as expositioned by the toaster) could I decide what obstacles might lie in the player's path.</p>
<p>The idea that the narrator could be sarcastic and even somewhat hostile to the player came early. I realized that the events I was describing were so ridiculous that they needed an over-the-top point of view. My last game, Voyage of the Marigold, doesn't really have a separate narrative voice at all so this was a nice change and very easy to write. I just had to pour my natural scorn onto the page.</p>
<p>I knew I wanted some art. I ended up doing it myself on a 8 year old iPad with an Apple pencil and the excellent procreate app. It is always hard to know when to stop when doing art so I set myself a strict time-limit of 25 minutes per image. The slightly unfinished style works well with the story.</p>
<p>After the art was finished I had to go back to change the text to match. For example, Toby was originally a big shaggy dog (appropriately enough given the nature of the story) but the dog I drew was nowhere near big or shaggy enough. It is easier to change text than redraw a picture so Toby got a haircut.</p>
<p>I had originally put aside some time to customize the default ink html page that the compiler spits out but once the content was finished I decided not to bother. The one small change I did make was to make the engine echo your choices in bold text to distinguish them from the rest of the narration, since the narrator is a distinct character in this game.</p>
<p>I am very proud of <em>That Sink</em>. My one regret is that I misspelled eldritch right in the first line of the text.</p>]]></description>
      <guid isPermaLink="false">https://sheep.horse/2026/9/inkjam2026_-_my_first_game_jam.html</guid>
      <pubDate>Thu, 03 Sep 2026 21:27:18 +0000</pubDate>
    </item>
    <item>
      <title>Estimania is a Great Daily Game (plus a rant about the NYT Games App)</title>
      <link>https://sheep.horse/2026/9/estimania_is_a_great_daily_game_%28plus_a_rant_about.html</link>
      <description><![CDATA[<p>I enjoy daily mini-games. I play the New York Times ones (Wordle, Connections, and the mini crossword) and sometimes Clues By Sam if I am feeling extra smart. Recently I have discovered my new favorite - Estimania.</p>
<p>I am writing this post because I think Estimania is a great game that more people should play. Each day you get five deceptively simple trivia questions - you are not expected to get the answer exactly, you are scored on how close your quick, back-of-the envelope estimate is.</p>
<figure><img alt="An example of a Estimania question - I defy even the biggest Dolly Parton fan to get the exact answer but you will get some points for even a poor guess. I was waaaay off with this question." src="https://sheep.horse/2026/9/estimania_screenshot.avif"><figcaption>An example of a Estimania question - I defy even the biggest Dolly Parton fan to get the exact answer but you will get some points for even a poor guess. I was waaaay off with this question.</figcaption>
</figure>
<p>The questions are varied and interesting. I find what works for me is answering with my first guess. If I consider my answer for too long I tend to second guess myself in ways that lead away from the correct answer.</p>
<p><a href="https://estimania.app">You should click here and play today's game before reading the rest of this post.</a></p>
<p>But, great as they are, the questions are not why I think Estimania deserves more love. Estimania just has the best design of any similar game. Let me count the ways:</p>
<ul>
<li>There is no logon process - you can just start playing. Estimania doesn't really have accounts but it does (optionally) give you a code that allows you to transfer scores across devices.  </li>
<li>It doesn't ask for your email, or any information at all. Despite not having accounts, Estomania manages to have a leaderboard.</li>
<li>The website is not laden with advertising and has minimal graphics. It is very lightweight compared to similar sites, which is very important for a game designed to be played on a commute with spotty network coverage.</li>
<li>Their <a href="https://estimania.app/imprint/">privacy statement</a> is incredibly readable and comprehensive. This is the standard which other websites should aspire to.</li>
</ul>
<p>But the very best part of Estimania is hidden in the source code:</p>
<div class="codehilite"><pre><span></span>  &lt;link rel="manifest" href="/manifest.json"/&gt;
</pre></div>


<p>Estimania doesn't have a app, but the author has thoughtfully done the tiny bit of work needed to turn their web page into a Progressive Web App, which allows users to install it on their phones with one click. For the user, this is a much better choice than installing a full app from the app store. Despite being a PWA, it integrates well with iOS. It even asks you nicely if you want to turn on notifications.</p>
<p>So far this is all praise for a game I like. I promised you a rant.</p>
<p>I am sick of installing apps from the App Store that could have easily been implemented as web pages or PWAs. I am looking at you, NYT Games App.</p>
<p>The NYT Games App is also very simple. It allows you to play crossword puzzles, a few tile moving games, <strike>The Connecting Wall</strike>Connections, and of course the all conquering Wordle. It has accounts, some history, and that is about it.</p>
<p><span class="importantmarginnote"><img alt="" src="https://sheep.horse/2026/9/estimania_storage.avif"><br>The Estimania PWA takes only 33Kb. I suspect the bulk of this is actually the app icon.</span>
Lets compare out how much of my very expensive phone storage the two games use. First up; Estimania clocking in at a quite reasonable 33Kb. This is a little misleading because the PWA will download resources from the internet as needed but still pretty nice.</p>
<p>Lets play a game, Estimania-style. In late 1990 15 year-old me bought an brand new Amiga500. It cost me $NZ1900, my entire lifesavings at the time, and came with 512Kb of memory. At the time it was considered a fairly powerful computer, with plenty of memory for games and applications. </p>
<figure><img alt="An Amiga500 in all its beige glory. &lt;br/&gt;Attribution: This is a modified version of the wikicommons picture uploaded by Bill Bertram" src="https://sheep.horse/2026/9/amiga500.avif"><figcaption>An Amiga500 in all its beige glory. <br>Attribution: This is a modified version of the <a href="https://commons.wikimedia.org/wiki/File:Amiga500_system.jpg">wikicommons picture</a> uploaded by Bill Bertram</figcaption>
</figure>
<p>Before you scroll down, guess how many Amiga500s it would take to store what the NYT Games App takes out of my very expensive phone storage.</p>
<figure><img alt="The NYT Games app takes a combined 181Mb of storage. Can't blame the app icon for all of it." src="https://sheep.horse/2026/9/NYT_games_storage.avif"><figcaption>The NYT Games app takes a combined 181Mb of storage. Can't blame the app icon for all of it.</figcaption>
</figure>
<p>For those playing along, this fairly simple app takes <em>three hundred and sixty two</em> Amiga500s. Maybe this means nothing to you but I have a degree in computer science and it is my professional opinion that that is far too many Amiga500s.</p>
<p>I am honestly not sure what the 55.2Mb of Documents &amp; Data could be. The app does store history of every game I have played going back years. Maybe it contains all the crosswords I haven't played yet, just in case I want to complete the Sunday March 22nd, 2020. In either case, this is data I can do without.</p>
<p>And why is the app so large? Lots of games need to be that large because of all the graphics, music, and 3d models. The NYT app has none of these things - the aforementioned Amiga500 could easy recreate any of the puzzles without breaking a sweat.</p>
<p>All this for some puzzle games that recreate what is on the NYT website. I am not sure but the app might actually <em>be</em> the website, certainly the app doesn't work without internet access. Sometimes it doesn't work even with internet access - I've noticed that even if you start the app with weak signal it often fails to initialize properly.</p>
<p>I actually pay good money to the NYT for the privilege of storing 181Mb of code and data on my phone for the 5 minutes a day when I interact with their content. I don't have any particular problems with the app apart from its size - it works well enough although it is weirdly slow on my 8 year old iPad. I just wish that the NYT and other providers would realize that they are paying a lot of money to maintain an app that isn't really needed.</p>]]></description>
      <guid isPermaLink="false">https://sheep.horse/2026/9/estimania_is_a_great_daily_game_%28plus_a_rant_about.html</guid>
      <pubDate>Thu, 17 Sep 2026 02:31:17 +0000</pubDate>
    </item>
    <item>
      <title>Small Website Updates and a Proper RSS Feed</title>
      <link>https://sheep.horse/2026/10/small_website_updates_and_a_proper_rss_feed.html</link>
      <description><![CDATA[<p>I have been a bad blogger. </p>
<figure><img alt="A portion of my rss feed, now with added CDATA content tags. Previously, this image (and most of the following text) would not have been visible in feedreaders." src="https://sheep.horse/2026/10/rss_feed.avif"><figcaption>A portion of my rss feed, now with added CDATA content tags. Previously, this image (and most of the following text) would not have been visible in feedreaders.</figcaption>
</figure>
<p>For the last 10 years my feeds have contained sad little text-only snippets (actually the first 30 words) instead of the complete contents of each post. This was pure laziness on my part. When I wrote the software that generates this site I couldn't be bothered to figure out how to do it properly. I always knew it was wrong but it took until today for me to finally do something about it.</p>
<p>As a technical aside, I find RSS an annoying format to work with. Dumping CDATA blobs all over the place seems like the wrong approach and having to make sure all your resources are specified as absolute URLs was a real pain point for me.</p>
<p>But we work with what we have, and from today reading sheep.horse in a feedreader should be a lot more pleasant.</p>
<p><strong>Update:</strong> Turns out the python library I am using to generate atom feeds is a little wonky. The atom feed has been fixed as well with some judicious post-processing of the xml.</p>
<p>For those interested, feedgen conflates the type of the entry node with whether you want it CDATA'ed. For atom, as best as I can determine, the content node should have type "html" and the text should be wrapped in CDATA. Feedgen just refuses to output this combination, only using CDATA if the type is "CDATA", which breaks atom readers.</p>
<p>The latest version of gensite does the following little dance to set the types to what readers expect.</p>
<div class="codehilite"><pre><span></span><span class="c1"># feedgen has a weird and incorrect way of generating atom feeds where it explicitly</span>
<span class="c1"># sets the type of content nodes to CDATA, which is incorrect. Manually go through and</span>
<span class="c1"># set them to "html"</span>
<span class="n">atom_string</span> <span class="o">=</span> <span class="n">fg</span><span class="o">.</span><span class="n">atom_str</span><span class="p">(</span><span class="n">pretty</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>

<span class="n">parser</span> <span class="o">=</span> <span class="n">lxml</span><span class="o">.</span><span class="n">etree</span><span class="o">.</span><span class="n">XMLParser</span><span class="p">(</span><span class="n">strip_cdata</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
<span class="n">atom_root</span> <span class="o">=</span> <span class="n">lxml</span><span class="o">.</span><span class="n">etree</span><span class="o">.</span><span class="n">fromstring</span><span class="p">(</span><span class="n">atom_string</span><span class="p">,</span> <span class="n">parser</span><span class="p">)</span>
<span class="n">cdata_nodes</span> <span class="o">=</span> <span class="n">atom_root</span><span class="o">.</span><span class="n">xpath</span><span class="p">(</span><span class="s2">"//*[@type='CDATA']"</span><span class="p">)</span>
<span class="k">for</span> <span class="n">node</span> <span class="ow">in</span> <span class="n">cdata_nodes</span><span class="p">:</span>
    <span class="n">node</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="s1">'type'</span><span class="p">,</span> <span class="s1">'html'</span><span class="p">)</span>

<span class="n">atom_string</span> <span class="o">=</span> <span class="n">lxml</span><span class="o">.</span><span class="n">etree</span><span class="o">.</span><span class="n">tostring</span><span class="p">(</span><span class="n">atom_root</span><span class="p">,</span> <span class="n">pretty_print</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>  <span class="n">method</span><span class="o">=</span><span class="s1">'xml'</span><span class="p">)</span><span class="o">.</span><span class="n">decode</span><span class="p">()</span>
<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">destdir</span><span class="p">,</span> <span class="s1">'atom.xml'</span><span class="p">),</span> <span class="s2">"w"</span><span class="p">,</span> <span class="n">encoding</span><span class="o">=</span><span class="s2">"utf-8"</span><span class="p">)</span> <span class="k">as</span> <span class="n">file</span><span class="p">:</span>
    <span class="n">file</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">atom_string</span><span class="p">)</span>
</pre></div>]]></description>
      <guid isPermaLink="false">https://sheep.horse/2026/10/small_website_updates_and_a_proper_rss_feed.html</guid>
      <pubDate>Sun, 04 Oct 2026 23:05:45 +0000</pubDate>
    </item>
    <item>
      <title>Wild Ride to Earth - A Game</title>
      <link>https://sheep.horse/2026/10/wild_ride_to_earth_-_a_game.html</link>
      <description><![CDATA[<p>The IFComp2026 is well underway, with dozens of interactive fiction games of various forms available to play. I don't have an entry but I did help out with one in a minor way.</p>
<p><span class="importantmarginnote"><a href="https://3355.play.ifcomp.org/content/index.html"><img src="https://sheep.horse/2026/10/wild_ride_to_earth_cover.avif"><br>Play Wild Ride to Earth in your browser</a></span><em>Wild Ride to Earth</em> is a sprawling and lighthearted scifi adventure where you are trying to find your way back to Earth after being abducted by aliens and dumped on a far distant space port. There is a huge amount of content tucked away in the corners of the game - several planets to explore and many ways to play.</p>
<p>The reviews have been enthusiastic about <em>Wild Ride to Earth</em>, praising the witty writing and imaginative setting. The competition is still going, if you really like the game you can log on and vote for it on the <a href="https://ifcomp.org/ballot/#entry-3355">IFComp2026 ballot</a>. While you are there, check out some of the other games - there are some really interesting works this year.</p>
<p>Of course, if you really like choice-based interactive fiction, my two games can be played right here: <a href="https://sheep.horse/voyage_of_the_marigold/">Voyage of the Marigold</a> and <a href="https://sheep.horse/that_sink/">That Sink</a>.</p>]]></description>
      <guid isPermaLink="false">https://sheep.horse/2026/10/wild_ride_to_earth_-_a_game.html</guid>
      <pubDate>Wed, 07 Oct 2026 04:22:00 +0000</pubDate>
    </item>
    <item>
      <title>C++ Condition Variables - The Basics</title>
      <link>https://sheep.horse/2026/10/c%2B%2B_condition_variables_-_the_basics.html</link>
      <description><![CDATA[<figure class="fullwidth"><img alt="Trains need careful marshalling, your threads are the same. I apologize for this illustration, it is bad even by my standards. In my defense, I drew it on an airplane." src="https://sheep.horse/2026/10/trains.avif"><figcaption>Trains need careful marshalling, your threads are the same. I apologize for this illustration, it is bad even by my standards. In my defense, I drew it on an airplane.</figcaption>
</figure>
<p>Condition variables (CVs) are supposed to be the easy-to-use, hard-to-mess-up synchronization primitive in C++. There are still plenty of way to mess them up, some subtle enough that I often encounter issues in production code. This article is a gentle walk through some of the common errors.</p>
<h2>Key Takeaways</h2>
<ul>
<li>Condition Variables are are “edge-triggered”, not “level-triggered”</li>
<li>You almost certainly want to use condition_variable::lock() with a predicate. Anything else is a code smell.</li>
<li>Using a std::atomic<bool> flag in the predicate is a code smell.</bool></li>
<li>The same mutex referenced in condition_variable::lock() must be used to protect any variables used in the predicate. </li>
<li>Other primitives exist and may be easier or more suited to your objective.</li>
</ul>
<h2>Edge-Triggered vs Level-Triggered</h2>
<p>These are terms from electrical engineering that I am stealing. A CV wait() is edge triggered - notifying a condition variable wakes up any <code>wait()</code>s that occurred <em>before</em> the <code>notify()</code> but crucially any <code>wait()</code> that occurs <em>after</em> the notify() will block. A <code>notify()</code>ed CV does not stay notified.</p>
<p>This means the following (nonsensical) code will always block.</p>
<div class="codehilite"><pre><span></span><span class="kt">void</span><span class="w"> </span><span class="nf">deadLocksInstantly</span><span class="p">()</span>
<span class="p">{</span>
<span class="w">    </span><span class="n">std</span><span class="o">::</span><span class="n">condition_variable</span><span class="w"> </span><span class="n">cv</span><span class="p">;</span>
<span class="w">    </span><span class="n">std</span><span class="o">::</span><span class="n">mutex</span><span class="w"> </span><span class="n">mutex</span><span class="p">;</span>

<span class="w">    </span><span class="n">std</span><span class="o">::</span><span class="n">unique_lock</span><span class="o">&lt;</span><span class="n">std</span><span class="o">::</span><span class="n">mutex</span><span class="o">&gt;</span><span class="w"> </span><span class="n">lock</span><span class="p">(</span><span class="n">mutex</span><span class="p">,</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">defer_lock</span><span class="p">);</span>
<span class="w">    </span><span class="n">cv</span><span class="p">.</span><span class="n">notify_one</span><span class="p">();</span><span class="w"> </span><span class="c1">// notify ourselves</span>

<span class="w">    </span><span class="n">cv</span><span class="p">.</span><span class="n">wait</span><span class="p">(</span><span class="n">lock</span><span class="p">);</span><span class="w">  </span><span class="c1">// never returns</span>
<span class="w">    </span><span class="n">lock</span><span class="p">.</span><span class="n">unlock</span><span class="p">();</span><span class="w"> </span>
<span class="p">}</span>
</pre></div>


<p>Here we notify the CV before we wait. The <code>cv.wait()</code> call doesn't care that the CV was notified, it will block and wait for the next one. </p>
<p>That was a contrived example but how about this:</p>
<div class="codehilite"><pre><span></span><span class="n">std</span><span class="o">::</span><span class="kr">thread</span><span class="w"> </span><span class="nf">t</span><span class="p">([</span><span class="o">&amp;</span><span class="p">]()</span>
<span class="w">              </span><span class="p">{</span><span class="w"> </span>
<span class="w">                </span><span class="c1">// do some work, notify the main thread</span>
<span class="w">                </span><span class="n">cv</span><span class="p">.</span><span class="n">notify_one</span><span class="p">();</span><span class="w"> </span>
<span class="w">              </span><span class="p">});</span>

<span class="c1">// wait for our background thread to notify us</span>
<span class="n">std</span><span class="o">::</span><span class="n">unique_lock</span><span class="o">&lt;</span><span class="n">std</span><span class="o">::</span><span class="n">mutex</span><span class="o">&gt;</span><span class="w"> </span><span class="n">lock</span><span class="p">(</span><span class="n">mutex</span><span class="p">);</span>
<span class="n">cv</span><span class="p">.</span><span class="n">wait</span><span class="p">(</span><span class="n">lock</span><span class="p">);</span>
</pre></div>


<p>This code can also deadlock. We do not control the relative order of the statements between the threads and it is perfectly possible for the thread to start executing and call <code>notify()</code> before the main thread gets a chance to call <code>wait()</code>.</p>
<p>On my MacBook M1 this happens about 1 in 500 times - a hard bug to catch in testing.</p>
<h2>Using condition_variable::lock() With a Predicate</h2>
<p>You almost certainly want to use the second form of <code>cv::wait()</code>, which takes a predicate function. This turns the edge-triggered blocking <code>wait()</code> into a level-triggered function that will not block if the predicate is met.</p>
<p>I always forget which way around the predicate function goes. The predicate function return false if the <code>wait()</code> needs to block.</p>
<h2>Using std::atomic&lt;&gt; In A Predicate is a Code Smell</h2>
<p>Knowing this, a developer might rewrite the previous example with a flag to signal that the background thread has finished its work. Not being a total noob, they use <code>std::atomic&lt;bool&gt;</code> for the flag because it will be shared between the threads.</p>
<div class="codehilite"><pre><span></span><span class="n">std</span><span class="o">::</span><span class="kt">atomic_bool</span><span class="w"> </span><span class="n">workDone</span><span class="p">{</span><span class="nb">false</span><span class="p">};</span>

<span class="n">std</span><span class="o">::</span><span class="kr">thread</span><span class="w"> </span><span class="nf">t</span><span class="p">([</span><span class="o">&amp;</span><span class="p">]()</span>
<span class="w">    </span><span class="p">{</span>
<span class="w">      </span><span class="c1">// do some work</span>
<span class="w">      </span><span class="n">workDone</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">true</span><span class="p">;</span>
<span class="w">      </span><span class="n">cv</span><span class="p">.</span><span class="n">notify_one</span><span class="p">();</span><span class="w"> </span>
<span class="w">    </span><span class="p">});</span>

<span class="c1">// wait for our background thread to notify us</span>
<span class="n">std</span><span class="o">::</span><span class="n">unique_lock</span><span class="o">&lt;</span><span class="n">std</span><span class="o">::</span><span class="n">mutex</span><span class="o">&gt;</span><span class="w"> </span><span class="n">lock</span><span class="p">(</span><span class="n">mutex</span><span class="p">);</span>
<span class="n">cv</span><span class="p">.</span><span class="n">wait</span><span class="p">(</span><span class="n">lock</span><span class="p">,</span><span class="w"> </span><span class="p">[</span><span class="o">&amp;</span><span class="p">]()</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="kt">bool</span>
<span class="w">        </span><span class="p">{</span><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">workDone</span><span class="p">;</span><span class="w"> </span><span class="p">});</span>
</pre></div>


<p>Unfortunately this code can also race despite the careful use of <code>atomic&lt;bool&gt;</code>. On my laptop this code deadlocks about 1 in 800 runs.</p>
<p>Remember that calling <code>wait()</code> with a predicate is equivalent to this:</p>
<div class="codehilite"><pre><span></span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">predicate</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
<span class="w">  </span><span class="n">wait</span><span class="p">();</span>
<span class="p">}</span>
</pre></div>


<p>Consider the following sequence of events:</p>
<style>
  table.threadtable {
    border-spacing: 0px;
    border-collapse: collapse;
    border-style: hidden;
  }

  table.threadtable td {
    border-left: dashed black 1px;
    border-bottom: solid black 1px;
    font-family: monospaced;
    padding: 0.5em;
  }

  table.threadtable th {
    border-bottom: solid black 2px;
    padding: 0.5em;
    font-size: larger;
  }
</style>

<table class="threadtable">
  <thead><tr><th>Main Thread</th><th>Background Thread</th></tr></thead>
  <tbody>
    <tr><td>Calls wait(predicate)</td><td></td></tr>
    <tr><td>Runs predicate, workDone is false</td><td></td></tr>
    <tr><td></td><td>Sets workDone = true</td></tr>
    <tr><td></td><td>Calls notify_one()</td></tr>
    <tr><td>Predicate returns false</td><td></td></tr>
    <tr><td>blocks forever</td><td></td></tr>
  </tbody>
</table>

<p>I see more complicated versions of this code in PRs quite often, so much so that I consider any use of <code>std::atomic&lt;&gt;</code> in a condition variable predicate to be a code smell.</p>
<p>The one exception is that if you really just need to wait on a single value then c++20 has you covered with <code>std::atomic&lt;&gt;::wait()</code>, which allows you to <code>wait()</code> on the variable directly without mucking about with mutexes and locks.</p>
<div class="codehilite"><pre><span></span><span class="n">std</span><span class="o">::</span><span class="n">atomic</span><span class="o">&lt;</span><span class="kt">bool</span><span class="o">&gt;</span><span class="w"> </span><span class="n">workFinished</span><span class="p">{</span><span class="nb">false</span><span class="p">};</span>

<span class="n">std</span><span class="o">::</span><span class="kr">thread</span><span class="w"> </span><span class="nf">t</span><span class="p">([</span><span class="o">&amp;</span><span class="p">]()</span>
<span class="w">    </span><span class="p">{</span>
<span class="w">        </span><span class="c1">// do some work</span>
<span class="w">        </span><span class="n">workFinished</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">true</span><span class="p">;</span>
<span class="w">        </span><span class="n">workFinished</span><span class="p">.</span><span class="n">notify_one</span><span class="p">();</span><span class="w"> </span>
<span class="w">    </span><span class="p">});</span>

<span class="n">workFinished</span><span class="p">.</span><span class="n">wait</span><span class="p">(</span><span class="nb">false</span><span class="p">);</span>
</pre></div>


<h2>Protect All Variables Used in the Predicate With The Same Mutex</h2>
<p>For more complex situations or if you can't use C++20, the solution is to protect any modification of any variable used in the predicate - no exceptions. You predicate will always be called with a lock holding the mutex but any other code must always explicitly lock even if the variables themselves are thread-safe.</p>
<div class="codehilite"><pre><span></span><span class="kt">bool</span><span class="w"> </span><span class="n">shouldStop</span><span class="p">{</span><span class="nb">false</span><span class="p">};</span><span class="w">  </span><span class="c1">// no need for atomic</span>

<span class="n">std</span><span class="o">::</span><span class="kr">thread</span><span class="w"> </span><span class="nf">t</span><span class="p">([</span><span class="o">&amp;</span><span class="p">]()</span>
<span class="w">    </span><span class="p">{</span>
<span class="w">        </span><span class="c1">// do some work</span>
<span class="w">        </span><span class="p">{</span>
<span class="w">            </span><span class="n">std</span><span class="o">::</span><span class="n">lock_guard</span><span class="o">&lt;</span><span class="n">std</span><span class="o">::</span><span class="n">mutex</span><span class="o">&gt;</span><span class="w"> </span><span class="n">lock</span><span class="p">(</span><span class="n">mutex</span><span class="p">);</span>
<span class="w">            </span><span class="n">shouldStop</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">true</span><span class="p">;</span>
<span class="w">        </span><span class="p">}</span>
<span class="w">        </span><span class="n">cv</span><span class="p">.</span><span class="n">notify_one</span><span class="p">();</span><span class="w"> </span>
<span class="w">    </span><span class="p">});</span>

<span class="n">std</span><span class="o">::</span><span class="n">unique_lock</span><span class="o">&lt;</span><span class="n">std</span><span class="o">::</span><span class="n">mutex</span><span class="o">&gt;</span><span class="w"> </span><span class="n">lock</span><span class="p">(</span><span class="n">mutex</span><span class="p">);</span>
<span class="n">cv</span><span class="p">.</span><span class="n">wait</span><span class="p">(</span><span class="n">lock</span><span class="p">,</span><span class="w"> </span><span class="p">[</span><span class="o">&amp;</span><span class="p">]()</span><span class="w"> </span><span class="o">-&gt;</span><span class="w"> </span><span class="kt">bool</span>
<span class="w">        </span><span class="p">{</span><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">shouldStop</span><span class="p">;</span><span class="w"> </span><span class="p">});</span>
</pre></div>


<h2>Other Primitives Exist</h2>
<p>There are other ways to safely synchronize threads that might be more suitable.</p>
<ul>
<li><code>std::future&lt;&gt;</code> is great if you need to return a single value from a background thread.</li>
<li>The aforementioned <code>std::atomic&lt;&gt;::wait</code> (C++20) if you just need to wait on a single value.</li>
<li>C++20 also provides Semaphores, Barriers, and Latches which are useful for orchestrating between multiple background threads.</li>
</ul>]]></description>
      <guid isPermaLink="false">https://sheep.horse/2026/10/c%2B%2B_condition_variables_-_the_basics.html</guid>
      <pubDate>Sat, 17 Oct 2026 23:14:31 +0000</pubDate>
    </item>
    <item>
      <title>Platforms Don't Always Strip Location MetaData From Photos</title>
      <link>https://sheep.horse/2026/10/platforms_don%27t_always_strip_location_metadata_fro.html</link>
      <description><![CDATA[<p>I have written about the problem of photo metadata being leaked by blogging platforms<label class="margin-toggle sidenote-number" for="sidenote1"></label><input class="margin-toggle" id="sidenote1" type="checkbox"><span class="sidenote">Most shamefully this one before I fixed that problem for good.</span> before. See <a href="https://sheep.horse/2026/6/parsing_xml_exif_from_.avif_files_%28plus_a_rant%29.html">Parsing XML EXIF from .avif files (plus a rant)</a> and <a href="https://sheep.horse/2025/4/you_should_be_stripping_exif_data_out_of_your_imag.html">You Should Be Stripping EXIF Data out of Your Image Files Before Posting</a> for the details but for the TL/DR:</p>
<p><span class="importantmarginnote"><img alt="Images very often pinpoint exactly where they were created." src="https://sheep.horse/2026/10/x_marks_the_spot.avif"></span>Cameras helpfully put a lot of metadata in your photos. Most of this is innocuous technical data, like the color space and the camera orientation. But the exact GPS coordinates that the picture was taken are also included. This can be very useful for you but if you take some pictures around your house then anyone who as access to the unmodified files knows exactly where you live.</p>
<p>The operative word in the preceding paragraph is <em>unmodified</em> - most social media sites strip out the location data before displaying your photos to other people<label class="margin-toggle sidenote-number" for="sidenote2"></label><input class="margin-toggle" id="sidenote2" type="checkbox"><span class="sidenote">Of course, they still get your location data, which is useful for selling you advertising</span>.</p>
<p>The operative word is the preceding paragraph is <em>most</em>. Someone named Usama Ejaz just emailed me with the results of some tests they ran on various platforms in their post <a href="https://justblogged.com/blog/photo-location-data-on-a-blog">Photo Location Data on a Blog: Which Platforms Strip GPS on Upload, and Where the Original Still Has It</a>.</p>
<p>Long story short, even popular blogging platforms such as Ghost and WordPress (sometimes) keep unmodified copies of uploaded photos available for download. This is a surprising result to me and all the more reason to strip out location data before uploading. iOS has a useful option in the photo sharing panel that does exactly that, although it is not on by default.</p>]]></description>
      <guid isPermaLink="false">https://sheep.horse/2026/10/platforms_don%27t_always_strip_location_metadata_fro.html</guid>
      <pubDate>Sat, 31 Oct 2026 19:58:03 +0000</pubDate>
    </item>
  </channel>
</rss>
