Russ Cox @swtch.com · Dec 3

Day 3 part 2. The function 'c step2 s' is the updated state machine, with an extra value tracking whether mul(x,y) is enabled. step2 takes care of do()/don't() processing and invokes 'step' (from part 1) to handle mul(x,y) when appropriate.

4 likes 1 replies

?

Replies

Russ Cox · Dec 4

Day 4 part 1 adventofcode.com/2024/day/4 #AdventOfCode pad dot-pads the matrix to avoid wraparound. x y shift m rotates the matrix x left, y down. d(=x y) shift4 m produces the 4 matrices shifted by d*0 1 2 3. d XMAS m identifies the X in XMAS in direction d.