Articles tagged #nom
Page 1
Day 11 (Advent of Code 2022)
It’s a new day, it’s a new advent of code puzzle.
In that one, we have to apparently cosplay as an IBM mainframe and just.. crunch them numbers. This doesn’t look fun, and I can’t think of a clever twist to make it fun, so let’s try to make it short and sweet.
Parsing
Our input looks like this:
Monkey 0 :
Starting items: 79 , 98
Operation new = old
divisible by
true throw to monkey
false throw to monkey
items
new = old +
divisible by
true throw to monkey
false throw to monkey
etc
Day 5 (Advent of Code 2022)
Part 1
The day 5 challenge actually looks fun!
Our input looks like this:
[D]
[N] [C]
[Z] [M] [P]
1 2 3
move 1 from 2 to 1
move 3 from 1 to 3
move 2 from 2 to 1
move 1 from 1 to 2
Which is a visual representation of stacks, and so, for once, we have some serious parsing to do, and that means I finally have a good reason to bust out the nom crate.
GDB scripting and Indirect functions
Page 1
Go back to the homepage.