As an organiser of a local ruby meetup group I occasionally need to pluck names from a hat to announce winners of raffles or randomise the order of speakers for a particularly packed agenda. We can do that with actual bits of paper from a hat, but being a rubyist I'm much more interested in writing little ruby scripts to do it for me. We'll start with the obvious technique of using `Array#sample` but as it's not very interesting or satisfying to write we'll go a bit further. We'll look at interactivity using `Fiber`, and several attempts at animation using _why's Shoes framework. Finally, we'll explore my magnum opus of a terminal-based dungeon crawler (like nethack and rogue) written in ruby that introduces a human element of randomisation alongside the computer element.
Get notified about new features and conference additions.