From QEMU Headache to Headless

馃樃 TL;DR Being lazy, I made a tool to run qcow2 images for my convenience. Feel free to use it if you find useful! 馃摉 The back story If you鈥檝e ever typed qemu-system-x86_64 into your terminal, you know the feeling. A creeping dread. A cold sweat. The QEMU headache. It鈥檚 that special migraine reserved for developers who know they鈥檙e about to spend the next ten minutes deciphering their own shell history to remember that one magic flag for networking. ...

September 11, 2025 路 Andrea Manzini

Refactoring the D Koans with metaprogramming

馃挕 The problem Welcome back, it鈥檚 been quite a long time since my last ramblings on the D Programming Language! This post is born from a necessity. An old project of mine, the D Koans, was using an external library to simplify unit testing, which is more or less the core of the whole project. Unfortunately, the library started giving some deprecation warnings when compiled with recent D versions. Since the D Language already has an internal unit testing framework, I thought it would be nice to remove the single dependency and rely only on the standard library. Initially, with some global search/replace, I managed to convert all the tests to unittest blocks. ...

May 21, 2025 路 Andrea Manzini

a 'pythonic' fileinput module for the D programming language

When I write small command line utilities in Python, I often take advantage of the fileinput module that makes working with text files very convenient: the library permits to write quickly and easily a loop over standard input or a list of files, something like perl -a or awk line processing. Then the size of input data grew, and also for a language comparison, I wanted to port my utility in the D programming language, but I cannot find an equivalent module, so I decided to write one myself. ...

January 25, 2021 路 Andrea Manzini

Hijack C library functions in D

I like playing with the D programming language and I wrote this little post to show how it鈥檚 easy to create a dynamic library (shared object, .so) that can be invoked in other programs; to have a little fun we will write a D replacement for the rand() C standard library function call. For your convenience, all the code is also on github Let鈥檚 start with the demo implementation, a C program that calls 10 times the stdlib function rand() to get a random number. ...

March 10, 2020 路 Andrea Manzini