Processes, Threads and the Clone Syscall

I want to explore how threads and processes work on Linux, under the hood, as in-depth as I can. It's been a while since I dove into the kernel. In this series of posts, I'll be writing some potentially insane C code to dive into this.

Continue Reading

Binary Search Tree Trim

This post came from a Leetcode problem in February's daily challenges which I solved. It contains a few things that were issues for me when initially learning Rust, namely, how to properly use Rc and RefCell. Now that I understand them a lot more, I thought I'd write about them.

Continue Reading

Decode A Certificate

From this post on I will leave a note at the end of some sections linking to the latest code up to that point. It will look like this:

That link points to the latest code from the last post.

Continue Reading

Three Bytes To An Integer

This post is a quick overview of how I turned an initially poor solution to a problem into a better one, and the thought process behind it.

Continue Reading

Morning silence and broken drivers

I woke up this morning and booted my desktop. No sound! Some digging around and I noticed dmesg spitting out an error. I don't have that message saved but here are the details from the kernel logs.

Continue Reading

Rust and GitHub Actions

Before we continue implementing our CLI, let's take time to set up some GitHub Actions to build and test our commits. We'll use the actions defined in the actions-rs GitHub Organization.

Continue Reading

A Rust cli for decoding certs

In this series of posts, we'll start to build a simple cli in Rust for decoding X.509 certificates. I'll try to keep it as beginner-friendly as possible, by explaining things as best I can when they may be unclear. Some basic Rust knowledge should hopefully be all you need. Feel free to ask any questions in the comments below!

Continue Reading

Structure of an SSL (X.509) certificate

I've been working on some tooling for pulling certificate information out of the certificate transparency logs on and off for a while. I started looking at this again after a few weeks away from it and I've forgotten quite a lot! I've even forgotten some of the basics of what makes a certificate. In this post I want to dive into the structure of a certificate, what it is made of at a high level. I won't talk much about how certificates are used in protocols (e.g. Transport Layer Security (TLS)).

This post started as a reference for myself but other folks may find it interesting or useful. It has a lot of external references to RFC's which are stored in footnotes.

Continue Reading

Containerizing The JVM: Basic Memory Overview

For the past few years where I work has been running JVM applications on Cloud Foundry. We have come across many issues in relation to memory when running JVM's within memory bounded containers.

Continue Reading

Terraform, Google Cloud And Kubernetes

I've been hacking about with automated infrastructure setup a lot lately. The two tools I've focused on the most are NixOps and Terraform. This post is about the use of terraform on Google Cloud Platform (GCP) to create and manage a Kubernetes Container Cluster.

Continue Reading

Building An Assembler In Haskell: Implementation

In the previous post we wrote a grammar for a simple assembly language, wrote the outline of our parser, derived some properties from the grammar for a simple parser byte and implemented byte. We also saw that there are a few deficiencies in our grammar. In this post we'll implement bytes, menmonic, label and labelAssign. For each parser I'll start with some QuickCheck properties then use those as the spec to implement the parser. Let's get to it!

Continue Reading

Building An Assembler In Haskell

Recently I started building an emulator for the MosTech 6502 Cpu, this post is about the initial stages of building an assembler for a simple assembly language that compiles to runnable 6502 machine code. I've created a repo and updated it as I wrote this post, so at the end of most sections that introduce new code I'll link to a commit which has the code up to that point.

Continue Reading

Some JS and Haskell stuff

Continue Reading

Installing NixOs

Continue Reading