AoC 2016 Day 11: Radiation Avoider

Source: Radioisotope Thermoelectric Generators

Part 1: Input will be a list of the following form:

  • The first floor contains a hydrogen-compatible microchip and a lithium-compatible microchip.
  • The second floor contains a hydrogen generator.
  • The third floor contains a lithium generator.
  • The fourth floor contains nothing relevant.

You have an elevator that can move exactly 1 or 2 items. You can only leave a microchip on a floor with a non-matching generator if a matching generator is also present.

Move all items to the top (4th) floor.

read more...


iOS Backups in Racket: Groundwork

For the last little while, I’ve been spending my spare programming time working on a slightly larger project than I normally do: a Racket library for reading iOS backups.

Basically, I want to take the mess that is an iOS backup (not particularly designed to be easy to read by other programs) and extract some information from it, backing it up in a more easily readable format.

Specifically, I would like to be able to backup:

  • Contact information: Even thought they’re mostly from Facebook, it will be useful for the other parts
  • Messages: These are taking up a large portion of my phone’s hard drive, mostly due to attachments. Back them up just in case12
  • Photos: I’m already backing these up, but it would be nice to have it in the same process
  • Application data:
  • List of applications over time
  • Moves: GPS location
  • Downcast: List of current podcasts
  • Sleep Cycle: Sleep data
  • Boardgame Scorer: High scores for board games

read more...


Graph coloring

Here’s another one from /r/dailyprogrammer:

… Your goal is to color a map of these regions with two requirements: 1) make sure that each adjacent department do not share a color, so you can clearly distinguish each department, and 2) minimize these numbers of colors.

Essentially, graph coloring.

read more...