2025-01-14 20:15:09 +00:00
|
|
|
# Advent
|
2025-01-06 13:57:49 +00:00
|
|
|
|
2025-01-14 20:15:09 +00:00
|
|
|
The goal of this project is to get all 500 currently available stars in the form
|
2025-01-23 05:36:10 +00:00
|
|
|
of one single Idris application, and thoroughly document the results as literate
|
|
|
|
Idris files.
|
2025-01-06 13:57:49 +00:00
|
|
|
|
2025-01-23 05:57:16 +00:00
|
|
|
## Authors Note
|
|
|
|
|
|
|
|
The solutions contained in this project are intended to be read in sequential
|
|
|
|
order, though can reasonably be read in any order if you have a good level of
|
|
|
|
familiarity with more advanced functional programming topics.
|
|
|
|
|
|
|
|
The solutions will involve progressively more advanced topics as day and year
|
|
|
|
number increase, though I try not to introduce too much within the scope of any
|
|
|
|
one day.
|
|
|
|
|
|
|
|
Suggestions and other feedback are highly welcome, please reach out to me via
|
|
|
|
any platform you know me on, or send an email to the
|
|
|
|
[~thatonelutenist/public-inbox](https://lists.sr.ht/~thatonelutenist/public-inbox)
|
|
|
|
mailing list on source hut.
|
|
|
|
|
2025-01-23 06:05:51 +00:00
|
|
|
While this project is intended to read more like a book, while it is still a
|
|
|
|
work in progress, you can follow its development as a psuedo-blog by subscribing
|
|
|
|
to the rss feed for the repository in your feed reader:
|
|
|
|
https://git.stranger.systems/Idris/advent.rss
|
|
|
|
|
2025-01-23 05:57:16 +00:00
|
|
|
## Index of non-day modules
|
2025-01-06 13:57:49 +00:00
|
|
|
|
|
|
|
- [Runner](src/Runner.md)
|
|
|
|
|
2025-01-14 20:15:09 +00:00
|
|
|
Provides data structures for structuring the division of the project into
|
|
|
|
years, days, and parts.
|
2025-01-10 19:16:31 +00:00
|
|
|
|
|
|
|
- [Main](src/Main.md)
|
|
|
|
|
2025-01-14 20:15:09 +00:00
|
|
|
Provides the `Runner` based command line interface for running a selected day's
|
|
|
|
solution.
|
2025-01-10 19:16:31 +00:00
|
|
|
|
2025-01-06 13:57:49 +00:00
|
|
|
- [Util](src/Util.md)
|
|
|
|
|
2025-01-14 20:15:09 +00:00
|
|
|
Provides extensions of the functionality of the standard library and external
|
|
|
|
libraries. Extensions to the standard library are in the base of this module.
|
|
|
|
|
2025-01-06 13:57:49 +00:00
|
|
|
- [Util.Eff](src/Util/Eff.md)
|
2025-01-14 20:15:09 +00:00
|
|
|
|
|
|
|
Extend the functionality of the effects included in the
|
|
|
|
[eff](https://github.com/stefan-hoeck/idris2-eff/) library
|
2025-01-06 13:57:49 +00:00
|
|
|
|
2025-01-23 05:17:19 +00:00
|
|
|
- [Util.Digits](src/Util/Digits.md)
|
|
|
|
|
|
|
|
Provide views that enable recursively pattern matching numbers as lists of
|
|
|
|
digits, in both ascending and descending order of significance.
|
|
|
|
|
2025-01-23 05:57:16 +00:00
|
|
|
## Index of years and days
|
2025-01-06 13:57:49 +00:00
|
|
|
|
|
|
|
- 2015
|
|
|
|
- [Day 1](src/Years/Y2015/Day1.md)
|
2025-01-23 05:57:16 +00:00
|
|
|
|
|
|
|
Warm up problem, breaks in our new runner and not much else interesting.
|
|
|
|
|
2025-01-06 13:57:49 +00:00
|
|
|
- [Day 2](src/Years/Y2015/Day2.md)
|
2025-01-23 05:57:16 +00:00
|
|
|
|
|
|
|
An early hint of effectful parsing.
|
|
|
|
|
2025-01-06 19:04:10 +00:00
|
|
|
- [Day 3](src/Years/Y2015/Day3.md)
|
2025-01-23 05:57:16 +00:00
|
|
|
|
|
|
|
Peculiarities of writing mutually recursive functions in dependently typed
|
|
|
|
languages.
|
|
|
|
|
2025-01-07 14:26:28 +00:00
|
|
|
- [Day 4](src/Years/Y2015/Day4.md)
|
2025-01-23 05:57:16 +00:00
|
|
|
|
|
|
|
Basic FFI to openssl to steal its MD5 function for Idris's use.
|
|
|
|
|
2025-01-07 16:47:05 +00:00
|
|
|
- [Day 5](src/Years/Y2015/Day5.md)
|
2025-01-23 05:57:16 +00:00
|
|
|
|
|
|
|
First introduction to views and dependent pattern matching[^1].
|
|
|
|
|
2025-01-10 18:31:00 +00:00
|
|
|
- [Day 6](src/Years/Y2015/Day6.md)
|
2025-01-23 05:57:16 +00:00
|
|
|
|
|
|
|
Naive approach to handling the first 2d grid problem.
|
|
|
|
|
2025-01-10 23:02:30 +00:00
|
|
|
- [Day 7](src/Years/Y2015/Day7.md)
|
2025-01-23 05:57:16 +00:00
|
|
|
|
|
|
|
Introduces dependent maps and indexed type families.
|
|
|
|
|
2025-01-14 20:52:04 +00:00
|
|
|
- [Day 8](src/Years/Y2015/Day8.md)
|
2025-01-23 05:57:16 +00:00
|
|
|
|
|
|
|
Proper effectful parsers and non-determinism in effect stacks.
|
|
|
|
|
2025-01-18 03:20:51 +00:00
|
|
|
- [Day 9](src/Years/Y2015/Day9.md)
|
2025-01-23 05:57:16 +00:00
|
|
|
|
|
|
|
Naive approach to handling the first graph traversal problem.
|
|
|
|
|
2025-01-23 03:23:05 +00:00
|
|
|
- [Day 10](src/Years/Y2015/Day10.md)
|
2025-01-23 05:57:16 +00:00
|
|
|
|
|
|
|
Introduce our `Digits`, dependent pattern matching on integers as lists of
|
|
|
|
digits.
|
|
|
|
|
2025-01-23 03:29:38 +00:00
|
|
|
- [Day 11](src/Years/Y2015/Day11.md)
|
2025-01-23 05:57:16 +00:00
|
|
|
|
|
|
|
Introduces refinement types
|
|
|
|
|
|
|
|
## References
|
|
|
|
|
|
|
|
[^1]: Idris 2 Manual:
|
|
|
|
[Views and the "with" rule](https://idris2.readthedocs.io/en/latest/tutorial/views.html#views-and-the-with-rule)
|