{
  "description": "Recent content for Nathan Grigg",
  "feed_url": "https://nathangrigg.com/feed.json",
  "home_page_url": "https://nathangrigg.com/",
  "icon": "https://nathangrigg.com/favicon.png",
  "items": [
    {
      "content_html": "<p>Writing go code is a thousand paper cuts but then you get that nice beautiful binary and you put it wherever you want and I&rsquo;m still not sure it&rsquo;s worth it.</p>\n",
      "date_published": "2026-03-02T11:37:41-08:00",
      "id": "https://nathangrigg.com/2026/03/ygvghg/",
      "url": "https://nathangrigg.com/2026/03/ygvghg/"
    },
    {
      "content_html": "<p>Well done <a href=\"https://brucespringsteen.net/news/2026/streets-of-minneapolis/\">Bruce Springsteen</a>. I&rsquo;m touched by the designation &ldquo;Winter of &lsquo;26.&rdquo; Some events are too momentous for a descriptive label. Here&rsquo;s hoping we remember it as a turning point, a wake-up call to the complacent.</p>\n",
      "date_published": "2026-01-28T15:40:46-08:00",
      "id": "https://nathangrigg.com/2026/01/rrjynz/",
      "url": "https://nathangrigg.com/2026/01/rrjynz/"
    },
    {
      "content_html": "<p>US politics are more about identity and power than principles, even though we\nlike to pretend otherwise. In my high school in conservative, rural Idaho, we\nwould debate the virtues of small, limited government, second amendment\nfreedoms, family values candidates, and I was duped into thinking the choice\nwas between Platform A or Platform B, when it was really a choice between\ngiving power to a “friend” or an “enemy.”</p>\n<p>It took me an embarrassingly long time to realize that my principles were more\naligned with the Democrats, even though I felt “more at home” among the\nRepublicans. But I have also changed, trading Idaho for Seattle, then Los\nAngeles, to the point where today I feel more at home in a city coffee shop\nthan a county fair or a church service.</p>\n<p>While I have always voted against Trump, I have supported some candiates that I\nnow strongly regret. And I try my best to see the humanity in those who did\nvote for him, because everyone has their own journey.</p>\n<p>But today, everyone must oppose the Trump administration, with its calculated,\nprovocative, performative violence, including but not limited to the killing of\nRenee Good and Alex Pretti. We cannot accept the lies, obstruction, and\ncover-ups that have followed. Anybody involved in or responsible for these\nviolent acts or their cover-ups should be impeached, removed from office,\nand/or put in jail for their crimes. Every person in power who refuses to hold\nthese offenders to account should be voted out of office and remembered as the\ncowards that they are.</p>\n<p>We cannot wait until the next election to take power away from these monsters.\nSpeak up today, set the record straight if you&rsquo;ve had a change of heart. Call\nyour representatives and tell them to defend us and enforce our laws.</p>\n<p>ICE is not our friend; Trump and his enablers are our enemy.</p>\n",
      "date_published": "2026-01-25T17:04:30-08:00",
      "id": "https://nathangrigg.com/2026/01/renee-and-alex/",
      "title": "Taking a Stand",
      "url": "https://nathangrigg.com/2026/01/renee-and-alex/"
    },
    {
      "content_html": "<p>I got a new watch.</p>\n<p>I’ve almost exclusively worn an Apple Watch for the past several years. I still\nwear one when exercising and sleeping, and I plan to still wear it on some\nother occasions, but I wanted to see what it was like to go back, shall we say,\nto a simpler time.</p>\n<p>My initial feelings are a happy dose of nostalgia. Back before all of our\nphones and watches and cars were synchronized to NIST time, I would carefully\nsynchronize my Timex digital watch to the school bell time. It was satisfying\nto know exactly how much time was left in class (or passing period) while most\nof my classmates just had to wait and wonder when freedom would come (or end).</p>\n<p>With a &ldquo;dumb&rdquo; watch, there is this same sense of satisfaction, that I know the\nprecise time not through the wonders of the internet, but because I made the\neffort to accurately set my watch.</p>\n<h1 id=\"a-gmt-complication\">A GMT Complication</h1>\n<p>My new watch is a GMT watch, which is a popular watch style over the last\ncentury or so, because it makes it easy to know the time in a second or even\nthird location, and can make it easier to change the time as well.</p>\n<p>There are many different styles of GMT watch, but they are usually\ndistinguished by a separate “GMT hand” that makes one revolution per 24 hours,\ncompared to a traditional hour hand that revolves once per 12 hours. A GMT\nwatch typically has the traditional hour hand as well, which most people call\nthe “local hour hand,” because it tracks the time of your current location.\nBoth of these hands are typically aligned to the same minute hand.</p>\n<p>Being non-smart watches, they are relatively simple to configure. A <em>true GMT</em>\nor <em>flyer GMT</em> lets you adjust the time (minutes and hours) on all three\nhands simultaneously, and then jump the local hour hand forward or backwards an\nhour at a time. On a <em>caller GMT</em> or <em>office GMT</em>, the jump function moves the\nGMT hand forward or backwards an hour at a time. Either way, you can track both\nthe local time and a separate reference time, but the caller GMT is more\ncumbersome to travel with, because if you change time zones, you have to reset\nthe watch the same way you would any watch, and then also fix the GMT hand to\npoint back to whatever reference time you want to track. A flyer GMT lets\nyou quickly adjust the local time without messing up the GMT hand at all.</p>\n<p>Many GMT watches also feature a rotating bezel labeled on a 24-hour scale. This\ngives you a way to quickly change the meaning of the GMT hand by shifting the\nlabels instead of the hand. Hence you have the ability to track a potentially\nthird time zone. I say potentially because on most GMT watches with a bezel,\nthe bezel is the only set of 24-hour labels, so if you rotate it, you might not\nknow exactly where the GMT hand is pointing on the “natural” set of labels.</p>\n<p>Here are some examples of tracking two or three time zones on a GMT watch:</p>\n<figure class=\"center\"><img src=\"/2026/01/gmt-watch/clock1.svg\" class=\"center\"\n    alt=\"It is 10:11 a.m. in Central European Summer Time, and the GMT hand is showing 08:11 UTC.\" width=\"300\"><figcaption>\n      <p>It is 10:11 a.m. in Central European Summer Time, and the GMT hand is showing 08:11 UTC.</p>\n    </figcaption>\n</figure>\n\n<figure class=\"center\"><img src=\"/2026/01/gmt-watch/clock2.svg\" class=\"center\"\n    alt=\"By rotating the dial four 15-degree clicks, we can read the New York Daylight Saving Time (UTC−4) as 04:11.\" width=\"300\"><figcaption>\n      <p>By rotating the dial four 15-degree clicks, we can read the New York Daylight Saving Time (UTC−4) as 04:11.</p>\n    </figcaption>\n</figure>\n\n<p>In these examples, note that the twelve o&rsquo;clock position represents midnight\nUTC, and in the second example, the 20 (which is −4 modulo 24) lines up with\nthis slot so that we can read UTC−4. And even with the bezel rotated, you get\na sense of the UTC time because you will at least remember where 0, 6, 12, and\n18 would be on the unrotated bezel.</p>\n<h1 id=\"open-to-interpretation\">Open to interpretation</h1>\n<p>Although a GMT watch only has a few configurable parts (minutes, local hour,\nGMT hour, and bezel rotation),  you get to choose what the configuration should\nbe. If you really wanted to, you could have the “local time” always be your\nhome time and the “GMT hand” be your current local time.</p>\n<p>I knew I wanted to use the local hour hand the normal way, with the local time\nof wherever I happen to be (usually in Los Angeles). At first, I thought that I\nwould use the GMT hand for UTC, and then rotate the bezel to whatever second\ntime zone I was actually interested in. But I was quickly annoyed that the\ndirection of the GMT hand didn’t really have any meaning to me.</p>\n<figure class=\"center\"><img src=\"/2026/01/gmt-watch/clock3.svg\" class=\"center\"\n    alt=\"At 9:29 p.m. Los Angeles winter time, it is 05:29 UTC\" width=\"300\"><figcaption>\n      <p>At 9:29 p.m. Los Angeles winter time, it is 05:29 UTC</p>\n    </figcaption>\n</figure>\n\n<p>Next, I decided to use my home time (or at least UTC−8, more on that in a bit)\nfor the GMT hand. This way, no matter where I am in the world, the GMT hand in\nthe upper half means it is night in Los Angeles, and in the lower half means it\nis daytime.</p>\n<figure class=\"center\"><img src=\"/2026/01/gmt-watch/clock4.svg\" class=\"center\"\n    alt=\"Still 9:29 p.m. in Los Angeles, with the local 24-hour time of 21:29 shown on the GMT hand\" width=\"300\"><figcaption>\n      <p>Still 9:29 p.m. in Los Angeles, with the local 24-hour time of 21:29 shown on the GMT hand</p>\n    </figcaption>\n</figure>\n\n<p>Then I realized that, because my watch doesn’t have a fixed set of labels, I\ncould orient the “natural” 24-hour scale with midnight at the bottom and noon\nat the top, imitating the path of the sun. I decided to keep the bezel oriented\nwith the zero marker at 6:00, so that I can read the Los Angeles 24-hour time\noff the bezel, if I want.</p>\n<figure class=\"center\"><img src=\"/2026/01/gmt-watch/clock5.svg\" class=\"center\"\n    alt=\"Again 9:29 p.m. in Los Angeles, with the local 24-hour time of 21:29 shown and the bezel rotated so that noon is at the top and midnight at the bottom.\" width=\"300\"><figcaption>\n      <p>Again 9:29 p.m. in Los Angeles, with the local 24-hour time of 21:29 shown and the bezel rotated so that noon is at the top and midnight at the bottom.</p>\n    </figcaption>\n</figure>\n\n<p>Then when traveling, I can intuitively read my home time off the GMT hand.</p>\n<figure class=\"center\"><img src=\"/2026/01/gmt-watch/clock6.svg\" class=\"center\"\n    alt=\"Jumping the local time to 2:29 p.m. (Tokyo time), the GMT hand and bezel still pointing to Los Angeles time of 21:29.\" width=\"300\"><figcaption>\n      <p>Jumping the local time to 2:29 p.m. (Tokyo time), the GMT hand and bezel still pointing to Los Angeles time of 21:29.</p>\n    </figcaption>\n</figure>\n\n<p>And in this configuration, midnight UTC happens when the GMT is at the two\no&rsquo;clock position, which means I can easily spin the bezel to read a third time\nzone, for example, putting the 1 at two o&rsquo;clock to read UTC+1.</p>\n<figure class=\"center\"><img src=\"/2026/01/gmt-watch/clock7.svg\" class=\"center\"\n    alt=\"Still 2:29 p.m. in Tokyo, and 06:29 in UTC&#43;1. Evening in Los Angeles.\" width=\"300\"><figcaption>\n      <p>Still 2:29 p.m. in Tokyo, and 06:29 in UTC+1. Evening in Los Angeles.</p>\n    </figcaption>\n</figure>\n\n<h1 id=\"los-angeles-time-zone-vs-utc8\">Los Angeles time zone vs UTC−8</h1>\n<p>Here is where things get a little speculative because I’ve only had the watch\nfor a month, and haven’t had to transition to summer time. So I have plans but\nmaybe I will change my mind after some experience.</p>\n<p>The Los Angeles time zone is only UTC−8 on winter time. For the rest of the\nyear, we observe Daylight Saving Time, which puts us at UTC−7.</p>\n<p>There are a lot of reasons to leave the GMT hand at (noon-on-top) UTC−8. First\nof all, it makes adjusting for Daylight Saving Time a simple jump of the local\nhour hand. It also preserves the two o&rsquo;clock UTC reference point year round,\nmaking a third time zone a bit easier. It is also somewhat convenient because I\ncan still track (approximate) astronomical noon and midnight.</p>\n<p>But it also means that during the summer, if I want the 24-hour bezel to track\nLos Angeles 24-hour time by default, then it has to be one 15-degree rotation\naskew.</p>\n<figure class=\"center\"><img src=\"/2026/01/gmt-watch/clock8.svg\" class=\"center\"\n    alt=\"Local Los Angeles summer time of 6:48 p.m., the bezel rotated to show UTC−7 time of almost 19:00, but the GMT hand also shows the natural solar time of almost 18:00.\" width=\"300\"><figcaption>\n      <p>Local Los Angeles summer time of 6:48 p.m., the bezel rotated to show UTC−7 time of almost 19:00, but the GMT hand also shows the natural solar time of almost 18:00.</p>\n    </figcaption>\n</figure>\n\n<figure class=\"center\"><img src=\"/2026/01/gmt-watch/clock9.svg\" class=\"center\"\n    alt=\"Quick spin of the bezel, aligning the 9 with the two o&amp;rsquo;clock marker, to check UTC&#43;9 Tokyo time, where it is nearly 11 a.m.\" width=\"300\"><figcaption>\n      <p>Quick spin of the bezel, aligning the 9 with the two o&rsquo;clock marker, to check UTC+9 Tokyo time, where it is nearly 11 a.m.</p>\n    </figcaption>\n</figure>\n\n<h1 id=\"the-apple-watch-gmt-face\">The Apple Watch GMT Face</h1>\n<p>Many years ago, I tried to use the Apple Watch GMT Face and didn’t last long. I\nlooked at it again to remind myself why I don’t like it.</p>\n<p>First of all, you have no choice about any orientations. The local hand has to\nmatch your local time (but at least it automatically adjusts when you travel).\nAnd of course, up has to be midnight because the programmers might die if they\nhad to add that level of complexity.</p>\n<p>The GMT hand also has to match your local time as well. As I mentioned, I don&rsquo;t\nlike how this messes with my intuition in the admittedly rare case when I&rsquo;m\nin a different time zone.</p>\n<p>You track a second time zone with a software spin of the bezel. Making use of\nthe flexibility of a digital screen, the bezel is two-toned with the colors\nrepresenting night and day, based on the current sunrise and sunset in the\nsecond time zone. Analog GMT watches often have two-toned bezels, with\ntransitions fixed at 6 and 18. (You could argue that 6 a.m. and 6 p.m. are more\nuseful markers than sunrise and sunset in a time zone where you aren&rsquo;t\ncurrently located.)</p>\n<p>Unfortunately, the Apple Watch bezel isn’t actually labeled\nexcept for the index closest to the hand, because otherwise the digital face\ngets too cluttered. Even worse, if you have your watch set to show 12-hour\ntime, the index gets labeled with the 12-hour time, with no indication of a.m.\nvs p.m. except for the color of the bezel.</p>\n<figure class=\"center\"><img src=\"/2026/01/gmt-watch/apple-watch.png\" class=\"center\"\n    alt=\"Apple Watch showing 2:44 p.m. in Los Angeles, 10:44 p.m. in London. You infer that pink is night because it is so long, or from the triangle that still marks midnight. Note that the GMT hand tracks Los Angeles time (currently UTC−8), but with midnight on top, so UTC midnight is at the eight o&amp;rsquo;clock marker.\" width=\"300\"><figcaption>\n      <p>Apple Watch showing 2:44 p.m. in Los Angeles, 10:44 p.m. in London. You infer that pink is night because it is so long, or from the triangle that still marks midnight. Note that the GMT hand tracks Los Angeles time (currently UTC−8), but with midnight on top, so UTC midnight is at the eight o&rsquo;clock marker.</p>\n    </figcaption>\n</figure>\n\n<p>Finally, and this is an ongoing gripe I have against Apple, by default the time\nzone label in the middle of the face says CUP for Cupertino (just like in\niPhone Settings). If that annoys you, you can change it to SF for San\nFrancisco. Neither of those is the correct name of the time zone. Twenty years\nago it was cute to label the Pacific time zone as Cupertino in honor of your\nheadquarters. It’s not cute anymore.</p>\n",
      "date_published": "2026-01-16T15:06:14-08:00",
      "id": "https://nathangrigg.com/2026/01/gmt-watch/",
      "title": "A GMT Watch",
      "url": "https://nathangrigg.com/2026/01/gmt-watch/"
    },
    {
      "content_html": "<p>Many years after starting The Wheel of Time series (I took a few years&rsquo; hiatus between the first 7 and final 7 books), I finished it. Great world, great characters, overall lots of fun.</p>\n<p>Hard to do the series justice, but I guess I would say the first few books are the most exciting, the middle books make for some interesting world building, and Robert Jordan started to pick up steam again before his life was cut short. I don&rsquo;t believe he ever would have ended the series, too many ideas and too many stories.</p>\n",
      "date_published": "2026-01-08T17:40:17-08:00",
      "id": "https://nathangrigg.com/2026/01/fmvfqp/",
      "url": "https://nathangrigg.com/2026/01/fmvfqp/"
    },
    {
      "content_html": "<p>On a single ten-minute ride from the bus stop to my house, two middle-school-aged kids and one preschooler complimented my bike.</p>\n<img src=\"/images/2026/bike.jpeg\" class=\"centered\" alt=\"My red Brompton foldable bike\"/>\n",
      "date_published": "2026-01-08T17:00:42-08:00",
      "id": "https://nathangrigg.com/2026/01/kcnlpv/",
      "url": "https://nathangrigg.com/2026/01/kcnlpv/"
    },
    {
      "content_html": "<p>Proud of my kiddo who raised $200 for the Trevor Project by selling crocheted frogs at a &ldquo;marketplace&rdquo; event put on by the high school.</p>\n",
      "date_published": "2025-12-12T18:10:09-08:00",
      "id": "https://nathangrigg.com/2025/12/vbcvbb/",
      "url": "https://nathangrigg.com/2025/12/vbcvbb/"
    },
    {
      "content_html": "<p>Many years after starting, I finally finished Robert Jordan&rsquo;s Wheel of Time series. I think I did the whole thing by audiobook, which by my calculations (assuming my typical 1.4x speed) is 321 hours of audio. Great series!</p>\n",
      "date_published": "2025-12-03T19:38:04-08:00",
      "id": "https://nathangrigg.com/2025/12/ckrhnp/",
      "url": "https://nathangrigg.com/2025/12/ckrhnp/"
    },
    {
      "content_html": "<p>I&rsquo;m slowly moving to <a href=\"https://jj-vcs.github.io\">Jujutsu</a> for my version control needs. For years, I&rsquo;ve been using Mercurial-based interface to <a href=\"https://en.wikipedia.org/wiki/Piper_(source_control_system)\">Piper</a> at work and Git at home, and switching challenges my muscle memory. Jujutsu provides a common interface that can handle a central repo in either format. I find it easier to work with than Git or Mercurial, but there is a learning curve.</p>\n",
      "date_published": "2025-10-29T16:14:24-07:00",
      "id": "https://nathangrigg.com/2025/10/bzhyrt/",
      "url": "https://nathangrigg.com/2025/10/bzhyrt/"
    },
    {
      "content_html": "<p>It is long past time for a screenshot file type. Pixel-based image format with selectable text and clickable links, annotations, and a context link to view the original source.</p>\n<p>(Most of this you could do with pdf, but you could also do it more simply. Either way, phones and computers should be able to create them properly from apps and web pages.)</p>\n",
      "date_published": "2025-09-05T12:51:18-07:00",
      "id": "https://nathangrigg.com/2025/09/zvyymk/",
      "url": "https://nathangrigg.com/2025/09/zvyymk/"
    },
    {
      "content_html": "<p>I feel very powerless to stop the intentional harm and destruction caused by Trump and Republicans in power, but I have absolutely no time for anyone or any organization that is happy about the way things are going, who sees Trump as a means to get something they want, or who sees Republicans as the lesser of two evils.</p>\n",
      "date_published": "2025-08-26T07:58:47-07:00",
      "id": "https://nathangrigg.com/2025/08/hqtxvb/",
      "url": "https://nathangrigg.com/2025/08/hqtxvb/"
    },
    {
      "content_html": "<p>I installed the iPad beta to try the new windowing and I mostly love it. My main complaint is that I sometimes, maybe even always, want a window to go away and come back full screen next time, so much that I find myself maximizing a window before closing it. I would probably be fine if closing a window made it forget its size, and just minimize when you want to preserve the size.</p>\n",
      "date_published": "2025-08-08T20:29:00-07:00",
      "id": "https://nathangrigg.com/2025/08/ncnwxv/",
      "url": "https://nathangrigg.com/2025/08/ncnwxv/"
    },
    {
      "content_html": "<p>I have two or three web pages that I tend to keep open on my desktop Mac. From\ntime to time I have experimented with turning these into web apps, which makes\nit possible for me to hide them independently of my other web browser\nwindows, helps them remember the appropriate window size, and helps me to not\naccidentally change them to a different page.</p>\n<p>I was happy to discover that Safari makes it easier than ever to convert a page\ninto a web app. Just select “Add to Dock” in the File menu (or share sheet). It\nputs an icon in the Dock, but you don’t have to leave it there because it also\nputs an application in <code>~/Applications</code>.</p>\n<p>But one of my pages is an HTML dashboard that is just a local file on my\ncomputer. I originally made it this way because it syncs via iCloud Drive,\nso that I can also view it on my phone or iPad if necessary. For some reason,\nyou can’t make a web app to view a local file.</p>\n<h2 id=\"simple-http-server\">Simple HTTP server</h2>\n<p>The good thing about the Mac is that you can work around almost anything,\nbuilding exactly what you want out of smaller pieces. And in this case, all you\nneed is a little program that responds to HTTP requests with the content of the\nfile.</p>\n<p>There are many ways to accomplish this. I think MacOS still comes with Apache\ninstalled by default. It is running on my machine, at least. But I don’t like\nconfiguring Apache, so I didn’t use this method.</p>\n<p>Python can make an HTTP server easily, just run</p>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-bash\" data-lang=\"bash\"><span class=\"line\"><span class=\"cl\">python -m http.server -b localhost -d /path/to/directory <span class=\"m\">8203</span>\n</span></span></code></pre></div><p>The <code>-m</code>  flag runs the <code>http.server</code> module as if it were a Python script\n(that is, with <code>__name__ == &quot;__main__&quot;</code>). In this case, it starts up a server\nwith the given options. The <code>-b</code> flag tells it to listen on <code>localhost</code>, so\nthat other computers on your network can’t access the page. Then you give it a\ndirectory and a port number. After this you can visit\n<code>http://localhost:8203/file.html</code> and view the file.</p>\n<p>But Python technically serves the entire directory, not just the file. You\ncould write a custom Python script that imported <code>http.server</code>, and probably\nbuild exactly what you wanted. But when I want a tiny program, I always seem to\ngravitate towards Go, even though I tend to hate it for larger programs. I\nprobably like it because you can compile a binary that has no dependencies,\nwhich reminds me of Turbo Pascal.</p>\n<p>Here is a simple Go program that serves a single file at the port, and\nredirects any other requests to the base URL:</p>\n<div class=\"highlight\"><pre tabindex=\"0\" class=\"chroma\"><code class=\"language-go\" data-lang=\"go\"><span class=\"line\"><span class=\"cl\"><span class=\"kn\">package</span> <span class=\"nx\">main</span>\n</span></span><span class=\"line\"><span class=\"cl\">\n</span></span><span class=\"line\"><span class=\"cl\"><span class=\"kn\">import</span> <span class=\"p\">(</span>\n</span></span><span class=\"line\"><span class=\"cl\">\t<span class=\"s\">&#34;flag&#34;</span>\n</span></span><span class=\"line\"><span class=\"cl\">\t<span class=\"s\">&#34;log&#34;</span>\n</span></span><span class=\"line\"><span class=\"cl\">\t<span class=\"s\">&#34;net/http&#34;</span>\n</span></span><span class=\"line\"><span class=\"cl\">\t<span class=\"s\">&#34;os&#34;</span>\n</span></span><span class=\"line\"><span class=\"cl\"><span class=\"p\">)</span>\n</span></span><span class=\"line\"><span class=\"cl\">\n</span></span><span class=\"line\"><span class=\"cl\"><span class=\"kd\">func</span> <span class=\"nf\">main</span><span class=\"p\">()</span> <span class=\"p\">{</span>\n</span></span><span class=\"line\"><span class=\"cl\">\t<span class=\"nx\">bind</span> <span class=\"o\">:=</span> <span class=\"nx\">flag</span><span class=\"p\">.</span><span class=\"nf\">String</span><span class=\"p\">(</span><span class=\"s\">&#34;bind&#34;</span><span class=\"p\">,</span> <span class=\"s\">&#34;127.0.0.1:8011&#34;</span><span class=\"p\">,</span> <span class=\"s\">&#34;The address to listen on.&#34;</span><span class=\"p\">)</span>\n</span></span><span class=\"line\"><span class=\"cl\">\t<span class=\"nx\">filename</span> <span class=\"o\">:=</span> <span class=\"nx\">flag</span><span class=\"p\">.</span><span class=\"nf\">String</span><span class=\"p\">(</span><span class=\"s\">&#34;file&#34;</span><span class=\"p\">,</span> <span class=\"s\">&#34;&#34;</span><span class=\"p\">,</span> <span class=\"s\">&#34;The file to serve&#34;</span><span class=\"p\">)</span>\n</span></span><span class=\"line\"><span class=\"cl\">\t<span class=\"nx\">flag</span><span class=\"p\">.</span><span class=\"nf\">Parse</span><span class=\"p\">()</span>\n</span></span><span class=\"line\"><span class=\"cl\">\n</span></span><span class=\"line\"><span class=\"cl\">\t<span class=\"k\">if</span> <span class=\"o\">*</span><span class=\"nx\">filename</span> <span class=\"o\">==</span> <span class=\"s\">&#34;&#34;</span> <span class=\"p\">{</span>\n</span></span><span class=\"line\"><span class=\"cl\">\t\t<span class=\"nx\">flag</span><span class=\"p\">.</span><span class=\"nf\">Usage</span><span class=\"p\">()</span>\n</span></span><span class=\"line\"><span class=\"cl\">\t\t<span class=\"nx\">os</span><span class=\"p\">.</span><span class=\"nf\">Exit</span><span class=\"p\">(</span><span class=\"mi\">1</span><span class=\"p\">)</span>\n</span></span><span class=\"line\"><span class=\"cl\">\t<span class=\"p\">}</span>\n</span></span><span class=\"line\"><span class=\"cl\">\n</span></span><span class=\"line\"><span class=\"cl\">\t<span class=\"nx\">http</span><span class=\"p\">.</span><span class=\"nf\">HandleFunc</span><span class=\"p\">(</span><span class=\"s\">&#34;/&#34;</span><span class=\"p\">,</span> <span class=\"kd\">func</span><span class=\"p\">(</span><span class=\"nx\">w</span> <span class=\"nx\">http</span><span class=\"p\">.</span><span class=\"nx\">ResponseWriter</span><span class=\"p\">,</span> <span class=\"nx\">r</span> <span class=\"o\">*</span><span class=\"nx\">http</span><span class=\"p\">.</span><span class=\"nx\">Request</span><span class=\"p\">)</span> <span class=\"p\">{</span>\n</span></span><span class=\"line\"><span class=\"cl\">\t\t<span class=\"k\">if</span> <span class=\"nx\">r</span><span class=\"p\">.</span><span class=\"nx\">URL</span><span class=\"p\">.</span><span class=\"nx\">Path</span> <span class=\"o\">==</span> <span class=\"s\">&#34;/&#34;</span> <span class=\"p\">{</span>\n</span></span><span class=\"line\"><span class=\"cl\">\t\t\t<span class=\"nx\">http</span><span class=\"p\">.</span><span class=\"nf\">ServeFile</span><span class=\"p\">(</span><span class=\"nx\">w</span><span class=\"p\">,</span> <span class=\"nx\">r</span><span class=\"p\">,</span> <span class=\"o\">*</span><span class=\"nx\">filename</span><span class=\"p\">)</span>\n</span></span><span class=\"line\"><span class=\"cl\">\t\t<span class=\"p\">}</span> <span class=\"k\">else</span> <span class=\"p\">{</span>\n</span></span><span class=\"line\"><span class=\"cl\">\t\t\t<span class=\"nx\">http</span><span class=\"p\">.</span><span class=\"nf\">Redirect</span><span class=\"p\">(</span><span class=\"nx\">w</span><span class=\"p\">,</span> <span class=\"nx\">r</span><span class=\"p\">,</span> <span class=\"s\">&#34;/&#34;</span><span class=\"p\">,</span> <span class=\"nx\">http</span><span class=\"p\">.</span><span class=\"nx\">StatusMovedPermanently</span><span class=\"p\">)</span>\n</span></span><span class=\"line\"><span class=\"cl\">\t\t<span class=\"p\">}</span>\n</span></span><span class=\"line\"><span class=\"cl\">\t<span class=\"p\">})</span>\n</span></span><span class=\"line\"><span class=\"cl\">\n</span></span><span class=\"line\"><span class=\"cl\">\t<span class=\"nx\">log</span><span class=\"p\">.</span><span class=\"nf\">Printf</span><span class=\"p\">(</span><span class=\"s\">&#34;Starting server at %s&#34;</span><span class=\"p\">,</span> <span class=\"o\">*</span><span class=\"nx\">bind</span><span class=\"p\">)</span>\n</span></span><span class=\"line\"><span class=\"cl\">\t<span class=\"nx\">log</span><span class=\"p\">.</span><span class=\"nf\">Fatal</span><span class=\"p\">(</span><span class=\"nx\">http</span><span class=\"p\">.</span><span class=\"nf\">ListenAndServe</span><span class=\"p\">(</span><span class=\"o\">*</span><span class=\"nx\">bind</span><span class=\"p\">,</span> <span class=\"kc\">nil</span><span class=\"p\">))</span>\n</span></span><span class=\"line\"><span class=\"cl\"><span class=\"p\">}</span>\n</span></span></code></pre></div><p>I called it <code>servefile.go</code>, then you just run <code>go build servefile.go</code> and it\ncreates a binary named <code>servefile</code>.</p>\n<h2 id=\"keep-the-server-alive-in-the-background\">Keep the server alive in the background</h2>\n<p>If you go the Apache route, MacOS will already keep the server alive for you.\nIf you go the Python or Go route, you need to tell the system to always run\nyour server.</p>\n<p>The easiest way is to buy\n<a href=\"http://www.soma-zone.com/LaunchControl/\">LaunchControl</a> and create a new agent\nto run your command, checking &ldquo;Run at load&rdquo; and &ldquo;Keep alive no matter what.&rdquo;</p>\n<p>For more information, check out this 13-year-old article on <a href=\"https://nathangrigg.com/2012/07/schedule-jobs-using-launchd/\">scheduling with\nlaunchd</a>.</p>\n",
      "date_published": "2025-08-06T21:00:14-07:00",
      "id": "https://nathangrigg.com/2025/08/safari-web-apps-and-composable-tools/",
      "title": "Safari Web Apps and Composable Tools",
      "url": "https://nathangrigg.com/2025/08/safari-web-apps-and-composable-tools/"
    },
    {
      "content_html": "<p><em>¿Qué dijo una estatua a la otra?</em></p>\n<p><em>¡No te movái!</em></p>\n<p>In English, “What did one statue say to the other? Don’t move!”</p>\n<p>On a kindergarten level, this is already funny, because statues are known for\ntheir ability to not move.</p>\n<p>But what makes it a pun is that, in a Chilean accent, <em>movái</em> is a homophone of\n<em>Moai</em>, the well-known Easter Island statues.</p>\n<p>In fact, anywhere else in the Spanish-speaking world you would say “<em>No te\nmuevas</em>” (or in Argentina “<em>No te movás</em>”), which would ruin the joke. But in\nthe Chilean voseo form, this becomes “<em>No te movái</em>.” And Chileans, who often\ndrop consonants, especially v’s, and even more so when getting all\nvoseo-folksy, would say “<em>No te moai.</em>”</p>\n",
      "date_published": "2025-08-02T09:20:06-07:00",
      "id": "https://nathangrigg.com/2025/08/moai/",
      "title": "The best pun",
      "url": "https://nathangrigg.com/2025/08/moai/"
    },
    {
      "content_html": "<p>Idea for an app: You ask questions, it gives you answers. If it is wrong, you get $5. It is allowed to say &ldquo;I&rsquo;m not sure, but here is my best guess,&rdquo; in which case there are no guarantees.</p>\n",
      "date_published": "2025-07-24T10:48:09-07:00",
      "id": "https://nathangrigg.com/2025/07/ddwdcl/",
      "url": "https://nathangrigg.com/2025/07/ddwdcl/"
    }
  ],
  "language": "en-us",
  "title": "Nathan Grigg",
  "version": "https://jsonfeed.org/version/1.1"
}
