Advent of code
Dec 4, 2022
I've done the Advent of Code off and on the past few years, but I never made it to the end. Let's see if I can do it this year.
To no one's surprise, perhaps, I'm using Julia this year, like every year I've participated in the past. In this post, I just want to log what I've learned so far! Advent of Code is always a good opportunity to discover the more "niche" functions in your language of choice. After even four days, I've found some cute stuff.
Warning: spoilers ahead!
eachsplit(string, dlm)
Creates an iterator over what you'd get fromsplit(string, dlm)
. Similar toeachline(filename)
, or really any othereach
-type function.- Subtracting letters For example,
'b' - 'a'
returns1
!