Writing Hello World in C Without the Dynamic Linker

As C/C++/Rust/OCaml/(insert other language usually compiled to native code here) programmers, when writing code targeting Linux, our toolchains usually produce as final output, a dynamically linked binary in the ELF format. While this covers almost all use cases when writing code meant to run in userspace, there are some circumstances in which it is necessary to write code that runs without the dynamic linker present.

More …

Fast Chess Move Generation With Magic Bitboards

One of my larger personal projects is a chess engine called Shallow Blue that’s been under on and off development since I started it a few years ago. Almost since I started writing Shallow Blue, magic bitboards have been sitting in the feature backlog. That changed the past few weeks as I had some time off school for the holidays. Impressed by the cleverness of the trick employed by magic bitboards, I figured it would make a good subject for a blog post.

More …