RSSAmplifier

Blog

aconz2

Stuff.

aconz2.github.comRSS feed ↗10 posts

Latest posts

Building Python Wheels For Raspberry Pi Zero

It can be a pain if you need to install python packages on a Pi Zero and there are no wheels available because of the low memory and slow CPU. This is relevant for things that use Cython etc. There are a few things I came across in searching about this problem and here is what works well for me: Setup We’ll use qemu’s binfmt capability to translate binaries on the fly to let us run on amd64 with…

Normalized Cross Correlation

I spent some time recently on a tool to OCR images which have been rendered (ie. Print To PDF not photographs) with a known font. I call that tool font-ocr or focr. Some fonts are particularly tricky with the difference between 1 (one) and lowercase l (letter el) like Courier or Courier New. So my approach was to take the known font, render each letter, and compare with the input image. Approach 1…

Einsum Visalization

The einsum function in numpy , jax or pytorch is a compact way of describing tensor operations which involve pairing up values, multiplying the pairs, and summing their products. The two operations dot and matmul can be written in einsum notation as i,i-> and mn,no->mo respectively. These strings assign letters to the dimensions of each input and output. Repeated letters from the input must match…

More Hash Filenames

In my last post on Hash Filenames , I showed a fast 40 byte escaping of a SHA256 32 byte digest suitable for use on Linux filesystems as a filename. This checked for the two bad bytes \0 and / , replaced them, and placed 2 bits per byte at the end to record whether the character was okay, \0 or / . One part of this encoding that I thought was neat was that the extra bytes at the end were…

Hash Filenames

I was looking into restic the other day and it uses a content addressed directory layout common to many programs. To store some blob, we compute a hash of the contents, transform it into a valid path, then write the contents into that path. This scheme also shows up in git , the OCI disk image layout , I’ve used it in Program Explorer for caching of images, etc. There are a few design choices that…

Visiting 2d Points

Let’s say you have a CNC machine of some kind and a list of 2d points the machine needs to visit and want to determine what order to visit the points in. Given the freedom to visit the points in any order, we probably want to visit them in a way that minimizes the total distance traveled. This is the classic traveling salesman problem (which in my memory was for a given graph, but apparently it is…

Program Explorer Update: July 2025

In case you’re not familiar, Program Explorer programexplorer.org is a project I started nearly a year ago with the goal of having a website to quickly run programs from container images in the browser. The name is a homage to Compiler Explorer which has been a big source of inspiration. The codebase is open source at https://github.com/aconz2/program-explorer . Load from Github gist The main new…

Program Explorer Update: June 2025

In case you’re not familiar, Program Explorer programexplorer.org is a project I started nearly a year ago with the goal of having a website to quickly run programs from container images in the browser. The name is a homage to Compiler Explorer which has been a big source of inspiration. The codebase is open source at https://github.com/aconz2/program-explorer . In March 2025 I announced the…

Compute Exchange

One idea I’ve had kicking around for a bit is something like a stock exchange but for compute. Buyers (users) submit a computation with resource requirements, a container hash, and a price; sellers (providers) submit their computational capacities and prices; the exchange does some matching and does the money things. This is one possible future for the stuff I’m doing with Program Explorer. I’m…

Slow dnf bash completions

I just tracked down something that has been plaguing me for as long as I can remember: slow dnf tab completion, both for commands ( in<TAB> ) and packages ( install lib<TAB> ). tldr is that my hostname was set to something that doesn’t resolve. With hostname of localhost the problem goes away. It tries resolving the host because librepo calls curl_version which does LDAP stuff and wants to resolve…