The biggest new thing since last time D2 was here is that we now have a playground for folks to easily check it out without installing: https://play.d2lang.com.
Also just to preface the top discussion points that arise when D2 is shared:
Yes, we're a for-profit company. D2 is 100% FOSS, and we make an alternative layout engine which we sell (Jetbrains model, i.e. your copy is your's forever if you've paid for 12+ months). It's a separate install, not packaged with D2, so you won't see it if you don't want it. D2 is perfectly usable without it, and integrates with multiple free open source layout engines (e.g. the one that Mermaid uses, "dagre", is D2's default).
The license for the proprietary layout engine (TALA), was quoted to me as US$240 for 12 months of updates. For comparison, a personal license for IntelliJ IDEA Ultimate is US$169 (for the first year; less for subsequent years). As an active user and proponent of text-to-diagram tools, and as someone who isn't shy about paying for software (including my personal IntelliJ IDEA Ultimate license), I'm keen on buying a better layout engine, but IMO this price-point is a bit much.
Thanks! We actually released a couple weeks ago, and since then it's been almost 100% fixing/improving things the community's surfaced. Long list of stuff here: https://github.com/terrastruct/d2/releases.
Re fonts: that README is for contributing fonts. I'm not sure what the best solution is for custom fonts -- whether to just specify the name of a system font, a google font, point to a directory of local TTFs. Some discussion going on here: https://github.com/terrastruct/d2/discussions/132
I feel it is misleading to call d2 "an open-source alternative", when it is developed to support proprietary rendering engine, the diagram examples given in documentation were rendered by that engine and the reason given is that the free alternative is inferiour.
It's completely open source. The majority of users are using it with other layout engines. We put in work to make those look good and fix bugs around the integrations with those layout engines. The proprietary layout engine is a completely separate install. I also preface it in every post I do for D2 (https://news.ycombinator.com/item?id=33704381). There's nothing misleading.
(apologies for this hidden path. trying to strike the balance of making it findable for those who search for it while hidden to those who just want free.)
The PlantUML license is slightly chaotic though, it's provided under several licenses, and each bundle has subtle differences in behavior which are not spelled out.
Seriously, no body do a little research before naming his public projects to see if some other public project had the same name that are you about to use ?
I'm talking about that D , aka D2, aka DLang has been using this name for a lot of years. This would create a lot of awful confusion!
Yes D2 is what current D version used to be called when D1 was still around, about 10 years ago.
D3 is the mythical version that would fix all D shortcomings, keeps being talked about when we have those long community rants, but that is about it, there is no project going on.
GraphViz is perheps a little tedious to write, and takes some work to make look good (which makes me appreciate the D2 style), but is also definitely possible in my experience.
I think one advantage in GraphViz is the ability to output EPS. I use this often for embedding into PDF via XeLaTeX and Pandoc filters. I also saw that D2 offers some kind of LaTeX output, but was not able to dig into the docs there further.
We link to this in the README for text-to-diagram.com, and it was a starting point for us when we were researching what's out there when designing D2. Thank you for maintaining this.
So far, for our diagraming needs we've used MermaidJS, embedded as code blocks into our Markdown documentation (github and mdbook for us, but support is pretty wide).
D2 seems like a nice upgrade:
- it has an even more intuitive syntax (which is really important for something used on-and-off by any individual developer).
- it seems to have better graph routing
However there are two things keeping us from trying it:
- not supported in our tools, most notably no mdbook plugin yet. I imagine this will change over time
- readability: node labels are tiny compared to nodes, meaning you have to zoom in much more and lose view of the larger structure
Re support: yeah it's a long queue we're making our way through. We have VSCode, Vim, Obsidian, about to roll out Slack, Discord, working on Github, etc. Somewhere down the line, mdbook will be on the chopping block. (community has also contributed plugins for TreeSitter and Emacs)
Re node labels. Yeah this has come up a few times now. We'll have something that addresses it in the next release. For now, you can change font-size:
Hi there, I’ve been following the Obsidian plugin development and noticed that it appears to be done but not yet listed in the Community Plugins? Is it likely to be available soon, do you know?
I don't have anything against the text to diagram tools, however as someone who has to create/tweak diagrams only 2-3 times in a month, I always find myself forgetting the syntax and needing to refer the docs for these utils.
I have since settled on just using excalidraw, with the vscode plugin it is easy to save/version the diagrams alongside my projects and embed them as ordinary image files in docs.
This is great, we need more tools like this -- diagrams that can be version controlled, iterated/edited on alongside the code, etc. I think there's so much room for innovation in the area of declarative diagramming.
I am working on a project where all documentation is in markdown and plantuml for precisely these reasons, and honestly I'm surprised at how seamless the transition has been from the usual world of Word docs plus ad-hoc diagramming tools (cough PowerPoint cough). Easy diffability is another big benefit.
The biggest new thing since last time D2 was here is that we now have a playground for folks to easily check it out without installing: https://play.d2lang.com.
Also just to preface the top discussion points that arise when D2 is shared:
> "What's the difference between this and--"
https://text-to-diagram.com. We made it. The maintainers of Mermaid themselves have contributed to it.
> "The name!"
I like this guy's reply: https://news.ycombinator.com/item?id=33704960
> Is there a proprietary aspect?
Yes, we're a for-profit company. D2 is 100% FOSS, and we make an alternative layout engine which we sell (Jetbrains model, i.e. your copy is your's forever if you've paid for 12+ months). It's a separate install, not packaged with D2, so you won't see it if you don't want it. D2 is perfectly usable without it, and integrates with multiple free open source layout engines (e.g. the one that Mermaid uses, "dagre", is D2's default).
I have an improvement suggestion for the playground: have some pre-defined examples I can open from a menu and mess around with.
Did I understand correctly that, in order to use custom fonts, one has to recompile the code with appropriate .tff files? It's shortly mentioned [1].
[1] https://github.com/terrastruct/d2/tree/master/d2renderers/d2...
Re fonts: that README is for contributing fonts. I'm not sure what the best solution is for custom fonts -- whether to just specify the name of a system font, a google font, point to a directory of local TTFs. Some discussion going on here: https://github.com/terrastruct/d2/discussions/132
https://binaries.templates.cdn.office.net/support/templates/...
https://play.d2lang.com/?script=VJDNbqswEIX3fopZ3R34J3EuRUqr...
I followed the submission link but found no details of pricing on that site.
(apologies for this hidden path. trying to strike the balance of making it findable for those who search for it while hidden to those who just want free.)
https://plantuml.com/download
Deleted Comment
I'm talking about that D , aka D2, aka DLang has been using this name for a lot of years. This would create a lot of awful confusion!
D3 is the mythical version that would fix all D shortcomings, keeps being talked about when we have those long community rants, but that is about it, there is no project going on.
Btw, is there a succinct comparison to GraphViz?
GraphViz is perheps a little tedious to write, and takes some work to make look good (which makes me appreciate the D2 style), but is also definitely possible in my experience.
E.g. SciPipe (https://scipipe.org) outputs pipeline diagrams in this style:
https://www.researchgate.net/profile/Samuel-Lampa/publicatio...
I'm not familiar with EPS. Will investigate, ty. https://github.com/terrastruct/d2/issues/489
GraphViz is included.
The URL for PlantText returns a 404. You might want to update that to just planttext.com
D2 seems like a nice upgrade:
- it has an even more intuitive syntax (which is really important for something used on-and-off by any individual developer).
- it seems to have better graph routing
However there are two things keeping us from trying it:
- not supported in our tools, most notably no mdbook plugin yet. I imagine this will change over time
- readability: node labels are tiny compared to nodes, meaning you have to zoom in much more and lose view of the larger structure
Re support: yeah it's a long queue we're making our way through. We have VSCode, Vim, Obsidian, about to roll out Slack, Discord, working on Github, etc. Somewhere down the line, mdbook will be on the chopping block. (community has also contributed plugins for TreeSitter and Emacs)
Re node labels. Yeah this has come up a few times now. We'll have something that addresses it in the next release. For now, you can change font-size:
https://play.d2lang.com/?script=cspPUtC1U3DMyUxOtVKo5lJQAPvX...
I have since settled on just using excalidraw, with the vscode plugin it is easy to save/version the diagrams alongside my projects and embed them as ordinary image files in docs.