New
The latest blog posts to take off on Hacker News. 4,389 posts.
Unit testing a TCP stack (2015)
Thoughts on how to write automated tests for a TCP implementation.
Bringing the Unix philosophy to the 21st century (2019)
JSON output must become the norm for application pipelining. Until then, jc can help.
LLVM Internals: The Bitcode Format
I’ve done a couple of posts on LLVM itself, mostly on things you can do with LLVM or how LLVM represents particular program features.
How Does FaceTime Work?
As an ex-pat living in Denmark, I use FaceTime audio a lot. Not only is it simple to use and reliable, but the sound quality is incredible. For those of you old enough to remember landlines, it reminds me of those but if you had a good headset. When
Speeding up atan2f
`atan2f` is an important but slow trigonometric function. In this article we'll explain how to approximate it, and implement a version 50x faster than `glibc` on batches of inputs.
Exploring Clang/LLVM optimization on programming horror
Recently, I’ve come across a not so efficient implementation of a isEven function (from r/programminghorror ).
EC2 Boot Time Benchmarking
Once I finished writing ec2-boot-bench, the natural next step was to run some tests — in particular, to see how FreeBSD compared to other operating systems used in EC2. I used the c5.xlarge instance type and tested FreeBSD releases since 11.1-RELEASE (the first FreeBSD release which can run on the c5.xlarge instance…
You can list a directory containing 8M files, but not with ls
I needed to list all files in a directory, but ls , find , and os.listdir all hung. This is my story.
Why query planning for streaming systems is hard
Many groups are working on running sql queries in incremental/streaming systems . Query planning in this context is not a well understood problem. This post is a quick pointer towards the many open problems. It's not intended to be complete or authoritative, because I haven't engaged with the problem much beyond…
C++ Exceptions: Under the Hood (2013)
Index A tiny ABI An ABI to appease the linker Catching what you throw Magic around __cxa_begin_catch and __cxa_end_catch Gcc...
The macOS Sandbox File Limit
There has recently been some renewed discussion on Twitter about the limitation that the macOS sandbox places on the number of open files an app can access at once. Apps are still running into problems because of this limitation, and there is not a lot of technical detail available on it outside of Apple, so I’d like…
Increase HTTP performance by fitting in the initial TCP slow start window
Did you know that if your site’s under ~12kb the first page will load significantly faster? Servers only send a few packets (typically 10) in the initial round-trip while TCP is warming up (referred to as TCP slow start). After sending the first set of packets, it needs to wait for the client to acknowledge it…
Simple Systems Have Less Downtime (2020)
The Maersk Triple-E Class container ship is 1,300 feet long, carries over 18,000 containers across 11,000 miles between Europe and Asia, and… Its entire crew can fit inside a passenger van. As a former naval architect and a current marketing consultant to startups, I found that
Leap seconds: Causing bugs even when they don’t happen
Some new minor leap second drama is coming up, and for once we can
How to write slow Rust code
I have recently published a blog post that, as I had expected (actually, hoped for, as that would attract people to contribute to the “study”), generated quite some polemic on the Internet!
Docker in Production: A History of Failure (2016)
Introduction My first encounter with docker goes back to early 2015. Docker was experimented with to find out whether it could benefit us. At the time it wasn’t possible to run a container [i…
Finding Windows HANDLE leaks, in Chromium and others
Three years ago I found a 32 GB memory leak caused by CcmExec.exe failing to close process handles. That bug is fixed, but ever since then I have had the handles column in Windows Task Manager ena…
Laptop to Lambda: Outsourcing Everyday Jobs to Thousands of Transient Containers
This week’s paper review is the second in a series on “The Future of the Shell” (Part 1, a paper about possible ways to innovate in the shell is here ). As always, feel free to reach out on Twitter with feedback or suggestions about papers to read! These weekly paper reviews can also be delivered weekly to your inbox .
Ncdu 2: Less hungry and more Ziggy
Ncdu (NCurses Disk Usage) is a terminal-based disk usage analyzer for Linux and other POSIX-y systems, (formerly) written in C and available in the package repositories of most distributions.
My Fanless OpenBSD Desktop
After the disappointment of my X1 Nano and learning that all future Intel "Evo"-branded laptops would lack S3 suspend, I started thinking about returning to my M1 MacBook full-time or building an OpenBSD desktop. I chose the latter, building my first desktop machine in many years.
Fun with Unix domain sockets
A small enhancement to Datasette this week: I’ve added support for proxying via Unix domain sockets. This started out as a feature request from Aslak Raanes: #1388: Serve using UNIX …
HiveNightmare a.k.a. SeriousSAM – anybody can read the registry in Windows 10
This is the story of how all non-admin users can read the registry — and so elevate privileges and access sensitive credential information…
Clojure builds as an amalgamation of orthogonal parts
The Clojure Core team recently released a new Clojure library, tools.build , that is a culmination of thought around batteries-included build support for Clojure projects. I won’t go into detail around the history and contents of the library in this post because much of that is found elsewhere, including the…
JVM Anatomy Quark #26: Identity Hash Code
"JVM Anatomy Quarks" is the on-going mini-post series, where every post is describing some elementary piece of knowledge about JVM. The name underlines the fact that the single post cannot be taken in isolation, and most pieces described here are going to readily interact with each other.
The Perils of M1 Ownership
The primary admin account on an M1 Mac is its Owner, responsible for authorising the installation and use of second operating systems. Here’s what can go wrong with Ownership.
Inserting a billion rows in SQLite under a minute
This is a chronicle of my experiment where I set out to insert 1B rows in SQLite