Recent Articles

A Soil VM for the Linux Kernel

One of the Linux kernel features that have gained the most traction in the last few years is probably (e)BPF. Originally, the "Berkeley Packet Filter" was intended as a means of filtering network packets in kernel mode. However, BPF quickly developed into a fully-featured VM used for all kinds of purposes. The appeal of BPF is not hard to see: It allows you to load kernel mode code at system runtime (similar to kernel modules) while keeping some degree of sandboxing and fault tolerance afforded by the VM. It is much more difficult to break your kernel with a BPF program than with a regular kernel module. One of the most prominent current users of BPF is sched_ext, a framework for writing scheduler implementations in BPF. This lets you easily tinker with your scheduler and see results live and without the risk of breaking your kernel if your implementation crashes....

2024-09-05 #soil #c #linux #kernel

Don't panic! - Or should you?

If you came to Rust from a more conventional programming language, you probably had to adjust to its error handling. Many languages use exceptions for error handling and if you are doing a fallible operation, it looks something like this:...

2023-03-12 #rust #panic #error handling

Updates to the Blog

Recently, I did some major work on the infrastructure of this blog. You may have noticed that the design moved away from GitHub's Primer framework and hopefully that loading times have also improved. In this article, I want to walk you through what changes I made and why I made them....

2023-02-02 #rust #axum #rss #database

Building a Brainfuck Compiler using Cranelift

After studying computer science at a university level for more than four years at the time of writing this article, many concepts and tasks have become demystified for me. The idea of building a website or app seems pretty simple to me now. Even embedded development or Linux kernel modules don't seem like that big of a task. However, compilers still remain a topic I have a huge amount of respect for....

2023-01-09 #rust #brainfuck #cranelift #compiler

Common Concepts - Iterators

Iterators are a concept that almost any modern high-level programming language implements and you have probably used them already, even if you didn't notice. In this article, I want to pull back the proverbial curtain and look at why iterators are so useful and how they work....

2021-09-29 #rust #python #iterator #common concepts

How do Trait Objects work?

As all good deep dives do, this article starts with a slightly contrived code example. Let's say, I have this file containing a number and want to read that. Here's a (very) naive Rust implementation:...

2021-08-27 #rust #trait

A Different Way To Introduce Pointers

Pointers seem to be a topic that many aspiring programmers have issues with. One of the reasons may be that they don't exist in higher-level language like Python or Java where you can just pass around objects and never have to think about whether you hold the object itself or a pointer to it1....

2021-08-21 #rust #c #pointers

Hello, World!

Hi, I'm Clemens and this is my blog. As you may have gathered from the sidebar, I'm a software developer....

2021-08-21