Bonus Drop #47 (2024-05-05): Publisher DoS Recovery Edition

Debian’s Stitch In time_t; RESTed Development; Include The (Opinionated) Batteries

Happy Cinco de Mayo Astro Guerras weekend! Hope everyone is enjoying their bantha tacos and BB-8 quesadillas.

The Drop had an unplanned hiaitus this week due to my spouse’s publisher changing the game a bit at the very last minute, forcing her (and, thus me, as I’m the pandoc support tech) to convert her upcoming “Math of Money: From Decimals to Derivatives” textbook from Word to LaTeX. It, quite literally, ate up all non-work and house-chores waking hours. O_O

In other news: I cannot wait for Typst to takeover the planet and give LaTeX the retirement it well-deserves.

We’ve got a good one on tap, today, to make up for said pause.


OH. Yeah. R kind of had a needlessly bad week, last week, and if you don’t know about the kerfuffle (and how dangerous R data files can be, you should likely dig into that if you do use R.

TL;DR

(This is an AI-generated summary of today’s Drop.)

  • Debian’s Stitch In time_t: Discusses Debian’s proactive measures to address the “2038 problem” by transitioning to a 64-bit time_t even on 32-bit architectures, highlighting the extensive coordination required across software libraries and applications to maintain compatibility. The transition involves rebuilding hundreds of library packages and thousands of dependent packages, with ongoing tracking of compatibility issues with certain file formats and databases.
  • RESTed Development: Features the REST Client extension for Visual Studio Code, which allows users to send HTTP requests and view responses directly within the editor, enhancing efficiency in API testing. This tool supports various HTTP methods, headers, and body content, and integrates seamlessly into the development environment, making it a valuable tool for developers transitioning from other platforms like VS Code.
  • Include The (Opinionated) Batteries: Highlights the cleanup and organization of the Raindrop stash to improve content searchability and introduces the stdx project, a defunct initiative that aimed to curate essential Rust crates. This section discusses the value of curated, opinionated lists of programming tools and libraries to aid developers in various ecosystems, suggesting a broader application across different programming languages.

Debian’s Stitch In time_t

Photo by Andrea Piacquadio on Pexels.com

I’m pretty sure every reader knows about the forthcoming “2038 problem“. Short version: one second after 2038-01-19 03:14:07 UTC, most 32-bit timestamps actually tick to 1901-12-13 20:45:52 UTC. While actual time travel might be cool, that IRL one second journey could be catastrophic.

In linux-y systems, time data is generally stored in the time_t data type, which harkens back to linux’s (et al.) C-roots. In 32-bit systems, time_t is typically represented as a 32-bit signed integer. Thankfully, the fine folks involved in the Debian project is proactively addressing this issue by transitioning to a 64-bit time_teven on 32-bit architectures!

It is super likely you’re already safe, since most humans are using 64-bit (or more) devices. However, a significant amount of computing still relies on 32-bit architectures, particularly in cost-sensitive devices such as IoT gadgets, automotive systems, routers, and even some smartphones. These devices, often operating with tight budget constraints, are in the crosshairs of this bug, and getting a fix in for those systems require[ds] a thoughtful approach to their software maintenance and future development.

Transitioning to a 64-bit time_t requires significant coordination across the entire software ecosystem. Libraries and applications that use time_t must be updated simultaneously to maintain compatibility, a process that demands meticulous planning and execution.

The transition will affect ~500-600 library packages that have time_t in their ABI.

An Application Binary Interface (ABI) is a low-level interface between two binary program modules, typically between a library or operating system facility and a user program. It defines how data structures and computational routines are accessed at the machine code level, which is crucial for ensuring that compiled programs can run on any given operating system without modification. The ABI encompasses details such as data type sizes and alignments, calling conventions (how functions’ arguments are passed, and return values are retrieved), system call numbers, and how applications should make system calls to the operating system.

All those packages need to be rebuilt. Between 5K-6K dependent packages will also need to be rebuilt, but this should be a pretty straightforward process.

Some known issues include compatibility problems with the utmp and wtmp files (they’re logs for user login and logout activities, and are not regular text files but are formatted in binary, which requires specific utilities for their reading and manipulation), as well as potential issues with some older file formats and databases that store 32-bit timestamps. The project is tracking these issues and asking maintainers to test their packages with the new 64-bit time_t.

The Debian team did a package survey between May-Oct 2023 and the actual transition project started on 2024-02-27.

Keep an eye on that page, and definitely consider tossing any 32-bit kit you have in your house into the bin.

RESTed Development

Zed is getting better every week, and it looks to be a great place to eventually land if you are, like me, a VS Code refugee. I’m still primarily using VS Codium and came across a lovely extension that cannot believe I did not know about sooner.

REST Client allows you to send HTTP request and view the response in Visual Studio Code directly. It eliminates the need for a separate tool to test REST APIs and makes API testing convenient and efficient.”

The README is extensive, so I won’t be pasting even the bullets from it here.

It’s billed as an API testing tool that integrates directly into your editor’s workspace. This integration affords immediate/seamless transition from writing code to testing API endpoints without the need to switch contexts or applications. The extension supports crafting requests with various HTTP methods, setting headers, and sending body content in a straightforward manner.

The extension also supports referencing environment variables and the ability to switch between different environments.

As is shown in the section header, you get a full preview of HTTP responses, and REST Client has options to view headers only, body only, or the entire HTTP exchange. The screencap also shows you can copy the result as a curl command line.

It’s super handy, and as I get closer to a Zed-only editorverse, I will have to port this there myself, if the author doesn’t beat me to it.

NOTE: by default it adds a User-Agent header of vscode-restclient by default. I mention this as that tripped me up at one point as I explored using it.

Include The (Opinionated) Batteries

Photo by Hilary Halliwell on Pexels.com

I’m trying to tidy up my Raindrop stash in order to get embeddings for the content and set up a better search engine for it than what ships with the service.

One of the dusty corners that have been cleaned was this referneceto stdx. It’s a now-defunct project to identify “must have” crates in the Rust ecosystem.

Unlike “awesome” lists, or even CRAN’s Task Views (it’s an R thing), focused, opinionated, “you should use these” lists can be super-helpful for folks just starting out in a programming language, and can be equally handy for teams to help standardize and streamline development.

If you don’t have one (or more, depending on how many ecosystems you use), it might be time to start one, and I’d be curious as to what you would recommend for Python, R, Go, Rust, Deno/Bun/Node, etc.

I’m going to do a deliberate search for more of these and feature them in upcoming Drops.

FIN

Remember, you can follow and interact with the full text of The Daily Drop’s free posts on Mastodon via @dailydrop.hrbrmstr.dev@dailydrop.hrbrmstr.dev ☮️

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.