s/regex/DSLs/: What Regex Teaches Us About DSL Design
summary
Regex serves concrete lessons for DSL design: it favors tight domain integration by expressing text-processing in text, it leans on composability via simple grammar, and it succeeds by staying small—closed domain integration—not trying to parse everything. The concrete toolkit described: three Ruby DSL shapes (class-macro, method-chaining, block), a Twitter-query micro-DSL built without monkeypatching, and practical extension APIs like RSpec’s; historical and production context includes regex embedded across tools and ActBlue’s cited $30 average donation and ~$850M raised.
AI-written summary · about
chapters (11)
- 0:00Start
- 0:31Introduction for Regular Expressions
- 5:27What Are Dsl
- 6:36Whether Regex Are Actually a Dsl
- 12:16Composability
- 13:11Class Macro Dsl
- 13:50Method Chaining
- 15:23Nested Block Dsl
- 18:25Why Reg Exes Are Made of Strings
- 26:29Closed Domain Integration
- 28:01Getting There








