What
This repository contains some WIP solutions in Python, Clojure and Elisp for Advent of Code 2022.
I’ll post the solutions as soon as I complete them, which could be some days after the puzzles are published, for as long as I keep my ability and motivation to complete them.
How
I’m not putting in git the input files. If you want to run the tests, you will
have to put your own inputs in files resources/aoc22/d[n].txt
.
For running the code you can do as follows:
Python
You need a recent python 3 (3.10+) and pytest for the tests:
Tests
$ pytest src/aoc22.py
Program
$ python3 src/aoc22.py
Clojure
If you have leiningen installed, it’s (almost) the standard way:
Tests
$ lein test aoc22 # Note tests are in the ns 'aoc22' itself
Program
$ lein test
Elisp
Evaluate the buffer. That will create two interactive commands:
aoc22-run-all
: runs all the functions for all days, callingmessage
with the full result.aoc22-run-all-tests
: runs all tests with ert, displaying the results on a new buffer.
If your Emacs version is < 28 these commands will be named my-run-all
and my-run-all-tests
respectively.