Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dfm/adventofcode
Holiday hacking because I'm a nerd
https://github.com/dfm/adventofcode
advent-of-code advent-of-code-2019 advent-of-code-2020 advent-of-code-2021 advent-of-code-2022
Last synced: 2 months ago
JSON representation
Holiday hacking because I'm a nerd
- Host: GitHub
- URL: https://github.com/dfm/adventofcode
- Owner: dfm
- License: apache-2.0
- Created: 2019-12-05T15:55:30.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2023-12-25T03:24:36.000Z (about 1 year ago)
- Last Synced: 2024-04-16T18:23:29.347Z (8 months ago)
- Topics: advent-of-code, advent-of-code-2019, advent-of-code-2020, advent-of-code-2021, advent-of-code-2022
- Language: Rust
- Homepage:
- Size: 689 KB
- Stars: 6
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
My solutions for [Advent of Code](https://adventofcode.com/).
2023 in Rust. Previous years:
- [2019 in C++11](https://github.com/dfm/adventofcode/tree/2019)
- [2020 in Haskell](https://github.com/dfm/adventofcode/tree/2020)
- [2021 in Rust](https://github.com/dfm/adventofcode/tree/2021)
- [2022 in C++20](https://github.com/dfm/adventofcode/tree/2022)It's not pretty, but sometimes it works(?):
[![Tests](https://github.com/dfm/adventofcode/workflows/Tests/badge.svg)](https://github.com/dfm/adventofcode/actions?query=workflow%3ATests)
## Project Layout
The solutions for each day live in `aoc/src/y2023/dDD.rs` where `DD` is the
relevant day of the month. To implement a new solution, create a new file for
the appropriate day, and it will be automatically discovered by
[MAGIC](https://github.com/dfm/adventofcode/tree/9a3c55aeac3c67f6008f702b0893b80a36b60caa/aoc-derive).
This can be automated by running:```bash
make new
```or
```bash
cargo run -- new
```You can specify the day to create using:
```bash
cargo run -- new --day 12
```## Usage Notes
**Session key:** To automatically download the inputs for a specific day, you'll
need to have your AofC session key saved somewhere. To find it, log into [the
AoC website](https://adventofcode.com), and use the developer tools to look at
the cookies to find your session key. Then save that key to a file called
`~/.config/aoc/key`. Then, the data files will be downloaded into
`~/.cache/aoc/2023` as text files.To run today's solution, use:
```bash
make
```which expands into:
```bash
cargo run -- --today
```To run all the checks and solutions, use:
```bash
make all
```## License
Copyright 2019-2023 Daniel Foreman-Mackey
Licensed under the [Apache License](/LICENSE).