Playing with Rust on ARM architecture

An old find I found an old cubieboard3 (cubietruck) collecting dust in a drawer, so I took the chance to try out Rust cross compilation and collect here some notes about the process. Here’s the baby: Give it a penguin First of all, I installed an ARM linux distro on a MicroSD card and started the device: [user@arm ~]$ cat /proc/cpuinfo processor : 0 model name : ARMv7 Processor rev 4 (v7l) BogoMIPS : 50....

March 1, 2024 · Andrea Manzini

Using containers for unit testing of bash functions

Intro Unit testing of Bash functions involves the process of systematically verifying the correctness and reliability of individual functions within a Bash script. While Bash is primarily used for scripting and automation, it’s important to ensure that the functions within your scripts work as expected, especially as scripts become more complex. Unit testing in Bash can help catch bugs and prevent unexpected behavior. Fixing bugs Working on a bugfix for an internal shell script, I wanted to add some unit tests to ensure correctness....

August 17, 2023 · Andrea Manzini

Embed git commit hash into an executable

The problem When we write our programs or libraries, usually we ship to the end user a packaged binary. If a user wants to report a bug or ask for a feature, one of the most important information to have is “which version of the software are you using ?” Since as any good programmer you likely use a source code control system, you should not rely only on the numeric version, but it’s practical to include also the git commit hash of the software you are actually shipping....

July 1, 2023 · Andrea Manzini

Old-School demo effects with Crystal

Nostalgia time! Today I decided to play with Raylib and the Crystal Programming Language. Technically speaking, the “plasma” effect is just a two variables noise function. Some used Perlin Noise, others the Diamond-square algorithm. A more interesting pattern can be obtained with trigonometrical functions, as explained here. The interesting part here is the easyness of graphics programming in a Linux environment with a high level, yet performant and statically typed programming language....

May 18, 2023 · Andrea Manzini