{"id":22411243,"url":"https://github.com/ryanfleck/aoc24","last_synced_at":"2025-06-25T03:38:53.178Z","repository":{"id":266170290,"uuid":"897602391","full_name":"RyanFleck/aoc24","owner":"RyanFleck","description":"Advent of Code 2024 - Clojure solutions.","archived":false,"fork":false,"pushed_at":"2024-12-05T02:37:08.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-01T08:25:41.342Z","etag":null,"topics":["advent-of-code-2024","clojure"],"latest_commit_sha":null,"homepage":"","language":"Clojure","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/RyanFleck.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2024-12-02T23:03:40.000Z","updated_at":"2024-12-05T02:37:11.000Z","dependencies_parsed_at":"2024-12-03T00:29:39.023Z","dependency_job_id":null,"html_url":"https://github.com/RyanFleck/aoc24","commit_stats":null,"previous_names":["ryanfleck/aoc24"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RyanFleck%2Faoc24","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RyanFleck%2Faoc24/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RyanFleck%2Faoc24/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RyanFleck%2Faoc24/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RyanFleck","download_url":"https://codeload.github.com/RyanFleck/aoc24/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245773147,"owners_count":20669719,"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-2024","clojure"],"created_at":"2024-12-05T13:13:28.136Z","updated_at":"2025-03-27T02:45:31.923Z","avatar_url":"https://github.com/RyanFleck.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Advent of Code 2024\n\n[![Clojure CI](https://github.com/RyanFleck/aoc24/actions/workflows/clojure.yml/badge.svg)](https://github.com/RyanFleck/aoc24/actions/workflows/clojure.yml)\n[![codecov](https://codecov.io/github/RyanFleck/aoc24/graph/badge.svg?token=8FGtTTnD1b)](https://codecov.io/github/RyanFleck/aoc24)\n\nThis year I am taking on the challenges in **Clojure**.\n\nTo use, add a `profiles.clj` file with the following data:\n\n```clojure\n{:dev {:env {:aoc-session \"53616c7... \"}}}\n```\n\nYou'll need to step through and execute (`C-x C-e`) most of the\nsolutions step by step with a REPL.\n\n```clojure\n(comment\n  (= 2 (count-trues (map is-level-safe? (str-\u003ematrix sample)))) ; test case\n  (count-trues (map is-level-safe? (str-\u003ematrix input)))) ; correct!\n```\n\n## Solutions\n\n- [Day 1](https://github.com/RyanFleck/aoc24/blob/master/src/aoc24/day1.clj)\n- [Day 2](https://github.com/RyanFleck/aoc24/blob/master/src/aoc24/day2.clj)\n- [Day 3](https://github.com/RyanFleck/aoc24/blob/master/src/aoc24/day3.clj)\n\n```clojure\n(-\u003e\u003e\n (s/split day-3-input #\"do\")\n (filter #(not (s/starts-with? % \"n't\")))\n (apply str)\n (re-seq #\"mul\\((\\d+),(\\d+)\\)\")\n (map #(* (str-\u003eint (nth % 1)) (str-\u003eint (nth % 2))))\n (apply +)) ; correct!\n```\n\n- [Day 4](https://github.com/RyanFleck/aoc24/blob/master/src/aoc24/day4.clj) (just part one)\n\n```clojure\n(defn day-4-answer [input]\n  (let [rows (get-rows input)\n        cols (get-columns input)\n        diag-se (get-diagonal-rows-se input)\n        diag-sw (get-diagonal-rows-sw input)\n        combined (flatten (apply merge rows cols diag-se diag-sw))\n        reversed (map #(apply str (reverse %)) combined)\n        all (flatten (apply merge combined reversed))]\n\n    (count (re-seq #\"XMAS\" (s/join \"-\" all)))))\n```\n\n- [Day 5](https://github.com/RyanFleck/aoc24/blob/master/src/aoc24/day5.clj)\n\n## License\n\nCopyright © 2024 Ryan Fleck\n\nThis program and the accompanying materials are made available under the\nterms of the Eclipse Public License 2.0 which is available at\nhttp://www.eclipse.org/legal/epl-2.0.\n\nThis Source Code may also be made available under the following Secondary\nLicenses when the conditions for such availability set forth in the Eclipse\nPublic License, v. 2.0 are satisfied: GNU General Public License as published by\nthe Free Software Foundation, either version 2 of the License, or (at your\noption) any later version, with the GNU Classpath Exception which is available\nat https://www.gnu.org/software/classpath/license.html.\n\n## Code Coverage\n\nUnit tests aren't critical to this project, but visualizations are still cool:\n\n![Code Coverage Tree](https://codecov.io/github/RyanFleck/aoc24/graphs/tree.svg?token=8FGtTTnD1b)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanfleck%2Faoc24","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryanfleck%2Faoc24","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanfleck%2Faoc24/lists"}