Cloning Redis in Rust: RESP [Part 1]

Recently, I read through Build Your Own Redis with C/C++. C/C++ are ugly, so let’s run through it in Rust!

My goal: implement some large subset of Redis (both server and client) in Rust. For any features I implement, it should be compatible with Redis off the shelf. I should be able to use their client with my server and their server with my client and it should just work.

No idea if this is going to work out, but it sounds like an interesting problem!

First task: the REdis Serialization Protocol (RESP).


AoC 2022 Day 5: Stackinator

Source: Supply Stacks

Part 1

Given a list of stacks of syntax 1 and instructions in the form syntax 2, apply each instruction to pop qty items from the stack src and put them on dst one at a time.

Syntax 1: Stacks

[N] [C]    
[Z] [M] [P]
 1   2   3 

Syntax 2: Instructions

move 1 from 2 to 1
move 3 from 1 to 3
move 2 from 2 to 1
move 1 from 1 to 2


AoC 2021 Day 25: Cucumbinator

Source: Sea Cucumber

Part 1: Load a grid of empty cells (.), east movers (>), and south movers (v). Each step, move all east movers than all south movers (only if they can this iteration). Wrap east/west and north/south. How many steps does it take the movers to get stuck?


AoC 2021 Day 19: Point Matchinator

Source: Snailfish

Part 1: You will be given a series of Scanners, each of which will tell you the location (from their point of view) of a series of Beacons. Each Scanner may be flipped or rotated in increments of 90 degrees in any direction. Determine where each Scanner and Beacon is by overlaying the maps (with at least pairwise 12 matches).