Live data from Hacker News

D2: A new declarative language to turn text into diagrams

d2-lang.com

101–110 of 130 posts

Re: D2: A new declarative language to turn text into diagrams

#101
post #4

The last question in the FAQ makes it clear that this can only be used in the context of their account-based online tool. Their free offering literally says "3 diagrams". Above this, the FAQ tries to compare their tool to Mermaid, Graphviz, PlantUML which are all open source, locally runnable, etc. Their comparison totally skips the fact that, because D2 can only be used in their service, a broad number of use cases…

Yikes. This looks like an amazing idea, but the online limitation kneecaps it. When I want to make diagrams graphically, I use diagrams.net. when I want to make diagrams from code, I use PIC. What else do people use? PIC works pretty well, but it has its limits and it's ancient.

could you share a link to PIC ?

Re: D2: A new declarative language to turn text into diagrams

#102
post #37
post #29

https://plantuml.com/ is free and nice. Plays well with Markdown and C4 diagrams. The only UML-specific diagram type I use is the sequence diagram but that is very useful IMHO.

It can be a bit clunky setting up the jar (or hosting it yourself), but it's still the best worst option. It scales pretty well and can draw some very complex flows, while still giving you the best in just plain ole text editing. I could have never maintained the diagrams I used for other developers on my teams or folks on the audit/regulation side of thing without it. The default styles are really unprofessional loo…

I use https://github.com/yuzutech/kroki in my github actions to build plantuml and other diagrams.

Also playing with 11ty and this to replace our home grown tooling based on markdown with embedded dot.

Re: D2: A new declarative language to turn text into diagrams

#103

Hi all, creator of D2 here. I posted this on Reddit to get some feedback but was hoping to improve the docs and offer a playground environment before posting on HackerNews. Ah well. I wanted to clarify some things: 1. D2 will be open source and usable outside of Terrastruct. Terrastruct will remain the best interface to D2, with bidirectional updates from GUI, but we already have vscode and vim plugins ready for loca…

Will you be able to make computer network diagrams? None of the existing open source programs are very useful for this mostly because you can’t put text at the beginning, middle, and end of connectors.

Re: D2: A new declarative language to turn text into diagrams

#105
post #37
post #29

https://plantuml.com/ is free and nice. Plays well with Markdown and C4 diagrams. The only UML-specific diagram type I use is the sequence diagram but that is very useful IMHO.

It can be a bit clunky setting up the jar (or hosting it yourself), but it's still the best worst option. It scales pretty well and can draw some very complex flows, while still giving you the best in just plain ole text editing. I could have never maintained the diagrams I used for other developers on my teams or folks on the audit/regulation side of thing without it. The default styles are really unprofessional loo…

Have you seen https://sequencediagram.org/ ? No JAR needed, just a web browser

Re: D2: A new declarative language to turn text into diagrams

#107

Hi all, creator of D2 here. I posted this on Reddit to get some feedback but was hoping to improve the docs and offer a playground environment before posting on HackerNews. Ah well. I wanted to clarify some things: 1. D2 will be open source and usable outside of Terrastruct. Terrastruct will remain the best interface to D2, with bidirectional updates from GUI, but we already have vscode and vim plugins ready for loca…

Will you be able to make computer network diagrams? None of the existing open source programs are very useful for this mostly because you can’t put text at the beginning, middle, and end of connectors.

we only support 1 label for connections right now, but that's a good suggestion. i'll put it on our roadmap, ty!

Re: D2: A new declarative language to turn text into diagrams

#108
post #4

The last question in the FAQ makes it clear that this can only be used in the context of their account-based online tool. Their free offering literally says "3 diagrams". Above this, the FAQ tries to compare their tool to Mermaid, Graphviz, PlantUML which are all open source, locally runnable, etc. Their comparison totally skips the fact that, because D2 can only be used in their service, a broad number of use cases…

> Mermaid, Graphviz, PlantUML which are all open source, locally runnable, etc

And there's C4 Model for Visualising Architecture [0] that has upcoming tool support, for instance Structurizr DSL [1]. It has an online editor [2] that can export to Mermaid, PlantUML and other formats. And has various open source repo's, like this Java codebase for the DSL itself [3].

[0] https://c4model.com/

[1] https://structurizr.com/help/dsl

[2] https://structurizr.com/dsl

[3] https://github.com/structurizr/dsl

Re: D2: A new declarative language to turn text into diagrams

#109
post #101

Earlier quoted context omitted.

Yikes. This looks like an amazing idea, but the online limitation kneecaps it. When I want to make diagrams graphically, I use diagrams.net. when I want to make diagrams from code, I use PIC. What else do people use? PIC works pretty well, but it has its limits and it's ancient.

could you share a link to PIC ?

Here is the Wikipedia article, maybe a good starting point.

https://en.wikipedia.org/wiki/PIC_(markup_language)

Re: D2: A new declarative language to turn text into diagrams

#110
post #4

The last question in the FAQ makes it clear that this can only be used in the context of their account-based online tool. Their free offering literally says "3 diagrams". Above this, the FAQ tries to compare their tool to Mermaid, Graphviz, PlantUML which are all open source, locally runnable, etc. Their comparison totally skips the fact that, because D2 can only be used in their service, a broad number of use cases…

Yikes. This looks like an amazing idea, but the online limitation kneecaps it. When I want to make diagrams graphically, I use diagrams.net. when I want to make diagrams from code, I use PIC. What else do people use? PIC works pretty well, but it has its limits and it's ancient.

https://pikchr.org/home/doc/trunk/homepage.md

Is a modern implementatiom that's pretty nice.

Post reply on HN