{"id":24119541,"url":"https://github.com/rikedyp/advent-of-code","last_synced_at":"2026-03-04T19:31:30.771Z","repository":{"id":119746793,"uuid":"317847463","full_name":"rikedyp/Advent-of-Code","owner":"rikedyp","description":null,"archived":false,"fork":false,"pushed_at":"2024-03-05T10:20:03.000Z","size":63,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-28T21:12:49.474Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rikedyp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2020-12-02T11:57:02.000Z","updated_at":"2021-12-14T10:15:38.000Z","dependencies_parsed_at":"2025-01-11T09:53:33.996Z","dependency_job_id":"76a8f14e-8354-4919-aba4-24c9db5d8c8f","html_url":"https://github.com/rikedyp/Advent-of-Code","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rikedyp/Advent-of-Code","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rikedyp%2FAdvent-of-Code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rikedyp%2FAdvent-of-Code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rikedyp%2FAdvent-of-Code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rikedyp%2FAdvent-of-Code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rikedyp","download_url":"https://codeload.github.com/rikedyp/Advent-of-Code/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rikedyp%2FAdvent-of-Code/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30090517,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T18:31:08.343Z","status":"ssl_error","status_checked_at":"2026-03-04T18:31:07.708Z","response_time":59,"last_error":"SSL_read: 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":[],"created_at":"2025-01-11T09:53:27.184Z","updated_at":"2026-03-04T19:31:30.740Z","avatar_url":"https://github.com/rikedyp.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# AdventOfCode\nMy solutions to [Advent of Code](https://adventofcode.com/) problems.\n\nEach folder becomes a namespace when the project is linked. Toolkit is in `#.kit`.\n\n## Style\nThese solutions have been cleaned up and provided with additional commentary. When initially solving the problems, I experiment in the session until I get the correct answer as quickly as possible.\n\nFor example, for 2021 day 2, the line of code which provided my part 1 solution initially was:\n\n```APL\n      ×/{9 11∘.○((⍎⊃∘⌽)¨⍵)+.×1 0j1 0j¯1['fdu'⍳⊃¨⍵]}snl input2\n1962940\n```\n\nThis has been exploded out into the \"waterfall\" style of commentary:\n\n```APL\n Day2_1←{\n⍝ This solution uses complex numbers to represent 2-dimensional co-ordinates (horzontal position and depth)\n     input←snl ⍵                                           ⍝ One instruction per line\n     ×/9 11∘.○((⍎⊃∘⌽)¨input)+.×1 0J1 0J¯1['fdu'⍳⊃¨input]\n⍝                                         'fdu'⍳⊃¨input    ⍝ forward, down or up?\n⍝                              1 0J1 0J¯1[             ]   ⍝ 1 means +1 horizontal position\n⍝                                                          ⍝ 0J1  is +1 depth\n⍝                                                          ⍝ 0J¯1 is ¯1 depth\n⍝             ((⍎⊃∘⌽)¨input)                               ⍝ X values (magnitudes) are the last character in each line\n⍝                           +.×                            ⍝ Sum of magnitudes times directions\n⍝      9 11∘.○                                             ⍝ Separate final co-ordinates\n⍝    ×/                                                    ⍝ Multiply final co-ordinates\n }\n```\n\n## Workflow\n1. Start Dyalog with the [configuration file](https://help.dyalog.com/latest/#UserGuide/Installation%20and%20Configuration/Configuration%20Files.htm) `aoc.dcfg`.\n\n1. Go to this year's namespace and copy in the kit\n\n```APL\n      ⎕CS Y2022\n      #.kit.Init⍕⎕THIS\n```\n\n## Getting input\nAlthough I don't generally compete for the top spots in AoC, in theory it is important to import the input data as quickly as possible.\n\nBefore the new problem is released, log in to the [advent of code website](https://adventofcode.com).\n\nOpen the web developer tools.\n\n\u003e Press \u003ckbd\u003eF12\u003c/kbd\u003e or \u003ckbd\u003e\u003ckbd\u003eCtrl\u003c/kbd\u003e + \u003ckbd\u003eShift\u003c/kbd\u003e + \u003ckbd\u003e I \u003c/kbd\u003e (on Firefox)\n\n**Refresh** the page. **Right click** on the request and **copy** the request headers.\n\nPaste them into the variable `headers` in the `#.kit` namespace.\n\nYou can then use the `pget` function from the kit:\n\n```APL\n      input6←pget 2021 6\n```\n\n## Parsing input\nNow, the input is in the workspace as a simple character vector with embedded newline characters. So, the first step is usually to either split the input on newlines or 2-newlines.\n\nFor this I have the utilities `snl` (split new lines) and `sec` (section).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frikedyp%2Fadvent-of-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frikedyp%2Fadvent-of-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frikedyp%2Fadvent-of-code/lists"}