Top posts
Every blog post that took off on Hacker News, ranked by the votes of its best submission. 21,819 posts.
Writing a TrueType font renderer
Text is the medium of digital interaction, and text rendering has an outsized impact on the overall fit and finish of any system. It therefore pains me that axle has for years relied on a low-resolution 8x8 bitmap font. Let’s fix it! Take a look at the characters composing this sentence. Note the curves, the negative…
An SVG that always shows today's date
For my contact page, I wanted a generic calendar icon to let people view my diary. Calendar icons are almost always a skeuomorph of a paper calendar, but I wondered if I could make it slightly more useful by creating a dynamic icon. Here it is, an SVG calendar which always display's today's date: The background image…
Technical Breakdown of a new NES game written in Lisp
What Remains is a narrative adventure game for the 8-bit NES video game console, and was released in March 2019 as a free ROM, playable in emulator. It was created by a small team, Iodine Dynamics, over the course of two years of on and off development. It’s currently in the hardware phase as a limited batch of…
Scrcpy – An app to display and control Android devices
I developed an application to display and control Android devices connected on USB. It does not require any root access. It works on GNU/Linux, Windows and Mac OS.
Go 1.2 is released
Go 1.2 adds test coverage results, goroutine preemption, and more.
Use Your Type System
Today I'm discussing a trivially simple technique that I've rarely seen used in production codebases. In programming, we often need to deal with simple values that can be represented by simple, generic types built into our programming language or provided by libraries: types like integer, string, or UUID. In any
Zig 0.9.0
Zig is a general-purpose programming language and toolchain for maintaining robust , optimal , and reusable software.
Bash $* and $@ (2017)
In Bash, there are two closely related "special parameters" for accessing how the current script was invoked: $* and $@ . For both variables, the behavior is affected by whether or not the variable is enclosed in double quotes. The following table summarizes all cases:
Better HTTP server routing in Go 1.22
An exciting proposal is expected to land in Go 1.22 - enhancing the pattern-matching capabilities of the default HTTP serving multiplexer in the net/http package.
On Voice Coding
(contains amazon affiliate links) I have had repetitive stress injury (RSI) flareups on and off for many years. I’ve kept them under control mostly through use of a Kinesis Advantage ergonomic keyboard that I’ve had for fifteen years. However, several months ago, I was diagnosed with carpal tunnel syndrome and…
Apple rejected my dictation app for using the accessibility API
Apple rejected WhisperPad under Guideline 2.4.5 for using the accessibility API to paste transcribed text. After an appeal that ended in another rejection, I split it into two versions — a compliant one on the App Store, and the original auto-paste version, direct.
The Journey Before main()
A while back, I worked on a RISC-V-based userspace simulator for fun. In doing so, taught myself a lot more than I wanted to know about what happens in-between when the Kernel is asked to run a program, and when the first line of our program’s main function is actually executed. Here’s a summary of that rabbit hole.
Tiny JITs for a Faster FFI
Can we have a faster FFI for CRuby? Yes.
BB(3, 3) is Hard
I’m excited to share a 3 state, 3 symbol Turing Machine that cannot be proven to halt or not (when starting on a blank tape) without solving a Collatz-like problem. Therefore, solving the \(BB(3, 3)\) problem is at least as hard as solving this Collatz-like problem, a class of problem for which Paul Erdős famously…
Bringing uv and ty together
Experimental uv-ty integration enables first-class support for Python scripts on the CLI and in the editor, and a unified uv check command.
Things I wish I knew about MongoDB a year ago
I’ve used MongoDB for over a year at scale at both Heyzap and Bugsnag and I’ve found it to be a very capable database. As with all databases, there are some gotchas, and here is a summary of the things I wish someone had told me earlier.
Nobody Wants to Learn How to Program
I frequently see a problem when people (especially techies) try to teach programming to someone (especially non-techies). Many programming tutorials begin with basic programming principles: variables, loops, data types. This is both an obvious way to teach programming and almost certainly a wrong way to teach…
PyPy gets funding from Mozilla for Python 3.5 support
"Python 2.x versus Python 3.x": this is by now an old question. In the eyes of some people Python 2 is here to stay, and in the eyes of oth...
Better Database Migrations in Postgres
As your database grows and scales there are some operations that you need to take more care of than you did when you were just starting. When working with your application in your dev environment you may not be fully aware of the cost of some operations until you run them against production. And at some point most of…
scrapscript.py
Scrapscript is a small, pure, functional, content-addressable, network-first programming language. It’s designed to allow creating small, simply shareable programs. The language was created by Taylor Troesh and the main implementation was created by me and Chris.
Writing a Fast JSON Parser
Several holidays ago, I got a bee in my bonnet and wrote a fast JSON parser whose parsed AST fits in a single contiguous block of memory. The code was small and simple and the performance was generally on-par with RapidJSON, so I stopped and moved on with my life.
OpenCV in the browser using WebAssembly and web workers
Learn how to use OpenCV in the web without a lot of headaches.
Handbook of Text manipulation on Unix
This introduction to text manipulation on UNIX platforms provides an overview of some common commands widely available and installed standard on most UNIX-based releases. Many times these standard utilities are ignored in favor of more modern text-processors such as Perl, Python, or Ruby, which are not always…
The mortifying ordeal of pairing all day
I had to confront a lot of my fears about myself, sometimes every day. I had to learn to show someone else all the things I didn’t know, my limitations as a human and a software engineer.
Important Coding Habits
The most important coding habits are those that enable us to enjoy this craft for years to come. Here are tips for programming without pain.