Skip to content

Advent of Code problems solved in OCaml with the Janestreet Core alternative standard library

License

Notifications You must be signed in to change notification settings

EthanOlpin/advent_of_ocaml

Repository files navigation

Advent of OCaml

Advent of Code problems solved in OCaml using the Jane Street Core alternative standard library

Solutions may be inefficient, anti-idiomatic, hot-garbage, etc. refer to them at your own risk.

Running the Solutions

Prerequisites

Instructions

  1. Clone the repo

  2. Switch to the new directory

  3. Create a new switch

    opam switch create advent_of_ocaml 5.1.0
  4. Update your PATH

    eval $(opam env)
  5. Install the project dependencies

    opam install . --locked
  6. Export your Advent of Code session ID (the session cookie when signed into adventofcode.com) to fetch your input

    Alternatively, manually add an input.txt file to bin/solutions/<year>/<day>/

    export AOC_SESSION_ID="<session ID>"
    
  7. Make the runner script executable

    chmod +x ./run.sh
  8. Run a solution

    ./run.sh <year> <day>

About

Advent of Code problems solved in OCaml with the Janestreet Core alternative standard library

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published