Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/prillan/adventofcode-solutions
My Haskell (and other) solutions to Advent of Code, adventofcode.com.
https://github.com/prillan/adventofcode-solutions
advent-of-code
Last synced: 14 days ago
JSON representation
My Haskell (and other) solutions to Advent of Code, adventofcode.com.
- Host: GitHub
- URL: https://github.com/prillan/adventofcode-solutions
- Owner: Prillan
- Created: 2015-12-06T23:58:31.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2024-12-13T19:01:15.000Z (15 days ago)
- Last Synced: 2024-12-13T20:18:01.084Z (15 days ago)
- Topics: advent-of-code
- Language: Haskell
- Homepage:
- Size: 2.16 MB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.base.md
Awesome Lists containing this project
README
Solutions to [Advent of Code](https://adventofcode.com/) problems in
Haskell. Some problems have also been solved in other languages. All
solutions are noted below.## Completion
$$$COMPLETION$$$
## Running the Code
Setting up the environment for a specific language, day and year is as
simple as running `./aoc -l LANG DAY YEAR`. Day is the only required
value, the others default to `hs` (Haskell) and 2020 respectively.```
$ # Haskell
$ ./aoc 23
Setting up day 23 (2020, hs)
Compile and run with:
ghc -O2 run.hs && time ./run
$ ghc -V
The Glorious Glasgow Haskell Compilation System, version 8.8.4
$ exit
$ # ASM
$ ./aoc -l asm 23
Setting up day 23 (2020, asm)
Compile and run with:
nasm -felf64 run.asm && ld -o run run.o && time ./run < input.txt
$ nasm -v
NASM version 2.14.02 compiled on Jan 1 1980
```## Language Completion
$$$LANGUAGE_COMPLETION$$$
## Notes
- For 2020's event I (finally) started adding a library for common
functions, it can be found [here](./adventofcode).
- The correct version of GHC can be pulled in by simply running
`nix-shell`. Of course, that requires that you have
[Nix](https://nixos.org/) installed.
- I'm not sure what version of GHC (+ libraries) I used for earlier
years. I'll try to clean that up.
- This README is also a WIP...## TODO
- Use a single cabal project?