Topics /
Software Engineering
The most popular blog posts about software engineering on Hacker News. 21,844 posts.
Compiling a Functional Language Using C++, Part 9 – Garbage Collection
In this post, we implement a garbage collector that frees memory no longer used by the executables our compiler creates.
Fast and Easy Levenshtein distance using a Trie (2011)
<img src="http://stevehanov.ca/blog/images/acer.jpg"/> If you have a web site with a search function, you will rapidly realize that most mortals are terrible typists. Many searches contain mispelled words, and users will expect these searches to magically work. This magic is often done using levenshtein distance. In…
Engineering a Chess Match
This is the story of me trying to win a game of chess against my brother. A single freaking game. What’s so special about it? Am I good at chess? Not at all. Did I improve at my game in the process? Also no. Is it a story about “the journey rather than the destination”? Not really. Did I at least have fun in the…
Chat-tails: Throwback terminal chat, built on Tailscale
Brian Scott made an app that's safe, simple, and educational for kids to chat in, using Tailscale's tsnet and connectivity.
Bump Allocation: Up or Down?
Back in 2019, Nick Fitzgerald published always bump downwards, an article making the case that for bump allocators, bumping “down” (towards lower addresses) is better than bumping up. The biggest reasons for this are bumping up requires 3 branches vs 2 for bumping down and rounding down requires fewer instructions…
The Caves of Clojure
Lately I've had an urge to start playing a few games again, namely Nethack and Dwarf Fortress (the latter being triggered by this book ). Aside from being incredibly fun, they also made me want to play around with writing a roguelike game of my own.
Beyond Exception Handling: Conditions and Restarts
One of Lisp's great features is its condition system. It serves a similar purpose to the exception handling systems in Java, Python, and C++ but is more flexible. In fact, its flexibility extends beyond error handling--conditions are more general than exceptions in that a condition can represent any occurrence during…
Compiling C++ with the Clang API
This post describes how to compile a single C++ source file to an object file with the Clang API. Here is the code. It behaves like a simplified clang executable that handles -c and -S…
Thrashing
I’ve invested in a new odometer to help my car go faster. Accountability is important, and as a driver I believe the most important thing I can do is set measurable, achievable and inspiring goals for the people pushing my car down the road.
Minimal Boolean Formulas (2011)
28 . That's the minimum number of AND or OR operators you need in order to write any Boolean function of five variables. Alex Healy and I computed that in April 2010. Until then, I believe no one had ever known that little fact. This post describes how we computed it and how we almost got scooped by Knuth's Volume 4A…
Demystifying programs that create programs, part 1: A disassembler
People appear to enjoy the blog posts about me porting different compilers to OpenBSD . What I would like to do for the next couple of posts beginning with this one is to take a step back and de-complexify these programs. Both the D compiler and the GNU Modula-2 compiler are highly complex pieces of software. But at…
Version SAT
The package version selection problem is to find a set of dependencies that can be used to build a top-level package P that is complete (all dependencies satisfied) and compatible (no two incompatible packages are selected). There may be no such set, because of the diamond dependency problem: perhaps A needs B and C…
Factorization diagrams in Haskell
Meta Title: Math, Sports Data & IPTV: A Portugal Guide Meta Description: Explore how math-minded sports fans use IPTV in Portugal to watch live football, Champi
How Swiss tables work in Go built-in map
Go 1.24 replaced the built-in map’s bucket-based runtime with Swiss Tables. This article explains groups, control bytes, H1 and H2, probing, table growth, directories, deletion, load factor, and the experimental split-group layout.
Porting to Python 3 Redux
Some updated tips for porting software to Python 3.
Fixing Bad Data in Datomic
The free database designed for immutable values and a time-aware information model.
Assembly Routine for Realtime Decoding of Floppy Data
The little routine presented here is, with all due humbleness, hands down the best code I ever wrote. It is esoteric and might not appeal to the masses, and it certainly has no commercial value. But in terms of personal satisfaction at a job well done, this is about as good as it gets. Here's why:
Designing Resilient Systems: Circuit Breakers or Retries?
Grab designs fault-tolerant systems that can withstand failures allowing us to continuously provide our consumers with the many services they expect from us.
Revisiting the postcard pathtracer with CUDA and Optix
Last week, I revisited Andrew Kensler's business card raytracer to make it run as fast as possible [1] . It was a lot of fun and I learned a lot in the process. I enjoyed it so much that I decided to revisit Andrew's follow up, the postcard sized pathtracer [2] . I spent a lot of time trying to make sense of that code…
Visual programming with Elixir: Learning to write binary parsers (2019)
Visualize binary protocols by building parsers in Elixir.