Got into the weeds a bit with today's Advent of Code (which I'm trying to solve using Rust, a language I don't yet know, combined with copious amounts of Copilot and ChatGPT to help me figure it out)

Sticking point was figuring out an idiomatic Rust way of reading a file three lines at a time - eventually got to something I didn't really dislike, but it was a messy process: https://github.com/simonw/advent-of-code-2022-in-rust/issues/4

Now reading https://fasterthanli.me/series/advent-of-code-2022/part-3 for a VERY different solution to the same problems

Day 3: Rucksack Reorganization · Issue #4 · simonw/advent-of-code-2022-in-rust

https://adventofcode.com/2022/day/3 The list of items for each rucksack is given as characters all on a single line. A given rucksack always has the same number of items in each of its two compartm...

GitHub
@simon Wow, this is the first time for me seeing the seamless transition back and forth between language and code using a LLM. Very impressive. Makes me wonder if learning new programming languages like this will become a popular approach.
@simon I have also been using Advent of Code to learn #rust. However, I’ve been solving the problems first in #python, then working the problem in Rust, which I’m sure leads to non-idiomatic Rust programs. Anyway, my Python solution used sets, and so rather than attempting to figure out how to read 3 lines at a time, I spent a fair amount of time learning about `std::collections::HashSet`. Took way longer than I had planned.
@simon I keep being surprised over and over at how different solutions are. It's amazing. I really struggled with day03 and collected links to a variety of solutions folks shared. In case it's useful: https://github.com/briandorsey/AdventOfCode/tree/main/2022/day03
AdventOfCode/2022/day03 at main · briandorsey/AdventOfCode

Advent of Code. Contribute to briandorsey/AdventOfCode development by creating an account on GitHub.

GitHub
@simon @briandorsey This is what I love most about AoC. Completing the puzzle and then seeing how other people have solved it. It’s a wonderful way of picking up new ideas.

@briandorsey @simon Wow there's a lot to study here! Also new to #rust and using #adventofcode as a means to learn it.

I eventually found iter.next_chunk() to pull 3 lines at a time, and which requires the nightly build, so I can feel like a real hacker 🤓

My solution here: https://github.com/blairfrandeen/2022-AoC/blob/master/src/day_3.rs

2022-AoC/day_3.rs at master · blairfrandeen/2022-AoC

Wherein I pretend I learned anythign at all about programming int he last year - 2022-AoC/day_3.rs at master · blairfrandeen/2022-AoC

GitHub
@simon loved reading your thought process (with the commits in between, really neat use of GitHub!), also wow, never thought about learning with the help of ChatGPT, or even just asking it about errors.