✨ New series: Advent of Code 2022 ❄️

A pretty long Day 1, wherein we go over #rust types, traits, iterators... to bear's chagrin. Then we come up with a ridiculous solution, because of course we do.

fasterthanli.me/series/advent- #xp

☃️ Advent of Code 2022, Day 2 🌲

In this one, we make our own enum and struct #rust types to model the problem accurately. And then.. more iterator shenanigans, including dealing with fallible iteration.

fasterthanli.me/series/advent- #xp

✨ Advent of Code 2022, Day 3

In which we learn about immutable data structure in #rust, and more iterator tricks!

fasterthanli.me/series/advent- #xp

🧑‍🎄 Advent of Code 2022, Day 4

...is a short one. But I went ahead and added some reader suggestions to Day 1 and 3, check them out!

We still have time to learn about extensions traits in #rust, don't worry: fasterthanli.me/series/advent- #xp

📦 Advent of Code 2022, Day 5

In that one, we finally get to use the nom crate to write proper parsers.

We also learn how to work around the #rust borrow checker, and, just to see if we can, we chase down heap allocations!

fasterthanli.me/series/advent- #xp

Follow

@fasterthanlime Interesting hearing about different parser options. How did you like using nom?

I'm new to but ended up using the Recap crate crates.io/crates/recap. Seemed like an elegant solution. Curious your thoughts.

github.com/haruska/aoc22/blob/

@haruska I like nom a lot, Geoffroy did good work there :) I've been using it in other contexts (HTTP, etc.)

Sign in to participate in the conversation
Haruska Mastodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!