Skip to content

dylan-thomas832/aoc

Repository files navigation

Dylan's Advent of Code

This holds my attempts at Advent of Code solutions. The solutions will mostly be in C++ and Python for practicing.

Installation

This project uses a few Python packages for C++ linting/etc. On first setup, follow the instructions to properly setup your build environment.

  1. Clone the repo:
    git clone [email protected]:dylan-thomas832/aoc.git
  2. Change directory:
    cd aoc
  3. Create a development Python environment:
    python -m venv .venv
  4. Activate the environment:
    source .venv/bin/activate
  5. Install Python packages via pip:
    pip install -r requirements.txt
  6. Install pre-commit hooks:
    pre-commit install

Once you completed the developer install, you only have to repeat Step 4 when starting to work.

Building

This project uses cmake to build, and is currently only tested to build on Linux using GCC. cmake is installed via pip in the previous section, but you'll need to make sure a valid GCC is installed with version 8 or higher.

The project executables can be built simply by running make which will configure, build, and install everything via cmake. By default, it builds in RelWithDebInfo mode, but running make debug all or make release all can change the build type.

To clean the project, removing built object files & executables, run make clean. A complete rebuild, including forcing cmake to reconfigure is done via make new.

Running

Once built and installed, each day/part has a separate executable that can be run independently. The input file will be co-located with the day's source code:

$ ./src/2022/day1/run_part1.exe src/2022/day1/input.txt
The elf at 224 has 68923 calories

To DO

  • Improve CMake build types
  • Figure out how to debug
  • Create top-level include and src directories with years under it
  • Create script to compare outputs of each version
  • Create installation instructions

Progress

Days are deleted once completed & verified. This includes both versions.

  • 2022
    • Day 4
    • Day 5
    • Day 6
    • Day 7
    • Day 8
    • Day 9
    • Day 10
    • Day 11
    • Day 12
    • Day 13
    • Day 14
    • Day 15
    • Day 16
    • Day 17
    • Day 18
    • Day 19
    • Day 20
    • Day 21
    • Day 22
    • Day 23
    • Day 24
    • Day 25

About

My Advent of Code solutions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published