This repository contains my solutions to the Advent of Code puzzles using Erlang and the rebar build tool.
To start working on a new puzzle, first, enter the Erlang shell with:
rebar3 shellOnce inside the shell, you can then initialize a new day with:
aoc_manager:init_day(Year, Day).This command automatically creates a directory with a template for the specified year and day to develop and test solutions. Additionally, it sends an HTTP request to fetch the HTML content of the puzzle's page for the specified day and extracts the problem statement from that HTML.
To run the solutions, you can use the following command:
rebar3 shellThen, you can run the solution for part one of a specific day with:
aoc_${Year}_day${Day}:sol(${Input}).The solution of the second part of the puzzle is also available with:
aoc_${Year}_day${Day}:sol2(${Input}).Replace ${Year}, ${Day}, and ${Input} with the appropriate year, day, and input data for the puzzle.
I do not upload the content of the Advent of Code problem statements in this repository as per the creator's guidelines for Advent of Code. Because of this, you will not see the problem statements or the tests in this repository.