advent_of_code

Version, currently main branch1 version
  • main branchlatestDec 23, 2024

github.com/gregawoods/advent-of-code-crystal-2024

Advent of Code solutions in Crystal

1 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  advent_of_code:
    github: gregawoods/advent-of-code-crystal-2024
    branch: main

main is a branch, not a release, so this tracks it rather than pinning a version.

Then run:

shards install

shard.yml

Crystal
>= 1.14.0
License
MIT
Author
Greg Woods
Target
  • advent_of_code from src/advent_of_code.cr

Dependencies

Runtime Dependencies

README

Advent of Code

Crystal solutions to Advent of Code.

Installation

First install crystal.

Note: If on macOS, I recommend installing via homebrew because it includes interpreter support. The current version installed by asdf does not support the interpreter.

Usage

Create a file at .session and enter your cookie value.

Download input for a day:

crystal run ./src/advent_of_code.cr -- -d 3

Solve a day:

crystal run ./src/advent_of_code.cr -- -s 1

Testing

Run all tests:

crystal spec

Run a specific test:

crystal spec spec/01_spec.cr:8