{"id":20657673,"url":"https://github.com/perrutquist/aoc2018","last_synced_at":"2026-05-28T01:02:03.486Z","repository":{"id":119977659,"uuid":"160067669","full_name":"perrutquist/aoc2018","owner":"perrutquist","description":"My Julia solutions to Advent of Code 2018","archived":false,"fork":false,"pushed_at":"2020-02-08T14:17:36.000Z","size":79,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-15T02:14:48.521Z","etag":null,"topics":["advent-of-code-2018","julia","julialang"],"latest_commit_sha":null,"homepage":"","language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/perrutquist.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2018-12-02T16:37:50.000Z","updated_at":"2021-05-11T16:19:06.000Z","dependencies_parsed_at":"2023-06-14T14:15:42.490Z","dependency_job_id":null,"html_url":"https://github.com/perrutquist/aoc2018","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/perrutquist/aoc2018","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perrutquist%2Faoc2018","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perrutquist%2Faoc2018/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perrutquist%2Faoc2018/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perrutquist%2Faoc2018/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/perrutquist","download_url":"https://codeload.github.com/perrutquist/aoc2018/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perrutquist%2Faoc2018/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33589684,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-27T02:00:06.184Z","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-2018","julia","julialang"],"created_at":"2024-11-16T18:22:18.954Z","updated_at":"2026-05-28T01:02:03.450Z","avatar_url":"https://github.com/perrutquist.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Advent of Code (2018) in Julia\n\nThis is a repository of my solutions to the AoC 2018 contest.\n\nFor maximum fun, try writing you own solutions before looking at somebody else's. However, there is some code in this repository that simply serves as a framework for looping over problems, loading data and printing results, and this code you might want to reuse.\n\n## Usage\n\nCopy `solutions_template.jl` and use as a starting point for writing your solutions.\n\nEdit `aoc2018.jl` and modify the line that reads `include(\"solutions_per.jl\")` (near the top) to instead use your solutions file.\n\nFor each day, a `solve` method needs to be written.\n```\nsolve(::Val{day}, ::Val{part}, list)\n```\nThis function takes a list of strings (input lines) and computes the solution.\n\nThe `solve` methods for each day will usually consist of some code that is common to the two parts, followed by an `if` statement that computes the solution for each part. However, it is also possible to write completely separate methods for the two parts.\n\nIt is convenient to start each `solve` method with `data = scan.(day, lines)`, where `scan` is a function that converts each line into a more useful format. For example:\n```\nscan(::Val{1}, line) = parse(Int, line)\n```\n\nStore the input data for day `1` as a file named `input1.txt`, and so on. Then run `include(\"aoc2018.jl\")` from the Julia REPL. The `solve` function will be called for each day (1-25) and part (1-2), something like:\n```\nfor day in 1:25\n    for part in 1:2\n        println(\"Day $day, part $part: \", solve(Val(day), Val(part), readlines(\"input$day.txt\")))\n     end\nend\n```\n\nRe-running the `include` command will replace the entire module, re-scan all data, and re-run the computations. (No need to restart Julia.)\n\nThe global variables `D1`, `D2`... will contain the input data (as returned by `scan`).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperrutquist%2Faoc2018","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperrutquist%2Faoc2018","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperrutquist%2Faoc2018/lists"}