Advent of Code 2023

Advent of Code has started again!

There's always a question around what language or tool you use to complete the challenges. This year, I decided to keep it simple, and keep it to what I know best: Javascript.

I did want to try a new way of running Javascript though, something I've thought about before but never had a chance to try: Jupyter Notebooks.

If you're not familiar with Jupyter, it's an interactive notebook platform, mostly used in the Python and data science community to quickly evaluate code on data and see instant results.

It has a really nice built-in Visual Studio Code interface, which Microsoft ships pre-installed with their build of VSCode.

Running Javascript in Jupyter

Jupyter consists of two parts - the UI, and the underlying 'kernel' that runs your code. Usually this is a Python environment, but you can install and build your own kernels to be available to Jupyter. One of those is IJavascript.

Installing it is pretty simple. These are the commands I ran on my Mac:

brew install jupyter
npm install -g ijavascript

After running those, I was able to run 'Create: New Jupyter Notebook' in VSCode, and able to select 'javascript' as the kernel in the the notebook.

There we go, ready to save some elves:


Here's my repo with my solutions so far: 🔖 tschoffelen/aoc-2023