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.
Every blog post that took off on Hacker News, ranked by the votes of its best submission. 21,843 posts.
In this post, we implement a garbage collector that frees memory no longer used by the executables our compiler creates.
<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…
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…
Brian Scott made an app that's safe, simple, and educational for kids to chat in, using Tailscale's tsnet and connectivity.
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…
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.
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…
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…
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.
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…
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…
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…
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
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.
Some updated tips for porting software to Python 3.
The free database designed for immutable values and a time-aware information model.
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:
Grab designs fault-tolerant systems that can withstand failures allowing us to continuously provide our consumers with the many services they expect from us.
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…
Visualize binary protocols by building parsers in Elixir.
TensorFlow release 1.4 is now public - and this is a big one! So we're happy to announce a number of new and exciting features we hope everyone will enjoy.