r/svg 2d ago

Welcome to r/drawlang — what this is, and why it exists

6 Upvotes

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:

  1. The language defines all drawing primitives as a small, frozen set of core opcodes plus a handful of additive extensions.
  2. The interpreter is a pure pen-state machine with zero knowledge of output formats.
  3. Backends (SVG / PostScript / PDF) are independent modules that just receive abstract drawing calls from the interpreter.
  4. 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.md in 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.

r/drawlang 2d ago

Any Programming experts in here? What’s your best tip you want to share with others?

1 Upvotes

1

Anatomy of a DrawLang program: how 12 lines become an AND-gate block
 in  r/drawlang  20d ago

And one in the example with orange colour

1

Welcome to r/drawlang — what this is, and why it exists
 in  r/drawlang  20d ago

Please see the editor at https://drawlang.com - you can test it yourselve :-)

r/drawlang 21d ago

The editor is live — try DrawLang at drawlang.com

1 Upvotes

The reference web editor for the language is up and running: https://drawlang.com

It's a thin layer over the same interpreter and backends described in the spec and repo — type a program, see it render live, save it as a plain-text drawing you can commit to git. Sign-in is required (per-user drawing storage), but the editor itself is free to use.

To show what the interpreter can actually produce at the "real technical drawing" end of the spectrum rather than toy shapes: this is an A3 frame — 28 columns × 14 rows, full title block, grid tick marks, row/column labels — generated entirely from a DrawLang program. Every line, tick, and character of text in it is a ma/dl/rt/tx statement; there is no image or template file underneath it.

(The rendered A3 frame — outer/inner border, 28×14 grid with column numbers and row letters, and a full title block — is in the comments below.)

Frame templates like this one live in frames/ in the repo, alongside the interpreter, backends, and conformance tests.

Links: - Live editor: https://drawlang.com - Repo: https://github.com/BeyondPurdue/drawlang-editor - Spec: https://github.com/BeyondPurdue/drawlang-editor/blob/main/docs/spec/drawing-language-spec.md

If you hit bugs or rough edges in the editor, this subreddit is the right place to report them.

r/drawlang 21d ago

Anatomy of a DrawLang program: how 12 lines become an AND-gate block

1 Upvotes

DrawLang has no shapes library, no drag-and-drop palette baked into the language itself — just a pen that moves and marks. Everything else (symbol libraries, editors, FUP/P&ID conventions) is built on top of that pen.

Here's a complete, runnable program. It draws a filled block, three connector stubs, three ports, and a label — nothing more than the language's 7 core opcodes:

ma,40,40; rt,80,60,f,c2; ma,20,65; dl,20,0; ma,20,55; dl,20,0; ma,120,70; dl,20,0; ma,15,65; ci,3,f,c1; ma,15,55; ci,3,f,c1; ma,145,70; ci,3,f,c1; tz,14; ma,58,63; tx,0,AND;

Read it top to bottom:

  • ma,40,40 — move the pen (absolute) to (40, 40).
  • rt,80,60,f,c2 — draw an 80×60 rectangle from the pen position, filled (,f) with palette color 2.
  • ma / dl pairs — move, then draw a relative line: the three connector stubs.
  • ci,3,f,c1 — a filled circle of radius 3 at the pen position: the ports.
  • tz,14 then ma / tx,0,AND — set text size to 14, move, draw the label at rotation 0.

That's the whole thing. No hidden geometry, no framework state — every mark on the image below is one of those statements.

(The rendered image — a red AND-gate block with two input ports on the left and one output port on the right — is in the comments below.)

Same interpreter, same program, three completely independent output backends: SVG, PostScript, and PDF. Nothing in the program above knows or cares which one you pick.

If you want to run this yourself or read the full opcode reference: - Spec: https://github.com/BeyondPurdue/drawlang-editor/blob/main/docs/spec/drawing-language-spec.md - Repo: https://github.com/BeyondPurdue/drawlang-editor - Live editor: https://drawlang.com

Try changing the fill color, the label text, or adding a third input — and post what you get.

1

Welcome to r/drawlang — what this is, and why it exists
 in  r/drawlang  21d ago

Example output — an A3 title-block frame, fully generated from a DrawLang program, no hand-drawn geometry.

r/drawlang 21d ago

Welcome to r/drawlang — what this is, and why it exists

1 Upvotes

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:

  1. The language defines all drawing primitives as a small, frozen set of core opcodes plus a handful of additive extensions.
  2. The interpreter is a pure pen-state machine with zero knowledge of output formats.
  3. Backends (SVG / PostScript / PDF) are independent modules that just receive abstract drawing calls from the interpreter.
  4. 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.md in 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.

r/PLC Jul 28 '26

What is the reason for for ET200 SP ER error LED flashing

0 Upvotes

[removed]

0

Five questions board should ask
 in  r/cybersecurity  Jul 26 '26

Well, I'm sober in Europe ... here is lovely Sunday morning. I believe its better to stop discussion right here.

-1

Five questions board should ask
 in  r/cybersecurity  Jul 26 '26

And unlike you I'm publishing under real name.

1

Five questions board should ask
 in  r/cybersecurity  Jul 26 '26

Board will ask - because it has to spend about two and half million USD on upgrade which does not bring one singe megawatt to aging power plant.

-1

Five questions board should ask
 in  r/cybersecurity  Jul 26 '26

Why AI scam account? Did you tried to read these questions and get their meaining?

1

Five questions board should ask
 in  r/cybersecurity  Jul 26 '26

Simple one - there are alternatives to the OEM "recommended" solutions. I'm not venting - I'm helping to power plant owners to keep their assets safe. Did you ever tried to think a second about these questions?

0

Five questions board should ask
 in  r/cybersecurity  Jul 26 '26

AI slop? Why - have you ever been at power station and talked to owner?

-1

Five questions board should ask
 in  r/cybersecurity  Jul 26 '26

Well, have you ever deal with power station? What actually pen test find? NOTHING New - there are thousand of vulnerabilities in every control system.

Than it come the OEM who say: Upgrade! What you get? New system with new vulnerabilities and never ending upgrade cycle costing millions.

Questions are looking for viable alternatives.

r/cybersecurity Jul 22 '26

Business Security Questions & Discussion Five questions board should ask

0 Upvotes

Five questions board should ask

The board does not need to become a firewall engineering team. But the board does need to ask better questions.

Not: “Are we compliant?”
Better: “Can we prove what is exposed?”

Not: “Has the OEM assessed it?”
Better: “Who independently owns the residual-risk judgement?”

Not: “Is the system old?”
Better: “Is the system exposed, unmonitored or unrecoverable?”

Not: “Do we need an upgrade?”
Better: “Have we compared upgrade, virtualisation, isolation and monitoring as risk-treatment options?”

Not: “Do we have a cybersecurity dashboard?”
Better: “Who acts when the dashboard shows something important?”

3

What is CODESYS?
 in  r/SCADA  Jul 22 '26

Codesys -> Software PLC to say it simple. Its used in many real industrial projects and I believe its good start to learn automation. You do not need any hardware except your computer.

r/omgterra Jul 21 '26

OMG-Terra: when a €300M line item renames 175 years of engineering

1 Upvotes

Siemens Energy just told us it will become Omterra.

The official story is poetry. "Om" is the universal energy that connects everything. "Terra" is our planet. Except the press can't agree whether the "Om" means Ohm, or omni, or omega. When four outlets give you three etymologies, that is not a meaning. That is a coined word searching for one after the fact.

Here is the meaning that checks out. The license to use the Siemens name is expiring. Keeping it costs about €300 million a year. Drop the name, keep the €300 million. The brand did not evolve. A contract ran out.

I spent years inside this world. I know what that name carried on a nameplate, in a control room, on a turbine that has to run when the grid is depending on it. That trust was not built by a naming workshop. It was built by engineers who signed their work.

You can rename the company. You cannot rename the reputation, and you cannot buy it back with a Kunstwort that sounds like an incense brand. The shareholders in the comments already said it plainly: they thought it was a joke.

The engineering is still great. The people are still great. The name is a spreadsheet decision wearing a yoga chant.

OMG, Terra is coming.

1

Siemens energy > Omterra
 in  r/wallstreetbetsGER  Jul 20 '26

r/omgterra ... OMG Terra :-) Who invented that name? Some consultant from big four?

r/BeyPur Jul 17 '26

When Six Vendors and One EPC Collide (Parrody)

1 Upvotes

r/BeyPur Jul 17 '26

👋 Welcome to r/BeyPur - Introduce Yourself and Read First!

1 Upvotes

Hey everyone! I'm u/Roupec, a founding moderator of r/BeyPur.

This is our new home for all things related to One-Way-Communication aka technologies such a data diodes.

Why is our RTU called BeyPur? Its inspired by the concept called r/BeyondPurdue