4 ms·
hi HN, I'm Alex, my team and I made D2. The biggest new thing since last time D2 was here is that we now have a playground for folks to easily check it out wit
by alixanderwang 4y ago
hi HN, I'm Alex, my team and I made D2.
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 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 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 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).
- sendfoods 4y agoCongrats on the release! I gave it a spin before the launch of the playground, and really liked it 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/d2fonts https://github.com/terrastruct/d2/tree/master/d2renderers/d2...
- alixanderwang 4y agoThanks! 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 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 https://github.com/terrastruct/d2/discussions/132
- porker 4y agoWhere's the pricing for your layout engine TALA? I detest the results from dagre so interested in this. I followed the submission link but found no details of pricing on that site.
- alixanderwang 4y agohttps://github.com/terrastruct/TALA https://github.com/terrastruct/TALA (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.)
- oftenwrong 4y agoThe 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.
- Yahivin 4y agoIf it saves you at least 15 minutes a month then it sounds like a bargain.
- unshavedyak 4y agoDumb question if i may, but what is the time saving with "an alternate layout engine"? Ie i don't even know what a layout engine is in this context, and how it would save me time over FOSS versions like mermaid. I'm tempted to give it a shot, but i don't get what the paid version would actually net me. I'm toying with the Playground now, and in many (most?) cases the TALA version (which i think is the paid version?) seems identical to the Dagre version (Mermaid, i think?) I'm also having difficulty finding where i'd even buy it. Hmm edit: Ah https://terrastruct.com/tala/ https://terrastruct.com/tala/ might have some of my answers
- alixanderwang 4y agoIt's not really time-saving. It's aesthetics, how much you care about the beauty and professionalism of your diagrams. All the layout engines will get the correctness right -- all the connections point to where you want em, etc. But they'll often do so in different ways. Eg: https://text-to-diagram.com/?example=chess&b=d2&layout_b=dagre https://text-to-diagram.com/?example=chess&b=d2&layout_b=dag...
- vosper 4y agoWhich one of those is the proprietary layout engine? Both dropdowns just show "D2" for me.
- ranting-moth 4y agoLooks nice! I have an improvement suggestion for the playground: have some pre-defined examples I can open from a menu and mess around with.
- adontz 4y agoCan I do something like this? https://binaries.templates.cdn.office.net/support/templates/en-us/lt00283905_quantized.png https://binaries.templates.cdn.office.net/support/templates/...
- alixanderwang 4y agoSure. Semi implemented for demonstration: https://play.d2lang.com/?script=VJDNbqswEIX3fopZ3R34J3EuRUqrblq1Fc9QWTACR8a2mEEkqvruFckGlt83mpmj0_jp4sYafgTAPXINfnQ9CoC1iBoG5ky1lF6VSy7bNMqciMsRO9-6EHEhTp273SdLLtoUGSPLOYfkOpLkGUkepFFGSXWQ78h8-1g_UKHVkznZqjodvwecUqGVOV7tf1tecv-ynLW29t9w1tZU4leIR1IonuF17mfirQgB44bfQprchhu_wy8XAu7W8erWVoR4nN5JaDb2EyNBI_4CAAD__w%3D%3D https://play.d2lang.com/?script=VJDNbqswEIX3fopZ3R34J3EuRUqr...
- adontz 4y agoUnfortunately no. Formatting is completely different. Each box is a picture on the left with text on the right. Text is two lines, bold text above and regular text below. this can be reproduced with HTML labels in Graphviz. Lines do not look similar too. They are round and not merged. It's concentrate in Graphviz. https://graphviz.org/docs/attrs/concentrate/ https://graphviz.org/docs/attrs/concentrate/
- alixanderwang 4y agooh i see, you meant exactly that. Yeah, D2 isn't meant for reproductions of an exact image you already have. It's made for when you just want an aesthetic rendering of a mental model. See https://d2lang.com/tour/future/#layouts https://d2lang.com/tour/future/#layouts
- Mikhail_K 4y agoI 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.
- alixanderwang 4y agoIt'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 https://news.ycombinator.com/item?id=33704381). There's nothing misleading.
- Mikhail_K 4y agoAnd yet your documentation states that the results of rendering with free engines are not as good as with your very expensive proprietary one. D2 is that fake corporate "open-source" intended to sucker programmers into tying their work into proprietary ecosystem.
- alixanderwang 4y ago> the results of rendering with free engines are not as good Can you cite where this is stated? Dagre and ELK can produce preferable diagrams depending on conditions. You can be mad that something isn't free for you, but again, I don't see how you could be misled, as the non-free part is stated upfront everywhere D2 pops up.
- Mikhail_K 4y ago>> the results of rendering with free engines are not as good > Can you cite where this is stated? By the way I've just realised why your github repo does not provide the sources of the diagrams in docs - it would blow your game wide open, once users start asking why they aren't getting the results depicted. And almost no compileable examples, either > You can be mad that something isn't free for you, Will you please stop lying? I am not "mad" because something isn't free, but because you're misrepresenting the nature of your D2 language. It is not something that you're making available to benefit community, but a thinly disguised marketing ploy. > but again, I don't see how you could be misled, as the non-free part is stated upfront everywhere D2 pops up. It is far from prominent on your site, for one.