It is hard to believe but we are already one month into 2024. January has flown by for me and I haven’t done a good job at keeping up with news sites… but I have been reading them on and off and I have collected a small set of interesting articles.
To everyone new around here, hello and thanks for subscribing! For some context, what follows is my manual selection of cool articles, videos, and projects I stumbled upon during this time period. However, this is not just a dump of links: each link is accompanied by a short commentary to justifies why I thought the material was interesting, why it is relevant to this publication and, more importantly, an attempt to nudge you into reading the source.
Let’s get to it.
“On Microsoft’s vision for Windows”
By @luciascarlet on January 2nd, 2024
This little Twitter rant aligns well with my own views of Windows: I have come to like Windows 10 and 11 as you can see from my previous lengthy review of the OS and my review of its history book, and I do think there are very interesting technical feats within this system. However, I do not like where the platform is headed with the constant enshittification due to the increased coupling with Microsoft’s own cloud services and the recent AI push.
The same applies to macOS by the way: the problems aren’t as pronounced as on Windows, but its progressive iOSification removes freedoms in you can use your own machine. These issues combined have actually pushed me back into the Linux desktop… and it’s a relief to not see a constant stream of attention-grabbing notifications and ads, and to have regained full control of my machine.
“Introduction to Plan 9 “
By the 9front project
Plan 9 is an interesting creature. It’s the OS that should have succeeded Unix but never did: it was a little too different a little too late. This document provides an explanation of what Plan 9 is, why it never “evolved”, and why you should (not) use it.
But do you want to see something cool? Parts of Plan 9 are still with us today. If you happen to be on a Windows desktop running WSL 2, go type this right now and behold:
$ ps ax | grep [p]lan9
4 hvc0 Sl+ 0:01 plan9 --control-socket 5 --log-level 4 --server-fd 6 --pipe-fd 8 --log-truncate
That’s right. WSL leverages the Plan 9 file server to let Windows access files within the WSL 2 virtual machine. Oh wait, is this an idea for a future Blog System/5 article? You bet!
A blog on operating systems, programming languages, testing, build systems, my own software projects and even personal productivity. Specifics include FreeBSD, Linux, Rust, Bazel and EndBASIC.
“Why Unix’s lseek() has that name instead of seek()”
By Chris Siebenmann on January 2nd, 2024
System calls are sometimes oddly named—like the well-known mistake of dropping the
e from the
creat syscall. But why is the naming of
lstat not consistent with
lseek? Read on for an interesting history review to reveal the answer.
“When random isn’t”
By Orson R. L. Peters on January 10th, 2024
Generating random numbers on deterministic machines—like computers are—is an interesting problem. While it is possible to come up with a good random number generator, most
rand-like functions in most languages use a pseudo random number generator. What this means is that the numbers they produce is deterministic given a specific seed.
In this article, the author explains how they used this deficiency to break the communication barrier between the sandbox that World of Warcraft uses to run untrusted code and the user-provided add-ons that run under said sandbox. There is “some math” in there, but you can skip over it and still understand the basis of this sandbox exploit.
“Understanding x86_64 Paging”
By Justin Miller on December 27th, 2023
Knowing the mechanics of virtual memory is a necessity for any systems engineer. Knowing the internals of paging, however, is optional but still a very useful piece of knowledge to carry around. This article equips you with that.
Myself, I knew how 32-bit paging worked but never bothered to learn how it did in 64-bit x86 chips. The fact is that there are some important differences because the approach that works for a 32-bit address space just doesn’t with a 64-bit address space: the page tables would take way too much memory!
So, read this article for more details. I found the text somewhat hard to read, but it’s full of diagrams and detailed information so it’s worth a glance.
“Passing nothing is surprisingly difficult”
By David Benjamin on January 175h, 2024
Slices are partial views into an existing array: instead of performing a costly copy of a part of the array into a smaller array, you represent the “slice” as an address of a first element and a length specifying how many elements follow. Slices are traditionally represented as a “start pointer + count” pair but there are other representations possible.
So, the question is: how do you represent empty slices? There are different choices, and different languages pick differently. This post dives into how C, C++, and Rust represent slices, and how Rust’s choices make it impossible to pass those slices to C and C++ without runtime checks and conversions.
“From 0 to 1 MB in DOS”
By yours truly on January 17th, 2024
Last month I wrote a pretty successful article reminiscing the IDEs we had in the DOS days 30 years ago, and that article made me want to play with and write about DJGPP. However, while writing that other draft, I realized I needed to clarify some concepts first for my own knowledge.
Those concepts were around how DOS managed memory back in the day and what all the EMS, XMS, HMA and other acronyms meant. I spent various hours researching the topic and then wrote a summary describing the many ways DOS programs squeezed the most of the first megabyte of the address space. By the way, I discovered draw.io along the way and I regret not having tried it much before; it’s great.
“Reading QR codes without a computer!”
By Piko and blinry sometime in December 2023
I remember learning how to read barcodes and, I think, QR codes back in school in the early 2000s… but obviously I had forgotten everything about it. This article is a work of art that explains how QR codes work. I’m… horrified by how long the authors must have spent preparing all the beautiful diagrams that accompany the article.
By David Soria Parra on January 22nd, 2024
I am a fan of leveraging the type system to narrowly model the different concepts in a problem domain. Passing around integers or strings that mean different things as raw types has caused serious production outages in the past, and in my software I like to prevent against those. Traditionally I’ve used Rust’s “new type” idiom, but this article presents a neat trick that seems easier to maintain than that one. If anything, it helps keep all of your types consistent with each other from an API perspective.
“Why do people post on [bad platform] instead of [good platform]?”
By Dan Luu on January 28th, 2024
Deciding where to publish content is something I’ve struggled (and I’m still struggling) with. No matter the medium, there is a trade off between convenience, familiarity and/or personal preference vs. audience. For example, while I’m enjoying my move to Substack from a self-hosted blog because of the sustained subscriber growth, I’m also well-aware that some of my past readers may not like this. Or as another example, whenever I have posted a Twitter thread, I’ve had to go through great lengths to also post the same content here to avoid it being slurped into “thread reader” apps.
This article does a nice job at diving into why people may be choosing certain publishing mediums and why it’s impossible to please everyone. I still don’t like the trend to move to video though.
By Koen van Glist on January 28th, 2024
A mesmerizing 2-player pong-like game where the board is divided in two territories and the bouncing balls try to gain the opposite territory by bouncing onto it.
I found this so neat that I hacked a very quick’n’dirty clone with EndBASIC. Launch it in your browser by clicking on jmmv/pongwars.bas and press any key to drop into the interpreter and explore!