Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ilia-kosenkov/advent-of-code-2023
https://adventofcode.com/2023
https://github.com/ilia-kosenkov/advent-of-code-2023
Last synced: 19 days ago
JSON representation
https://adventofcode.com/2023
- Host: GitHub
- URL: https://github.com/ilia-kosenkov/advent-of-code-2023
- Owner: Ilia-Kosenkov
- License: mit
- Created: 2023-12-02T14:18:26.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2023-12-06T18:36:56.000Z (12 months ago)
- Last Synced: 2024-10-07T08:10:02.341Z (about 1 month ago)
- Language: F#
- Homepage:
- Size: 78.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Welcome to [Advent of Code 2023](https://adventofcode.com/2023)
This year it is going to be an `F#` advent.
My goal here is to build a 'pipeline' for each task, i.e. to read input once, process it (preferrably in a forward-only manner) and print out a result.
Each input is expected to be provided as an argument to the program, as a new-line-separated single string.
I plan to make each solution not throw any exception, but rather pipe everything as an `Option` of something. This makes the challenge a little bit harder.## How to run
You need `pwsh` and `dotnet 8` installed. Then you can just
```pwsh
./run.ps1 -Task 1 -Part 2 -InputFilePath task.input.txt
```Here `Task` is the task number (equal to the day), `Part` is either `1` or `2`, and `InputFilePath` is the path to the input file, which is read and send as an `stdin` to the chosen program.
## Solved tasks so far
- Day 1
- [First task](Task-01-01)
- [Second task](Task-01-02)
- Day 2
- [First task](Task-02-01)
- [Second task](Task-02-02)
- Day 3
- [First task](Task-03-01)
- [Second task](Task-03-02)
- Day 4
- [First task](Task-04-01)
- [Second task](Task-04-02)
- Day 5
- [First task](Task-05-01)## Lessons learned (Warning: spoilers ahead)
`Regex.Matches` returns only non-overlapping matches, which prevent its usage in task `01-02`. I was so confused until I realised it failed for cases like `"oneight"` (which should match to `18` and not `11` or `88`).