Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advent of code

These are my solutions to Advent of Code puzzles.

They were done out of order in different languages (first JS, some attemps in C++, more JS, and finally Python). Some years were initially not completed, but during the summer of 2025 I solved all remaining puzzles for all years in Python.

There is no commit history before 2025 as I reorganized an old set of repositories.

How to run

It depends on the years (and days...)

Python solutions

Python solutions use aocd to fetch inputs and a common library in lib for python solutions. A pip install -e . is required to make that work, as well as an AOC_SESSION env variable with the session ID from the AoC website. Then just run each day separately (eg. cd 2015; python d21.py).

Javascript solutions

Some solutions expect to run in the browser on the AOC webpage while being logged in, as they use the fetch API to get inputs. Copy-paste them in the developer console. That was the way I solved AoC initially. Please analyze the code before executing it. It may steal your credentials (no, it will not, but you should not trust a random internet dev).

Later on, I decided to build a small frontend app to host them, with a nice UI and graphic visualizations for some puzzles. For those:

  • Download your puzzle inputs and store them as <year>/input/<day>
  • Use a local webserver like python -m http.server or npm's serve in the year directory
  • Direct your browser to aoc.html

Note that for the latter, your browser may look like it's frozen for a while when running some solutions.

2015

  • Days 1-19 were done in JS in 2019 when I got stuck on solving that year's puzzles. They expect to run in the dev console on the AoC website. Day 19 is incomplete, but I still have the star. Probably ran some code from reddit.
  • Days 20-25 were done in Python in 2025.

2016

All done in 2025 in Python.

2017

All done in 2025 in Python.

2018

  • Days 1-4 were done in C++ in 2020, after I finished that year's puzzles. Download inputs into 2018/input/<day> and use cd 2018; make; aoc-2018. You will need SDL2 headers. Press Q to quit when day 4 is done. I don't have a solution for part 2 in here, but somehow I have the star. Probably stole some reddit code.
  • Days 5-25 were done in Python in 2025

2019

I loved Intcode so much. Made me want to do Synacor and Bound Variable later on.

  • Most of days 1-24 were done in JS in 2019. They run in the dev console on the AoC website. I got stuck on several of them.
  • All missing days were done in Python in 2025.

2020

Done in JS in 2020. Runs as a webapp on a local webserver.

2021

Done in JS in 2021. Runs as a webapp on a local webserver.

2022

Done in JS in 2022, but skipped day 22 part 2. Runs as a webapp on a local webserver.

2023

Done in JS in 2023. Runs as a webapp on a local webserver.

2024

I didn't do it in december 2024 as real life took over.

I did them in 2025 in Python, as an exercise to get back into Python dev. Each day looks for the input with the same basename in 2024/data/dXX.in, I wasn't using aocd at first. It also does not use the same common lib tools used by other Python years, as I did that later.

About

Advent of Code solutions

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages