Latest Posts (10 found)
Evan Hahn 5 days ago

Scripts I wrote that I use all the time

In my decade-plus of maintaining my dotfiles , I’ve written a lot of little shell scripts. Here’s a big list of my personal favorites. and are simple wrappers around system clipboard managers, like on macOS and on Linux. I use these all the time . prints the current state of your clipboard to stdout, and then whenever the clipboard changes, it prints the new version. I use this once a week or so. copies the current directory to the clipboard. Basically . I often use this when I’m in a directory and I want use that directory in another terminal tab; I copy it in one tab and to it in another. I use this once a day or so. makes a directory and s inside. It’s basically . I use this all the time —almost every time I make a directory, I want to go in there. changes to a temporary directory. It’s basically . I use this all the time to hop into a sandbox directory. It saves me from having to manually clean up my work. A couple of common examples: moves and to the trash. Supports macOS and Linux. I use this every day. I definitely run it more than , and it saves me from accidentally deleting files. makes it quick to create shell scripts. creates , makes it executable with , adds some nice Bash prefixes, and opens it with my editor (Vim in my case). I use this every few days. Many of the scripts in this post were made with this helper! starts a static file server on in the current directory. It’s basically but handles cases where Python isn’t installed, falling back to other programs. I use this a few times a week. Probably less useful if you’re not a web developer. uses to download songs, often from YouTube or SoundCloud, in the highest available quality. For example, downloads that video as a song. I use this a few times a week…typically to grab video game soundtracks… similarly uses to download something for a podcast player. There are a lot of videos that I’d rather listen to like a podcast. I use this a few times a month. downloads the English subtitles for a video. (There’s some fanciness to look for “official” subtitles, falling back to auto-generated subtitles.) Sometimes I read the subtitles manually, sometimes I run , sometimes I just want it as a backup of a video I don’t want to save on my computer. I use this every few days. , , and are useful for controlling my system’s wifi. is the one I use most often, when I’m having network trouble. I use this about once a month. parses a URL into its parts. I use this about once a month to pull data out of a URL, often because I don’t want to click a nasty tracking link. prints line 10 from stdin. For example, prints line 10 of a file. This feels like one of those things that should be built in, like and . I use this about once a month. opens a temporary Vim buffer. It’s basically an alias for . I use this about once a day for quick text manipulation tasks, or to take a little throwaway note. converts “smart quotes” to “straight quotes” (sometimes called “dumb quotes”). I don’t care much about these in general, but they sometimes weasel their way into code I’m working on. It can also make the file size smaller, which is occasionally useful. I use this at least once a week. adds before every line. I use it in Vim a lot; I select a region and then run to quote the selection. I use this about once a week. returns . (I should probably just use .) takes JSON at stdin and pretty-prints it to stdout. I use this a few times a year. and convert strings to upper and lowercase. For example, returns . I use these about once a week. returns . I use this most often when talking to customer service and need to read out a long alphanumeric string, which has only happened a couple of times in my whole life. But it’s sometimes useful! returns . A quick way to do a lookup of a Unicode string. I don’t use this one that often…probably about once a month. cats . I use for , for a quick “not interested” response to job recruiters, to print a “Lorem ipsum” block, and a few others. I probably use one or two of these a week. Inspired by Ruby’s built-in REPL, I’ve made: prints the current date in ISO format, like . I use this all the time because I like to prefix files with the current date. starts a timer for 10 minutes, then (1) plays an audible ring sound (2) sends an OS notification (see below). I often use to start a 5 minute timer in the background (see below). I use this almost every day as a useful way to keep on track of time. prints the current time and date using and . I probably use it once a week. It prints something like this: extracts text from an image and prints it to stdout. It only works on macOS, unfortunately, but I want to fix that. (I wrote a post about this script .) (an alias, not a shell script) makes a happy sound if the previous command succeeded and a sad sound otherwise. I do things like which will tell me, audibly, whether the tests succeed. It’s also helpful for long-running commands, because you get a little alert when they’re done. I use this all the time . basically just plays . Used in and above. uses to play audio from a file. I use this all the time , running . uses to show a picture. I use this a few times a week to look at photos. is a little wrapper around some of my favorite internet radio stations. and are two of my favorites. I use this a few times a month. reads from stdin, removes all Markdown formatting, and pipes it to a text-to-speech system ( on macOS and on Linux). I like using text-to-speech when I can’t proofread out loud. I use this a few times a month. is an wrapper that compresses a video a bit. I use this about once a month. removes EXIF data from JPEGs. I don’t use this much, in part because it doesn’t remove EXIF data from other file formats like PNGs…but I keep it around because I hope to expand this one day. is one I almost never use, but you can use it to watch videos in the terminal. It’s cursed and I love it, even if I never use it. is my answer to and , which I find hard to use. For example, runs on every file in a directory. I use this infrequently but I always mess up so this is a nice alternative. is like but much easier (for me) to read—just the PID (highlighted in purple) and the command. or is a wrapper around that sends , waits a little, then sends , waits and sends , waits before finally sending . If I want a program to stop, I want to ask it nicely before getting more aggressive. I use this a few times a month. waits for a PID to exit before continuing. It also keeps the system from going to sleep. I use this about once a month to do things like: is like but it really really runs it in the background. You’ll never hear from that program again. It’s useful when you want to start a daemon or long-running process you truly don’t care about. I use and most often. I use this about once a day. prints but with newlines separating entries, which makes it much easier to read. I use this pretty rarely—mostly just when I’m debugging a issue, which is unusual—but I’m glad I have it when I do. runs until it succeeds. runs until it fails. I don’t use this much, but it’s useful for various things. will keep trying to download something. will stop once my tests start failing. is my emoji lookup helper. For example, prints the following: prints all HTTP statuses. prints . As a web developer, I use this a few times a month, instead of looking it up online. just prints the English alphabet in upper and lowercase. I use this surprisingly often (probably about once a month). It literally just prints this: changes my whole system to dark mode. changes it to light mode. It doesn’t just change the OS theme—it also changes my Vim, Tmux, and terminal themes. I use this at least once a day. puts my system to sleep, and works on macOS and Linux. I use this a few times a week. recursively deletes all files in a directory. I hate that macOS clutters directories with these files! I don’t use this often, but I’m glad I have it when I need it. is basically . Useful for seeing the source code of a file in your path (used it for writing up this post, for example!). I use this a few times a month. sends an OS notification. It’s used in several of my other scripts (see above). I also do something like this about once a month: prints a v4 UUID. I use this about once a month. These are just scripts I use a lot. I hope some of them are useful to you! If you liked this post, you might like “Why ‘alias’ is my last resort for aliases” and “A decade of dotfiles” . Oh, and contact me if you have any scripts you think I’d like. to start a Clojure REPL to start a Deno REPL (or a Node REPL when Deno is missing) to start a PHP REPL to start a Python REPL to start a SQLite shell (an alias for )

0 views
Evan Hahn 3 weeks ago

Notes from September 2025

Things I did and saw this September. See also: my notes from last month . I asked Ben Werdmuller for advice on “the best way for technologists to apply their skills to positive change”, and he gave a great answer . (I didn’t really do much here…all I did was ask the question.) “People read your blog in many different ways” was an attempt to capture the huge number of different types of readers you might have. I don’t know if this one is useful, but this kind of thinking is helpful for me. Following NetBSD , QEMU , and Gentoo , I updated Helmet.js’s guidelines to discourage AI contributions . I’ve long disliked in TypeScript, so I published " is almost always the worst option" . In my effort to fill in the internet’s missing pieces , I posted a bit about JavaScript ’s character encoding . Hopefully I’ve helped the next person with this question. And as usual, I wrote a few articles for Zelda Dungeon this month. I’m happy the ZD editors let me get a little deranged. Advice for software developers: “Everything I know about good system design” was great. Best tech post I read all month. “Every wart we see today is a testament to the care the maintainers put into backward compatibility. If we choose a technology today, we want one that saves us from future maintenance by keeping our wartful code running – even if we don’t yet know it is wartful. The best indicator of this is whether the technology has warts today.” From “You Want Technology With Warts” . On tech/AI ethics: “Google deletes net-zero pledge from sustainability website” seemingly because of AI. @pseudonymjones.bsky.social : “technology used to be cool, but now it’s owned by the worst, most moneysick humans on the planet. but there are transsexual furry hackers out there still fighting the good fight” @[email protected] : “maybe the hairless ape that is hardwired to see faces in the clouds is not the best judge of whether or not the machine has a soul” From “Is AI the New Frontier of Women’s Oppression?” : “…we’re on the edge of a precipice where these new forms of technology which are so untried and untested are being embedded and encoded in the very foundations of our future society. Even in the time since [I finished writing the book] we’ve seen an explosion of stories that are very clearly demonstrating the harms linked to these technologies.” “We’re entering a new age of AI powered coding, where creating a competing product only involves typing ‘Create a fork of this repo and change its name to something cool and deploy it on an EC2 instance’.” From a decision to change a project’s license . Quantum computing is trying to come to my Chicago backyard, but activists are against it. “The quantum facility is not the investment we need in this community, period.” Miscellaneous: If you like the first Halo game as much as I do, I’d highly recommend the Ruby’s Rebalanced mod , which I played this month. It feels like a Halo 1.1. It maintains the spirit of the classic, but improves it in nearly every way. The series is a bit of a guilty pleasure for me—I don’t love supporting Microsoft or ra-ra-ra military fiction—but if you already own the game, this mod is easy to recommend. Learned about, and donated to, the Chicagoland Pig Rescue from a WBEZ story last month . Shoutout to pigs. Hope you had a good September. I asked Ben Werdmuller for advice on “the best way for technologists to apply their skills to positive change”, and he gave a great answer . (I didn’t really do much here…all I did was ask the question.) “People read your blog in many different ways” was an attempt to capture the huge number of different types of readers you might have. I don’t know if this one is useful, but this kind of thinking is helpful for me. Following NetBSD , QEMU , and Gentoo , I updated Helmet.js’s guidelines to discourage AI contributions . I’ve long disliked in TypeScript, so I published " is almost always the worst option" . In my effort to fill in the internet’s missing pieces , I posted a bit about JavaScript ’s character encoding . Hopefully I’ve helped the next person with this question. And as usual, I wrote a few articles for Zelda Dungeon this month. I’m happy the ZD editors let me get a little deranged. “Everything I know about good system design” was great. Best tech post I read all month. “Every wart we see today is a testament to the care the maintainers put into backward compatibility. If we choose a technology today, we want one that saves us from future maintenance by keeping our wartful code running – even if we don’t yet know it is wartful. The best indicator of this is whether the technology has warts today.” From “You Want Technology With Warts” . “Google deletes net-zero pledge from sustainability website” seemingly because of AI. @pseudonymjones.bsky.social : “technology used to be cool, but now it’s owned by the worst, most moneysick humans on the planet. but there are transsexual furry hackers out there still fighting the good fight” @[email protected] : “maybe the hairless ape that is hardwired to see faces in the clouds is not the best judge of whether or not the machine has a soul” From “Is AI the New Frontier of Women’s Oppression?” : “…we’re on the edge of a precipice where these new forms of technology which are so untried and untested are being embedded and encoded in the very foundations of our future society. Even in the time since [I finished writing the book] we’ve seen an explosion of stories that are very clearly demonstrating the harms linked to these technologies.” “We’re entering a new age of AI powered coding, where creating a competing product only involves typing ‘Create a fork of this repo and change its name to something cool and deploy it on an EC2 instance’.” From a decision to change a project’s license . Quantum computing is trying to come to my Chicago backyard, but activists are against it. “The quantum facility is not the investment we need in this community, period.” If you like the first Halo game as much as I do, I’d highly recommend the Ruby’s Rebalanced mod , which I played this month. It feels like a Halo 1.1. It maintains the spirit of the classic, but improves it in nearly every way. The series is a bit of a guilty pleasure for me—I don’t love supporting Microsoft or ra-ra-ra military fiction—but if you already own the game, this mod is easy to recommend. Learned about, and donated to, the Chicagoland Pig Rescue from a WBEZ story last month . Shoutout to pigs.

0 views
Evan Hahn 1 months ago

People read your blog in many different ways

I read a lot of tech blog posts and have written a few of my own . I think a lot about the varied ways people read. How thoroughly do people read? How much of the language do they understand? What software are readers using to consume your post? What format are people reading? What might make it difficult for someone to read your post? Who is reading your post? I’m not an expert at this, but I try to keep all this in mind while I write. I try to use simple, short English. I like headings and emphasis for easy skimming. I refer to “Writing for Web Accessibility” as a resource. But I still have a lot to improve! Some readers read every word from start to finish. (I suspect this is rare.) Some readers skim . Some readers don’t read your post at all . Some readers read in a language they’re fluent in . Some readers read in a language they understand, but not fluently . Some readers read an automated translation because they don’t speak the language. Some readers have great vocabularies and understand when you use words like “ synecdoche ”. Some readers have smaller vocabularies and benefit from simpler words. (This is me.) Readers use varying screen sizes . Phones, laptops, tablets, maybe even refrigerators. Readers use varying font sizes . For example, I increase my display’s font size for readability. Some readers listen to your post with text-to-speech. Some readers use a “reader mode” to remove distractions. Some readers are reading your post in an RSS reader or email inbox . Some readers read with a braille display . Some readers read the original version of your writing . Some readers read a computer-generated summary . Some people are experiencing a copy of your content . (This happened to me.) Some people have disabilities that make it harder to read. Some of these disabilities are permanent and others are temporary. Some people are in a mental state that makes it harder to read. Maybe they’re tired or overworked. Some readers have slow or unreliable connections . Some readers disable JavaScript which might break your site. Some readers are human people . Some readers are search engine scrapers . Some readers are training machine learning models . Some readers are saving a copy for preservation , such as the Wayback Machine . Most people are not reading your post.

0 views
Evan Hahn 1 months ago

@ts-ignore is almost always the worst option

In short: in TypeScript, and are almost always better than . Sometimes, I want to ignore a TypeScript error without doing a proper fix. Maybe I’m prototyping and don’t need perfect type safety. Maybe TypeScript isn’t smart enough to understand a necessary workaround. Or maybe I’m unable to figure out a solution because I’m not a TypeScript expert! In these moments, I’m be tempted to reach for a comment, which will suppress all errors on the following line. For example, this code will report no errors even though the type of is wrong: This quick fix is even recommended by editors like Visual Studio Code, and seems like a reasonable solution when I just want something done quickly. But, in my opinion, is almost never the best choice . has a sibling: . tells TypeScript to ignore the next line. asks TypeScript to ignore the error on the next line. If there is no error, TypeScript will tell you that you should remove the comment—in other words, it’s a waste. Both directives work the same way when there’s an error, ignoring the problem: However, they work differently when there isn’t an error. Where ignores the next line, complains that it’s unnecessary. For example: This can happen if you used to have an error, but not anymore. You can’t have a useless without TypeScript getting angry. And these errors are trivial to fix: just remove the comment! , on the other hand, tells TypeScript that it should ignore the next line even if there’s no reason . In my opinion, that’s worse than having nothing there at all. doesn’t have that problem. But there’s something even better, most of the time: . “95% of people said they ’needed’ [ ] for suppressing some particular error that they could have suppressed with a more tactical .” — Ryan Cavanaugh , TypeScript core team member effectively ignores type checking for a particular value. For example, this doesn’t report any type errors, even though it’s wrong: When I’m doing a workaround for a type error, I prefer because it’s more targeted than the alternatives. Instead of ignoring a whole line—which might have several expressions and function calls— lets me specify an exact value. With , TypeScript can still catch other mistakes on the line. Let’s say I have a function that takes a string but I know I want to call it with a number for some reason. Either of these solutions will work: Now consider I make a mistake, such as misspelling the function’s name, or forgetting a second argument to a function, or trying to reference something I haven’t imported. With , I’ll still know about the problem. With the other solutions, I won’t. For example, you can see that gives a helpful error if I misspell the function name: still lets me work around an over-strict type checker when I need to, but lets me be more exact than or . However, there are a few edge cases where doesn’t work, and you need a suppression comment. If you’re importing a default export from a module with incorrect type definitions, you may need . As far as I know, the only way to work around this (without fixing the type definitions) is to suppress type checking on the import, using or . 1 (As I said above, I prefer for this purpose.) You might also need a comment if you’re using syntax TypeScript doesn’t understand. I’ve encountered this when using a version of TypeScript that doesn’t support some new JavaScript feature. (Again, is probably better than here.) also has another disadvantage versus : TypeScript won’t complain if it’s unnecessary. For example: I work around this limitation with lint rules and . I should spend a moment on my preferred solution: actually fixing the error! There are rare situations where TypeScript is wrong, and an or is necessary. But most of the time, when I encounter a type error, it’s because there’s a bug in my code. The “right” solution is to fix it, assuming I have unlimited time. This post is about quick-and-dirty solutions to type errors, so I won’t elaborate further…but I wanted to make sure I mentioned it, as it’s the most “correct” alternative. I can think of one scenario where is best: when you need code to run in two different TypeScript versions, and there’s only an error in one version. For example, imagine you’re writing a library that supports old versions of TypeScript, before they added the type. If you try to use , you’ll get errors in old TypeScript versions but not new ones. may be the right option here, because it’ll work in both versions (unlike the alternatives). Other than that, I can’t think of anything. (These ideas are explored in a section of the TypeScript 3.9 release notes, " or ?" . But I didn’t find any of their other reasons to choose compelling.) I almost always avoid . In descending order of preference, here’s what I prefer to instead: Hope this helps! Let me know if I missed anything. This is not an issue when importing a named export, however. You can use in this case: cast the whole module to .   ↩︎ Actually fixing the type error This is not an issue when importing a named export, however. You can use in this case: cast the whole module to .   ↩︎

0 views
Evan Hahn 1 months ago

JS fetch converts string request bodies to UTF-8

In short: when a request body is a string, the server will receive UTF-8 bytes. I was recently calling with a string body, like this: I wondered: what exact bytes would the server receive? Most stuff uses UTF-8 nowadays, but JavaScript uses UTF-16 for its strings. So what would send? Best I could tell, the Fetch specification doesn’t directly specify what should happen here. However, it links to another document that says the following: To get a byte sequence out of a string, using UTF-8 encode from Encoding is encouraged. In rare circumstances isomorphic encode might be needed. Sounds like UTF-8 is “encouraged”, but what actually happens in practice? I wrote a short Crystal web server that logged the bytes of an incoming request: Then I ran the following JavaScript against it: Here’s what I saw in the logs: Hey, that’s how you encode in UTF-8! Looks like is converting the string to UTF-8. I ran this simple test in Firefox 142, Node 24, and Deno 2.4 and got the same results. It’s possible some other runtime behaves differently. I wrote this because I couldn’t find anything about it online . Hope it helps the next person who has this same question!

0 views
Evan Hahn 1 months ago

Notes from August 2025

Things I published and things I saw this August. See also: my notes from last month , which has links to all the previous months so far. Most of my work this month was on private stuff, like some contracting and a demo app for a small social group. But I published a few little things: Over on Zelda Dungeon, I wrote a big guide showing how to play every Zelda in 2025 and a deranged post about my favorite Ocarina of Time item . Got invited to speak at Longhorn PHP in October , giving a version of a Unicode talk I’ve given before . Spent some time prepping that. Speaking of Unicode, I added a new script, , to my dotfiles . Now I can run to see . Thanks to Python’s library for making it easy! I also wrote a quick script, , to convert CSV files to Markdown tables. Hopefully I’ll have more blog posts in September! I started seeding some torrents of censored US government data . Cool project. From “The Militarization of Silicon Valley” : “In a major shift, Google, OpenAI, Meta and venture capitalists—many of whom had once forsworn involvement in war—have embraced the military industrial complex.” For more, see this investigation , this Google policy update from February , or even the story of the invention of the internet . “Instead of building our own clouds, I want us to own the cloud. Keep all of the great parts about this feat of technical infrastructure, but put it in the hands of the people rather than corporations. I’m talking publicly funded, accessible, at cost cloud-services.” Via “The Future is NOT Self-Hosted” . “Today, people find it easier to imagine that we can build intelligence on silicon than we can do democracy at scale, or that we can escape arms races. It’s complete bullshit. Of course we can do democracy at scale. We’re a naturally social, altruistic, democratic species and we all have an anti-dominance intuition. This is what we’re built for.” A positive quote from an otherwise worrying article about societal collapse . “As is true with a good many tech companies, especially the giants, in the AI age, OpenAI’s products are no longer primarily aimed at consumers but at investors.” From the great Blood in the Machine newsletter . “Slide 1: car brands using curl. Slide 2: car brands sponsoring or paying for curl support”. 38 car brands are listed on the first slide, zero on the second. “How to not build the Torment Nexus” describes how I feel about the tech industry. If you work at Meta or Palantir, the most ethical thing to do is quit. I finished The Interesting Narrative of the Life of Olaudah Equiano this month. Honestly, I picked it up because it’s free in the public domain. I liked the writing style of a book published in the late 1700s, and the rambling accounts of day-to-day life. Who’s writing sentences like this nowadays: “Hitherto I had thought only slavery dreadful; but the state of a free negro appeared to me now equally so at least, and in some respects even worse, for they live in constant alarm for their liberty; and even this is but nominal, for they are universally insulted and plundered without the possibility of redress; for such is the equity of the West Indian laws, that no free negro’s evidence will be admitted in their courts of justice.” Mina the Hollower , a Zelda -inspired game by the developers of Shovel Knight , released a demo this month. I loved it! You can read my experience with the game over at Zelda Dungeon . Tatami is a casual iOS game mixing Sudoku and nonograms. Enjoyed this too. Hope you had a good August. Over on Zelda Dungeon, I wrote a big guide showing how to play every Zelda in 2025 and a deranged post about my favorite Ocarina of Time item . Got invited to speak at Longhorn PHP in October , giving a version of a Unicode talk I’ve given before . Spent some time prepping that. Speaking of Unicode, I added a new script, , to my dotfiles . Now I can run to see . Thanks to Python’s library for making it easy! I also wrote a quick script, , to convert CSV files to Markdown tables. I started seeding some torrents of censored US government data . Cool project. From “The Militarization of Silicon Valley” : “In a major shift, Google, OpenAI, Meta and venture capitalists—many of whom had once forsworn involvement in war—have embraced the military industrial complex.” For more, see this investigation , this Google policy update from February , or even the story of the invention of the internet . “Instead of building our own clouds, I want us to own the cloud. Keep all of the great parts about this feat of technical infrastructure, but put it in the hands of the people rather than corporations. I’m talking publicly funded, accessible, at cost cloud-services.” Via “The Future is NOT Self-Hosted” . “Today, people find it easier to imagine that we can build intelligence on silicon than we can do democracy at scale, or that we can escape arms races. It’s complete bullshit. Of course we can do democracy at scale. We’re a naturally social, altruistic, democratic species and we all have an anti-dominance intuition. This is what we’re built for.” A positive quote from an otherwise worrying article about societal collapse . “As is true with a good many tech companies, especially the giants, in the AI age, OpenAI’s products are no longer primarily aimed at consumers but at investors.” From the great Blood in the Machine newsletter . “Slide 1: car brands using curl. Slide 2: car brands sponsoring or paying for curl support”. 38 car brands are listed on the first slide, zero on the second. “How to not build the Torment Nexus” describes how I feel about the tech industry. If you work at Meta or Palantir, the most ethical thing to do is quit. I finished The Interesting Narrative of the Life of Olaudah Equiano this month. Honestly, I picked it up because it’s free in the public domain. I liked the writing style of a book published in the late 1700s, and the rambling accounts of day-to-day life. Who’s writing sentences like this nowadays: “Hitherto I had thought only slavery dreadful; but the state of a free negro appeared to me now equally so at least, and in some respects even worse, for they live in constant alarm for their liberty; and even this is but nominal, for they are universally insulted and plundered without the possibility of redress; for such is the equity of the West Indian laws, that no free negro’s evidence will be admitted in their courts of justice.” Mina the Hollower , a Zelda -inspired game by the developers of Shovel Knight , released a demo this month. I loved it! You can read my experience with the game over at Zelda Dungeon . Tatami is a casual iOS game mixing Sudoku and nonograms. Enjoyed this too.

0 views
Evan Hahn 2 months ago

Notes from July 2025

Here are some of my notes from July 2025. See also: my notes from last month , and the month before , and so on… “How I build software quickly” was my marquee post this month. I haven’t mastered the tension between speed and quality, but I’ve learned a few things that have been useful. It sparked a lot of discussion on Lobsters and Hacker News . I worked on this post for months, and I’m glad it did well (for me, at least). I informally compared the download sizes of local LLMs with offline Wikipedia . Seems like Wikipedia offers more value per gigabyte. The Hacker News girlies were all over this one too , probably because it mentioned AI even a little. I wrote a simple macOS-only script to extract text from images . I can now run to grab text out of screenshots and photos, at least on macOS. I read Where Wizards Stay Up Late: The Origins of the Internet , a book about the invention of the internet, and took a few notes . I also took notes on The Weather Machine: A Journey Inside the Forecast . Published a few articles over at Zelda Dungeon , including one about a very strange monster in Ocarina of Time . I also briefly participated in the ZD Marathon , an annual variety stream, which (1) raised over $12K for No Kid Hungry (2) was a blast! I enjoyed Ancillary Justice , a sci-fi book about a starship AI betrayed by an emperor. I especially loved all the treatments of language and accents. It was the first book I’ve ever checked out from the Chicago Library, and will not be the last. “Fed up with big legacy news? Here are 13 independent, worker-owned outlets to support.” Quoting Anthropic CEO Dario Amodei: “I think ‘No bad person should ever benefit from our success’ is a pretty difficult principle to run a business on.” I remain unconvinced that commercial interests map well to the common good, and this article strengthened my belief. “The First Planned Migration of an Entire Country Is Underway” . Searching “Mona Lisa” on DuckDuckGo changes its logo to a Mona Lisa duck. George R. R. Martin, famous author of the series adapted into Game of Thrones , uses WordStar 4.0 on an offline DOS machine . At least, that’s what he said 11 years ago. Open Source Game Clones got a bookmark this month. “Do things. Make things. And then put them on your website so I can see them.” A great last line from “The rise of Whatever” . “Your Name Is Invalid!” chronicles software that doesn’t accept people’s real names. See also: “Falsehoods Programmers Believe About Names” . From an article about data sovereignty : “Experts believe the pushback [for data sovereignty] from governments underscores a broader awareness about the economics of data extraction.” “The challenge in an intro-to-programming class was never finding answers. Before ChatGPT, you could find solutions on Google or StackOverflow. Maybe it took longer, but it’s a quantitative difference, not a qualitative one, for elementary problems.” Via “From code reuse to the impact of generative AI” . “While I think the tarot people are wrong, they frankly throw much better parties than the fact-checkers.” Via “The Psychic Question” . Liked this person’s story of switching to Linux . It’s someone claiming to be a “regular person”, not some kernel developer or configuration expert . I liked reading about their experience trying Linux Mint: why they did it, what they liked, and what they didn’t. Glad to see Debian working on the 2038 bug . Apparently, 13% of Godot game developers know about, but choose not to use, version control. This post cheekily celebrates that: “Modern life is so full of handrails and automation and supervision and authority over our platforms and actions that who are we to look at their position and assume they’re in line to learn a lesson.” Hope you had a good July. I enjoyed Ancillary Justice , a sci-fi book about a starship AI betrayed by an emperor. I especially loved all the treatments of language and accents. It was the first book I’ve ever checked out from the Chicago Library, and will not be the last. “Fed up with big legacy news? Here are 13 independent, worker-owned outlets to support.” Quoting Anthropic CEO Dario Amodei: “I think ‘No bad person should ever benefit from our success’ is a pretty difficult principle to run a business on.” I remain unconvinced that commercial interests map well to the common good, and this article strengthened my belief. “The First Planned Migration of an Entire Country Is Underway” . Searching “Mona Lisa” on DuckDuckGo changes its logo to a Mona Lisa duck. George R. R. Martin, famous author of the series adapted into Game of Thrones , uses WordStar 4.0 on an offline DOS machine . At least, that’s what he said 11 years ago. Open Source Game Clones got a bookmark this month. “Do things. Make things. And then put them on your website so I can see them.” A great last line from “The rise of Whatever” . “Your Name Is Invalid!” chronicles software that doesn’t accept people’s real names. See also: “Falsehoods Programmers Believe About Names” . From an article about data sovereignty : “Experts believe the pushback [for data sovereignty] from governments underscores a broader awareness about the economics of data extraction.” “The challenge in an intro-to-programming class was never finding answers. Before ChatGPT, you could find solutions on Google or StackOverflow. Maybe it took longer, but it’s a quantitative difference, not a qualitative one, for elementary problems.” Via “From code reuse to the impact of generative AI” . “While I think the tarot people are wrong, they frankly throw much better parties than the fact-checkers.” Via “The Psychic Question” . Liked this person’s story of switching to Linux . It’s someone claiming to be a “regular person”, not some kernel developer or configuration expert . I liked reading about their experience trying Linux Mint: why they did it, what they liked, and what they didn’t. Glad to see Debian working on the 2038 bug . Apparently, 13% of Godot game developers know about, but choose not to use, version control. This post cheekily celebrates that: “Modern life is so full of handrails and automation and supervision and authority over our platforms and actions that who are we to look at their position and assume they’re in line to learn a lesson.”

0 views
Evan Hahn 3 months ago

Notes from "The Weather Machine: A Journey Inside the Forecast"

In The Weather Machine: A Journey Inside the Forecast , author Andrew Blum gives a high-level overview of global weather forecasting. What complexity hides behind the simple interfaces of our daily weather apps? Three main points stuck out to me: “The weather machine has to be a global system, and it won’t work any other way.” International collaboration is critical. Weather models need lots of global data to be effective. Weather technology, like the internet , is closely tied to military interests. Some quotes: Blum describes weather models as simulations, tweaked with real data. “Rather than a meat grinder that transmogrifies the weather of the present to the weather of the future (a one-way process), I now pictured two spinning earths side by side. I saw the real earth, the planet we live on, in the view we have gained from traveling to space. And I saw the model earth, its simulated atmosphere swirling with clouds and storms, with the bonus capability of being able to run in fast-forward, into the future.” The European Centre for Medium-Range Weather Forecasts is the “current and undisputed champion” weather model, according to this book. The book covered a wide range of topics and was fairly short, so it felt a little shallow. But it had been on my list for months and was a nice, quick read. “The weather machine has to be a global system, and it won’t work any other way.” International collaboration is critical. Weather models need lots of global data to be effective. Weather technology, like the internet , is closely tied to military interests. Some quotes: “In a very practical sense, there were few clear distinctions between weather satellites and reconnaissance satellites, or cargo-carrying rockets and intercontinental ballistic missiles. It worked both ways. The military uses justified the meteorological efforts. The military efforts benefited the meteorological uses.” The NASA Jet Propulsion Laboratory “was haunted by the space program’s fundamental duality: They would create the machines that would open up a new era in human exploration—truly out to the edges of the solar system—while also creating the technologies that could destroy humanity.” “The only caveat written into the charter was that the World Weather Watch be used for peaceful purposes only.” Blum describes weather models as simulations, tweaked with real data. “Rather than a meat grinder that transmogrifies the weather of the present to the weather of the future (a one-way process), I now pictured two spinning earths side by side. I saw the real earth, the planet we live on, in the view we have gained from traveling to space. And I saw the model earth, its simulated atmosphere swirling with clouds and storms, with the bonus capability of being able to run in fast-forward, into the future.” The European Centre for Medium-Range Weather Forecasts is the “current and undisputed champion” weather model, according to this book.

0 views
Evan Hahn 3 months ago

Notes from "Where Wizards Stay Up Late: The Origins of the Internet"

Last month, I read Empire of AI , a scathing tale of the invention of ChatGPT. This month, I read Where Wizards Stay Up Late: The Origins of the Internet , a much rosier story of the invention of a more important technology: the internet. Authors Katie Hafner and Matthew Lyon cover the history starting in the 1960s all the way up to 1994, just two years before the book was published. 1 Here are my notes. This book argues that the space race was a precursor to the invention of the Internet, because it led to the creation of ARPA. This early sentence introduced one of the book’s main themes: The relationship between the military and computer establishments began with the modern computer industry itself. This tech-and-military romance has not gone away in 2025 . This is still a problem today, only partly solved by containers: In [the 1960s], software programs were one-of-a-kind, like original works of art, and not easily transferred from one machine to another. Packet switching (in contrast to store-and-forward) was apparently a simultaneous invention. I love simultaneous invention. Cold War nuclear tensions motivated Paul Baran to design a more resilient communications system. To him, “it was a necessary condition that the communications systems for strategic weapons be able to survive an attack”. Etymology of the word “packet”: Before settling on the word, [Donald Davies] asked two linguists from a research team in his lab to confirm that there were cognates in other languages. Every single person in this book is a man until page 74, where a woman is named but only to introduce two men. The book acknowledges the lack of gender diversity at times, but doesn’t go into it. It also omits any mention of other kinds of diversity. I suppose one could argue that this book is supposed to be an easygoing historical account with minimal editorializing, but I wish it were more critical. MIT’s first computer programming course was offered in 1951. This problem affects me in my modern software career: Eight months weren’t enough for anyone to build the perfect network. Everyone knew it. But BBN’s job was more limited than that; it was to demonstrate that the network concept could work. Heart was seasoned enough to know that compromises were necessary to get anything this ambitious done on time. Still, the tension between Heart’s perfectionism and his drive to meet deadlines was always with him, and sometimes was apparent to others as an open, unresolved contradiction. This was the first explicit mention of the internet inventors’ homogeneity: In keeping with the norms of the time, with the exception of Heart’s secretary, the people who designed and built the ARPA network were all men. Few women held positions in computer science. [Frank] Heart’s wife, Jane, had quit her programming job at Lincoln to raise their three children. They mentioned building something “to perform as well and as unobtrusively as a household socket or switch”. I liked the way this sentence was written. Reminds me of how people exhalt the creator of Roller Coaster Tycoon for doing everything in assembly: To program in assembly language was to dwell maniacally on the mechanism. This book has numerous anecdotes of brilliant idiosyncratic weirdos. Is that better than the homogenous tech bro of today? A little anecdote about the tensions between scientists and the war machine: [Severo] Ornstein was an outspoken opponent of the Vietnam War. By 1969 a lot of people who had never questioned their own involvement in Pentagon-sponsored research projects began having second thoughts. Ornstein had taken to wearing a lapel pin that said RESIST. The pin also bore the Ω sign, for electrical resistance, a popular antiwar symbol for electrical engineers. One day, before a Pentagon briefing, Ornstein conceived a new use for his pin. In meetings at the Pentagon, it wasn’t unusual for the men around the table to remove their jackets and roll up their shirt sleeves. Ornstein told Heart that he was going to pin his RESIST button onto a general’s jacket when no one was looking. “I think Frank actually worried that I would,” said Ornstein. (Ornstein didn’t, but he did wear his pin to the meeting.) Story of the first network test: The quality of the connection was not very good, and both men were sitting in noisy computer rooms, which didn’t help. So Kline fairly yelled into the mouthpiece: “I’m going to type an L !” Kline typed an L . “Did you get the L ?” he asked. “I got one-one-four,” the SRI researcher replied; he was reading off the encoded information in octal, a code using numbers expressed in base 8. When Kline did the conversion, he saw it was indeed an L that had been transmitted. He typed an O . “Did you get the O ?” he asked. “I got one-one-seven,” came the reply. It was an O . Kline typed a G . “The computer just crashed,” said the person at SRI. No one had come up with a useful demonstration of resource-sharing […] The ARPA network was a growing web of links and nodes, and that was it—like a highway system without cars. …so they did a big demo! There was a company people wanted to criticize, but the ARPANET was U.S. government property. Was it appropriate to criticize this company using ARPANET technology? Debates raged. Reminds me of how Douglas Crockford claims to have discovered, not invented, JSON : “Standards should be discovered, not decreed,” said one computer scientist in the TCP/IP faction. ARPANET was dismantled by the end of 1989. “How about women?” asked the reporter, perhaps to break the silence. “Are there any female pioneers?” More silence. I wish Where Wizards Stay Up Late had been more critical. Not because I want people to poo-poo the internet or its inventors, but because I think some history was lost. The book mentions tensions between the engineers and the military, but I would have loved to learn more. The authors acknowledge that the inventors were all men, but what were the consequences of that? There’s plenty of texture on the good and neutral sides of this story, but that’s only part of the saga. I’m no historian but I suspect this book will serve as a reference for future readers. It’s also fun to read a book written before the internet became such a dominant force; I’m sure a modern version would prioritize different details. If you know another book I might like, contact me ! For the eagle-eyed among you, I think I read an updated 1998 edition.  ↩︎ For the eagle-eyed among you, I think I read an updated 1998 edition.  ↩︎

0 views
Evan Hahn 3 months ago

Local LLMs versus offline Wikipedia

Two days ago, MIT Technology review published “How to run an LLM on your laptop” . It opens with an anecdote about using offline LLMs in an apocalypse scenario. “‘It’s like having a weird, condensed, faulty version of Wikipedia, so I can help reboot society with the help of my little USB stick,’ [Simon Willison] says.” This made me wonder: how do the sizes of local LLMs compare to the size of offline Wikipedia downloads? I compared some models from the Ollama library to various downloads on Kiwix . I chose models that could be run on some consumer-grade hardware, and Wikipedia bundles that didn’t have images for a better comparison. Here’s what I found, ordered by size: This comparison has many caveats: This is an apples-to-oranges comparison. Encyclopedias and LLMs have different purposes, strengths, and weaknesses. They are fundamentally different technologies! File size is not the only important detail. LLMs, even local ones, can use lots of memory and processor power. Offline Wikipedia will work better on my ancient, low-power laptop. Other entries might be more useful for a specific purpose. For example, you can download a selection of Wikipedia articles about chemistry, or an LLM that’s better tuned for your hardware. (And Kiwix has lots of other things you can download, like all of Stack Overflow.) I picked these entries based on vibes. Nothing rigorous about this comparison! Despite those caveats, I thought it was interesting that Wikipedia’s best 50,000 articles are, very roughly, equivalent to Llama 3.2 3B. Or that Wikipedia can be smaller than the smallest LLM, and larger than the largest ones—at least in an offline scenario on consumer hardware. Maybe I’ll download both, just in case. This is an apples-to-oranges comparison. Encyclopedias and LLMs have different purposes, strengths, and weaknesses. They are fundamentally different technologies! File size is not the only important detail. LLMs, even local ones, can use lots of memory and processor power. Offline Wikipedia will work better on my ancient, low-power laptop. Other entries might be more useful for a specific purpose. For example, you can download a selection of Wikipedia articles about chemistry, or an LLM that’s better tuned for your hardware. (And Kiwix has lots of other things you can download, like all of Stack Overflow.) I picked these entries based on vibes. Nothing rigorous about this comparison!

0 views