~/talk

I see your 127.32+, a tale of rationals

Talkat code.talks 2014 · 2014-10-09..10-10· [ruby]
slides:none on file

A Rails betting site requires a zero-sum betting ledger and a three‑field calculator where stake, odds and profit are editable; floating point fails, integers force manual rounding, bigdecimal fails on recurring divisions, so the system uses exact rationals (Ruby rationals + a CoffeeScript rational class) and a Postgres rational type extension for persistence. The result preserves exact arithmetic across UI, app and DB, performs acceptably, and matches business rounding rules.

AI-written summary · about

  1. 0:00Betting system problem
  2. 7:15Floats forbidden for money
  3. 14:44Integers for exact money
  4. 22:12Big decimal limitations
  5. 29:42Rationals as solution
  6. 35:12Database integration
  7. 37:00Summary
~/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.