{"id":19299212,"url":"https://github.com/bmatcuk/adventofcode2023","last_synced_at":"2025-10-29T07:49:41.129Z","repository":{"id":210402845,"uuid":"726103418","full_name":"bmatcuk/adventofcode2023","owner":"bmatcuk","description":"My solutions to the Advent of Code 2023","archived":false,"fork":false,"pushed_at":"2023-12-25T18:26:27.000Z","size":260,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-07T11:16:12.622Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","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/bmatcuk.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":"2023-12-01T14:41:05.000Z","updated_at":"2023-12-01T16:19:20.000Z","dependencies_parsed_at":"2023-12-25T20:31:29.998Z","dependency_job_id":"3f188837-75c2-4d11-b2c5-f243a9242774","html_url":"https://github.com/bmatcuk/adventofcode2023","commit_stats":null,"previous_names":["bmatcuk/adventofcode2023"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bmatcuk/adventofcode2023","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmatcuk%2Fadventofcode2023","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmatcuk%2Fadventofcode2023/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmatcuk%2Fadventofcode2023/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmatcuk%2Fadventofcode2023/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bmatcuk","download_url":"https://codeload.github.com/bmatcuk/adventofcode2023/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmatcuk%2Fadventofcode2023/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281584986,"owners_count":26526171,"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-10-29T02:00:06.901Z","response_time":59,"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":[],"created_at":"2024-11-09T23:10:33.243Z","updated_at":"2025-10-29T07:49:41.100Z","avatar_url":"https://github.com/bmatcuk.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Advent of Code, 2023 :christmas_tree:\nMy solutions to the [Advent of Code 2023] in [Kotlin].\n\nI like to use the Advent of Code as a learning opportunity. This year, I\ndecided on learning [Kotlin]. I have zero experience with the language.\n\n## Retrospective :santa:\nI must admit, my opinion of [Kotlin] was kind of sour after the first day or\ntwo. I found the language to be... adequate? That is to say: perfectly usable,\nbut without any stand-out features. It started to grow on me somewhere around\nday 3 or 4, I think. I appreciate the vast built-in functionally-inspired\nniceties, shorthands (such as `it`, data classes, and the concise syntax for\nprimary constructors), and familiar syntax (it was easy to learn).\n\nBut, it's not without its problems.\n* I find the regex engine to be severely lacking. I never did figure out how to\n  make it honor start and end anchors (ie, `^` and `$`). And, there's no\n  syntactical sugar for the regex language so you end up with a lot of `\\\\`.\n* No implicit conversions? In 2023? If I never see another compiler _error_\n  about comparing or performing math on an Int and a Long again, it'll be too\n  damn soon. Come on!\n* (Almost) everything is an expression is cool. I kind of like when languages\n  do that. But I'd argue that other languages do a better job of it. For\n  starters, the \"almost\" qualifier - why can't an assignment be an expression?\n  Then there was the error I ran into on [day 15, part 2]. The compiler reasons\n  that the return value of the `RGX.matchEntire(it)?.let { ... }` will be\n  `Unit` because it is the last statement in the enclosing `forEach`, which\n  expects a `Unit` return value. However, if you uncomment the lines below the\n  `matchEntire`, the compiler now throws an error inside the `let` block - code\n  that is unchanged by adding code below it! The reason is that the last\n  statement in the `let` is an `if` and not all paths return the same type\n  (there's no `else` for starters, and the three paths through the `if` return\n  `Unit`, `Boolean`, and a `Lens`, respectively). So now the compiler can't\n  figure out the return value of the `let`... the return value that literally\n  doesn't matter because it's not assigned to anything. Sure, since I don't\n  care about the return value, I probably should have used `also` instead of\n  `let`. But I think the compiler could do a better job reasoning the intention\n  here. Since the return value is unused, why not just assume it is `Unit` like\n  before?\n* Documentation. The docs are pretty nice. But in the stdlib api docs, I would\n  _kill_ for a scrollable side bar that had a list of all of the symbols. When\n  I knew exactly what I was looking for, it was somewhat easy to just Cmd+F\n  search for it (but even that was painful if the function was a common english\n  word, or, for example, something like MutableList on the collections page -\n  you have to step through a dozen matches before you get to the _actual_\n  MutableList class). When I vaguely knew what I was looking for (like, \"hmm, I\n  bet there's a function that does X - but what would it be called?\"), I had no\n  option but to scroll through everything.\n* I made the compiler very mad one day by trying to do a `.map(::SomeClass)`.\n  It's my understanding that should have worked, and I found examples of it on\n  stackoverflow. But, for me, the compiler threw an exception and died. Had to\n  change it to `.map { SomeClass(it) }` :shrug:\n\nBut, despite my complaints above, I did enjoy [Kotlin]. It wasn't particularly\nwell suited for solving AoC puzzles, such as some of the languages I chose in\nprevious years. But, as I became more comfortable with it, I found writing\n[Kotlin] to be pleasurable.\n\n:snowman_with_snow:\n\n[Advent of Code 2023]: https://adventofcode.com/2023\n[Kotlin]: https://kotlinlang.org/\n[day 15, part 2]: https://github.com/bmatcuk/adventofcode2023/blob/c7d201d505a257792e0ba32bbdf66e2e6b1f119e/day15/part2.kts#L136-L156\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmatcuk%2Fadventofcode2023","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbmatcuk%2Fadventofcode2023","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmatcuk%2Fadventofcode2023/lists"}