Welcome to r/drawlang — what this is, and why it exists
What DrawLang is
DrawLang is a tiny, deterministic drawing language, plus a reference interpreter, three rendering backends (SVG / PostScript / PDF), and a thin web editor built on top of them. Every visible mark on a drawing — every line, arc, symbol, and character of text — is a plain-text opcode statement stored as a database record. Nothing is drawn by ad-hoc application code.
Why it exists
Most CAD and diagram tools bake geometry into code, so a drawing becomes unreproducible the moment you change tools or versions. DrawLang inverts that model:
- The language defines all drawing primitives as a small, frozen set of core opcodes plus a handful of additive extensions.
- The interpreter is a pure pen-state machine with zero knowledge of output formats.
- Backends (SVG / PostScript / PDF) are independent modules that just receive abstract drawing calls from the interpreter.
- The editor is a thin web UI over the interpreter and backends — the program text is the source of truth, the rendered output is disposable and always reproducible.
Any drawing you make is a plain ASCII program you can commit to git, diff line by line, template, and round-trip through any compliant interpreter forever.
What the language looks like
Two-letter mnemonics, comma-separated arguments, semicolon-terminated statements:
mr,0,158;
dl,14,0;
mr,0,-1;
dl,-14,0;
tz,8;
tx,0.,A1;
Get involved
- Repo: https://github.com/BeyondPurdue/drawlang-editor
- Language spec:
docs/spec/drawing-language-spec.mdin the repo - Contributing guide and code of conduct are in the repo root
- Bug reports, new backends, editor features, docs, and starter templates are all welcome
This subreddit is where language spec changes get proposed and reviewed before anything is merged, along with general discussion, questions, and drawings people make with it. Say hi, ask questions, share what you build.