~/talk

Ruby for Home-Ec

Talkat RubyConf 2016 · 2016-11-10..11-12· [ruby]
github:agfor
slides:none on file

Two concrete Ruby solutions show what actually happens: a ~20-line greedy_approximation script takes 64 cuts from 35 boards (three board lengths), accounts for kerf, and proves board order matters — one ordering leaves 17 cuts impossible, another makes all but one, and a third ordering makes every cut. A second short script sorts ~100 pantry jars (salsa verde = 20) using integer-safe division via mathn to evenly space common items. Both scripts run and output usable plans; code lives on Github.

AI-written summary · about

  1. 0:00Start
  2. 4:36Method Greedy Approximation
  3. 8:45The Knapsack Problem
  4. 9:12Knapsack Problem
  5. 9:53Subset Sum Problem
  6. 10:51The Stock Cutting Problem
  7. 11:31Guillotine Stock Cutting Problem
  8. 26:27Animation
  9. 26:59Simulated Annealing
  10. 31:11How Do I Come Up with a Mathematical Algorithm
~/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.