~/talk

Golf Scripting with Ruby - Helping Santa Schedule Christmas

Talkat RubyConf 2021 · 2021-11-08..11-10· [ruby, creative-coding]
slides:none on file

An algorithm that turns a house list of naughty and nice counts into a delivery schedule is implemented in Ruby and verified with test cases, using a left‑justified two‑dimensional beam-packing / bin-packing approach and Array#permutation to brute‑force orderings. The code is iteratively shortened by removing methods, inlining blocks, renaming variables and deleting whitespace until a one‑line 4 kilobytes → 392 bytes solution remains; the golfed one‑liner passes the supplied tests and runs on the example inputs.

AI-written summary · about

  1. 0:00Start
  2. 19:00Weighted Spaces
  3. 21:44Tips for Golfing Ruby
  4. 23:56Operator Methods
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.