Welcome to my blog.
I work as Scala software developer and system engineer for satellite mission planning. You can find me on GitHub and LinkedIn.
2021-04-01: Secure boot on Arch Linux with sbctl and dracut
Secure boot on Arch Linux with sbctl and dracut
I started playing around with secure boot, with the ultimately goal of setting it up on my laptop. I experimented in a libvirt/qemu VM and to my surprise a custom secure boot is rather easy 1, thanks to dracut and a fairly recent tool named
sbctlwhich just recently had it’s first release.
The Secure Boot page on the Arch Wiki suggests quite the contrary; it’s rather long, very rambling and confusing, recommends a bunch of random scripts from the forums or the AUR which I don’t find particularly trustworthy, etc. No one’s fault for sure, the page was written when proper tooling just didn’t exist, and partly it still doesn’t (for instance,
mkinitcpiostill cannot build unified images and sign EFI binaries). ↩
Arch Linux with LUKS and (almost) no configuration
Installing Arch on a LUKS-encrypted dsik traditionally required a few careful configuration steps to configure the proper root device for booting; if any of these steps was omitted or done wrongly the system would fail to boot. With systemd and dracut however a LUKS-encrypted Arch system can boot safely and reliably without any configuration:
- Dracut builds a unified EFI kernel image including microcode and a generic initrd with systemd and cryptsetup.
- systemd-boot automatically discovers unified kernel images installed by dracut and automatically adds them to the boot menu without explicit boot loader configuration.
- At boot systemd automatically discovers and mounts the root file system following its DISCOVERABLE PARTITIONS specification.
2020-12-13: Wayland & HiDPI
Wayland & HiDPI
So far I never really cared for the difference between X11 and wayland, but I recently realized that wayland supports semi HiDPI setups whereas X11 doesn’t. And it also adds kinetic scrolling with touchpads.
Observations from using systemd-homed for a couple of days:
2020-10-11: My Arch setup
My Arch setup
I like Arch Linux and use it for my systems whereever possible. In this post I’ll briefly go through my preferred Arch Linux setup.
2018-09-16: UTC is the Worst
UTC is the Worst
UTC is the worst; and it’s going to get way worse:
Some time in the 22nd century, two leap seconds will be required every year. The current use of only the leap second opportunities in June and December will be insufficient, and the March and September options will have to be used. In the 25th century, four leap seconds will be required every year, so the current quarterly options will be insufficient. Thereafter there will need to be the possibility of leap seconds at the end of any month. In about two thousand years, even that will be insufficient, and there will have to be leap seconds that are not at the end of a month. In a few tens of thousands of years (the timing is uncertain), LOD will exceed 86,401 s, causing UTC to require more than one leap second per day.
In 40.000 years People will hate us for three things: Global warming, Nuclear waste, and UTC LEAP SECONDS!
2018-02-24: Algebraic Data Types In Scala
Algebraic Data Types In Scala
Object-Oriented Meets Functional
— Scala’s punchline, https://scala-lang.org
Scala claims to unite object-oriented and functional programming, and offers a rich set features from both worlds. Developers coming from object-oriented languages—Java in particular—quickly adopt the object-oriented features of Scala but often struggle to find their way around functional programming. Some aspects of functional programming found their way into object-oriented languages: Higher order functions or combinators like
filterappear in today’s C# or Java code, and even a preference for immutable data structures spreads out into conventional object-oriented languages.
But algebraic data types (ADTs) still do not appear in object-oriented programming although these enable the true power of functional programming: Types well-founded on theory let us model the problem domain in types and thus help us write correct-by-construction code which provides a higher level of compile-time confidence than possible with the type systems of most object-oriented languages. This article aims to help developers from object-oriented languages understand what it means, and become familiar with the basic set of algebraic data types commonly used in functional programming and its appearance in Scala.
2018-01-09: SOAP, a convenient interface
SOAP, a convenient interface
Last week I got a big PDF with documentation about the almost-but-not-quite-entirely-unlike-REST HTTP API of an external partner. In the section about restrictions of their HTTP API:
For this functionality we recommend to use the SOAP API. This convenient interface offers almost unlimited possibilities to integrate Foo.
Emphasis mine. I have different memories of SOAP.
2017-12-10: Decode irregular JSON with Circe
Decode irregular JSON with Circe
The popular CI server Jenkins has a JSON API to access builds, but its JSON has a rather strange shape: Relevant information sits in a generic
actionsarray containing objects of various different shapes (even empty objects for whatever reason):
2014-08-12: Emacs script pitfalls
Emacs script pitfalls
Emacs isn’t just an editor, it’s an entire Emacs Lisp interpreter and environment. We can use Emacs Lisp not only to extend and customize our beloved editor, but also to write entire programs and applications. Nic Ferrier’s elnode server is the most ambitious Emacs Lisp application of this sort, but we can start at a smaller scale and try to write our shell scripts and tools with Emacs Lisp.
However, it turns out that writing programs in Emacs Lisp is more intricate than it looks at a first glance. Emacs decades-long history as interactive application have left deep marks in Emacs and Emacs Lisp, which make independent noninteractive scripts difficult.