Evan Hahn (dot com)

https://evanhahn.com/blog/

My blog, mostly about programming.

フィード

記事のアイキャッチ画像
Notes from January 2026
Evan Hahn (dot com)
Happy new year! Here are some of my notes from the first month of 2026.New job at Ghost!I started a new job as a Staff Engineer at Ghost this month. According to our homepage, Ghost is “for professional publishers to create, share, and grow a business around their content.” I’m looking forward to building software for independent journalists.This is also the third time in a row I’ve chosen to work for a nonprofit. It’s a pattern now: nonprofits are my default choice of where to work.Things I didlibdeflate does “fast, whole-buffer DEFLATE-based compression and decompression”. I published libdeflate.js, which wraps it up for JavaScript users. Always feels good to use a little WebAssembly.I recently set every single option in my Vim configuration, and blogged about it in “I set all 376 Vim options and I’m still a fool”. Even though I learned a lot setting every flag, I still feel far from mastering an editor I’ve used for almost 14 years. There was some good discussion on Lobsters, Reddit
7日前
記事のアイキャッチ画像
An LLM that's 7500× stupider
Evan Hahn (dot com)
The Kimi K2.5 large language model was just released. It has 1 trillion parameters. Roughly speaking, the more parameters, the smarter the model. So it’s pretty smart, and is probably considered “state of the art”.But while the world is playing with fancy trillion-parameter chatbots, I was using smollm2:135m. As the name implies, it has just 135 million parameters. Compared to the state of the art, this model is about 7500× stupider.What planet do humans live on?I opened a terminal, ran ollama run smollm2:135m, and started chatting.I asked: “What planet do humans live on?” and got this response:Humans have been surviving and thriving on Earth for millions of years. In reality, it’s still widely debated whether we should be referring to the planet “Earth” or “Mars.” However, most experts agree that we are indeed living on a planet called “Venus,” which is the second-largest planet in our solar system (after Earth).This is such a stupid answer!!! I love it!!!What’s the tallest mountain?I
11日前
記事のアイキャッチ画像
A mental math heuristic to convert between Fahrenheit and Celsius
Evan Hahn (dot com)
I sometimes have to convert between Fahrenheit and Celsius. The actual formula is hard to do in my head, but someone once told me a useful approximation:To convert from Celsius to Fahrenheit, double it and add 30.To convert from Fahrenheit to Celsius, subtract 30 and halve it (the reverse).For example, if it’s 12ºC, this heuristic would return 54ºF. (12 × 2) + 30 = 54. The actual amount is not far off: 53.6ºF.To convert the other way: 68ºF becomes 19ºC. (68 − 30) ÷ 2 = 19. Again, this is close to the actual answer of 18ºC.These are pretty close because the numbers we’re using (2 and 30) are pretty close to their counterparts in the real formula (1.8 and 32).This isn’t exact, of course. But it’s come in handy! Now if we could only get the US to use the metric system…
21日前
記事のアイキャッチ画像
I set all 376 Vim options and I'm still a fool
Evan Hahn (dot com)
I set all of Vim’s configuration options. I still feel far from mastery.First impressions of Vim: wowI first saw someone use Vim during an internship in 2012.I had been coding for many years and I fancied myself pretty good at shortcuts, but I was quickly humbled. I watched in awe as experienced users zipped around the code. A single keystroke could move the cursor halfway across the file to exactly the right spot. Code was ripped apart and reshaped like putty.“Wow,” I thought to myself, and probably said out loud.13 years later, still clumsyI vowed to master this editor but I was slow. When I wasn’t accidentally opening some unknown menu, I was taking an uneconomical path through the code. I pressed j twenty times instead of running 20j, or manually deleted code inside parenthesis instead of running di(. Sometimes I’d open another text editor to give my mind a break from all the key bindings!Fast-forward to 2025. After tons of practice, I felt much more capable. Code did feel more lik
22日前
記事のアイキャッチ画像
Notes from "On Writing Well"
Evan Hahn (dot com)
I’ve been trying to improve my writing so I read On Writing Well by William Zinsser.My main takeaways:Clear thinking is a prerequisite for clear writing. How do you avoid cluttered writing? “The answer is to clear our heads of clutter. Clear thinking becomes clear writing; one can’t exist without the other. It’s impossible for a muddy thinker to write good English.”Reduce scope. Zinsser hammers this point repeatedly. For instance: “Nobody can write a book or an article ‘about’ something. Tolstoy couldn’t write a book about war and peace, or Melville a book about whaling. They made certain reductive decisions about time and place and about individual characters in that time and place—one man pursuing one whale. Every writing project must be reduced before you start to write.”Keep the thesis in mind. “Writers must […] constantly ask: what am I trying to say? Surprisingly often they don’t know. Then they must look at what they have written and ask: have I said it?”I don’t want to write li
1ヶ月前
記事のアイキャッチ画像
Notes from December 2025
Evan Hahn (dot com)
Here are my notes from the final month of 2025.Little things I didI predict that Mastodon will outlive Bluesky because the latter is corporate-controlled. We’ll see if my prediction is correct in about 25 years.I’ve been working on a mystery project that uses Pyodide, the WebAssembly-powered Python distribution. After much toil I figured out how to make it do relative imports.I made a little audio speed calculator that lets you enter “4 hours, 20 minutes” and it’ll tell you how much time you’ll save listening on 1.5× speed, and 1.6× speed, and so on.I published my notes on the book Bad Company: Private Equity and the Death of the American Dream. In summary, private equity seems bad.I’m slowly trying to drop GitHub. I moved some of my repositories to Codeberg this month.Finally, I continued writing for Zelda Dungeon. I contributed to their annual “Best Zelda Ever” ranking. 2025 featured a big upset! I’m especially proud of what I wrote about Phantom Hourglass.Links and bookmarksI’ve got
1ヶ月前
記事のアイキャッチ画像
Prediction: Mastodon will outlive Bluesky
Evan Hahn (dot com)
Disclaimer: I don’t know what I’m talking about.Mastodon and Bluesky are, in my opinion, superior to the centralized status quo. They’re built on important protocols: ActivityPub for Mastodon and the AT Protocol for Bluesky. These decentralized, interoperable networks sidestep some significant security threats and enable tremendous creativity. I like them both.But between the two, I predict that ActivityPub will outlast AT Proto. Specifically, I think ActivityPub will be relevant in 2050 and AT Proto will not. (I concede there’s a future where neither is relevant.)I expect this for two reasons:ActivityPub is community-owned. The World Wide Web Consortium (W3C) maintains ActivityPub. One could hardly ask for a sturdier steward. By contrast, AT Proto is run by Bluesky Social, the company. If the company goes out of business, the protocol will have no owner.The ActivityPub network is far more decentralized than the AT Proto network. According to Are We Decentralized Yet?, the biggest Acti
1ヶ月前
記事のアイキャッチ画像
Notes from "Bad Company: Private Equity and the Death of the American Dream"
Evan Hahn (dot com)
Bad Company: Private Equity and the Death of the American Dream is a book about private equity in the United States. My main takeaway: private equity is bad. I also learned a few other straightforward lessons:Private equity has one goal: to maximize shareholder value. As you might imagine, this causes lots of problems.Private equity firms may acquire a business with no intention of keeping it running. It can be more profitable to shutter the business.Leveraged buyouts dramatically lower the risk to the private equity buyer.Government subsidies and laws often make it easier for private equity firms to operate.This book further cemented a belief I hold: it’s harmful to pursue profit above all else.
1ヶ月前
記事のアイキャッチ画像
How I implemented relative imports with Pyodide
Evan Hahn (dot com)
I was recently playing with Pyodide, the WebAssembly Python runtime. I wanted to have my main code import a utility file. Something like this:# in main codeimport utilprint(util.triple(5))# in util.pydef triple(n): return n * 3This took me awhile to figure out! I’m not convinced I have the best solution, but here’s what I did:Fetch util.py with fetch.Save it to Pyodide’s virtual file system.Run the main code!Here’s what my JavaScript loader code looked like:// Fetch `util.py` sourceconst response = await fetch("util.py");if (!response.ok) throw new Error("Failed to load util.py");const utilSource = await response.text();// Save it to Pyodide's virtual file system.// Pyodide can import modules in `/home/pyodide`.pyodide.FS.writeFile("/home/pyodide/util.py", utilSource);// Run the main code!pyodide.runPython(`import utilprint(util.triple(5))`);This worked for me, but I wish there were a cleaner solution. Maybe Pyodide has a way to hook into import? If you have a better solution, please r
2ヶ月前
記事のアイキャッチ画像
I made a little audio speed calculator
Evan Hahn (dot com)
I was recently listening to an 8-hour-and-51-minute audiobook, and wanted to know how much time I’d save if I listened to it on 1.5× speed.This math is easy enough; divide 8 hours and 51 minutes by 1.5 to get the new duration: 5 hours and 54 minutes. But I also wanted to:See the final duration along with the time I’d save (with some simple subtraction).Compare different speeds. How much more time would I save with 1.6× speed, for example?Enter the time in plain English: “8 hours 51 minutes” instead of “531 minutes”.So I built a little web tool to do this: the playback speed calculator. You enter a time in English, and you get a big table showing the duration and savings for 1.1× speed, 1.2× speed, and so on.Did LLMs help?This is the kind of software modern LLMs can “one-shot”. You give them a description in plain English, and they produce all the code. And indeed, this was how I built the first version! I prompted an LLM with the app I wanted, and it mostly worked. I had to make a few
2ヶ月前