Live data from Hacker News

Diagram as Code

diagrams.mingrammer.com

41–50 of 77 posts

Re: Diagram as Code

#41
post #33

Earlier quoted context omitted.

Indent with 4 spaces at the start of each line for code blocks.

This is annoyingly difficult in a browser.

Just copy the text and use `sed` on your clipboard to transform your text.

On macOS:

    pbpaste | sed 's/^.*$/    &/' | pbcopy

Re: Diagram as Code

#43

I have been thinking about using this for some diagrams, but whats been on the back of my mind since I heard about it is how to combine it with Terraform, or Troposphere, and have your infrastructure as code also draw the diagrams automatically.

I had the exact same thought!

Re: Diagram as Code

#44
Why is this better than Mermaid? It works in Markdown, you can version control, and Git(Hub|Lab) displays it automatically.

I'm really curious. Maybe for doing something programmatically, but GraphViz may be better.

Re: Diagram as Code

#45
post #44

Why is this better than Mermaid? It works in Markdown, you can version control, and Git(Hub|Lab) displays it automatically. I'm really curious. Maybe for doing something programmatically, but GraphViz may be better.

Here is the link to Mermaid: https://mermaid-js.github.io/mermaid/#/

Re: Diagram as Code

#46
this is going to send me down a rabbit hole for a long long time .... there was another thread some months ago about an architecture diagraming tool that reads the code and outputs architecture based on methods.

Re: Diagram as Code

#47
post #44

Why is this better than Mermaid? It works in Markdown, you can version control, and Git(Hub|Lab) displays it automatically. I'm really curious. Maybe for doing something programmatically, but GraphViz may be better.

> Why is this better than Mermaid?

It isn't. Apples and oranges; Mermaid deals with UML-ish type diagrams whereas 'Diagram as Code' is illustrating cloud system architecture.

> but GraphViz may be better

GraphViz is actually doing the rendering. You might want to take a moment and study the site.

Re: Diagram as Code

#49
Why the obsession with product names and logos? Having a Python class for a specific product is not necessary.

...and then people talk about CV-driven development...

Re: Diagram as Code

#50
post #44

Why is this better than Mermaid? It works in Markdown, you can version control, and Git(Hub|Lab) displays it automatically. I'm really curious. Maybe for doing something programmatically, but GraphViz may be better.

Graphviz is even better: you can generate SVGs and PNGs that can be displayed without jabbascript
Post reply on HN