Skip to main content Logo

Quis custodiet ipsos custodes?
Home | About | All pages | Cluster Status | RSS Feed | Gopher

Hi there!

I'm Remy, a developer from The Netherlands with a focus on C++, C, C#, Linux and embedded systems.

I currently work for De Jong DUKE were I develop software for an embedded platform that powers coffee machines. This is a C++ and Qt stack running on Yocto Linux. It controls hardware, runs the UI and has a few utilities for IoT connectivity and configuration. Technology includes Visual C++ (MFC), .NET (Core, Framework and C++/CLI), Flash, Qt and ARM kernel drivers. I was Linux and UNIX sysadmin for over 10 years before I got into development.

To read more or get in touch, click here. This is my personal website, these articles do not reflect or are based on work, opinions or policies of any of my (previous) employers. Any resemblance to reality is pure coincidence.

Latest Items

Rectangle{} debugging in QML, just like printf(), but for QT

08-09-2021 | Remy van Elst

Recently I've been using a debugging technique in QT/QML that I've decided to name Rectangle{} debugging, in the same vein as printf() debugging. QML is a markup language (part of the QT framework) like HTML/CSS, with inline Javascript that can interact with the C++ code of your (QT) application. QML has the concept of anchors for relative positioning of elements. Overall, anchors work quite well, but can get complex when inheretance and complicated layouts come into play. The Rectangle{} style of debugging places a semi-transparent rectangle with a border around your element so you can visualize the positioning and see what effect your changes have. This article shows an example where I recently applied this style of debugging at work in our coffee machine user interface, including some tips to do actual printf() style debugging (but with Console.log).


Relegendable keycaps for your macropad, the best thing ever for developer productivity

06-09-2021 | Remy van Elst

As you might know, I've got a weird keyboard. It is an Ergodox EZ, it's split up in two halves and for me it's the best thing ever to combat RSI. I've also got a weird mouse, a left handed vertical mouse, for the same reason. Even 15 minutes on a regular setup and my wrists and shoulders hurt. The next best thing is my standing desk and number three is having regular breaks with small exercises. One downside to the Ergodox is that you have less keys than on a regular keyboard. This is solved with layers, just like when holding SHIFT or CTRL, a key does something different. SHIFT is the layer for capital letters and symbols, with the Ergodox you can define your own layers. I however cannot get used to layers, not even after 7 years of using the Ergodox. Not a problem, I've got an extra keyboard in the middle, next to my mouse, with 8 or 9 keys just for my most often used shortcuts. It's called a macropad, one I've soldered myself and one I've bought on a well-known chinese webstore. One at work and one at home, both run QMK, firmware that allows me to program the macropad with my own shortcuts. Recently a video from Atomic Shrimp (awesome channel) showed off relegendable keycaps. Those are transparent keycaps with an insert for your own label. Before I had relegendable keycaps, I had regular keycaps for the macropad, for example, the L key sends CTRL+ALT+L to lock the desktop. Now, with these awesome keycaps, I have a dedicated LOCK key. This is such a big quality of life improvement, especially when using the CLion debugger shortcuts. This post covers my usage of the macropads, the re-legendable keycaps and shows you a few pictures of the macropads, both before and after.


Install NetBSD 9.2 on a DEC Alpha CPU with AXPBox

28-08-2021 | Remy van Elst

This is a guide on installing and running NetBSD 9.2 for the DEC Alpha CPU architecture on AXPbox, the open source Alpha Emulator. I recently wrote an article on how to install NetBSD in QEMU for Alpha and since I'm involved with the AXPbox project this article was just a matter of time. This guide shows you how to compile AXPbox and install NetBSD 9.2. It also shows you how to install packages without networking available and includes openssl and sysbench benchmarks, which we compare to NetBSD running inside QEMU.


Install NetBSD 9.2 on a DEC Alpha CPU in QEMU with X11

Published: 18-08-2021 | Last update: 27-08-2021 | Author: Remy van Elst

This is a guide on installing and running NetBSD 9.2 for the DEC Alpha CPU architecture in QEMU, including a GUI (X11 via VNC). It requires you to patch and compile QEMU yourself. It was never possible, until now, to run an actual operating system easily with QEMU Alpha, so this is amazing! It is very cool that Jason Thorpe is putting in so much effort on the QEMU side, as all but one patch is upstream already. Alpha emulation has always been a niche of a niche, so seeing this improve in QEMU is wonderful. OpenVMS does not boot yet since many more things are missing on the QEMU side, but who knows what the future might bring? Maybe even Windows NT for Alpha will boot on QEMU one day?


Remote desktop on NetBSD with Xnest (no VNC)

22-08-2021 | Remy van Elst

After I recently wrote about NetBSD on the DEC Alpha CPU in QEMU, I decided to play with NetBSD some more. One x86_64 virtual machine later, I'm starting to appreciate the beauty and simplicity. Great documentation, both online and via the manpages, low resource usage and boy oh boy does it feel fast. But, you're not here for my love letter, you want to have a remote desktop. In the earlier article, we set up VNC, both because it shows you how to install packages and because native X11 crashes. In this article, we are going to set up X11 forwarding via SSH, but with Xnest instead of VNC. Xnest allows you to have a full desktop / window manager inside a window. If you did a full install of NetBSD, then all you need is included on the system, no need to install any packages. This is an advantage if you are on an architecture that has no precompiled binary packages or if compiling from source takes too long.


Using IceWM and a Raspberry Pi as my main PC, sharing my theme, config and some tips and tricks.

10-07-2021 | Remy van Elst

KDE is my desktop environment of choice. KDE5 is rock-solid, configurable in any way possible and works great. It treats you like a responsible adult instead of a child like GNOME does these days, and after XFCE switched to GTK3, the RAM usage is on-par, more often than not a bare KDE install (Debian or Arch) uses around 300MB ram. This is with Baloo (search indexer) and Akonadi (PIM database backend) disabled. Great default behaviour, low resource usage and enourmous configurability, so why is this post then titled 'IceWM'? At home I'm using a small ARM device (Raspberry Pi 4 with an SSD) as my main computer, and there resources are limited. KDE runs fine, but you notice that it is a bit slower than on my work computer. IceWM on the other hand, uses less than 30 MB of RAM and even less CPU. The program that gives you a desktop background, icewmbg, uses double the RAM of IceWM itself! IceWM, next to Awesome, is one of my favorite window managers, very configurable and provides all I need. This PC doesn't have multiple screens, which would be a bit more of a hassle than with KDE. After switching, the machine feels a lot faster. It's the small details in which I notice it, like text input, a few seconds of lag here and there. This post shows my IceWM config including some options explained, my IceWM theme and a few tips and tricks to configure the rest of the desktop.


Firefox 89 Proton UI Tab Styling

27-06-2021 | Remy van Elst

Firefox 89 recently came out with a 'new' user interface (named proton). I'm not a fan of change because UX/UI people need to make it seem like their job is relevant. Also, the picture they show under the headline '17 billion clicks...' only scares the crap out of me, tracking every move a user makes in their browser seems to me to be a bad idea, but hey, lets see how long Mozilla can continue their war against their own users. Since the about:config flag to disable proton will probably be gone in a few releases I thought, why not try to get used to this new interface. It's so enormous and wide, lacking contrast. As you might have guessed, I cannot get used to the tab bar, so in this post I'll show you how to use the userChrome.css file to make the new tab bar look a bit more like the old tab bar.


Get started with the Nitrokey HSM or SmartCard-HSM

Published: 19-06-2016 | Last update: 20-06-2021 | Author: Remy van Elst

This is a guide to get started with the Nitrokey HSM (or SmartCard-HSM). It covers what a HSM is and what it can be used for. It also goes over software installation and initializing the device, including backups of the device and the keys. Finally we do some actual crypto operatons via pkcs11, OpenSSL, Apache and OpenSSH. We also cover usage in Thunderbird (S/MIME), Elementary Files (EF), a Web cluster with Apache and mod_nss and the decryption of the keys.


Execute a command and get both output and exit status in C++ (Windows & Linux)

07-06-2021 | Remy van Elst

Recently I had to parse some command line output inside a C++ program. Executing a command and getting just the exit status is easy using std::system, but also getting output is a bit harder and OS specific. By using popen, a POSIX C function we can get both the exit status as well as the output of a given command. On Windows I'm using _popen, so the code should be cross platform, except for the exit status on Windows is alway 0, that concept does not exist there. This article starts off with a stack overflow example to get just the output of a command and builds on that to a safer version (null-byte handling) that returns both the exit status as well as the command output. It also involves a lot of detail on fread vs fgets and how to handle binary data.


Exclude lines in less (or journalctl)

23-05-2021 | Remy van Elst

This is a small tip I want to give you when using a less based pager, for example in journalctl or when viewing a file interactively with less or more. You can exclude certain lines that match one or multiple words (or a regex) with a few keystrokes, once less is open. This is one of those tips you never knew you needed, but when you know it, you'll use it frequently. Like in my case today when searching through some logfiles to find out why my database stopped working.


All packages that were present in Ubuntu 18.04 but absent in Ubuntu 20.04

19-05-2021 | Remy van Elst

Otherwise titled Figure out the differences between two apt repositories. Recently I've had a few packages that I often use but were missing from Ubuntu 20.04 LTS. One is ckermit and the other is gnash, both of which I 'converted' to a snap. (In air quotes because I just converted the 18.04 deb). This made me wonder if I could figure out a list of that are present in Ubuntu 18.04, but absent in Ubuntu 20.04. As apt and dpkg are standardized tools and and package formats, we can use a few shell tools to parse the package lists and compare them side by side. This post shows you how to do the comparison yourself and I discuss the removed packages a bit. Some are version increments (like gcc-6 in Ubuntu 18.04 but gcc-7in Ubuntu 20.04), and some are packages that were combined into one instead of split up (like ltsp in Ubuntu 20.04 but a bunch of seperate ltsp-$postfix packages instead in Ubuntu 18.04). Many others are just replaced by newer versions (python-ceph vs python3-ceph). The list of differences is provided as a download, both ways.


View all Items