https://github.com/vanyle/advent-of-nim
The advent of code solved every year in Nim, with a CLI to help solve the problems
https://github.com/vanyle/advent-of-nim
Last synced: 6 months ago
JSON representation
The advent of code solved every year in Nim, with a CLI to help solve the problems
- Host: GitHub
- URL: https://github.com/vanyle/advent-of-nim
- Owner: vanyle
- Created: 2024-12-09T22:23:44.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2024-12-09T22:28:08.000Z (10 months ago)
- Last Synced: 2024-12-09T23:28:11.833Z (10 months ago)
- Language: Nim
- Size: 212 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
πAdvent of Code Helper
Crush your friends and foes using this automated tool
that fetchs the example, the problem and
automates trivial parts of the solving process for the Advent of Code
This tool is designed for the [πNim](https://nim-lang.org) programing language, which is in my opinion the best language for quickly solving AOC problems.
Run `./aoc` and let the command line guide you!
## π Getting started
You will need a working [Nim installation](https://github.com/nim-lang/choosenim).
Compile `aoc.nim` using `nim c -d:ssl -d:release aoc.nim` to generate an executable.
Run the generated executable `./aoc` or `aoc.exe` and let the program guide you. You can also use `./aoc.sh` or `./aoc.cmd` directly without compilation.
## β¨ Features
Automatically:
- Downloads the problem statement and case.
- Opens your text editor
- Runs your code and tests it
- Submits your solution
- Shows the performance of your solution
- Supports Linux, Windows and MacOS.A `toolbox.nim` file is provided where you can put code that is often needed for multiple days.
Currently, the `toolbox` contains function to quickly handle string parsing with no copies.## π More usage information
In general, the syntax is: `./aoc -y:year -d:day [more options]`
By specifying the year/day, you can work on past solutions (or past years), not just the latest one.The options are:
- `--noedit` : to disable the opening the text editor
- `--speed` : to compile with speed options (by default, the executable is compiled in debug mode to see errors)**Examples**
- `./aoc`
- `./aoc -y:2023 -d:11 --speed`
- `./aoc --noedit`## π§ TODO
- Generate HTML report with performance
- Generate a standalone result Nim or C file if requested for external repositories