Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fichtefoll/advent-of-code

Solutions for the Advent of Code puzzle Advent calendar (in Rust & Haskell)
https://github.com/fichtefoll/advent-of-code

advent-of-code advent-of-code-2017 advent-of-code-2018 haskell rust

Last synced: 4 months ago
JSON representation

Solutions for the Advent of Code puzzle Advent calendar (in Rust & Haskell)

Awesome Lists containing this project

README

        

# FichteFoll's Advent of Code

These are just my (quick and dirty) solutions to the
[Advent of Code][] Advent calendar
for everyone to see, frown and laugh at.

[Advent of Code]: https://adventofcode.com/

Code is split into folders or files by year and day
with my input included for better reproducibility.
I did not complete all puzzles,
so you'll only see those that I completed.

For **2017**, wanted to use **Rust**,
which I had barely used until that point,
and not use any external crates.
Unstable and experimental features were allowed.

For **2018**, I *again* used **Rust**
because I like the language a lot
but don't have any real uses for it
considering my day-to-day language is Python.
~~I'm unsure whether I'll allow external crates this time,
but unstable is definitely allowed.~~
Crates are too useful.
Also, tests are nice.

For **2019**, I decided to go with **Haskell**.
That was definitely an interesting and fun choice,
although implementing some solutions
definitely took a bit longer than necessary.
For some days, I used the Linear package for its vector implementation,
although that was definitely not necessary.
The RecordDotNotation extension was added later,
but I would definitely have liked to used that.
I eventually gave up after spending a lot of time on day 18,
which I built a correct solution for
but could not for the life of me get performant enough,
despite implementing every optimization strategy
I could think of or found from discussions.

For **2020**, I am going back to **Rust**,
because it has been two years since I last did something with it.

For **2021**, **Rust** it is. It's just so much fun.

It's **2022** and you know the deal (**Rust**).
It might sound boring,
but I distract myself from "too much Rust"
(if that's even possible)
by comparing mine against other solutions
in a different language.
You can read more details and a summary
in [the subfolder's README](./2022#readme).

## Completed

The following completed counts are a snapshot of the respective year
before the end of December
(though until now I have not gone back to a previous year anyway).

```
day | 1111111111222222|
`->|1234567890123456789012345|
year | | sum
2017 |++-++++ +++ + + + ++- | 30
2018 |+++++++++++ + + ++ -| 31
2019 |+++++++++++ +++++ + | 34
2020 |+++++++++++++++++++ ++- | 43
2021 |+++++++++++++++++++++ ++-| 47
2022 |+++++++++++++++++++++++++| 50
```

`+` represents two stars, `-` one star