Day03 Tokens, Enums and Docstrings

A better way to communicate code

The Day 03 challenge involves the calculating whether a character symbol is adjacent to a part number in a two dimensional map, such as: 467..114.. ...*...... ..35..633. ......#... 617*...... .....+.58. ..592..... ......755. ...$.*.... .664.598.. and then doing things with the part numbers. To calculate whether a symbol is adjacent to a part number we’re going to need: the position of each symbol, the position of each number, the length of the token for each number. [Read More]

Day02 Copilot and Vanilla Parsing

Look mum, no imports!

After refreshing my knowledge of the rust parsing library ’nom’ with the day01 challenge, I was keen to do the second challenge without, simply using the standard library’s string manipulation and default parsing for this simpler parsing problem. At the same time, I was keen to work more with GitHub Copilot since I’ve not been able to use copilot at my most recent job due to potential legal issues. The Elf’s game for day 02 consists of pulling out multiple combinations of red, green and blue balls from a sack - and the parsing looks quite straight forward. [Read More]

Day 01 - a Rust Parsing Exercise With Nom

An exercise in avoiding confirmation bias

It’s been quite some time since I’ve taken time to enjoy coding challenges primarily for the fun of it. Over the next months, I’m keen to work my way through the 2023 Advent of Code - a fun set of problems created by Eric Wastl strung together with a seasonal story - and write up a bit about my own learning and fun. For me it’s a chance to keep improving my fluency with various Rust libraries and tools (start learning the Rust programming language here! [Read More]

Advent of Code 2023

Advent of code 2023 - I’ll eventually collect some general info about the libraries that I’m using repeatedly, as well as some other more general learning, but the details are in each post below.