Advent of Code 2021

Date

Update: I’ve rewritten the visualization and documented the process.

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

Date

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

Date

Update: I’ve rewritten the visualization and documented the process.

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

Date

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

Score Card 2.3 Released

Date

Score Card 2.3 has been released. This version beings trackpad and keyboard support in iPad OS, as well as improvements to Dark Mode.

It also has an improved credits screen, and a new “What’s New” page, telling you exactly what you are reading here!