Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sevenseacat/advent_of_code
My Elixir solutions to Advent of Code
https://github.com/sevenseacat/advent_of_code
advent-of-code adventofcode
Last synced: about 5 hours ago
JSON representation
My Elixir solutions to Advent of Code
- Host: GitHub
- URL: https://github.com/sevenseacat/advent_of_code
- Owner: sevenseacat
- Created: 2021-11-29T12:30:44.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-12-16T10:27:27.000Z (about 2 months ago)
- Last Synced: 2024-12-16T11:27:40.064Z (about 2 months ago)
- Topics: advent-of-code, adventofcode
- Language: Elixir
- Homepage:
- Size: 4.06 MB
- Stars: 11
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Advent of Code
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/sevenseacat/advent_of_code/elixir.yml?branch=main&style=flat-square)](https://github.com/sevenseacat/advent_of_code/actions/workflows/elixir.yml)
My Elixir solutions for [Advent of Code](https://adventofcode.com/) (all years).
This repository is a work in progress - I haven't yet completed all puzzles, but I'm working on them!
Each yearly event has:
* Daily solutions in `lib/y/day.ex`
* Tests in `tests/y/day_test.exs`
* Benchmarking in `lib/y/README.md`
* Doctests where applicableEach day's solution follows a general formula:
* A module named after the day, eg. `Y2021.Day19`
* Reading any provided input file with `input/0` (sometimes not used)
* Parsing the input file into a useful structure with `parse_input/1`
* Piping the parsed input into a `part1/1` or `part2/1` function
* Optionally processing the result, eg. if `part1/1` returns a map with extra data but the question only needs a single key value.
* The test module for each day's solution verifies that the code gives the correct answer as input on the site, by calling `part1_verify/0` or `part2_verify/0`.For the puzzles I completed prior to Advent of Code 2021, I've copied them from their original codebases into this repo commit by commit, modifying them to fit into my new universal structure. I've also kept the original author dates on those commits, some of them date back to 2016!