docs: add DSL Language Guide + wire the three-doc DSL learning path#41
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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:
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