{"id":15611583,"url":"https://github.com/boxdot/aoc-2018","last_synced_at":"2025-06-11T09:33:22.477Z","repository":{"id":78593602,"uuid":"164203444","full_name":"boxdot/aoc-2018","owner":"boxdot","description":"Advent of Code 2018 solutions in Rust","archived":false,"fork":false,"pushed_at":"2019-01-05T11:00:04.000Z","size":175,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T14:45:38.747Z","etag":null,"topics":["advent-of-code-2018","rust"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/boxdot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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":"2019-01-05T10:10:04.000Z","updated_at":"2019-01-05T11:00:06.000Z","dependencies_parsed_at":"2023-05-16T19:15:42.804Z","dependency_job_id":null,"html_url":"https://github.com/boxdot/aoc-2018","commit_stats":{"total_commits":40,"total_committers":1,"mean_commits":40.0,"dds":0.0,"last_synced_commit":"8f0546602d1f77530438a7dc6cdece1d4cd2da22"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boxdot%2Faoc-2018","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boxdot%2Faoc-2018/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boxdot%2Faoc-2018/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boxdot%2Faoc-2018/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boxdot","download_url":"https://codeload.github.com/boxdot/aoc-2018/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boxdot%2Faoc-2018/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259239126,"owners_count":22826865,"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","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-2018","rust"],"created_at":"2024-10-03T06:05:34.654Z","updated_at":"2025-06-11T09:33:22.451Z","avatar_url":"https://github.com/boxdot.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Advent of Code 2018\n\nSolutions of puzzles are in Rust. Parsing of input is done most of the time by using the [`text_io`] crate.\n\n## What did I learn\n\nRust related:\n\n* Iterators are awesome! [`itertools`] gives you even more iterators.\n* In-place unit tests are exactly what you want.\n* Strings consist of UTF8 chars, but there are function to work with ASCII like [`to_ascii_uppercase`] (cf. day 5).\n* [`BinaryHeap`] in Rust is a max-heap, for min-heap you need to define an inverse order (cf. day 7). And there is a crate [`revord`] which does it for you.\n* [`nom`] is very powerful for parsing! In my case, it helped me to parse nested expressions (cf. day 20).\n* Sometimes [`HashMap`] API is slightly verbose (cf. [day 22, L93] in Dijkstra's shortest path).\n* [`BinaryHeap`] does not have increase/decrease functions for modifying elements, use [`priority_queue`] crate instead (cf. day 22).\n* Not to fight with borrow checker, you can use indexes, however be prepared to be hit by bugs (cf. day 24).\n\nAlgorithms related:\n\n* Day 7: Lexicographic Topological Sort\n* Day 15: I can write RPG's. 🙂\n* Day 20: Generator of strings from simple regex-like expressions\n* Days 19 + 21: Loop unrolling is hard in compilers (did it just manually).\n* Day 23: Spatial search and line/plane sweep (which did not work and where I spent most of the time). Also there are some nice solutions on the internet using powerful solvers like [`Z3`].\n\n[day 22, L93]: blob/master/src/day22.rs#L93\n[`itertools`]: https://crates.io/crates/itertools\n[`BinaryHeap`]: https://doc.rust-lang.org/std/collections/struct.BinaryHeap.html\n[`revord`]: https://crates.io/crates/revord\n[`nom`]: https://crates.io/crates/nom\n[`text_io`]: https://crates.io/crates/text_io\n[`HashMap`]: https://doc.rust-lang.org/std/collections/struct.HashMap.html\n[`priority_queue`]: https://crates.io/crates/priority_queue\n[`Z3`]: https://github.com/Z3Prover/z3\n[`to_ascii_uppercase`]: https://doc.rust-lang.org/std/primitive.char.html#method.to_ascii_uppercase\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboxdot%2Faoc-2018","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboxdot%2Faoc-2018","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboxdot%2Faoc-2018/lists"}