Live data from Hacker News

D2: A new declarative language to turn text into diagrams

d2-lang.com

61–70 of 130 posts

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

#61

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…

Nice intro video on the landing page. I liked the capabilities shown.

I do think you could have made it obvious in the Getting Started section that this is not a local runnable language. I spent some time looking for how to install it only for me to realise that it is some form of SaaS.

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

#62
post #32

Earlier quoted context omitted.

A code dump does not make it an open source project. Sustainable OSS projects are developed publicly.

That's probably why they're doing a code dump

The language spec, or the rendering backend code? And even if the "complete package", if the "locally runable version" is an afterthought of the OnlineWebVersion, have previous situations like that not regularly resulted in *Paks wrapping an electron instance with some blobs under the hood?

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

#63

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…

Nice intro video on the landing page. I liked the capabilities shown. I do think you could have made it obvious in the Getting Started section that this is not a local runnable language. I spent some time looking for how to install it only for me to realise that it is some form of SaaS.

Thanks! The caveat is on the intro/home page. We very much intend to support a high quality locally runnable experience before we'd call it a v1.

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

#64
post #46

Earlier quoted context omitted.

Unless you use instanced rendering via some GPU API it's going to take some galaxy brain code to make that work.

Forget about rendering, just doing the layout would be extremely challenging.

Some of the graphs (near the bottom) of the GraphViz example page are quite large: https://graphviz.org/gallery/

And there's a link to a gallery with even bigger ones, so #NumberOfNodes alone does not seem to be the main limiting metric. Maybe combined with the choice of rendering layout.

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

#65

Earlier quoted context omitted.

Would you believe me if I said this was just an ad and you wasted time on it? Just because HN isn't Reddit doesn't mean ads aren't thrown in with all the curated "content"

May be an ad but this is something I would actually use if it wasn't paid. Like other said, maybe it will inspire someone to take this and make an open-source version

If it was open source with a permissive license I'd start paying immediately, like I have with other projects.

> if it wasn't paid.

Maybe you intended to say 'if it wasn't closed', or similar.

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

#68

Earlier quoted context omitted.

By the way do you have a BNF grammar (or something more of a formal spec for this?). The cheat sheet does look good though.

No unfortunately not yet. The docs are like 75% caught up to all the language right now and it's still changing not infrequently, so we'll make some formal specs once it's stable. This reveal caught us off guard =).

> I posted this on Reddit to get some feedback

> This reveal caught us off guard

Hmmm

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

#69
post #68

Earlier quoted context omitted.

No unfortunately not yet. The docs are like 75% caught up to all the language right now and it's still changing not infrequently, so we'll make some formal specs once it's stable. This reveal caught us off guard =).

> I posted this on Reddit to get some feedback > This reveal caught us off guard Hmmm

hah, so the line of logic was: "let's post on reddit to get some low stakes feedback in preparation for a HN launch"

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

#70
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…

Wow, thanks for the clarification. Totally missed this part. After having already evangelized this with my coworkers, I may need to take it back.

If they made the core open and allowed users to use this language independently of their online service, there's still a ton of value they could have added with premium services on top of this. For writing the docs, sharing with teams, comments / versioning, etc. Visual figma type features essentially. A team bought into the specification would very likely pay for this.

But it's hard to imagine it taking off being completely locked into their service. Ah well, a fine idea and looked pretty well executed.

EDIT: maybe that's on their roadmap "When the language is more stable, we intend to open source D2. This will happen sometime in 2022.". Ok, back on board

Post reply on HN