New
The latest blog posts to take off on Hacker News. 4,387 posts.
32 MiB Working Sets on a 64 GiB machine
Memory is a relatively scarce resource on many consumer computers, so a feature to limit how much memory a process uses seems like a good idea, and Microsoft did indeed implement such a feature. Ho…
Adding runtime benchmarks to the Rust compiler benchmark suite
This post describes the design and implementation of a runtime benchmark suite for measuring the performance of Rust programs, which was recently added into the Rust compiler suite. I have recently blogged about how the whole benchmark suite works, so feel free to read that post first if you want to gather a bit more…
50 years later, is two-phase locking the best we can do?
Two phase locking (2PL) was the first of the general-purpose Concurrency Controls to be invented which provided Serializability. In fact, 2P...
OpenBSD PF versus FreeBSD PF
I encountered yet another discussion about OpenBSD PF versus FreeBSD PF . For those who are new to the discussion: OpenBSD developers created PF in 2001, and it rapidly improved to become the most approachable open source packet filter. FreeBSD ported PF over to its kernel in 2004, with occasional updates since. Today…
Writing a debugger from scratch: Breakpoints
(New to this series? Consider starting from part 1) At the end of the last post, we started to get some interesting functionality with the ability to resolve addresses to names in a module. This was the last functionality missing before we could implement breakpoints! This part adds the ability for DbgRs to set…
Arena allocator tips and tricks
Over the past year I’ve refined my approach to arena allocation . With practice, it’s effective, simple, and fast; typically as easy to use as garbage collection but without the costs. Depending on need, an allocator can weigh just 7–25 lines of code — perfect when lacking a runtime . With the core details of my own…
Introduction to sysclean(8)
sysclean(8) is a system tool designed for help system administrator to keep their OpenBSD clean after upgrade.
Exploring Linux command-line space time
I was curious to explore how long a program takes to run, how much memory is used over time, and what processes/threads are spawned. To provide answers I wrote a tool, which I named st . Here are a few things I looked into.
Batch size one billion: SQLite insert speedups, from the useful to the absurd
A little-discussed method enables inserting rows with bound data into SQLite faster than any existing technique. This novel method is then discovered to have a drawback that makes it generally unusable. The rest of this article explores how to get the best insert performance out of SQLite generally; what's in your…
PostScript’s sudden death in Sonoma
For the last 39 years, PostScript has been at the heart of the Mac, bringing desktop publishing, fonts, and the LaserWriter and other printers. It has been removed from Sonoma.
Unpacking Elixir: Resilience
The nine nines. 99.9999999% of uptime. Whether the AXD301 actually deserves to be held up as a system of nine nines seems debatable. I am not particularly interested in that debate. Erlang has a strong record for reliability and a design intended to help you as a developer and operator achieve your nines. Maybe just…
Fiber in C++: Understanding the Basics
Fiber, a less known concept compared with coroutine, is a pretty powerful addition to cooperative multitasking. As a graphics programmer in game industry, I totally appreciate the great flexibility that fiber brings on the table. As a matter of fact, I feel the tech is a little bit underappreciated due to the lack of…
Parsing integers quickly with AVX-512
If I give a programmer a string such as "9223372036854775808" and I ask them to convert it to an integer, they might do the following in C++: std::string s = .... uint64_t val; auto [ptr, ec] = std::from_chars(s.data(), s.data() + s.size(), val); if (ec != std::errc()) {} // I have an error ! // val … Continue reading…
Install Windows the Arch Linux Way
Installing Windows strictly through the Command Line is an important tool to have. If windows changes the installer or out of box experience, you can bypass any changes with this guide!
RabbitMQ vs. Kafka – An Architect’s Dilemma (Part 1)
RabbitMQ and Apache Kafka might appear similar but serve very different needs. Read to learn and make an informed decision suitable for your needs.
Unix shells are generally not viable access control mechanisms any more
You're probably reading this page because you've attempted to access some part of my blog (Wandering Thoughts) or CSpace , the wiki thing it's part of. Unfortunately you're using a browser version that my anti-crawler precautions consider suspicious, most often because it's too old (most often this applies to versions…
How FoundationDB works and why it works (2021)
FoundationDB is a very impressive database. Its paper won the best industry paper award in SIGMOD’21. In this post, I will explain, in detail, how FDB works and discuss a few very interesting design choices they made. It’s a dense paper packed with neat ideas. Many details (sometimes even proof of correctness) are not…
Introduction to Immutable Linux Systems
In this article, you will learn what stands behind the label immutable when it comes to Linux systems
Running one’s own root Certificate Authority in 2023
A tale how running your own x509 root CA – for internal services – changed in the last 20 years.
Hypervisor from Scratch (2022)
We write about Windows Internals, Hypervisors, Linux, and Networks.
S32 Unix Clock
I've been thinking I should do more "short form" blogging. Something between microblogging and regular blogging. This is me doing that!
Death by a Thousand Microservices
The software industry is learning once again that complexity kills
Unix Domain Sockets vs Loopback TCP Sockets (2014)
Two communicating processes on a single machine have a few options. They can use regular TCP sockets, UDP sockets, unix domain sockets, or shared memory. A recent project I was working on used Node…
RISC-V SBI and the full boot process
Detailed explanation on how RISC-V boot process works and what role SBI has in the RISC-V software stack. Concrete example with OpenSBI.
How does Linux NAT a ping?
A few months ago, I found myself wondering how a command like ping 1.1.1.1 works from within a private network. In most private networks, multiple hosts connect to the Internet through a router. For IPv4, the router performs network address translation (NAT) by rewriting the original host’s source address to the…
Why you might want async in your project
There is a common sentiment I’ve seen over and over in the Rust community that I think is ignorant at best and harmful at worst.
Using LD_PRELOAD to cheat, inject features and investigate programs
This post assumes some basic C skills. Linux puts you in full control. This is not always seen from everyone’s perspective, but a power user loves to be in control. I’m going to show yo…