Sorry for the pun.
This project is an attempt to solve the advent of code challenge in various programming languages I'm learning.
Currently only a Nim, Cobol, Rust, Zig and C versions are available. Maybe other versions will emerged (eg: Asm, Haskell, ...), depending of my spare time and my willingness to test myself.
It should work for both Windows and Linux architectures.
Days | Rust | C99 |
---|---|---|
1 | ✔️ | ❌ |
2 | 〰️ | ❌ |
3 | ✔️ | ❌ |
4 | ✔️ | ❌ |
5 | 〰️ | ❌ |
6 | ❌ | ❌ |
7 | ❌ | ❌ |
8 | ❌ | ❌ |
9 | ❌ | ❌ |
10 | ❌ | ❌ |
11 | ❌ | ❌ |
12 | ❌ | ❌ |
13 | ❌ | ❌ |
14 | ❌ | ❌ |
15 | ❌ | ❌ |
16 | ❌ | ❌ |
17 | ❌ | ❌ |
18 | ❌ | ❌ |
19 | ❌ | ❌ |
20 | ❌ | ❌ |
21 | ❌ | ❌ |
22 | ❌ | ❌ |
23 | ❌ | ❌ |
24 | ❌ | ❌ |
25 | ❌ | ❌ |
I've currently stopped working on them since the 2024 edition is here.
Days | Nim | Rust | Zig | C99 |
---|---|---|---|---|
1 | ✔️ | ✔️ | ✔️ | ✔️ |
2 | ✔️ | ✔️ | ❌ | ✔️ |
3 | ✔️ | ✔️ | ❌ | ❌ |
4 | ❌ | ✔️ | ❌ | ❌ |
5 | ❌ | 〰️ | ❌ | ❌ |
6 | ❌ | ✔️ | ❌ | ❌ |
7 | ❌ | ✔️ | ❌ | ❌ |
8 | ❌ | ✔️ | ❌ | ❌ |
9 | ❌ | ✔️ | ❌ | ❌ |
10 | ❌ | 〰️ | ❌ | ❌ |
11 | ❌ | ❌ | ❌ | ❌ |
12 | ❌ | ❌ | ❌ | ❌ |
13 | ❌ | ❌ | ❌ | ❌ |
14 | ❌ | ❌ | ❌ | ❌ |
15 | ❌ | ❌ | ❌ | ❌ |
16 | ❌ | ❌ | ❌ | ❌ |
17 | ❌ | ❌ | ❌ | ❌ |
18 | ❌ | ❌ | ❌ | ❌ |
19 | ❌ | ❌ | ❌ | ❌ |
20 | ❌ | ❌ | ❌ | ❌ |
21 | ❌ | ❌ | ❌ | ❌ |
22 | ❌ | ❌ | ❌ | ❌ |
23 | ❌ | ❌ | ❌ | ❌ |
24 | ❌ | ❌ | ❌ | ❌ |
25 | ❌ | ❌ | ❌ | ❌ |
I've currently stopped working on them since the 2023 edition is here.
Days | C99 | GnuCobol | Nim | Rust |
---|---|---|---|---|
1 | ✔️ | ✔️ | ✔️ | ✔️ |
2 | ✔️ | ✔️ | ✔️ | ✔️ |
3 | ✔️ | ✔️ | ✔️ | ❌ |
4 | ✔️ | ✔️ | ✔️ | ❌ |
5 | ❌ | ✔️ | ✔️ | ❌ |
6 | ❌ | ❌ | ✔️ | ❌ |
7 | ❌ | ❌ | ❌ | ❌ |
8 | ❌ | ❌ | ❌ | ❌ |
9 | ❌ | ❌ | ❌ | ❌ |
10 | ❌ | ❌ | ❌ | ❌ |
11 | ❌ | ❌ | ❌ | ❌ |
12 | ❌ | ❌ | ❌ | ❌ |
13 | ❌ | ❌ | ❌ | ❌ |
14 | ❌ | ❌ | ❌ | ❌ |
15 | ❌ | ❌ | ❌ | ❌ |
16 | ❌ | ❌ | ❌ | ❌ |
17 | ❌ | ❌ | ❌ | ❌ |
18 | ❌ | ❌ | ❌ | ❌ |
19 | ❌ | ❌ | ❌ | ❌ |
20 | ❌ | ❌ | ❌ | ❌ |
21 | ❌ | ❌ | ❌ | ❌ |
22 | ❌ | ❌ | ❌ | ❌ |
23 | ❌ | ❌ | ❌ | ❌ |
24 | ❌ | ❌ | ❌ | ❌ |
25 | ❌ | ❌ | ❌ | ❌ |
You'll need the Nim compiler. You should find tutorials about installation on the official website.
Same as Nim, compiler and cargo can be found on the official website.
Same as Nim and Rust, compiler can be found on the official website.
First you'll need the Cobol compiler. And depending on your plateform it can be a challenge to get there. I personnally installed GnuCobol via msys2 on windows. Good luck.
GCC is used in this project, on windows it can be installed through msys2. CMake is used for compilation and build.
Asm is not really supported yet. It's more of a test currently.
I use a makefile to centralize compilation and build for every language (yes even Rust).
Some lua scripts are used during compilation and to run the project. Lua is then mandatory for this project, compiler can be found on the official website.
Once everything is installed, to compile simplely run in the root folder:
make build_all
or
make build_xxx
where xxx is either nim
, rust
, c99
, zig
or cob
if you only want to compile a specific language. More options are available for debugging or to use an other compiler (clang for instance).
To execute a specific part (PART) of a challenge (DAY) of a peculiar edition (YEAR) in a list of languages (XXX ...), run:
./adventLaunch.lua XXX ... -y YEAR -d DAY -p PART
or
lua54 .\adventLaunch.lua XXX ... -y YEAR -d DAY -p PART
Of course not every combinations exists (yet)
As far as I know, there are always two parts during each days, so PART=1
will run the first part, and PART=2
the second part.
If no language is given, the solution will run all available languages.
For instance ./adventLaunch.lua -y 2022 -d 2 -p 1
will run the first part of the second day of the 2022 edition written every languages (nim, rust, cobol, c99, zig and asm).
In the YEAR/data
folder, there are the data used to solve each challenge. I'm using data I was given during the challenge, and I don't know if everyone was given the same (I expect not).