My solutions for the Advent of Code puzzles. Some are in Go, and some are in Rust. I also have some smatterings of other languages, like Lua (for no reason other than wanting to have a little fun).
All of the solutions written in Go are expecting to read input from STDIN. So, to run them:
$ go run 2016/01/part1.go < path/to/input.txt
substituting path/to/input.txt
to the file holding your personalized input
data.
The 2022 solutions use the embed package to embed the puzzle input into the executable at compile time.
To run the 2022 solutions:
$ go run 2022/01/main.go
The Rust solutions expect to read puzzle input from a file, whose path is specified as the first, positional argument to the program. To run the Rust solutions:
$ cd <YEAR>
$ cargo run --bin <DD> -- path/to/input.txt
substituting <YEAR>
with the event year (e.g. "2020"),
and substituting <DD>
with the zero-prefixed day (e.g. "02").