Skip to content

A repository for solving Advent of Code puzzles in Erlang

License

Notifications You must be signed in to change notification settings

yagogarea/advent_of_code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advent of Code

This repository contains my solutions to the Advent of Code puzzles using Erlang and the rebar build tool.

Overview

To start working on a new puzzle, first, enter the Erlang shell with:

rebar3 shell

Once 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.

Running Solutions

To run the solutions, you can use the following command:

rebar3 shell

Then, 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.

Advent of Code Data

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.

About

A repository for solving Advent of Code puzzles in Erlang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published