{"id":19010980,"url":"https://github.com/spencerwi/adventofcode2018","last_synced_at":"2025-10-03T22:16:30.084Z","repository":{"id":150151338,"uuid":"159944520","full_name":"spencerwi/AdventOfCode2018","owner":"spencerwi","description":"Advent of code solutions for 2018","archived":false,"fork":false,"pushed_at":"2019-01-17T12:59:13.000Z","size":383,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-21T15:49:31.513Z","etag":null,"topics":["advent-of-code","advent-of-code-2018","crystal","crystal-lang"],"latest_commit_sha":null,"homepage":null,"language":"Crystal","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spencerwi.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":"2018-12-01T12:55:57.000Z","updated_at":"2019-02-13T04:43:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"76b46865-b941-4b4a-9643-a5a423737b47","html_url":"https://github.com/spencerwi/AdventOfCode2018","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/spencerwi/AdventOfCode2018","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spencerwi%2FAdventOfCode2018","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spencerwi%2FAdventOfCode2018/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spencerwi%2FAdventOfCode2018/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spencerwi%2FAdventOfCode2018/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spencerwi","download_url":"https://codeload.github.com/spencerwi/AdventOfCode2018/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spencerwi%2FAdventOfCode2018/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269324688,"owners_count":24398039,"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-08-07T02:00:09.698Z","response_time":73,"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-2018","crystal","crystal-lang"],"created_at":"2024-11-08T19:13:03.851Z","updated_at":"2025-10-03T22:16:25.040Z","avatar_url":"https://github.com/spencerwi.png","language":"Crystal","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Advent of Code solutions for 2018\n\n## Requirements\n\n[Crystal-lang](https://crystal-lang.org), at least 0.27.0\n\n## Running tests\n\nMost (but not all) solutions have tests, in a `spec/` subdirectory in the day's\ndirectory. To run the test, cd into the day's dir and run `crystal spec`.\n\n## What's the deal with that weird `unless PROGRAM_NAME` thing?\n\nNormally, you write your \"library\" logic in one Crystal file and your executable\n\"wrapper\" in another file, and your specs import the library file and test it.\n\nHowever, that's a lot of overhead for these problems, but I like the idea of \nbeing able to TDD my way to solutions given the sample input/outputs, so each of\nmy solutions checks to see if the file is being imported as part of running \nspecs (by looking at the current executable name and matching against a special\nname Crystal uses for the `crystal spec` command) and if so, doesn't execute the\n\"main\"/\"executable\" logic.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspencerwi%2Fadventofcode2018","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspencerwi%2Fadventofcode2018","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspencerwi%2Fadventofcode2018/lists"}