Skip to content

An attempt to solve the advent of code challenge in different langages

License

Notifications You must be signed in to change notification settings

remyCases/adventOfCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advent of code, an adventure to code

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.

Solved challenges 2024 edition

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

Solved challenges 2023 edition

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

Solved challenges 2022 edition

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

Compiler and tools

Nim

You'll need the Nim compiler. You should find tutorials about installation on the official website.

Rust

Same as Nim, compiler and cargo can be found on the official website.

Zig

Same as Nim and Rust, compiler can be found on the official website.

Cobol

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.

C99

GCC is used in this project, on windows it can be installed through msys2. CMake is used for compilation and build.

ASM

Asm is not really supported yet. It's more of a test currently.

Make

I use a makefile to centralize compilation and build for every language (yes even Rust).

Lua

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.

Building

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).

Running

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).

Wait, that's not the right solutions concidering the data I have...

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).

About

An attempt to solve the advent of code challenge in different langages

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published