Programming
Essays on data structures, parsing, ID schemes, address spaces and the performance of everyday code.
Articles
Generating short ordered IDs with any insertion pattern
Say you have a set of elements which need to be ordered, and you want to give each element an ID which reflects its position in the ordering.
Counting up to 2^256 unique values using only O(1 byte)
There are occasions when you need to know how many unique entries there are in an array or how many unique values have been seen in a stream, but do not need the exact number.
On address space sizes
We are well into the 64-bit era, and a 64-bit pointer allows for an addressable space of 2^64 bytes, or 16 exabytes.
Some JavaScript performance comparisons
In JavaScript there are often many ways to achieve the same common things
Exceptional Parsing
Parsing is one of those intermediate-level algorithms, which, like state machines, you may not use on a day-to-day basis as a developer but their understanding helps with your…
Composable typechecking in JavaScript
If you are working in pure JavaScript on a project of any reasonable size, type errors will often become a major source of pain unless you have a process for spotting them…
Comparison of JavaScript binary data objects
There are a set of objects for dealing with binary data in JavaScript, which are slightly different on NodeJS and in the browser.
A pure JavaScript CPU emulator
A CPU is a device which takes instructions from RAM and performs actions based on those instructions.