Plurrrr

week 15, 2023

SQL:2023 is finished: Here is what's new

SQL:2023 has been wrapped. The final text has been submitted by the working group to ISO Central Secretariat, and it’s now up to the ISO gods when it will be published. Based on past experience, it could be between a few weeks and a few months.

In the meantime, we can look at what is new. The changes can be grouped into three areas:

  1. Various smaller changes to the existing SQL language
  2. New features related to JSON
  3. A new part for property graph queries

Let’s look at each one.

Source: SQL:2023 is finished: Here is what’s new, an article by Peter Eisentraut.

Dark Angel

Letty Davenport’s days working a desk job at are behind her. Her previous actions at a gunfight in Texas—and her incredible skills with firearms—draw the attention of several branches of the US government, and make her a perfect fit for even more dangerous work. The Department of Homeland Security and the NSA have tasked her with infiltrating a hacker group, known only as Ordinary People, that is intent on wreaking havoc. Letty and her reluctant partner from the NSA pose as free-spirited programmers for hire and embark on a cross country road trip to the group’s California headquarters.

While the two work to make inroads with Ordinary People and uncover their plans, they begin to suspect that the hackers are not their only enemy. Someone within their own circle may have betrayed them, and has ulterior motives that place their mission—and their lives—in grave danger.

In the evening I started in Dark Angel, a Letty Davenport novel book 2, by John Sandford.

Grappling With C

I want to learn C, for several reasons:

  • it's the granddaddy of all languages
  • I need a compiled language in my repertoire
  • in the short time that I've used it, it feels really simple
  • flexing rights

I am all too well aware of the new hotness - Rust/Go. I am sure both of these are excellent languages, each with its unique ecosystem of features, communities, and goals. But there's a back to the roots feeling with C. Somewhere in my mind, I feel that C is still important if you want to know what the heck is going in your computer.

Source: Grappling With C: Part 1 🏋, an article by Ishaan Arora.

916 days of Emacs

So over time, Emacs has become my programming environment, email client, window manager, knowledge base, and a lot more. I think I ended up using Emacs for almost as many things as possible; I even authored a few packages that implement certain parts of my workflows that weren’t readily available.

Source: 916 days of Emacs, an article by Pavel Korytov.

Running Tasks Concurrently in Django Asynchronous Views

Async support has really been improving and expanding in Django! Since Django 3.0 with the addition of ASGI support (Asynchronous Server Gateway Interface) there has been a steady march of improvements that bring Django closer to having a full asynchronous request-response cycle.

Now we're to the point where there's enough foundational support that interesting things are possible for our "normal web apps.". This is where it gets really exciting for people! Here we'll take a look at how we can start using async views with Django.

Source: Running tasks concurrently in Django asynchronous views, an article by Mariusz Felisiak.

EXPLAIN (GENERIC_PLAN): New in PostgreSQL 16

A while ago, I wrote about how difficult it is to get an execution plan for a parameterized query. The method suggested in that article works, but is still somewhat complicated. So I wrote a patch to support an EXPLAIN option GENERIC_PLAN, which provides native support for that. My patch got committed by Tom Lane in 3c05284d83, which means the new option will be available from v16 on. This article describes how the new feature works and how it can be useful.

Source: PostgreSQL 16: EXPLAIN (GENERIC_PLAN), an article by Laurenz Albe.

Building 15-year-old software with Nix

What is Nix? Among other things, Nix is an ecosystem of tools that you can use to build software in a reproducible way: Usually, when I try to compile a program, I need to make sure that I have all libraries and other dependencies I need, in the correct versions. With Nix, you can describe exactly which other things a piece of software depends on, and also how to build those.

So I thought: Could we try to build some really old software? Like, for example, Firefox from 15 years ago? :D Let’s try that, and let’s also try to build the graphics programs Blender, Inkscape and GIMP.

Source: Building 15-year-old software with Nix.

Pedagogical Downsides of Haskell

While running a course on functional programming and using Haskell for the practical sessions, I have experienced several issues that act as impediments to understanding.

I still think Haskell is one of the best ways to teach functional programming. In any case, the issues below are difficulties in teaching and learning Haskell. Most of them actually make the life of a working Haskell programmer better.

Source: Pedagogical Downsides of Haskell, an article by Stefan Ciobaca.

Transformer Deep Dive: Parameter Counting

Recently, the machine learning community has been buzzed with discussions surrounding how many parameters state-of-the-art models are. This blog post aims to offer a comprehensive overview of parameter counting, delving into the methods of counting parameters in various transformer-like architectures from first principles and shedding light on how the majority of parameter counts can be attributed to the feedforward network. For this blog post, we will mostly focus on OpenAI’s GPT-3 architecture and Google’s PALM architecture.

Source: Transformer Deep Dive: Parameter Counting, an article by Oren Leung.

Why We Ditched RabbitMQ And Replaced It With A Postgres Queue

We recently ripped out RabbitMQ from our system and replaced it with a queue built on top of our Postgres db and written in SQL. The change took half a day to implement + test, and had a net delta of -580 LOC. Much more importantly, it drastically improved the reliability and resiliency of our system. This is a writeup of that change, the rationale behind it, and how we did it.

Source: SQL Maxis: Why We Ditched RabbitMQ And Replaced It With A Postgres Queue, an article by Charles Chretien.

Quickly formatting a stack of commits

A certain category of developer uses Git with a “patch stack” workflow, in which they accumulate a sequence of small, individually-reviewable commits that together implement a large change. In these cases, it’s oftentimes useful to run linters or formatters on each commit in the stack and apply the results. However, this can be tedious, and a naive approach can cause needless merge conflicts. (One workaround is to run formatters on each commit in the stack backwards.)

git-branchless’s git test command offers a solution to quickly run formatters, etc., on an entire stack of commits without causing merge conflicts. Additionally, it can be performed in parallel, and it caches results so that reformats of the same commits are skipped. You can see the announcement post or the documentation for git test.

Source: Quickly formatting a stack of commits, an article by Waleed Khan.

Narvik: Hitler's First Defeat (2022)

April 1940. The eyes of the world are on Narvik, a small town in northern Norway, source of the iron ore needed for Hitler's war machinery. Through two months of fierce winter warfare, Hitler is dealt his first defeat.

In the evening I watched Narvik: Hitler's First Defeat. I liked the movie and give it a 7 out of 10.

FreeBSD 13.2

The FreeBSD Release Engineering Team is pleased to announce the availability of FreeBSD 13.2-RELEASE. This is the third release of the stable/13 branch.

Some of the highlights:

  • OpenSSH has been updated to version 9.2p1.
  • OpenSSL has been updated to version 1.1.1t.
  • The bhyve hypervisor now supports more than 16 vCPUs in a guest.
  • Address Space Layout Randomization (ASLR) is now enabled for 64-bit executables by default.
  • ZFS has been upgraded to OpenZFS release 2.1.9.
  • It is now possible to take snapshots on UFS filesystems when running with journaled soft updates.
  • The kernel wg(4) WireGuard driver is now available.
  • The kernel netlink(4) network configuration protocol is now available.

Source: FreeBSD 13.2-RELEASE Announcement.

Authentication vs Authorization

Authentication and Authorization (AuthN and AuthZ) are terms that refer to discrete, specific concepts that can easily be confused.

Authentication is the process of proving that someone is who they claim to be.

Authorization is the process of granting access to a resource.

Source: Authentication vs Authorization, an article by Dan Schnau.

Sparkle

Last month, I posted about writing my new todo app called To-Day: why I wrote it and how I wrote it. At the time, I mentioned that I had set it up to install updates using Sparkle but there was too much detail to include in the initial post. So here, as promised, is the article about implementing Sparkle.

Source: Sparkle, an article by Sarah Reichelt.

Modular Errors in Rust

What I’m here to convince you of today is that this principle applies additionally to error types: that is, error types should be located near to their unit of fallibility. To illustrate this point, I will follow the initial development and later API improvement of a hypothetical Rust library.

Source: Modular Errors in Rust, an article by Sabrina Jewson.

Write Cleaner Unit Tests Using Parameterization

If you’re used to writing unit tests, you might already know that when you’re testing a function with parameters, you want to test it using many (or ideally, all) possible inputs. That is to ensure that the function is doing what we want for anything we decide to throw at it. However, if we’re repeating the same pattern of set up data – run function – expect certain result for writing unit tests, an undesirable pattern could potentially emerge.

Source: Write Cleaner Unit Tests Using Parameterization, an article by Teagen Kiel.

Rust vs Go in 2023

Which is better, Rust or Go? Go or Rust? Which language should you choose for your next project in 2023, and why? How do the two compare in areas like performance, simplicity, safety, features, scale, and concurrency? What do they have in common, and where do they fundamentally differ? Let’s find out, in this friendly and even-handed comparison of Rust and Golang.

Source: Rust vs Go in 2023, an article by John Arundel.