You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I decided together with some friends to learn [Rust](https://www.rust-lang.org/) with this year's AoC. So all except one task (day 24 task 2) were solved in Rust. For the one task, I ended up using a semi-manual approach using graph plotting (with graphviz). To speed up the plotting process, I decided to resort to python. I might add a rust solution in the futures.
The ferris icon is licensed under CC0 and can be found [here](https://commons.wikimedia.org/wiki/File:Original_Ferris.svg).
18
+
The python icon is licensed under the GPL and can be found [here](https://en.m.wikipedia.org/wiki/File:Python-logo-notext.svg).
19
+
20
+
## Structure
21
+
22
+
-[`examples`](./examples) contains the examples as separate files. The file names follow the format `day{day:02d}_{counter:02d}.txt`
23
+
-[`inputs`](./inputs) the same for the inputs, but without the counter, i.e., `day{day:02d}.txt`.
24
+
- The other directories are named after a programming language and contain the solutions to AoC in that programming language. This year, there is a [`rust`](./rust) and a [`python`](./python) directory. The READMEs in each directory tell you how to run the solutions.
This year I wanted to learn rust. So, all except one task were solved in rust only. I took a semi-manual approach for day24 part2 which required to plot a graph using graphviz. The tooling for python seemed easier than the one for rust, so I decided to go for python to speed up the process.
4
+
5
+
## Setup
6
+
7
+
Make sure you have [uv](https://docs.astral.sh/uv/getting-started/installation/) installed.
8
+
9
+
10
+
## Run an example
11
+
12
+
To run an example, you can simply run:
13
+
```shell
14
+
uv run aoc2024 <day><task> -e <example_id>
15
+
```
16
+
For example, if you want to run the first example for day 13 task 2, you would enter
17
+
18
+
```shell
19
+
uv run aoc2024 13 2 -e 1
20
+
```
21
+
22
+
## Run a solution
23
+
24
+
To run a solution, you can simply leave out the `-e <example_id>`:
25
+
```shell
26
+
uv run aoc2024 <day><task>
27
+
```
28
+
For example, if you want to run the solution for day 16 task 1, you would enter
0 commit comments