Advent of code in Rust - solving year 2020 exercise 14 - Part 2 (Twitch Live 2021-07-05)

Subscribers:
953
Published on ● Video Link: https://www.youtube.com/watch?v=oZqqCW6hIrA



Duration: 1:20:24
15 views
2


In this episode, we completed Advent of Code y2020 ex14 part 2 (part 1 is available in the previous session ➡️ https://www.youtube.com/watch?v=thcdDUKE4Lw).

This exercise is basically a simulation of a simple calculator that can allocate memory and apply some sort of bit-masking algorithm to change the values in memory. We needed to run a given script as input and see what was the final configuration of the memory (output).

The second part requires a bit more work on calculating masks. We figured out how to do that and took some extra time to refactor our solution and generalise the approach a little bit.

We also showed some improvements we did to reduce the number of allocations from our original solution for part 1 (PR with diff here: https://github.com/lmammino/rust-advent/pull/10/files)

Feel free to send us more PRs if you want to recommend us to use a different approach! We are here to learn and we'd be happy to receive more and more suggestions :)

For all the source code check out the official GitHub repo: https://github.com/lmammino/rust-advent

For seeing the next episodes live check out our Twitch channel: https://twitch.tv/loige




Other Videos By Luciano Mammino (loige)


2021-10-12Advent of code in Rust - solving year 2020 exercise 19 p1 & p2 (ALMOST) (Twitch Live 2021-10-11)
2021-09-27Advent of code in Rust - solving year 2020 exercise 19 p1 (Twitch Live 2021-09-27)
2021-09-20Advent of code in Rust - solving year 2020 exercise 18 p2 (Twitch Live 2021-09-20)
2021-09-14Advent of code in Rust - solving year 2020 exercise 18 p1 (Twitch Live 2021-09-13)
2021-09-06Advent of code in Rust - solving year 2020 exercise 17 p2 (Twitch Live 2021-09-06)
2021-08-30Advent of code in Rust - solving year 2020 exercise 17 p1 (Twitch Live 2021-08-30)
2021-08-24Advent of code in Rust - reviewing year 2020 exercise 16 - Part 2 + 17 p1 (Twitch Live 2021-08-23)
2021-08-17Advent of code in Rust - solving year 2020 exercise 16 - Part 2 (Twitch Live 2021-08-16)
2021-08-10Advent of code in Rust - solving year 2020 exercise 16 - Part 1 (Twitch Live 2021-08-09)
2021-07-12Advent of code in Rust - solving year 2020 exercise 15 - Part 1 & Part 2 (Twitch Live 2021-07-12)
2021-07-05Advent of code in Rust - solving year 2020 exercise 14 - Part 2 (Twitch Live 2021-07-05)
2021-06-28Advent of code in Rust - solving year 2020 exercise 14 - Part 1 (Twitch Live 2021-06-28)
2021-06-27Working on Rust crate "gmaps-static" (Google Static Maps API URL builder) - Twitch live 2021-06-27
2021-06-21Advent of code in Rust - solving year 2020 exercise 13 - Part 2 (Twitch Live 2021-06-21)
2021-06-14Advent of code in Rust - solving year 2020 exercise 13 - Part 1 (Twitch Live 2021-06-14)
2021-06-07Advent of code in Rust - solving year 2020 exercise 12 - Part 2 (Twitch Live 2021-06-07)
2021-05-31Advent of code in Rust - solving year 2020 exercise 12 - Part 1 (Twitch Live 2021-05-31)
2021-05-24Advent of code in Rust - solving year 2020 exercise 11 - Part 2 (Twitch Live 2021-05-24)
2021-05-19Advent of code in Rust - solving year 2020 exercise 11 (Twitch Live 2021-05-18)
2020-04-26Middy.js contribution graph



Tags:
rust
rustlang
live coding
pair programming
coding
advent of code
aoc
irl
in real life
performance testing
memory allocation
year 2020 exercise 14