Long Lost Advent of Code Visualizations

As is tradition with Advent of Code, I make visualizations of some of the solutions. Nowadays, I do it in a fancy way using Apple’s APIs to draw, present, and encode the visualization for me.

Prior to that, I used to solve the problems with Ruby. I would output a series of images and then later encode them using FFmpeg to make my videos. How inefficient!

It also turns out, Google is yet again closing off a free service it got everyone hooked on. I’ve been reorganizing and re-uploading YouTube videos and found some of the old videos mentioned above.

Fixing a broken display

Moving data in a mainframe

Defragging a disk
 

Advent of Code 2021

Every year, I attempt to complete the Advent of Code. It’s a series of programming challenges that gives me an opportunity excise my coding ability in new and unique ways.

I completed this year in the same manor I’ve used for the past few years: Swift command line applications with some visualizations done through CoreGraphics, AVFoundation, Metal, and SwiftUI. The solutions can be found on my GitHub page.

My Animator and RenderableWorkView stayed roughly the same from last year, but I did discover a terrible memory leak in the Metal renderer. C calls like CVMetalTextureCacheCreateTextureFromImage write to pointers, and in Swift, the Automatic Reference Counting misses that overwrite, causing every single texture generated to leak. For proper accounting, you must assign the texture to nil first, to ensure the previous texture gets cleaned up. Leaks like that are hard to find because Advent of Code challenges are sometimes designed to consume tons of memory if you aren’t paying attention.

Bingo with an octopus
Flashing dumbo octopuses
Folding transparent notes
Finding the least risky path
 

Score Card 2.4 Released

Score Card Icon

Score Card 2.4 has been released. This version makes game headers more useful by displaying a player’s full name if there is room. When room is too tight, either their first three letters are shown, or their first initial is shown.

It also make text bigger on iPadOS for better utilization of the screen.

Get the latest version on the App Store.

 

Advent of Code 2020

Every year, I attempt to complete the Advent of Code. It’s a series of programming challenges that gives me an opportunity excise my coding ability in new and unique ways.

I was unable to complete this year. Life sometimes just gets in the way. I did most of my work in Swift on the command line. The solutions can be found on my GitHub page. I rewrote my animation code to also exist as a live preview window. This allowed me to watch my solutions in real time, as opposed to waiting for the result to be muxed and written to disk.

The Animator still relies on CoreGraphics and AVFoundation for rendering, encoding, and muxing. A RenderableWorkView has been added, using SwiftUI and Metal, to allow for the previews.

Optimal seating
 

Restructure 2.1.0 Released

Restructure 2.1.0 is a minor feature release. sqliteVersion has been added to inspect the version of SQLite that is being used. JournalMode.off has been removed as it is no longer safe nor supported.

This release also adds Dynamic Member Lookup to the Row class, allowing the use of property-like accessors. For example:

/// Old Method
let value: Int = row["someValue"]

/// New Method
let value: Int = row.someValue