~/talk

Compilers aren’t magic, so let’s build one in Swift

Talkat 360|iDev 2016 · 2016-09-14..09-17· [swift]
links:none on file
slides:none on file

Claims that compilers aren’t magic and builds a working compiler in Swift for a tiny BASIC‑like language called bitsy, implementing a BASIC‑like "bitsy" language with integer-only variables, loop/break/conditionals, and comment handling. Walks through a hand‑rolled tokenizer → recursive‑descent parser → Swift codegen pipeline, shows token format, disambiguation of identifiers vs keywords, use of Swift pattern matching and temporary registers, and emits Swift source that is compiled with swiftc into an executable.

AI-written summary · about

  1. 0:00Intro
  2. 2:33What is a compiler
  3. 3:36Swift as language
  4. 5:52What have we learned
  5. 6:43Target language
  6. 10:16Choose language to target
  7. 10:28Know how to write
  8. 11:14Read source characters
  9. 11:54Tokenization
  10. 12:50Language Elements
  11. 13:56Implement commending
  12. 14:31Integer
  13. 15:08Keyword
  14. 16:26Tokenizer
  15. 18:29Whitespace
  16. 20:41Tokens
  17. 21:05Processing tokens
  18. 21:19Parse
  19. 24:52Block
  20. 27:11Break
  21. 28:33Code Generation
  22. 30:18Code Generation Animation
  23. 31:49Code Generation Explanation
  24. 35:34Resources
  25. 37:34Outro
~/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.