~/talk

“What C++ Programmers Need to Know about Header <random>"

Talkat CppCon 2016 · 2016-09-18..09-23· [c-and-cpp]
links:none on file
slides:none on file

Explains why the <random> header separates engine vs distribution (use an engine as a bits source and let a distribution produce the shaped variates), shows the correct pattern (instantiate an engine and call a distribution) and demonstrates the common modulo-bias anti-pattern (remainder-of-engine produces biased dice), warns that default_random_engine is vendor-chosen while nine other engines are bit-for-bit portable, lists ~20 distributions, notes Mersenne Twister’s large state (~600× bigger) and covers random_device, generate_canonical, seed issues, sample/shuffle, and extensional engines like PCG and Random123.

AI-written summary · about

  1. 0:00Introduction and thanks
  2. 1:50Background on randomness
  3. 14:25Engines vs distributions
  4. 24:29Preconfigured engines
  5. 31:38Random device and entropy
  6. 35:57Distribution families
  7. 43:08Anti-pattern: biased die roll
  8. 50:36Correct usage with distributions
  9. 55:40Resource management tips
  10. 1:01:42Future directions and resources
  11. 1:07:27Q&A and closing
~/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.