Clojure Katas - Designing Data-Driven DSLs
summary
Argues that libraries accept plain data structures (EDN/JSON) instead of string grammars or opaque macro/fluent APIs, so code generation, inspection and composition become easy. Gives concrete examples: regal for regex, reitit for routing (noted as fast and efficient), and a move from spec to malli because malli lets tools walk and generate forms; a homegrown tada service DSL is built and used at the company. Notes limits: more verbose, poor fit for imperative tasks (Ansible/YAML) and complex SQL features.
AI-written summary · about
chapters (24)
- 0:00Start
- 5:47Introduction to workshop
- 7:14What are DSLs?
- 9:00The bargain of DSLs
- 11:43History of DSL approaches
- 12:58Custom syntax dsls
- 14:05Fluent APIs
- 17:31Data-driven APIs
- 19:26Comparing dsl approaches
- 22:48Advantages of data-driven
- 25:26The complexity tradeoff
- 29:05Downsides and limitations
- 31:41Examples in cloJure
- 35:47Adoption in other ecosystems
- 37:10Applying data-driven design
- 42:16Workshop task assignment
- 45:41Working session
- 48:12Review: Graph DSL
- 50:39Review: Byte array parser
- 54:33Review: Gherkin DSL
- 56:35Review: XSLT for EDN
- 58:23Review: 3D modeling DSL
- 59:40Review: Dominion card game
- 1:00:03Wrap up
related talks
34mBuilding a DSL… in Kotlin!
01h 21mDescribing Data...with free applicative functors (and more)
45mDeveloping DSLs with FP: Exploring 3 Strategies Through Examples
48mContracts & Clojure: The Best-Yet Compromise of Types and Tests
52mFunctional Patterns in Domain Modeling
01h 02mSolving Problems the Clojure Way
44mFunctional Interpreters and You
24mCultivating an Engineering Dialect
