Skip to main content

Raymii.org Raymii.org 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

QML Drag and Drop including reordering the C++ model

21-01-2022 | Remy van Elst

This guide shows you how to implement drag and drop in Qml including how to reorder the backing C++ (QAbstractListModel derived) data model. Most QML Drag and Drop examples you find online, including the Qt official example, use a ListModel in the same Qml file which has the data, but no example I found actually reordered a C++ model. This example has a simple MVVM (model-view-viewmodel) C++ structure and a QML file with a drag and drop grid. The dragable example items come from the C++ model, which is derived from QAbstractListModel.

Read more...

Selling my own GPL software, part 1: a lot of hurdles

24-12-2021 | Remy van Elst

For as long as I can remember I've got this dream of a passive income software project. At first I thought of it as a hosted service, probably something monitoring related, or high-available cloud hosting-ish. That's the kind of stuff a sysadmin dreams of.

Now that I'm a developer for a couple of years, exposed to a few different languages, design patterns and software architectures, that idea is still lingering around, but no longer focused on a hosted piece of software. The web is just too fast paced, bloated and way too much work compared to a piece of cross platform software.

In my spare time I've been chugging along on a piece of software, which I'm contemplating selling. In my case the commercial aspect is made more difficult because I also want to release the software with a GPL license.

This post describes the initial hurdles I'm encountering, next to just programming the software.

Read more...

The yearly backup restore test

05-11-2021 | Remy van Elst

In my calendar there is a yearly recurring item named 'backup restore test'. This is an article on my backup scheme and the yearly restore test, covering all aspects, such as data validation, backup scheme, time and cost involved. I started doing personal restore tests each year around 2012, when I did them for my first job. At work back then, the restore test was monthly, for my own backups I decided that yearly was okay enough, since the backup scheme, software and provider do not change. I'm using Azure cold storage for my (locally encrypted) personal backups, since it's both cheap and supported by my local NAS.

Have you done your backup restore test recently?

Read more...

Responsive QML Layout (with scrollbars)

05-10-2021 | Remy van Elst

In this article I'll show you how to make a responsive layout in Qt / QML that automatically adjusts the amount of columns and rows based on the window dimensions, including scrollbars for when the content does not fit inside the window. This also works if you have a portrait and landscape orientation of your application, since the screen or window dimensions will be different across those two builds. I also explain how the dynamic resizing works with an explanation of property bindings in QML and as a bonus this works on mobile (Android/iOS) as well.

Read more...

Render markdown in a Qt QML Text or TextEdit control

04-10-2021 | Remy van Elst

I recently discovered that Qt QML can render Markdown in Text{} controls. This snippet shows you how to do that including a screenshot and demo QML app.

Read more...

Qt/QML setContextProperty is a bad way to expose C++ classes to QML, use these better alternatives!

03-10-2021 | Remy van Elst

In this article I'm going to discuss the different ways to expose a C++ class to QML. 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. There are multiple ways to expose a C++ class to QML, each with their own benefits and quirks. This guide will cover three integration methods, qmlRegisterSingletonType<>, rootContext->setContextProperty() and qmlRegisterType<>. We'll end off with a simple benchmark showing the difference in startup times between the first two.

Read more...

Expose any Qt5 program via VNC

20-09-2021 | Remy van Elst

A few months ago I wrote about [Microsoft Teams running on a coffee machine. That was a fun work experiment where I got a VNC client running on the Linux-based coffee machines that we produce at work. In the comments on hackernews Jean-Michaël Celerier pointed me to the reverse, a way to expose any Qt application over VNC. This article shows you how I use this feature to work on our Qt 5 based coffee machine frontend as well as how you can use this on your machine, for example, to expose Dolphin, the KDE file manager, over VNC.

Read more...

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).

Read more...

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.

Read more...

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.

Read more...

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?

Read more...

View all Items