~/talk

Writing and improving tail recursive functions

Talkat Functional Conf 2014 · 2014-10-09..10-11· [functional-programming]
links:none on file
slides:none on file

Erlang uses tail recursion as the fundamental mechanism for long‑running processes: a function that ends in a tail call stays alive and avoids growing the call stack, so daemons, receive loops and TCP servers run forever without leaks. Examples use spawn, self, receive and gen_tcp to build an echo server that must be tail‑recursive to stay running, and an in‑house Kafka producer (buffering, reconnects, state machine) implemented with gen_fsm. Claims include handling ~100 billion events/month and aggressive internal benchmarks (40× then 200×, managers asked for 40,000×).

AI-written summary · about

  1. 0:00Introduction
  2. 5:02Erlang history and goals
  3. 14:35Recursion and tail calls
  4. 20:39Amdahl's law and parallelism
  5. 21:00Tail recursion in processes
  6. 26:36Process isolation basics
  7. 30:13Long-running daemons
  8. 33:23Tail recursion with messages
  9. 35:51Network programming in Erlang
  10. 37:44State machines in distributed systems
  11. 41:36Tail recursion and processes
~/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.