~/talk

Writing Domain Specific Languages with Python

Talkat EuroPython 2015 · 2015-07-20..07-26· [python, developer-experience]
links:none on file
slides:none on file

Covers concrete techniques and tradeoffs: implementing DSLs with PLY and PyParsing, using the ast and tokenizer or metaprogramming (metaclasses, context managers, operator overloading) to map text into structures, and when those tricks bite back. Shows a working project — an adventure game script that wins Pi Week — with roughly 1,100 lines of DSL and ~3,000 Python lines. Argues metaclasses are safest, operator-overloading causes surprising precedence bugs, and custom parsers need clear errors and tooling.

AI-written summary · about

  1. 0:00Introduction
  2. 0:15Domain Specific Languages
  3. 4:22What is a DSL
  4. 6:02Metaclasses
  5. 9:54Context managers
  6. 11:17Operator Overloading
  7. 21:22Parsers
  8. 22:01DSLs
  9. 28:51Do it Line
  10. 35:35Linewise parses
  11. 37:12Parser generators
  12. 40:12PLY
  13. 47:43Summary
~/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.