Debriefing Advent of Code 2024

🎄 Intro After a very interesting and fun SUSE hackweek, as every December since some years, I took part to Advent of Code. First of all, I wish to thank Eric Wastl because he’s giving us every year a great and unforgettable advent-ure. [image source: Reddit u/edo360 ] ✨ What’s Advent of Code ? More than just a countdown to Christmas, AoC is a joyful game that invites developers of all age and levels to sharpen their problem-solving abilities and coding skills. Like a virtual advent calendar, AoC presents a new programming puzzle each day from December 1st to 25th. These puzzles are often deceptively simple at first glance, but they quickly unfold into intricate challenges requiring clever algorithms and efficient code. ...

December 26, 2024 · 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’s 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’s 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

a very simple NTP client in D

I am quite a fan of the D programming language and I think it deserves more attention, even if since a few months it’s becoming more and more popular, as it gained top20 in the TIOBE Index for February 2020. As an experiment in network programming, I took this simple NTP client written in C and translated to D ; in my opinion while it’s keeping the low-level nature, it’s shorter, clearer and more effective. It’s only a dozen lines of code, but full program is available on my github; stars and contributions are welcome! ...

February 20, 2020 · Andrea Manzini