~/talk

Improving Clojure's Error Messages with Grammars

Talkat Clojure/conj 2015 · 2015-11-16..11-18· [developer-experience]
slides:none on file

Cursive parses unexpanded source with Parsing Expression Grammars to validate macro forms and produce actionable errors that point to file and column, mark syntax in the editor, and list what was expected. The prototype is an afternoon‑scale effort — about 200 lines of code — and returns structured captures for reuse across macros. The core compiler fixes that took years to land contrast with this approach; there are still 39 JIRAs open for error messages, so grammar‑based parsing scales far better.

AI-written summary · about

  1. 0:00Introduction to Cursive
  2. 1:08The problem with error messages
  3. 2:24Macro parsing difficulties
  4. 6:37Analyzing JIRA and improvements
  5. 13:13Cursive's approach to parsing
  6. 17:10Implementing parsing expression grammars
  7. 26:33Error handling with PEGs
  8. 30:10Demonstrating the new parser
  9. 37:22Lessons from Elm and conclusion
~/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.