Conway's Life Server

A few years back I was experimenting with Go and SDL2, I wrote a dead-simple Conway's Game of Life program with it, added loading of a couple popular pattern file formats, and was pretty much finished with it. The other day I came across this cool project while preparing for Thanksgiving by browsing infosec.exchange . Brett has an e-ink display running life and is seeding it from tarpit data which struck me as a really neat idea to keep the world from becoming static as most of the more complex ones tend to do.

Profiling osbuild-composer with Go pprof

One of the projects that I work on is osbuild-composer . This is an operating system image builder, written in Go, and is the replacement for the lorax-composer project. I’m going to skim over the details since this post is about profiling things, but you can read more about it at osbuild.org and the [GitHub repository]. Behind the scenes it uses DNF to handle depsolving and package queries. A few weeks back I wrote a patch to cache the results from the dnf-json program in order to speed up the response time when listing all the packages (over 63000 of them in Fedora 35!

Finding The Fuzzy Middle

It has been quite some time since I wrote about one of my longest running projects, MovieLandmarks . The UI hasn’t changed much in the intervening years. But the backend has been rewritten in Go, and the covers now come from TMDB instead of IMDB . Recently I decided I wanted the map to open to a view of the landmarks related to the move being passed to it using the #mv-XXXX hash.

letterbox - SMTP to Maildir delivery agent

Letterbox is a simple Go program that accepts SMTP connections and delivers mail to a per-user maildir directory. I use it to gather reports from various services on my LAN without needing to setup postfix or some other more complex MTA. Usage of letterbox: -config string Path to configutation file (default "letterbox.toml") -host string Host IP or name to bind to -maildirs string Path to the top level of the user Maildirs (default "/var/spool/maildirs") -port int Port to bind to (default 25) The configuration file is written using TOML .

mpd-status - print song details

mpd-status is a simple Go program that queries the music player daemon and prints out the status for use with tmux . You need to have Go installed, clone the repo and run go build to create the binary. By default the output is the status (using unicode play/pause/stop characters), the artist name, and song title. Pass --volume to include the volume level from 0-100%, and --elapsed to output the elapsed time and duration, like 2m40s/3m43s.

Simple Schema Migration With Go

In 2010 I wrote about a simple method for migrating schema with Python . Here’s the same kind of thing, but this time using Go. I’m using the SQLx extensions for database/sql and PostgreSQL as my database. The only requirement is an extra table named schema with a single version in it. This tracks which version of the schema update has been applied. This table is created in the first schema update below.