The Audacious Array
summary
Claim: Ruby arrays serve as randomizer/sample(n), 2D map via transpose.reverse/rotate, stack/queue via push/pop/unshift/shift, and as set-like containers with uniq, &, |, - and tally. Tools actually used: shuffle, sample, sort_by/max_by, Enumerable methods (each, map, inject/reduce, sum), bsearch/bsearch_index, and transpose + map. Surprise: unshift benchmarks match push thanks to Arrays Q added in Ruby 2 (2013). Built: a playable Catwalk game (GitHub am kaplan catwalk) that generates maps, rotates on turns, applies cyclones, tracks temporary items, and works.
AI-written summary · about
chapters (6)
- 0:00Start
- 6:07] #= "adding and removing elements"
- 13:16] #= "order and randomness"
- 22:14] #= "The Second Dimension"
- 28:22] #= "Arrays as Sets"
- 31:40] #= "CatWalk"








