AoC 2024 Day 11: Exponential Growthinator

Source: Day 11: Plutonian Pebbles

Full solution for today (spoilers!).

Part 1

Given a sequence of values v_n, replace each value with the first matching rule:

  • if v = 0 -> 1
  • If v has an even number of digits, split it (so v = 8675 becomes [86, 75])
  • Otherwise, v -> v * 2024

Calculate how many elements are in the sequence after 25 iterations.

read more...


StackLang Part VII: New CLI and Datatypes

Another day, another Stacklang! Posts in StackLang: StackLang Part I: The Idea StackLang Part II: The Lexer StackLang Part III: The Parser StackLang Part IV: An Interpreter StackLang Part V: Compiling to C StackLang Part VI: Some Examples StackLang Part VII: New CLI and Datatypes StackLang Part VIII: Compiler Stacks StackLang Part IX: Better Testing Today, we’ve got two main parts to work on: A new CLI New datatypes (VM only; so far!

read more...