Simon Willison’s Weblog

Subscribe

July 2022

82 posts: 4 entries, 25 links, 2 quotes, 51 beats

July 25, 2022

None
TIL Deploying a redbean app to Fly — [redbean](https://redbean.dev/) is a fascinating project - it provides a web server in a self-contained executable which you can add assets (or dynamic Lua code) to just by zipping them into the same binary package.

Reduce Friction. Outstanding essay on software engineering friction and development team productivity by C J Silverio: it explains the concept of “friction” (and gives great definitions of “process”, “ceremony” and “formality” in the process) as it applies to software engineering, lays out the challenges involved in getting organizations to commit to reducing it and then provides actionable advice on how to get consensus and where to invest your efforts in order to make things better.

# 10:25 pm / software-engineering, management

July 26, 2022

viewport-preview (via) I built a tiny tool which lets you preview a URL in a bunch of different common browser viewport widths, using iframes.

# 12 am / css, iframes, mobile, projects, testing

Cosmopolitan: Compiling Python. Cosmopolitan is Justine Tunney’s “build-once run-anywhere C library”—part of the αcτµαlly pδrταblε εxεcµταblε effort, which produces wildly clever binary executable files that work on multiple different platforms, and is the secret sauce behind redbean. I hadn’t realized this was happening but there’s an active project to get Python to work as this format, producing a new way of running Python applications as standalone executables, only these ones have the potential to run unmodified on Windows, Linux and macOS.

# 8:43 pm / python, redbean, cosmopolitan, justine-tunney

July 27, 2022

SQLite Internals: Pages & B-trees (via) Ben Johnson provides a delightfully clear introduction to SQLite internals, describing the binary format used to store rows on disk and how SQLite uses 4KB pages for both row storage and for the b-trees used to look up records.

# 2:57 pm / algorithms, databases, sqlite, ben-johnson

Fastest way to turn HTML into text in Python (via) A light benchmark of the new-to-me selectolax Python library shows it performing extremely well for tasks such as extracting just the text from an HTML string, after first manipulating the DOM. selectolax is a Python binding over the Modest and Lexbor HTML parsing engines, which are written in no-outside-dependency C.

# 5:55 pm / html, python

None
TIL Testing things in Fedora using Docker — I got [a report](https://twitter.com/peterjanes/status/1552407491819884544) of a bug with my [s3-ocr tool](https://simonwillison.net/2022/Jun/30/s3-ocr/) running on Fedora.

July 28, 2022

Release sqlite-fts4 1.0.2 — Custom Python functions for working with SQLite FTS4
None
TIL struct endianness in Python — TIL the Python standard library [struct](https://docs.python.org/3/library/struct.html) module defaults to interpreting binary strings using the endianness of your machine.
Release datasette-sqlite-fts4 0.3.1 — Datasette plugin that adds custom SQL functions for working with SQLite FTS4
Release shot-scraper 0.14.2 — A command-line utility for taking automated screenshots of websites
None
TIL Migrating a GitHub wiki from one repository to another — I figured out how to migrate a [GitHub wiki](https://docs.github.com/en/communities/documenting-your-project-with-wikis/about-wikis) (public or private) from one repository to another while preserving all history.

July 29, 2022

Packaging Python Projects with pyproject.toml. I decided to finally figure out how packaging with pyproject.toml works—all of my existing projects use setup.py. The official tutorial from the Python Packaging Authority (PyPA) had everything I needed.

# 11:18 pm / packaging, python

July 30, 2022

Release sqlite-fts4 1.0.3 — Custom Python functions for working with SQLite FTS4
None
TIL Emulating a big-endian s390x with QEMU — I got [a bug report](https://github.com/simonw/sqlite-fts4/issues/6) concerning my [sqlite-fts4](https://github.com/simonw/sqlite-fts4) project running on PPC64 and s390x architectures.

Weeknotes: Joining the board of the Python Software Foundation

Visit Weeknotes: Joining the board of the Python Software Foundation

A few weeks ago I was elected to the board of directors for the Python Software Foundation.

[... 2,081 words]

Introducing sqlite-lines—a SQLite extension for reading files line-by-line (via) Alex Garcia wrote a brilliant C module for SQLIte which adds functions (and a table-valued function) for efficiently reading newline-delimited text into SQLite. When combined with SQLite’s built-in JSON features this means you can read a huge newline-delimited JSON file into SQLite in a streaming fashion so it doesn’t exhaust memory for a large file. Alex also compiled the extension to WebAssembly, and his post here is an Observable notebook post that lets you exercise the code directly.

# 7:18 pm / json, sqlite, observable, webassembly, alex-garcia

GPSJam (via) John Wiseman’s “Daily maps of GPS interference” —a beautiful interactive globe (powered by Mapbox GL) which you can use to see points of heaviest GPS interference over a 24 hour period, using data collected from commercial airline radios by ADS-B Exchange. “From what I can tell the most common reason for aircraft GPS systems to have degraded accuracy is jamming by military systems. At least, the vast majority of aircraft that I see with bad GPS accuracy are flying near conflict zones where GPS jamming is known to occur.”

# 7:51 pm / geospatial, gps, mapping, john-wiseman

GAS-ICS-Sync (via) Google Calendar can subscribe to ICS calendar feeds... but polls for updates less than once every 24 hours (as far as I can tell) greatly limiting their usefulness. Derek Antrican wrote a script using Google App Script which fixes this by polling calendar URLs more often and writing them to your calendar via the write API.

# 11:47 pm / google-calendar, icalendar

July 31, 2022

Release datasette-sqlite-fts4 0.3.2 — Datasette plugin that adds custom SQL functions for working with SQLite FTS4

Cleaning data with sqlite-utils and Datasette (via) I wrote a new tutorial for the Datasette website, showing how to use sqlite-utils to import a CSV file, clean up the resulting schema, fix date formats and extract some of the columns into a separate table. It’s accompanied by a ten minute video originally recorded for the HYTRADBOI conference.

# 7:57 pm / documentation, tutorials, datasette, sqlite-utils

Sighting 3:17 PM – 3:26 PM — Red-shouldered Hawk, Field Crescent, in Wavecrest Open Space, CA, US
Red-shouldered Hawk
Red-shouldered Hawk
Field Crescent
Field Crescent

2022 » July

MTWTFSS
    123
45678910
11121314151617
18192021222324
25262728293031