Skip to content

docs: add DSL Language Guide + wire the three-doc DSL learning path#41

Merged
rdevaul merged 1 commit into
mainfrom
docs/dsl-language-guide
Jun 3, 2026
Merged

docs: add DSL Language Guide + wire the three-doc DSL learning path#41
rdevaul merged 1 commit into
mainfrom
docs/dsl-language-guide

Conversation

@rdevaul

@rdevaul rdevaul commented Jun 3, 2026

Copy link
Copy Markdown
Owner

The yapCAD DSL had a reference (function/type catalog) and a tutorial (one worked example), but no document teaching the language AS a language — its mental model, execution semantics, and idioms. Newcomers had no on-ramp and no 'how to think in this DSL' guide; the why/how lived scattered across index.rst prose and historical specs.

Adds docs/dsl_guide.md — a DSL Language Guide covering:

  • what the DSL is and why it exists (type safety, guaranteed termination, provenance, automation/LLM-friendliness)
  • the execution model (module -> command -> emit -> CLI)
  • UPPERCASE-export vs lowercase-helper command convention
  • thinking in static types; the angle-units convention (degrees for geometry/transforms, radians for trig); control flow and no-while design
  • the build/transform/boolean composition workflow
  • idioms & gotchas (over-cut subtractions, 0.0 - x negation, degrees/radians mismatch, require contracts, aggregation over chained unions, radial patterns)
  • @meta/@ui annotations and the CLI lifecycle

Documents the degrees-vs-radians convention that was previously only implicit in per-function comments: transform/geometry functions (rotate, rotate_2d, arc, ellipse) take DEGREES; trig (sin/cos/tan) takes RADIANS. Added prominent callouts to the Guide (§4 + gotchas), the Reference (Transformation + Math section headers), and the Tutorial (Tips).

Also wires the three docs into a clear learning path:

  • index.rst toctree reordered to Guide -> Tutorial -> Reference
  • reciprocal cross-links added to the Tutorial and Reference headers/footers

Depends on the myst_parser fix (PR #40, merged) for the Markdown to render. Docs build verified clean (no dsl_guide warnings) against main.

Co-authored-by: jarvis-rich

The yapCAD DSL had a reference (function/type catalog) and a tutorial (one
worked example), but no document teaching the language AS a language — its
mental model, execution semantics, and idioms. Newcomers had no on-ramp and
no 'how to think in this DSL' guide; the why/how lived scattered across
index.rst prose and historical specs.

Adds docs/dsl_guide.md — a DSL Language Guide covering:
- what the DSL is and why it exists (type safety, guaranteed termination,
  provenance, automation/LLM-friendliness)
- the execution model (module -> command -> emit -> CLI)
- UPPERCASE-export vs lowercase-helper command convention
- thinking in static types; the angle-units convention (degrees for
  geometry/transforms, radians for trig); control flow and no-while design
- the build/transform/boolean composition workflow
- idioms & gotchas (over-cut subtractions, 0.0 - x negation, degrees/radians
  mismatch, require contracts, aggregation over chained unions, radial patterns)
- @meta/@ui annotations and the CLI lifecycle

Documents the degrees-vs-radians convention that was previously only implicit
in per-function comments: transform/geometry functions (rotate, rotate_2d,
arc, ellipse) take DEGREES; trig (sin/cos/tan) takes RADIANS. Added prominent
callouts to the Guide (§4 + gotchas), the Reference (Transformation + Math
section headers), and the Tutorial (Tips).

Also wires the three docs into a clear learning path:
- index.rst toctree reordered to Guide -> Tutorial -> Reference
- reciprocal cross-links added to the Tutorial and Reference headers/footers

Depends on the myst_parser fix (PR #40, merged) for the Markdown to render.
Docs build verified clean (no dsl_guide warnings) against main.

Co-authored-by: jarvis-rich
@rdevaul
rdevaul merged commit 0ab2f2a into main Jun 3, 2026
0 of 3 checks passed
@rdevaul
rdevaul deleted the docs/dsl-language-guide branch June 3, 2026 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant