TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

D2 language, open source alternative to PlantUML

214 点作者 dcu超过 2 年前

17 条评论

alixanderwang超过 2 年前
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 未加载
maeln超过 2 年前
PlantUML is also open-source. The title make it look as if it is not.
评论 #34079843 未加载
评论 #34078892 未加载
Zardoz84超过 2 年前
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 未加载
samuell超过 2 年前
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 未加载
smusamashah超过 2 年前
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 未加载
wongarsu超过 2 年前
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-non超过 2 年前
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 未加载
mcqueenjordan超过 2 年前
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-error超过 2 年前
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.
xigoi超过 2 年前
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>
mdaniel超过 2 年前
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>
bmitc超过 2 年前
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 未加载
ysleepy超过 2 年前
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 未加载
Daedren超过 2 年前
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.
signa11超过 2 年前
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>
lloydatkinson超过 2 年前
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 未加载
devin超过 2 年前
My kingdom for an Emacs plug-in.
评论 #34088648 未加载