Sun 21 May 2023

PGP signatures on PyPI: worse than useless

A large number of PGP signatures on PyPI can’t be correlated to any well-known PGP key and, of the signatures that can be correlated, many are generated from weak keys or malformed certificates. The results suggest widespread misuse of GPG and other PGP implementations by Python packagers, with said misuse being encouraged by the PGP ecosystem’s poor defaults, opaque and user-hostile interfaces, and outright dangerous recommendations.

Source: PGP signatures on PyPI: worse than useless, an article by William Woodruff.

Writing Python like it's Rust

I started programming in Rust several years ago, and it has gradually changed the way I design programs in other programming languages, most notably in Python. Before I started using Rust, I was usually writing Python code in a very dynamic and type-loose way, without type hints, passing and returning dictionaries everywhere, and occasionally falling back to “stringly-typed” interfaces. However, after experiencing the strictness of the Rust type system, and noticing all the problems that it prevents “by construction”, I suddenly became quite anxious whenever I got back to Python and wasn’t provided with the same guarantees.

Source: Writing Python like it’s Rust, an article by Jakub Beránek.

Resilient LL Parsing Tutorial

In this tutorial, I will explain a particular approach to parsing, which gracefully handles syntax errors and is thus suitable for language servers, which, by their nature, have to handle incomplete and invalid code. Explaining the problem and the solution requires somewhat less than a trivial worked example, and I want to share a couple of tricks not directly related to resilience, so the tutorial builds a full, self-contained parser, instead of explaining abstractly just the resilience.

Source: Resilient LL Parsing Tutorial, an article by Alex Kladov.

Faithfully Yours (2022)

Best friends Bodil and Isabel, apparently happily married, sneak off for secret affairs using each other as an alibi. But when Isabel is killed when they were supposed to have been together. Bodil gets caught up in her own web of lies.

In the evening Esme and I watched Faithfully Yours. The movie was OK and I give it a 6 out of 10.