~/talk

What About the Natural Numbers?

Talkat PWLConf 2019 · on Thursday, 2019-09-12
links:none on file
slides:none on file

Argues that for common discrete structures (lists, trees, indices) using naturals changes APIs: represent numbers as Z/S Nat with Arabic numerals desugared, make subtraction saturating subtraction so length(drop xs n) == length(xs) - n holds, treat division as slicing or use lazy infinity, and return Option Nat or a list of positions instead of negative sentinels. Notes Colin Runciman’s 1989 paper still matters after 30 years, shows implementations compile Nats to machine words or use thunks plus strictness analysis to make it practical.

AI-written summary · about

  1. 0:00Introduction and personal anecdotes
  2. 5:20Goals and thesis of the paper
  3. 7:47Defining natural numbers in programming
  4. 10:18Representing naturals as a datatype
  5. 12:45Syntactic sugar for natural numbers
  6. 15:58Arithmetic with natural numbers
  7. 19:30Total and closed arithmetic systems
  8. 22:37Division challenges and solutions
  9. 25:56Introduction to laziness
  10. 29:02Benefits of lazy natural numbers
  11. 30:52API design beyond arithmetic
  12. 34:05Mind the gap in API design
  13. 36:10Implementation concerns for naturals
  14. 39:03Alternatives to lazy naturals
  15. 41:35Beyond naturals: sets and data structures
  16. 43:21Closing thoughts and call to action
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.