You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository reflects the effort I've put into solving advent of code challenges. Here you'll find solutions completed in several languages and varying levels of expertise based on when I solved that challenge.
AOC CLI
This repository comes equipped with a CLI allowing for easy downloading of new files and setting up new directories for challenges.
Per AOC Requirements, this script automatically caches input files so they don't need to be read again. It also grabs the test input (if there is one!) and puts it in the same directory.
The easiest way to run a file given its input is:
$ ./main.py <real.txt
This bash syntax pipes the contents of real.txt into ./main.py. Then, you can use sys.stdin to read it however you want (via sys.stdin.readline, etc.).
Of course, you can also use open("real.txt") if you want to work with a file pointer and run your script as ./main.py.
Languages
My goal is to solve each challenge using multiple languages to provide the most exposure. The current languages I have solves with:
Language
Solves
ASM
4
Bash
7
C
28
Python
105
This table is automatically updated using the aoc CLI. Sometimes it can be off if a file was accidentally introduced but not fully complete.
Here's a little more about the languages I use:
ASM: x86_64 NASM compiled with Makefile. glibc is not used at all - syscalls only!
Bash: Bash v5.2. Not necessarily POSIX compliant. To the greatest extent possible, only using shell built-ins. A future task will be ridding the aoc scripts as well.
C: C99 compiled using gcc. I was using a library file with a bunch of cheater-functions, but I'm slowly removing its use in favor of solving things the C way.
Python: My speed language I use on challenge day. The only non-default libraries I use (so far) are numpy and networkx.
Challenge Calendars
These calendars indicate solves in at least one language.