Articles about C
Articles about or around the C programming languageXMacros
- 01 May 2026
- Manuel Capel
- Tags: C programming
XMacros are a way for the C preprocessor to process lists. They are quite unknown. Many would probably qualify them as Macro wizardry, but their logic makes sense once understood. Anyway, it’s a good trick to know. We will see how it work along a simple example: find the position of the first bit set in a 8-bits integer. This is called ffs (find first set) or clz (count leading zeros).
continue...Solver for Des Chiffres Et Des Lettres
- 17 Apr 2025
- Manuel Capel
- Tags: C programming
Des Chiffres et des Lettres was a French TV game broadcasted from 1965 up until 2024, means almost 60 years long, a record. It consists in two games: chiffres, where you get a set of number and combine them to reach a target number as close as possible; and lettres, where you combine a set of letters to get the longest possible word. This article presents a solver for those games implemented in C.
continue...Hasenspiel - Escape the White Rabbit
- 07 Jan 2025
- Manuel Capel
- Tags: RL C programming
Hasenspiel (German for “Rabbit Game”) is relatively simple game played on the chess board with 5 pawns. The goal is for the white pawn a.k.a. the rabbit to escape the opponent pawns. It’s a funny and not so trivial game. In this article, we will see how to completely solve it with an efficient implementation in C.
continue...Build a Minimal Webserver in C
Machines are already strong by themselves, but their potential gets truly unleashed when they can communicate with each other. Web servers enable this communication by taking requests from and sending back responses to other machines. Here we will see how to implement a very simple web server in C for Linux. You can find the complete code for it on this repo.
continue...