{"id":22988781,"url":"https://github.com/fabberr/aoc2024","last_synced_at":"2025-10-12T18:43:01.127Z","repository":{"id":263296772,"uuid":"889573791","full_name":"fabberr/aoc2024","owner":"fabberr","description":"Solutions for Advent of Code 2024 puzzles written in C++","archived":false,"fork":false,"pushed_at":"2024-12-08T02:50:45.000Z","size":82,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-12T18:42:59.398Z","etag":null,"topics":["advent-of-code","advent-of-code-2024","aoc","aoc-2024-in-cpp","aoc2024","cpp","cpp26","programming-challenge"],"latest_commit_sha":null,"homepage":"https://adventofcode.com/2024","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fabberr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-16T17:12:35.000Z","updated_at":"2024-12-08T02:50:49.000Z","dependencies_parsed_at":"2024-11-17T17:31:34.164Z","dependency_job_id":"b82fcf37-6621-4044-b32a-87ae4db77245","html_url":"https://github.com/fabberr/aoc2024","commit_stats":null,"previous_names":["fabberr/aoc2024"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fabberr/aoc2024","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabberr%2Faoc2024","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabberr%2Faoc2024/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabberr%2Faoc2024/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabberr%2Faoc2024/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fabberr","download_url":"https://codeload.github.com/fabberr/aoc2024/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabberr%2Faoc2024/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279012519,"owners_count":26085134,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["advent-of-code","advent-of-code-2024","aoc","aoc-2024-in-cpp","aoc2024","cpp","cpp26","programming-challenge"],"created_at":"2024-12-15T04:14:09.093Z","updated_at":"2025-10-12T18:43:01.099Z","avatar_url":"https://github.com/fabberr.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Advent of Code 2024 (C++)\n\nSolutions for [Advent of Code 2024](https://adventofcode.com/2024) puzzles written in C++.\n\n## Solutions\n\nSolutions are implemented by creating a new C++ source file in `src/solutions` and implementing the two functions declared `include/aoc2024/solution.hpp`, one for each of the day's puzzles. The inputs for the day should be placed in a text file located in `src/input`.\n\nThe entry point is defined in `src/main.cpp`, and already implements basic command line parsing and file handling logic.\n\nThe program accepts the following arguments:\n1. `\u003cinput_filename\u003e`: Path to the file containing the inputs for the day.\n2. `\u003csolution\u003e`: Selects which puzzle to solve for, `a` for the first puzzle, and `b` for the second one.\n\nA sample implementation is provided in `src/solutions/day00.cpp`, with its inputs in `src/input/day00.txt`.\n\n## Building\n\nTo build a solution, use the following compiler flags: `-std=c++26 -Iinclude`\n- Note: Only ONE implementation of `solution.hpp` should be provided.\n\n```bash\n# Ensure output directory exists and build the solution\n$ mkdir -p build; g++ -std=c++26 -Iinclude -o build/dayXX ./src/main.cpp ./src/solutions/dayXX.cpp\n```\n\n## Automation\n\n`aoc2024.sh` is a shell script for automating the process of implementing and running solutions by making use of [GNU Make](https://www.gnu.org/software/make). The script will create all the necessary files/targets for building and running solutions.\n\nNote that the script was designed to use paths _relative to the root directory_ of this repository and will refuse to run if called from elsewhere.\n\nThe script accepts two commands:\n- `new \u003csolution\u003e`: Cretes a new solution by creating an empty input file and the source file implementing `solution.hpp`. Two Make targets for building and running the solution will also be created.\n- `run \u003csolution\u003e [args]`: Runs a solution with the specified command line arguments. If the executable is not found in the `build` directory, the build target is invoked first.\n\nExample usage:\n\n```bash\n# Ensure the execute file mode bit is set for your user:\n$ chmod u+x ./aoc2024.sh\n\n# To create a new solution (e.g. Day 1 of the event):\n$ ./aoc2024.sh new day01\n\n# To build and run the first puzzle of the solution:\n$ ./aoc2024.sh run day01 a\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabberr%2Faoc2024","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabberr%2Faoc2024","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabberr%2Faoc2024/lists"}