Top posts
Every blog post that took off on Hacker News, ranked by the votes of its best submission. 14,540 posts.
Full Unicode Search at 50× ICU Speed with AVX‑512
ICU gets Unicode right and pays for it. This post shows a different approach: fold-safe windows, SIMD probes, and verifiers for fast UTF‑8 search.
Implementing Logic Programming
I just think it's neat!
Explaining my fast 6502 code generator
To learn how optimizing compilers are made, I built one targeting the 6502 architecture . In a bizarre twist, my compiler generates faster code than GCC, LLVM, and every other compiler I compared it to.
Sierpiński Triangle? In My Bitwise and?
Exploring a peculiar bit-twiddling hack at the intersection of 1980s geek sensibilities.
PostgreSQL Basics by Example
Connecting to a database 1 2 $ psql postgres # the default database $ psql database_name Connecting as a specific user 1 2 $ psql postgres john $ …
Of SVG, Minification and Gzip
Smaller files are downloaded faster, so making an asset file size smaller before sending it to a client is a good thing to do.
A programming language from scratch: 3 steps to an interpreter
A little while ago I wrote about 16bitjs, a 16 bit virtual machine written in javascript. It implemented a custom CPU architecture and assembly language, assembler, and debugger. I had the thought …
Markov Chains for programmers
Materials for book: “Markov Chains for programmers”
Eller’s Algorithm (2012)
Eller's algorithm creates 'perfect' mazes, having only a single path between any two cells, one row at a time. The algorithm itself is incredibly fast, and far more memory efficient than other popular algorithms (such as Prim's and Kruskal's) requiring storage proportional to only a single row. This makes it possible…
Lost Chapter of Automate the Boring Stuff: Audio, Video, and Webcams in Python
The third edition of Automate the Boring Stuff with Python is now available for purchase or to read for free online . It has updated content and several new chapters, but one chapter that was left on the cutting room floor was "Working with Audio, Video, and Webcams" . I present the 26-page rough draft chapter in this…
Building a Distributed Log from Scratch: Data Replication
In part one of this series we introduced the idea of a message log, touched on why it’s useful, and discussed the storage mechanics behind it. In part two, we discuss data replication. We have our log. We know how to write data to it and read it back as well as how data is persisted. The caveat to this is, although we…
DRY Is a Trade-Off
DRY, or Don't Repeat Yourself is frequently touted as a principle of software development. "Copy-pasta" is the derisive term applied to a violation of it, tying together the concept of copying code and pasta as description of software development bad practices (see also spaghetti code ).
Open Source .NET three years later
A little over 3 years ago Microsoft announced that they were open sourcing large parts of the .NET framework and as Scott Hanselman said in his Connect 2016 keynote, the community has been contributing in a significant way:
C23: A Slightly Better C
One of the established and most popular programming languages is the C programming language. It is relatively easy to learn, and highly practical. Maybe surprisingly, the C programming language keeps evolving, slowly and carefully. If you have GCC 13 or LLVM (Clang) 16, you already have a compiler with some of the…
Getting syntax highlighting wrong
Applying human ergonomics and design principles to syntax highlighting
Huge Binaries
A problem I experienced when pursuing my PhD and submitting academic articles was that I had built solutions to problems that required dramatic scale to be effective and worthwhile. Responses to my publication submissions often claimed such problems did not exist; however, I had observed them during my time within…
Coarse is better
Make AI weird again.
Why do we keep building rotten foundations?
APIs are like bones: sometimes you have to break them to mend them, and it fucking hurts. It’s not a perfect analogy, but it reflects an observation of (superficially) pragmatic behavioural t…
Build Your Own FPGA (2012)
The Open 7400 Logic Competition is a crowd-sourced contest with a simple but broad criteria for entry: build something interesting out of discrete logic chips. It's now in its second year, and this time around I was inspired to enter it.