Advent of code solutions from the me
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
haskal 21f67edf06 all: add my inputs directory 10 months ago
inputs all: add my inputs directory 10 months ago
scripts day 25: all done.... 10 months ago
.gitignore all: add my inputs directory 10 months ago
1.rkt day 1: shonks 11 months ago
2.rkt clean up day 2 solution with fancy stuff 11 months ago
3.rkt day 3: triple shork 11 months ago
4.rkt day 4: cleaned up version 11 months ago
5.rkt day 5: cleaned up version 11 months ago
6.rkt day 6: initial implementation 11 months ago
7.rkt day 7: cleaned up version using graph-lib 11 months ago
8.rkt day 8 impl 3: the program analysis solution 11 months ago
9.rkt day 9: fix bug that didn't change the answer 11 months ago
10.rkt day 10: shark 10 months ago
11.rkt day 11 10 months ago
12.rkt day 12: use #:result 10 months ago
13.rkt day 13: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 10 months ago
14.rkt day 14: solution without bitvectors 10 months ago
15.rkt day 15: use unsafe for more fast 10 months ago
16.rkt day 16: implement bipartite-matching solution 10 months ago
17.rkt day 17: extremely minor fix 10 months ago
18.rkt day 18: minor cleanups 10 months ago
19.rkt day 19: the import solution version 10 months ago
20.rkt day 20: okay this is some of the worst code ever.. 10 months ago
21.rkt day 21: implement stable bipartite matching result 10 months ago
22.rkt day 22: some cleanup/optimization 10 months ago
23.rkt day 23: make it faste 10 months ago
24.rkt day 24: use complex numbers for great faste 10 months ago
25.rkt day 25: make it nicer 10 months ago
COPYING initial commit 11 months ago
LICENSE initial commit 11 months ago day 20: okay this is some of the worst code ever.. 10 months ago

haskal's advent of code 2020 solutions


third party packages used so far

  • curly-fn and threading: all
  • graph: day 7 +
  • brag: day 19

a guide to this repo

(pregexp #px"([0-9]+).rkt" (list _ day))

these are the solution files for day. some of them have two versions, click on the history button to view both. the first version is the original solution i wrote, and the second version contains some cleanup to make the code nicer. day 1 doesn't have an original version because i didn't commit it. other days may not have a cleaned up version if i didn't think any cleanup needed to be done

the code aims to be as efficient as needed, but prioritizes readability and conciseness. i want to create a good demo of using racket and its available features to solve programming problems quickly and cleanly


the license is GPL 3.0 or later, including solutions and scripts


an empty folder, this is where scripts put input files


this is a collection of functions for interacting with the AoC server to fetch challenges, submit answers, get leaderboards, and track progress (in a local file called .status.rktd)

scripts expect some environment variables to be present

  • AOC_SESSION: a session token for your account. log in, then copy the session cookie
  • AOC_YEAR: the challenge year
  • AOC_LEADERBOARD: your leaderboard ID, used for plot


this is included by the template and goes into every solution by default. it exports a function to report answers to the challenge server, and useful libraries for challenge code to use


counts down to the next challenge then initializes it from a template, downloads the input file, and displays the challenge text in the terminal


a CLI application for viewing challenges. takes 1 argument for day. displays somewhat styled challenge text to the terminal (requires 256color)


downloads the input for day n to inputs/n


creates a new solution file from template and downloads the input for a given day


plots the scores of everyone on a private leaderboard over time, defaults to displaying the plot in a window

(or "scripts/plot.scrbl" "scripts/plot.css")

define a webpage (rendered with scribble) to display the plot generated by scripts/plot. you can render it with scribble --dest <dest> --style plot.css plot.scrbl

the plot for my leaderboard is available at


takes a day, level, and answer and submits it. returns what the server responded


a template (in scribble) defining the solution code for a day. should be templated with the variable day specifying the day