Debugging a problematic build

The Good 馃槆 Today I decided to submit an openSUSE package update for the nim compiler. It went almost all well but unfortunately I faced a problem: on the i586 platform it fails to build. ...

March 14, 2023 路 Andrea Manzini

linux resource control with cgroups

intro Resource isolation is an hot topic these days, and it鈥檚 a problem excellently solved by containerization. However, we can achieve isolation between internal tasks of an operating system by leveraging a technology exposed by the kernel: cgroups. This component is also used by Docker, and other Linux container technologies. Cgroups are the Linux way of organizing groups of processes: roughly speaking a cgroup is to a process what a process is to a thread: one can have many threads belonging to the same process, and in the same way one can join many processes inside the same cgroup. ...

May 3, 2022 路 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

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鈥檚 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鈥檚 keeping the low-level nature, it鈥檚 shorter, clearer and more effective. It鈥檚 only a dozen lines of code, but full program is available on my github; stars and contributions are welcome! ...

February 20, 2020 路 Andrea Manzini