~/talk

How to write a programming language

Talkat ACCU 2017 · 2017-04-24..04-29· [compilers-and-language-design, python]
slides:none on file

A tiny interpreter called Cell (github.com/andybalaam/cell) is implemented in Python and deliberately short to show core ideas. The lexer tokenizes input, the parser builds nested AST tuples, and the evaluator reduces trees to values with lexical scope and closures; error messages are minimal but it runs. The code sizes are explicit: lexer 40 lines, parser 81 lines, evaluator 92 lines, and the implementation demonstrates function calls, definitions, assignment, and a small standard library.

AI-written summary · about

  1. 0:00Introduction to Cell
  2. 2:02Cell language demonstration
  3. 4:46Core language concepts
  4. 7:28Lexical scoping and closures
  5. 8:46The lexer explained
  6. 10:37Lexer implementation details
  7. 12:37Lexing strings and numbers
  8. 17:03Scanning string literals
  9. 19:38Scanning numbers and symbols
  10. 22:18Lexer testing and conclusion
  11. 25:33Introduction to parsing
  12. 28:06Parser data structures
  13. 30:01The parsing function
  14. 33:31Building expression trees
  15. 37:15Handling operator precedence
  16. 39:23Parsing function calls
  17. 43:25Parsing function definitions
  18. 45:24Parsing assignment statements
  19. 48:27Overview of evaluation
  20. 50:41The environment class
  21. 52:21Environment implementation
  22. 54:21Evaluating basic types
  23. 57:05Evaluating operations
  24. 59:16Error handling and evaluation
  25. 1:01:41Evaluating assignments
  26. 1:04:28Evaluating function calls
  27. 1:07:41Executing native functions
  28. 1:10:31Evaluating function definitions
~/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.