~/talk

Accepting complex inputs with simple code

Talkat GoLab 2024 · 2024-11-11..11-13· [go]
slides:none on file

Shows how to accept messy byte streams by splitting tokenization from validation, using bufio.Scanner with a custom split to stream tokens, and small state functions that return the next state for parsing. Demonstrates a streaming SSE parser that bubbles scanner and parser errors, uses io.LimitReader for bounds, and can emit channels for parallel processing. Uses differential fuzzing to find mismatches — one audit finds 36 bugs in fastHTTP compared to the stdlib.

AI-written summary · about

  1. 0:00Introduction to input parsing
  2. 1:09Context-sensitive grammar challenge
  3. 2:34Problems with regular expressions
  4. 3:40Flaws in initial parsing attempt
  5. 5:27Handling streaming data
  6. 7:54State machine approach
  7. 10:22Benefits of state functions
  8. 12:29Fuzzing for robust validation
  9. 15:41Real-world example: Server-Sent Events
  10. 19:32Layered parsing architecture
  11. 20:37Parser generators overview
  12. 21:25Q&A: Regex use cases
  13. 23:13Q&A: Input processing limits
  14. 24:38Q&A: Fuzzing strategies
~/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.