TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

D2 language, open source alternative to PlantUML

214 pointsby dcuover 2 years ago

17 comments

alixanderwangover 2 years ago
hi HN, I&#x27;m Alex, my team and I made D2.<p>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: <a href="https:&#x2F;&#x2F;play.d2lang.com" rel="nofollow">https:&#x2F;&#x2F;play.d2lang.com</a>.<p>Also just to preface the top discussion points that arise when D2 is shared:<p>&gt; <i>&quot;What&#x27;s the difference between this and--&quot;</i><p><a href="https:&#x2F;&#x2F;text-to-diagram.com" rel="nofollow">https:&#x2F;&#x2F;text-to-diagram.com</a>. We made it. The maintainers of Mermaid themselves have contributed to it.<p>&gt; <i>&quot;The name!&quot;</i><p>I like this guy&#x27;s reply: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=33704960" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=33704960</a><p>&gt; <i>Is there a proprietary aspect?</i><p>Yes, we&#x27;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&#x27;s forever if you&#x27;ve paid for 12+ months). It&#x27;s a separate install, not packaged with D2, so you won&#x27;t see it if you don&#x27;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, &quot;dagre&quot;, is D2&#x27;s default).
评论 #34081655 未加载
评论 #34082813 未加载
评论 #34078777 未加载
评论 #34106039 未加载
评论 #34084537 未加载
评论 #34078864 未加载
maelnover 2 years ago
PlantUML is also open-source. The title make it look as if it is not.
评论 #34079843 未加载
评论 #34078892 未加载
Zardoz84over 2 years ago
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 ?<p>I&#x27;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!
评论 #34077968 未加载
samuellover 2 years ago
Nice! I like the default aesthetics!<p>Btw, is there a succinct comparison to GraphViz?<p>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.<p>E.g. SciPipe (<a href="https:&#x2F;&#x2F;scipipe.org" rel="nofollow">https:&#x2F;&#x2F;scipipe.org</a>) outputs pipeline diagrams in this style:<p><a href="https:&#x2F;&#x2F;www.researchgate.net&#x2F;profile&#x2F;Samuel-Lampa&#x2F;publication&#x2F;326761313&#x2F;figure&#x2F;fig1&#x2F;AS:654994197987328@1533174194487&#x2F;Figure-Directed-graph-of-workkkow-processes-in-the-Genomics-Cancer-Analysis.png" rel="nofollow">https:&#x2F;&#x2F;www.researchgate.net&#x2F;profile&#x2F;Samuel-Lampa&#x2F;publicatio...</a>
评论 #34079169 未加载
评论 #34081893 未加载
评论 #34081046 未加载
smusamashahover 2 years ago
I have a list of more tools like this here <a href="https:&#x2F;&#x2F;xosh.org&#x2F;text-to-diagram&#x2F;" rel="nofollow">https:&#x2F;&#x2F;xosh.org&#x2F;text-to-diagram&#x2F;</a>
评论 #34084418 未加载
评论 #34078446 未加载
wongarsuover 2 years ago
So far, for our diagraming needs we&#x27;ve used MermaidJS, embedded as code blocks into our Markdown documentation (github and mdbook for us, but support is pretty wide).<p>D2 seems like a nice upgrade:<p>- it has an even more intuitive syntax (which is really important for something used on-and-off by any individual developer).<p>- it seems to have better graph routing<p>However there are two things keeping us from trying it:<p>- not supported in our tools, most notably no mdbook plugin yet. I imagine this will change over time<p>- readability: node labels are tiny compared to nodes, meaning you have to zoom in much more and lose view of the larger structure
评论 #34078307 未加载
lf-nonover 2 years ago
I don&#x27;t have anything against the text to diagram tools, however as someone who has to create&#x2F;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.<p>I have since settled on just using excalidraw, with the vscode plugin it is easy to save&#x2F;version the diagrams alongside my projects and embed them as ordinary image files in docs.
评论 #34078058 未加载
mcqueenjordanover 2 years ago
This is great, we need more tools like this -- diagrams that can be version controlled, iterated&#x2F;edited on alongside the code, etc. I think there&#x27;s so much room for innovation in the area of declarative diagramming.
评论 #34077925 未加载
contr-errorover 2 years ago
Thanks for sharing, looks really nice. Way less verbose and more intuitive syntax than PlantUML. Also seems to drop some vestigial UML aspects, like those default icons in the top right of PlantUML boxes (although I don&#x27;t really grok UML). Title is somewhat ambiguous, since PlantUML is open source as well.<p>I have a standing Google alert for UML threads, because I&#x27;ve been looking for a long while for a good resource on what makes a good diagram. Not how to make it or what to make it with; like a Tufte for diagrams... Anyway D2 seems to make it easy to make clean diagrams.
xigoiover 2 years ago
Also see Pikchr: <a href="https:&#x2F;&#x2F;pikchr.org&#x2F;home&#x2F;doc&#x2F;trunk&#x2F;homepage.md" rel="nofollow">https:&#x2F;&#x2F;pikchr.org&#x2F;home&#x2F;doc&#x2F;trunk&#x2F;homepage.md</a>
mdanielover 2 years ago
previously: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=33704254" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=33704254</a>
bmitcover 2 years ago
Has anyone used this? Would this be what people would suggest if choosing a new text-based visualization tool?<p>I have been wanting to implement the C4 model, for something, since recently learning about it but haven’t yet. And I generally have used Visio and PowerPoint for these things.
评论 #34077724 未加载
评论 #34077712 未加载
评论 #34078507 未加载
评论 #34077664 未加载
ysleepyover 2 years ago
Reminds me of Mairmaid<p><a href="https:&#x2F;&#x2F;mermaid.js.org&#x2F;syntax&#x2F;flowchart.html" rel="nofollow">https:&#x2F;&#x2F;mermaid.js.org&#x2F;syntax&#x2F;flowchart.html</a><p>Is mairmaid plantuml or why is plantuml chosen as the comparison point?<p>The markdown embedding and integrated rendering in gitlab is really useful.
评论 #34078644 未加载
Daedrenover 2 years ago
It does look nifty, but without the tooling, I don&#x27;t see myself replacing Mermaid anytime soon. For example, VSCode doesn&#x27;t have live previews for D2 which makes it awkward to work with.
signa11over 2 years ago
dupe: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=33704254" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=33704254</a>
lloydatkinsonover 2 years ago
How do you prevent lines going through titles in containers?<p>a: { b: { c: { d } } }<p>x: { y: { z: { z1 } } }<p>a.b -&gt; x.y.z
评论 #34084323 未加载
devinover 2 years ago
My kingdom for an Emacs plug-in.
评论 #34088648 未加载