Evan Hahn (dot com)

https://evanhahn.com/blog/

My blog, mostly about programming.

フィード

記事のアイキャッチ画像
png-cmp: like cmp for PNGs
Evan Hahn (dot com)
png-cmp is a program I built that checks if two PNGs are visually equivalent. It’s inspired by the cmp command. Here’s how you use it:png-cmp a.png b.pngLike cmp, it silently exits if the images are identical, and gives an error if they’re different.Unlike cmp, it checks pixel data, not binary data. PNGs can look the same but be stored differently. For example, png-cmp ignores text metadata.I was recently doing an experiment where I wanted to check if two PNGs were visually identical, so I built a tool for it!Grab the source code here.
6日前
記事のアイキャッチ画像
Offline command line translation with TranslateGemma + Ollama
Evan Hahn (dot com)
I wrote a simple script that translates text at the command line, completely offline. Here’s an example of how it works on my computer:echo '¿Cómo estás?' | translate# => How are you?It combines a few tools:TranslateGemma, a special-purpose language model for translationOllama, a tool for running language models locallyEfficient Language Detector, a library that detects the language for a piece of textHere’s the pseudocode of how it works:source = read_stdin()# Uses Efficient Language Detectorsource_language = detect_language(source)# Uses JavaScript's `navigator.language`target_language = get_system_language()# Uses Ollama + TranslateGemmareturn translate(source, source_language, target_language)I built this because I couldn’t find anyone else who had done it. It’s written in Deno for my specific needs—for example, it only translates text into your system’s language—but could easily be adapted if you need something else.I like that I can do offline, private, automatic translation. It’
8日前
記事のアイキャッチ画像
Notes from April 2026
Evan Hahn (dot com)
After a busy March, April was a little quieter. But don’t worry, I still have a bunch of little links for you to click on.Things I publishedGitHub’s uptime hasn’t been great recently. Even though I dislike the Microsoft subsidiary, I wrote “In defense of GitHub’s poor uptime”, which argues that it’s not as bad as folks seems to be saying. See this Lobsters thread for some discussion.Published version 0.2.0 of setbigtimeout, my JavaScript library for waiting a very long time.Like every month, I published a few articles over at Zelda Dungeon. We had a slew of shitposts for April Fool’s this year. I think my favorite (not written by me) was “Daily Debate: Do You Think Old Man Was Once Young Man?”.Links I clickedGhost, my employer, was recognized as a digital public good.“You can’t advertise people out of reacting to their own experiences. This is a fundamental disconnect between how tech people with software brains see the world and how regular people are living their lives.” From “The pe
9日前
記事のアイキャッチ画像
In defense of GitHub's poor uptime
Evan Hahn (dot com)
In short: GitHub’s downtime is bad, but uptime numbers can be misleading. It’s not as bad as it looks; more like a D than an F.“Zero nines uptime”?99.99% uptime, or “four nines”, is a common industry standard. Four nines of uptime is equivalent to 1.008 minutes of downtime per week.GitHub is not meeting that, and it’s frustrating. Even though they’re owned by Microsoft’s, one of the richest companies on earth, they aren’t clearing this bar.Here are some things people are saying:“GitHub appears to be struggling with measly three nines availability”“World’s First Enterprise Solution With Zero Nines Uptime”“Sure, they may have made the uptime worse, but remember what we got in exchange – when it’s up, the UI is slower and buggier.”According to “The Missing GitHub Status Page”, which reports historical uptime better than GitHub’s official source, they’ve had 89.43% uptime over the last 90 days. That’s zero nines of uptime. That implies more than 2.5 hours of downtime every day!I dislike Gi
1ヶ月前
記事のアイキャッチ画像
Notes from March 2026
Evan Hahn (dot com)
March always seems to be my life’s busiest month.Things I wrote and made“The two kinds of error”: in my mind, software errors are divided into two categories: expected and unexpected errors. I finally wrote up this idea I’ve had for a long time.“All tests pass” is a short story about a strange, and sorta sad, experience I had with a coding agent.Inspired by others, I published a disclaimer about how I use generative AI to write this blog. My main rule of thumb: the final product must be word-for-word what I would’ve written without AI, given enough time. And I have discomfort about its use.Built llm-eliza, a plugin for LLM that lets you use the ELIZA chatbot at the command line. I think this is my first satirical software project. (Also the first thing I’ve published to the Python package registry, PyPI.)Found the human.json standard, which is “a protocol for humans to assert authorship of their site content and vouch for the humanity of others.” I added it to my site this month.Scrape
1ヶ月前
記事のアイキャッチ画像
All tests pass: a short story
Evan Hahn (dot com)
One night, I wrote a simple tool to pick a random programming language. After shuffling a few times, I landed on Arturo. I decided to try it for fun.What’s Arturo?Best I understand, Arturo is a stack-based programming language. It’s primarily maintained by Yanis Zafirópulos. They published a vision of the language in 2020. Here’s the stated goal from that post:to make something that I myself will use as an easier do-it-all scripting language, you know… automation scripts, templating, latex generation and perhaps help me a bit in the packaging of webview-based applications (think of Electron, but something far more manageable and without having to deal with Node.js and the likes).As a stickler for syntax, I bristle at this writing. That first word, “to”, should be capitalized. In fact, the whole sentence is too long and structured strangely. “latex” should be “LaTeX”.This post, while readable, could be edited for clarity and correctness.Arturo’s website, on the other hand? Flawless! Not
2ヶ月前
記事のアイキャッチ画像
Little web app to pick a random programming language
Evan Hahn (dot com)
I wrote a web app to choose a random programming language.It’s very simple; I hestitate to even call it an “app”! The interesting part was scraping all the languages on Rosetta Code, and even that wasn’t very interesting. But I hope you like it!I learned about a language called Arturo this way, and wrote a short story about that experience.
2ヶ月前
記事のアイキャッチ画像
human.json
Evan Hahn (dot com)
To quote the human.json Protocol:human.json is a protocol for humans to assert authorship of their site content and vouch for the humanity of others. It uses URL ownership as identity, and trust propagates through a crawlable web of vouches between sites.I think this is a neat idea, so I added it to my site. It’s available at evanhahn.com/human.json.For more, see the human.json documentation. And see how I use AI on this blog.
2ヶ月前
記事のアイキャッチ画像
How I use generative AI on this blog
Evan Hahn (dot com)
Inspired by others, I’m publishing how I use generative AI to write this little blog.General feelings on generative AIGenerative AI, like any technology, has tradeoffs. I think the cons far outweigh the pros. In other words, the world would be better off without generative AI.Despite this belief, I use it. I’m effectively forced at work, but I also use LLMs to help write this personal blog. I think they can produce better writing if used correctly.Also: I want to be critical of this technology. Specifically, I want to change the minds of “AI maxxers”, not preach to those who already hate it. If I never used this stuff, AI lovers wouldn’t listen to me. These people are more likely to respect criticism from a daily user who’s sympathetic to the benefits. I think there’s space for critique from a user of a technology they wish didn’t exist.I feel discomfort and tension about this, which I hope comes through.With that, let’s get to the specifics.The specificsMy main rule of thumb: the fina
2ヶ月前
記事のアイキャッチ画像
Introducing llm-eliza
Evan Hahn (dot com)
LLM is a popular CLI tool for talking with language models. I built llm-eliza, a plugin to chat with the ELIZA language model.Usage:llm install llm-elizallm -m eliza "I'm worried about computers."# => What do you think machines have to do with your problem?ELIZA, released in 1966, is a state-of-the-art language model. It offers zero-GPU inference with sub-millisecond semantic throughput, and scores highly on EQ measurements (emotional intelligence).Source code here.
2ヶ月前