Links: November 2023 edition
Interesting articles, videos and projects from this time period—with commentary
Welcome to the second edition of my “interesting links” recap, this time covering the month of November 2023.
For context, what follows is my manual curation of cool articles, videos, and projects I stumbled upon during this time period. But this is not just a dump of links: each link is accompanied by a 1-paragraph commentary that justifies why I thought the material was cool, why it is relevant to this publication and, more importantly, an attempt to nudge you into reading it.
Before we dive in, two quick things. First: I want to explicitly acknowledge all the new subscribers that have joined us since the last post on Windows NT landed on some major news sites. Thank you; I hope you find this interesting and a good reason to stick around. And, second…
Articles
“Lenovo ThinkPad T14s G4 review: Business laptop is better with AMD Zen4” by Andreas Osthoff on November 1st, 2023.
I have been eyeing the T14s that Costco has on sale for a while and, while I’m not going to get it because of the “low” screen resolution, I had to read through this review. And oh wow, what an amazing, in-depth description of the device. I’m now waiting for the X1 Nano to be in stock again…
“Why ACPI?” by Matthew Garrett on October 31st, 2023.
A high-level overview of what ACPI is, why it was needed to replace APM, and how computers would look like in a world without ACPI.
“Sometimes, it is a compiler bug” by strager on May 25th, 2022.
Great debugging story of an obscure problem that the author hit when seeing someone else write a bug in their code, suggesting that they install a VSCode extension that would have highlighted the bug, and watching in real time how the extension then pointed at a non-existent bug. I recall hitting some compiler bugs myself (a similar issue with Rust’s incremental compilation, and various ICEs) but I have never had the patience to dig for an answer.
“Intel 80386, a revolutionary CPU” by Christophe Meneboeuf on September 2nd, 2023.
A good story on how the 80386 came to be and why it was important at the time. I recall reading a book (that I still have) that described the 8086, the 80286, and the 80386 in great depth and how they differed among each other. All of the details about memory and task management felt fascinating to me at the time, and I’ve always found it weird that almost none of the features that the chips provided (segmentation instead of pagination; 4 protection levels; task, interrupt, and call gates; hardware-assisted task switching…) were put to use by operating systems. Sure, their original implementation might have sucked and been slow, but if they had been used, Intel would have improved those over time.
“What exactly was the point of [ “x$var” = “xval” ]?” by Vidar on April 12th, 2021.
One more oddity that you’ll find in shell scripts. And not just ancient ones: this still shows up regularly in auto-generated
configure
scripts, or even in theirconfigure.ac
originals because people copy/paste code snippets without thinking about them much.“Why does unsafe multithreaded use of an std::unordered_map crash more often than unsafe multithreaded use of a std::map?” by Raymond Chen on November 3rd, 2023.
I always enjoy Raymond’s posts, and to be honest, his blog is what drove me into writing mine and changing the way I looked at Microsoft and Windows 9x. In this one, he entertains a question of the type “this thing is broken, but why does it look more broken in this case than in this other one?”. Obviously, The Internet cannot read subtlety.
“End-to-end testing with Bazel and shtk” by yours truly on November 4th, 2023.
Last month, and for reasons that are not interesting, I revived an old project of mine: shtk. This, combined with my trip to BazelCon 2023, made me want to create a new ruleset to integrate shtk with Bazel builds because I know the shell is a great language to write integration tests for tools. So I ended up creating rules_shtk and wrote this post to explain how to use it and how it can help you write better tools.
“Faster compilation with the parallel (Rust) front-end in nightly” by Nicholas Nethercote on behalf of The Parallel Rustc Working Group on November 9th, 2023.
This is exciting work. I have an overkill server in the garage with 72 cores where I remote into for development and, most of the time, it goes vastly unused. I doubt the Rust compiler will be able to use that many cores, at least for the kind of projects I work on—they aren’t that large—but still, this is exciting.
“Write your own terminal” by Ted Unangst on November 10th, 2023.
Writing a terminal is surely rewarding: as the author says, you have to do very little to get it to a functional state, but then can iterate endlessly on the details and on performance. And I know it’s fun because I had to do this for the EndBASIC console. Replacing the use of Xterm.js with my own implementation showed results quickly, and I was then able to mix text and graphics seamlessly.
“Why do I know shell, and how can you?” by yours truly on November 10th, 2023.
I spent some time last month and this month writing more shell than usual, and people at work often ask me “why I know so many ancient incantations”. So I decided to explain how the constraints of NetBSD, an open-source OS project I contributed to for many years, guided me down this path.
“Don’t waste money on a math coprocessor they said” by neozeed on November 12th, 2023.
Did you know that CPUs did not use to have floating point operations and that there were optional chips you could buy to supplement the CPU with those? Say hi to the FPUs. This article dives into history and shows how installing an 80287 along an 80286 fixed a mysterious crashing bug in a game and in OS/2—even when none of this code was using floating point. If you are into retro stuff, this one (and the whole blog it seems!) is for you… but I only wish the author came up with a precise explanation of what went wrong here.
“i accidentally a scheme” by wingo on November 13th, 2023.
This article is short and not very detailed, but it contains a bunch of interesting references to programming language implementation topics and is entertaining to read. You must read the intro, though; it is just great. Plus I learned a new meme… and several new words.
“A decade of developing a programming language” by Yorick Peterse on November 14th, 2023.
An easy-to-read reflection on the challenges of building a new programming language, along with some suggestions on how to approach doing so.
“Reptar” by Tavis Ormandy on November 14th, 2023.
An article from Google’s Project Zero team describing a glitch in instruction processing that makes certain modern x86 processors enter an invalid state. Whether this can be used for privilege escalation is still unknown, but assume the worst.
“SSH agent forwarding and tmux done right” by yours truly on November 17th, 2023.
If you have ever used SSH agent forwarding and you keep long-running tmux sessions on the remote machine, you know you are in for trouble. This article covers why agent forwarding breaks in this case, describes various solutions, and presents a prototype I quickly wrote (the ssh-agent-switcher) to fix the problem.
“Setenv is not Thread Safe and C Doesn’t Want to Fix It” by Evan Jones on November 19th, 2023.
Well, yes, it is not thread safe—but you should not be modifying the environment of your own process, except right before
exec
. Environment variables are global, untyped, not-thread-safe variables.“DOS/4GW and Protected Mode” by Gustavo Pezzi on December 12th, 2021.
Ah, the memories. Learn more about how DOS games could unleash the power of 32 bits and more than 1 MB (yes, MB) of memory by using an “extender” while running on an “OS” that was 16-bit real mode.
“Code reviews: A success story” by yours truly on November 21st, 2023.
If you ask people what they think about the Pull Request process to get code merged into a project, you’ll find critics. I do think PR reviews, and in particular code reviews, are a good process that can increase the quality of the software you ship—but it’s important for the people involved to understand the limitations of the process and when they need to take a different route. This Twitter thread presents a success story that I was personally involved in.
“Why is 56k the fastest dialup modem speed?” by Alex Freeman probably pre-2008.
I can hear this article. A good technical explanation on why the maximum transmission speed for dial-up connections is 56k, a number that seems pulled out of thin air, and how it’s not possible to achieve it in practice.
“On harmful overuse of std::move” by Raymond Chen on November 24th, 2023.
So using
std::move
can hurt? Thanks, C++. The article touches upon optimizations that the compiler can perform and how move construction can hamper them. Also, this reminds me how the NRVO (described in the article too) masked a bug in code I wrote long ago, and how I do not want to ever write C++ again if I can avoid it.“Windows NT: Peeking into the cradle” by yours truly on November 24th, 2023.
A review of the “Showstopper!” book combined with my own commentary on how exciting (and tiresome) it must have been to live through the development of Windows NT: the OS that still powers most PCs in the world, more than 30 years after its inception.
“10 Weird HTML Hacks That Shaped The Internet” by Ernie Smith on November 24th, 2023.
This article gets my vote if only for its retro photos of Netscape 4. But, in any case, the article is a neat summary of weird things that people did (and still do!) with HTML to format their websites. The article is long, but each of the 10 entries has a very brief what/how/why summary at the top which makes it easy decide what you want to read.
“Unix shells and the current directory” by Chris Siebenmann on November 25th, 2023.
It’s interesting to think about how the “current directory” is represented in the kernel and how, depending on the choices, the kernel may not be able to provide a
getcwd(2)
system call. When that happens, how doespwd(1)
work? This article answers these questions, and more.“Storing data in pointers” by Alex Bradbury on November 27th, 2023.
Pointers are really wide, but addressable memory isn’t yet—so pointers have enough room to carry data in them. This article describes how, but the more interesting part is the list at the end covering the many real-world use cases where this is done.
Other
“Who invented file extensions in file names?” StackExchange discussion on November 1st, 2023.
We take file extensions as part of file names for granted today, but looking into their history, we discover that extensions were a separate metadata field in the file system, much like timestamps are. It wasn’t until Unix and its flat approach to file names that extensions became part of the file names. This is why on MS-DOS you can refer to files without specifying their extension (again, just like you can refer to files without specifying the time they were modified).
The very first Linux distribution I ever tried. I recall that this came with the PC Actual magazine and remember how the installation instructions in the corresponding article described a workaround for a bug in the mounting of the CD. I also remember not achieving a resolution larger than 320x200 with X11. Not a great first impression… but this hooked me into the Unix world forever.
“NTFS really isn’t that bad [video]” by Robert Collins on January 16th, 2020.
A conference presentation that describes how the speaker optimized Rust’s installation from 3 and a half minutes to just 14 seconds on Windows. NTFS isn’t the problem: it’s the applications assuming that the whole world is like Linux.
“The Netwide Assembler (NASM)”.
Brought to memory by a Hacker News discussion. It’s interesting to me to see people disregard the AT&T syntax as unusable, which makes me feel better about never learning it.
“Half-Life: 25th anniversary documentary [video]” by Valve on November 17th, 2023.
A documentary on my favorite game of all times. Well worth the watch, even for the whole family.
“Effective Rust” online book.
Inspired by Scott Meyer’s famous Effective C++ book, this online book takes a similar approach to show more than 30 different scenarios in how to better apply Rust. I haven’t read it cover to cover, but the few items I skimmed through seem solid. Worth a read and, as with any programming guidelines, lots of what you can find here apply to any language.
“FreeBSD 14.0-RELEASE Announcement” on November 20th, 2023.
It’s here! Go grab it while it’s hot. There are claims to significant performance improvements, so I’m eagerly awaiting to have a few spare hours to upgrade my server in the garage. I suspect I’ll only need a few minutes… but need to plan for the worst case scenario.
“tmp0ut.sh #003” by multiple authors on November, 2023.
A new edition of an online underground ezine talking about security and exploits. The content is super-interesting, but the looks of this are frigging awesome too.
“Power On: The Story of Xbox [video series]”.
A 6-part documentary on how the Xbox came to be, and how it almost didn’t launch. I’ve only been able to watch the first episode so far, but it was engaging.
“The mind behind Windows: Dave Cutler” by Dave’s Garage on October 21st, 2023.
A 3-hour long interview with Dave Cutler on the creation of Windows NT. Having just written a detailed article on this part of history, this looks very interesting to watch.
Pick any version of System Software/Mac OS from the 1980s or 1990s and run it right in your browser. I wasn’t a Mac user until Mac OS X Tiger, so these are systems I never experienced—except for System 7.5, I think, which I had to use to bootstrap a NetBSD/mac68k system. But if you did, this is a good toy to recreate memories.