I’ve wanted to learn to use Julia for a while now. It’s supposedly as expressive as Python, but faster to run, to which I say: sign me up! However, I can’t really use it at work because we have a pretty extensive Python ecosystem for pulling data from a range of different SQL and non-SQL sources, and the inertia there is just too great.
The Advent of Code is an advent calendar of small coding puzzles, and should be a great opportunity to learn something new on bite-size, once or twice a day kind of challenges.
It’s now the second of December, so rather than going through any kind of tutorial, I’m going to fumble blindly around in the dark/stack overflow and see what I can figure out. I would be surprised if any of my solutions are properly Julian, but they’ll work. I’ll also try to post here as I figure stuff out, and commit to GitHub.
Day 1: Numbers and data types
Much googling here for “how do I append to a list” and “how do I read a file” type questions. Also figuring out how to configure vim to highlight/autoformat Julia code. I’m pretty sure I don’t have the later figured out yet.
Day 2: Substrings
My Python muscle memory is quite strong, and I keep wanting to use and
instead of &&
, put colons after for clauses, etc. Also, unclear whether using substrings or regex matching is a better idea. I did it with substrings, but played around a bit with regexes afterwards in the REPL, and I think I like that better.