About a week or two ago I started following some how-tos on the internet for building kernels and/or hypervisors in Rust. It’s been a fun adventure and I thought I would compile my notes together in case someone wants to follow along or see how an OS starts up. Most of the examples out (probably to keep things simpler…) are based on x86_64 hardware. To spice things up a bit I decided that I’d be targeting aarch64 (ARMv8) instead using QEMU’s virt board.

The intended audience here is someone with a background in programming, but not necessarily kernel programming or C. A familiarity with assembly syntax is helpful, but certainly not required. The same can be said for a working knowledge of Rust. This is mostly a vehicle to talk about all the exciting concepts in lower-level programming as opposed to a “Here’s how to write Rust.” …

Image for post
Image for post
Amazing Stories!

Sometime ago I made a personal project out of reading the list of Hugo award winning science fiction novels. I don’t remember exactly when it started, but as I write this I’m working my way through the 1990s. I offered to put together a reading list for friends based on the entries I’ve read so far with some light commentary on which ones I’d recommend and which ones I’d skip.

Me as a reader & Who this is for

I’m going to qualify this entire list with the kind of reader I am. First off, I tend to read short fiction and novellas. Shorter is better and I am immediately skeptical of any book over 250 pages. I also distrust books that are meant to be a series. Concise is good. I do not, however, have any particular preferences on hard science fiction versus “softer” science fiction. …

I’ve been meaning to write a primer on certificates for about a decade now. Certificates are a ubiquitous piece of modern engineering infrastructure that we collectively spend very little time discussing. Hopefully I can demystify some of the inner-workings so the next time you get a goofy certificate error you’ll at least have something to refer back to.

This might become “Part 1” of a larger set if you find it helpful :-). So feel free to offer suggestions + feedback.

The Certificate File

Certificates essentially come in two flavors: DER and PEM. Telling them apart is very easy. …

Lately I’ve been working on a project to explore the x86–64 instruction set. Part of this exploration requires using a disassembler to get the actual instructions that comprise a piece of software. That leads to the question “Where exactly are the instructions that make up my program?”

Let’s say you have a program written in C like the following

#include<stdio.h>int main() {
printf("Hello World!\n");
return 0;
Image for post
Image for post
Print the program, compile it, run it.

The first leading question is: what exactly is a.out anyway? In most circles you’ll hear it called a binary but that’s not the whole picture. Specifically, it’s an Executable & Linkable Format file also called an elf file. …

Image for post
Image for post
Checking some results in Ghidra

Recently I had a project develop that had some fairly unique requirements. First off, it’s a solid candidate for Rust. Second, because of some, erm, strange deployment situations… we needed a toolchain that supported arbitrary out-of-tree LLVM passes. So this work grew out of a viability test. Suffice it to say, I am not a rust expert by any means and there might even be a better way of doing this. That being said, it’s also a fun tour through LLVM internals and other systems concepts. …

About a year and a half ago I built myself a tool I call “translation workbench” to make reading manga (in its original Japanese) easier. Going from textbook Japanese to colloquial Japanese is a hell of a jump and there’s really nothing quite like manga for absorbing common speech.

The core problem though is, unless you can read all 2,136 常用漢字, you’re going to spending 90% of your time in the dictionary. That is assuming you have no problem with the grammar.

So I did what I do. I built a tool! Take a picture of a page, upload it into translation workbench, splash some ML+computer vision on it to detect the page + apply keystone correction, run it through a preliminary translation engine, ENHANCE, select regions of interest + apply layout. Voila, you now have all the extracted kanji in a place where in-browser tools like rikaikun can drastically speed up reading time. …

Let’s talk about security. One of the criteria I wanted to bake into this project early on was security. I’ve worked in security off and on again all over my career. Which I say only to add emphasis that writing about embedded security is extremely obtuse. It exists in a state somewhere between “non-existent” and “imagine Ikea instructions for a car engine.” I struggled for days on how to layout most of this information and I’m still not thrilled with it… so there’s likely going to be a lot of additional writing and probably a revision coming. …

In a former life I spent a lot of time thinking about how to turn an empty room with chillers, some dark fiber, and a pallet of blank servers into a functioning production datacenter. Though I just tell people to use The Cloud anymore, applications that can’t use the cloud still exist. In particular, what about deploying temporary infrastructure into the world where either power or connectivity are disrupted or entirely unavailable? I made a small project of trying to find a way to create a small, shippable mini datacenter made from Raspberry Pi units that would be remotely manageable without having hands-on access. …

Technical interviewing is profoundly broken. The problem isn’t constrained to either the job seeking or the job hiring side. For those looking for a job it frequently boils down to little more than an algorithm lottery on how quickly you’ll spot the “ah ha” moment. On the hiring side it amounts to a mountain of weak signals and going through interview wrap ups with a lot of “I’m just not sure.” Luck is a considerable factor on both sides. The result is a tremendous amount of energy on all sides being wasted. Why is this the case though? Largely it’s a combination of ossified bad practices, lack of defining the skills we actually need, and a misunderstanding of what problem solving really is. This is about the concrete steps of interviewing, but that being said, we must take a large detour through the realm of problem solving to make it sufficiently coherent and relevant. Also, this is not about weeding out negative candidates faster- it’s about reducing false-negatives (people you should have hired but didn’t) and false-positives (people you did hire but shouldn’t have) through improved signaling and reduced guessing. …


Chris Chandler

Software engineer, investor, and aspiring humanitarian. Trying to find ways to make things a little bit better. https://squanderingti.me

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store