{"id":18678647,"url":"https://github.com/chylex/advent-of-code","last_synced_at":"2026-05-07T09:34:47.093Z","repository":{"id":80098805,"uuid":"433239393","full_name":"chylex/Advent-of-Code","owner":"chylex","description":"My solutions to https://adventofcode.com.","archived":false,"fork":false,"pushed_at":"2022-12-27T12:51:00.000Z","size":313,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-20T00:12:33.497Z","etag":null,"topics":["advent-of-code","kotlin","nasm","python","rust","sql"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chylex.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":"2021-11-30T00:22:59.000Z","updated_at":"2023-07-13T15:26:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"3440b2d5-02b6-404e-9fed-d4bb13cb46c9","html_url":"https://github.com/chylex/Advent-of-Code","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chylex/Advent-of-Code","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chylex%2FAdvent-of-Code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chylex%2FAdvent-of-Code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chylex%2FAdvent-of-Code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chylex%2FAdvent-of-Code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chylex","download_url":"https://codeload.github.com/chylex/Advent-of-Code/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chylex%2FAdvent-of-Code/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32731648,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-07T02:14:30.463Z","status":"ssl_error","status_checked_at":"2026-05-07T02:14:29.405Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","kotlin","nasm","python","rust","sql"],"created_at":"2024-11-07T09:39:36.990Z","updated_at":"2026-05-07T09:34:47.077Z","avatar_url":"https://github.com/chylex.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"These are my solutions to [Advent of Code](https://adventofcode.com) puzzles!\n\nThis repository is likely going to be an utter mess of programming languages. If you're interested, read below for the list of used languages, and instructions to get them working on your machine.\n\nYears and days are organized in folders. Every day contains a source code file named `main` with the solution, and the input file `input.txt`. Some years also contain a `utils` folder with shared code used in each day (usually to read the input file).\n\nThe solutions always look for the input file in the working directory, so make sure the working directory is set to the day's folder.\n\nIf you use JetBrains IDEs, you can open each year's folder in the appropriate IDE. I have included a Run Configuration for each solved day, so you should see them in the Run/Debug Configurations menu.\n\n# Languages\n\n## \\[2022\\] Python\n\nThe `2022` folder does not have any special project. You can run the `main.py` file in each day's folder directly using Python 3.11 or newer (older versions may also work, but this is not guaranteed).\n\nYou should be able to load the `2022` folder into [PyCharm](https://www.jetbrains.com/pycharm/).\n\n## \\[2021\\] Kotlin\n\nThe `2021` folder contains a Gradle project (`build.gradle.kts`) that sets up every day as a source root and task that can be launched with `gradlew \u003cday\u003e` (for ex. `gradlew 01`).\n\nYou should be able to load the Gradle project into [IntelliJ IDEA](https://www.jetbrains.com/idea/).\n\n## \\[2020\\] Rust\n\nThe `2020` folder contains a Cargo project (`Cargo.toml`) that sets up every day as a binary target that can be launched with `cargo run --bin \u003cday\u003e` (for ex. `cargo run --bin 01`).\n\nYou should be able to load the Cargo project into [CLion](https://www.jetbrains.com/clion/).\n\n## \\[2017\\] PostgreSQL\n\nThe `2017` folder contains a Docker Compose file (`docker-compose.yml`) that launches a local PostgreSQL instance on `127.0.0.1:2017`, with the username `postgres` and password `aoc2017`. The container has the `2017` folder mounted to `/aoc`, so that PostgreSQL can see the input files.\n\nTo start the Docker container, enter the `2017` folder and run `docker compose up -d`. To stop and remove the Docker container and its data, run `docker compose down -v`.\n\nYou can execute the script for each day and get its output by running the following command. See [psql](https://www.postgresql.org/docs/current/app-psql.html) for the documentation of arguments and flags passed to the `psql` program.\n```\n# First, execute procedures.sql to set up procedures for turning input files into tables.\ndocker exec aoc-2017-postgres psql postgres postgres -f /aoc/utils/procedures.sql\n\n# Substitute \u003cday\u003e for the specific day you want to run.\ndocker exec aoc-2017-postgres psql postgres postgres -Atqf /aoc/\u003cday\u003e/main.sql\n\n# For example:\ndocker exec aoc-2017-postgres psql postgres postgres -Atqf /aoc/01/main.sql\n```\n\n**Every day's script begins by dropping all tables whose name begins with that day.** Don't execute these scripts on any database you care about.\n\nYou should be able to load the `2017` folder into [DataGrip](https://www.jetbrains.com/datagrip/), where you can attach the PostgreSQL data source, execute the scripts, and explore the tables created in the process.\n\n## \\[2015\\] NASM x64 Assembly\n\nThe `2015` folder contains a CMake project (`CMakeLists.txt`), which sets up every day as a CMake subproject.\n\nYou should be able to load the CMake project into [CLion](https://www.jetbrains.com/clion/), as long as you have a toolchain named `Visual Studio x64` set to use the `amd64` architecture.\n\nThe entry point is in `utils/main.c`, which reads the whole input file into a buffer and passes it as a parameter to the `entryPoint` function defined in each day's `main.asm`.\n\nNote that everything is targeted for Windows and assembly is not portable, so running on a different OS will most likely require some changes. To compile the code on Windows, you will need to:\n\n1. Install [Visual Studio](https://visualstudio.microsoft.com/) with `MSVC x64/x86 Build Tools`\n2. Install [NASM](https://www.nasm.us/pub/nasm/releasebuilds/?C=M;O=D) (the \"Executable only\" version will suffice, as long as you setup the system `%PATH%` environment variable to include the folder with `nasm.exe`)\n\nThe versions should not matter, but I used Visual Studio 2019 with `MSVC v142 (14.29)` and `NASM 2.15.05`.\n\n# Solved Days\n\n| Year | Day | Language |  /  | Year | Day | Language   |  /  | Year | Day | Language |\n|-----:|----:|----------|-----|-----:|----:|------------|-----|-----:|----:|----------|\n| 2015 |  01 | NASM x64 |  /  | 2017 |  01 | PostgreSQL |  /  | 2020 |  01 | Rust     |\n| 2015 |  02 | NASM x64 |  /  | 2017 |  02 | PostgreSQL |  /  | 2020 |  02 | Rust     |\n| 2015 |  03 | NASM x64 |  /  |      |     |            |  /  | 2020 |  03 | Rust     |\n|      |     |          |  /  |      |     |            |  /  | 2020 |  04 | Rust     |\n|      |     |          |  /  |      |     |            |  /  | 2020 |  05 | Rust     |\n|      |     |          |  /  |      |     |            |  /  | 2020 |  06 | Rust     |\n|      |     |          |  /  |      |     |            |  /  | 2020 |  07 | Rust     |\n|      |     |          |  /  |      |     |            |  /  | 2020 |  08 | Rust     |\n\n| Year | Day | Language |  /  | Year | Day | Language |\n|-----:|----:|----------|-----|-----:|----:|----------|\n| 2021 |  01 | Kotlin   |  /  | 2022 |  01 | Python   |\n| 2021 |  02 | Kotlin   |  /  | 2022 |  02 | Python   |\n| 2021 |  03 | Kotlin   |  /  | 2022 |  03 | Python   |\n| 2021 |  04 | Kotlin   |  /  | 2022 |  04 | Python   |\n| 2021 |  05 | Kotlin   |  /  | 2022 |  05 | Python   |\n| 2021 |  06 | Kotlin   |  /  | 2022 |  06 | Python   |\n| 2021 |  07 | Kotlin   |  /  | 2022 |  07 | Python   |\n| 2021 |  08 | Kotlin   |  /  | 2022 |  08 | Python   |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchylex%2Fadvent-of-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchylex%2Fadvent-of-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchylex%2Fadvent-of-code/lists"}