aoc-2022/05
Dominique Liberda 11c9fba2c4 day 5, part 2 2022-12-09 13:34:27 +01:00
..
01.sh day 5, part 1 2022-12-09 13:33:05 +01:00
02.sh day 5, part 2 2022-12-09 13:34:27 +01:00
README.md day 5, part 2 2022-12-09 13:34:27 +01:00

README.md

day 05 (actually 09, oops)

again, put your things in /tmp/05

part 1

biggest part of what threw me off is the fact that I can't read. I have assumed that multiple crate moves were meant as "grab n crates at once", while in reality they meant "grab one, then another, then another..." That's why L31 has that funky subshell with a rev.

Wrapping everything in () was a fun hack I thought about to parse the header separately from the rest of the code - probably wouldn't be needed if Tulip was fronting and writing the code, she likes to accept input from stdin (whereas I (Paula?) like to accept input from argv)

part 2

... remember L31?

so I removed that | rev, and that did the trick for the 2nd part. BOORIIIIING