Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/vrugtehagel/aoc-2024

Advent of Code 2024
https://github.com/vrugtehagel/aoc-2024

advent-of-code aoc-2024 aoc-2024-in-deno

Last synced: 2 days ago
JSON representation

Advent of Code 2024

Awesome Lists containing this project

README

        

# Advent of Code 2024

Let's try and see how far I can get in
[Advent of Code](https://adventofcode.com/) using [Deno](https://deno.com/)!

```
-***=.
:*#####*: *
-****###*+.:. .
-@@@@@@@@@..:! .# %. @@@.
@@*.=%=.+%@@@ # # .#@. #: #
@%:. *%= .-#@@ @@@@@ #- -@ @
@#: :#@ @ @ @. .@ #. .%
@*: .. .=%@ @ # #%=# %@@
@#- .*=::.::=%@@
@@= .%@@@@@
@#: *@ *
@@+ :@@
@%= =@ *
@%- =@ *
@%- -@
@%= .%@
@%+ :@@ @@@@@
@*. .%@ @@@*=-:::::-+#@@@
@%- .-%@@@@%=:.. ...=%@@ *
@*. .-%@
@@=. .-#@@
@@=. .-#@@ @@@@
@@=. .:+%@@@ @@@++@@
@@+. ..:-=++++=-:.-%@
@%: .*@@
@@#-. .-*%@
@@%#=. .:-*#%@@
@@@%%#-. .:---: .#*****##%%@@@@
@%=.=#+. .-@@@#: .#@@@@
@#: -#-. :%@*+*: .+@
@*:.**. :#@@#%#: .=@
@@@@@=:...:=@@ @@@#-::::-*@
@@@@@@@@@ @@@@@@@@
```

Solutions are written in TypeScript or WASM. The latter can be written in `.wat`
files and are compiled automatically, but require `wat2wasm` to be installed.
However, `.wasm` files are committed to the repository, which Deno can run, so
`wat2wasm` is _not_ necessary to run the existing WASM solutions.

The tasks available are:

- `deno task day [day]` to run the solution for a specific day, with an optional
`--example` flag. Here, `[day]` should be replaced with the day number (e.g.
`deno task day 3`). It then runs each solution, for both parts, both example
and real inputs, and compares them against the specified output files, if any.
If the `--example` flag is given, the main inputs are ignored (for easier
debugging).
- `deno task test` runs all solutions against the real inputs. If an output is
not given, the test is skipped. This task runs on commits to `main`.