Live data from Hacker News

Diagram as Code

diagrams.mingrammer.com

51–60 of 77 posts

Re: Diagram as Code

#51
> from diagrams import Diagram

Slightly off-topic, but I wish JavaScript's import syntax was designed to be this way around, for better autocomplete in your editor.

Re: Diagram as Code

#52

Earlier quoted context omitted.

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

Perhaps it's more readable/writeable with Awk:

    pbpaste | awk '{print "    "$0}' | pbcopy
Although this also seems to do the same thing

    pbpaste | sed 's/^/    &/' | pbcopy

Re: Diagram as Code

#53
post #12
post #11

Earlier quoted context omitted.

What's the alternative you'd recommend?

The explicit, declarative model, using tools that don't need a ton of other things deployed. Ideally the same tool can be run locally and in CI (with the same invocation commands) so that an Op can run tests locally, and even see the potential diff, before putting it up for review. The advantage of this approach is you can see a diff, and use standard tooling like git / pr reviews to approve changes in day to day, an…

> The advantage of this approach is you can see a diff, and use standard tooling like git / pr reviews to approve changes in day to day, and when the world is on fire, someone can break the glass and run it locally.

sounds sweet. imagine applying gerrit to infra

> there is a reason things like ITIL exist, and we should learn from them

spot on.

That said, I am unsure if most people here are ITIL aware/certified.

TBH, the primary reason why I am familiar with ITIL is our clients from Accenture days requires certification to win contracts.

Re: Diagram as Code

#54
post #3

It seems to be hyperfocused on system architecture diagrams. There are some other kinds of diagrams would we like to draw that’s not system architecture diagrams, eg: - algorithms - decision trees - UML/ER Diagrams Mermaid (JS) helps draw quality diagrams quickly - more than system architecture diagrams. It would have been perfect if the development cycles that went here was used to create Mermaid templates instead.…

The focus would make sense to me if, say, it exported to initial terraform templates or something like that.

Up-voted. That would really make sense and be extremely useful but I don't see anything related to that.

Re: Diagram as Code

#55
post #16
post #10

I like this a lot - trying to store diagrams that look good, without sticking a visio file into a git repo is something I keep an eye out for.

You may also find value in diagram.codes (I'm the author) It's focused on non technical users so the syntax will always be very simple (at the cost of flexibility but that's on purpose).

> diagram.codes

looks fascinating. is this closed source?

Can I run this over an API or a local container?

Re: Diagram as Code

#57

I was hoping this tool would support directionality/sequencing of nodes. A tool I've used in the past is SequenceDiagram.org for diagraming a sequence of service calls. While a bit old-school, it's good for its purpose. I've also used Whimsical[0] to model flows and graph-like relationships. It's got the added benefit of allowing multiple users to view and edit the same document. Whimsical is still my favorite tool r…

What about mermaid-js? Here's a sequence diagram example: https://mermaid-js.github.io/mermaid-live-editor/#/edit/eyJj...

Exactly. PlantUML and Mermaid have really been very useful to me.

Re: Diagram as Code

#58
post #12

Earlier quoted context omitted.

The explicit, declarative model, using tools that don't need a ton of other things deployed. Ideally the same tool can be run locally and in CI (with the same invocation commands) so that an Op can run tests locally, and even see the potential diff, before putting it up for review. The advantage of this approach is you can see a diff, and use standard tooling like git / pr reviews to approve changes in day to day, an…

> The advantage of this approach is you can see a diff, and use standard tooling like git / pr reviews to approve changes in day to day, and when the world is on fire, someone can break the glass and run it locally. sounds sweet. imagine applying gerrit to infra > there is a reason things like ITIL exist, and we should learn from them spot on. That said, I am unsure if most people here are ITIL aware/certified. TBH,…

> sounds sweet. imagine applying gerrit to infra

Yeah, it is cool - https://opendev.org/ is done that way, as is some of the wikimedia labs infrastructure

I am not certified either - I have just worked in places with ITIL inspired processes, but I can really see a way they can move forward with tools like terraform / pulumi / ansible and git

Re: Diagram as Code

#59

I was hoping this tool would support directionality/sequencing of nodes. A tool I've used in the past is SequenceDiagram.org for diagraming a sequence of service calls. While a bit old-school, it's good for its purpose. I've also used Whimsical[0] to model flows and graph-like relationships. It's got the added benefit of allowing multiple users to view and edit the same document. Whimsical is still my favorite tool r…

For quick sequence diagrams I really like

https://swimlanes.io/

It's text-based (build on Mermaid if I'm not mistaken) and really easy to work with for simple interactions.

Also because it's purely text-based you can pass around the full context in the URL. This makes it a little awkward to collaborate vs. a true hosted solution, but it also lowers the barrier to entry significantly.

Re: Diagram as Code

#60

I was hoping this tool would support directionality/sequencing of nodes. A tool I've used in the past is SequenceDiagram.org for diagraming a sequence of service calls. While a bit old-school, it's good for its purpose. I've also used Whimsical[0] to model flows and graph-like relationships. It's got the added benefit of allowing multiple users to view and edit the same document. Whimsical is still my favorite tool r…

web sequence diagrams is very good for sequences. https://www.websequencediagrams.com/
Post reply on HN