String Theory
summary
Explains how Elixir treats bitstrings, binaries and UTF‑8 strings, shows that bytes like 226 143 176 map to multi‑byte UTF‑8 code points, and demonstrates with dtrace that using iolists and writev avoids allocating a concatenated output (Phoenix compiles templates to IO data), warns about the large binary space and its reference‑counted GC pitfalls around the 64 bytes threshold, and recommends iodata, raw file mode and short‑lived processes for safer, faster I/O.
AI-written summary · about
chapters (21)
- 0:00Intro
- 1:56String Theory
- 2:17Nathan Long
- 3:17Charlist (Single-quoted Strings)
- 7:44Quick List Appending
- 8:35Expert Help
- 12:06Unicode: Also A Mapping
- 13:21UTF-8 Templates
- 13:54Encoding
- 14:40Three Kinds of Bytes
- 17:11Combining Diacritical Marks
- 18:54Tricky Reversal
- 19:41Tricky Casing
- 21:02The Rules of the BEAM
- 21:18The Large Binary Space
- 24:07Mysteries
- 25:03Detecting the Leak
- 27:15Look Ma, No Concatenation!
- 29:20Different System Calls
- 32:31Caching via function compilation
- 33:36Simple Caching








