Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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 (including programmatically generating diagrams inside some other application) basically aren't supported.

Seems like it could have been cool, but likely will not seriously try it because of these limits.




This is a complete non starter for any regulated industry.

Shame. Mermaid works almost okay and often looks like garbage. I wish there was an open source effort somewhere to do better, or even a paid locally runnable tool that has no service connections.


It's why I keep falling back to excalidraw over tools like mermaid with auto-layout. When I need to communicate an idea, often I really need to fuss with layout in order to get my point across, and having the control to drag things around is the only way to get there.


Problem with non automated tools is that editing becomes a big issue since you have to reflow big parts of the diagram to make an addition. This is always my biggest issue with any diagram, the fact that they are evolving.


Oh of course. This is the tradeoff.

That said, over time a diagram's value will diminish regardless if you have auto-layout or not, since the codebase will always outpace documentation.


It won't work for every use case but https://flowchart.fun is one open-source alternative



Ilograph [0] is a similar (and, in my biased opinion, better) tool that has a 100% local runtime option (called Ilograph Desktop). You can still test-drive it with the browser version, of course.

[0] https://www.ilograph.com


Those tools are mature 10-20+ year and we're just getting feedback for our little ol' alpha born ~yesterday. The limitations are temporary -- we are working on an offline, locally runnable experience (it's in the roadmap), but, alas, engineering bandwidth of a 6 person team.

edit: I've updated the docs to make this clear


Maybe starting this way makes sense.

But when the project is trying to compare itself to others, it's only fair to compare based on what's true of the project currently vs what's aspirational. I would guess that for many potential users, the temporary limitations trump most of the stuff in the comparison portion of the FAQ, or the "current shortcomings" section.

And the "Getting Started" section could also say "create an account and familiarize yourself with the existing terrastruct product" or whatever.


How is this different/better than, say, Mermaid?


For one thing, the output looks lightyears better.


You can fully modify styles in mermaid using CSS and style attributes. You can also load it as a JS library, attach events to chart components, programmatically render charts plus way more.


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


Looks like it will, just not yet:

> INFO: It's currently in alpha. During this time, it's only housed on Terrastruct, which provides the most well-supported interface (IDE) for it. Once we have a stable v1, we'll release and continue development of it in open source and make local options available.


Also, to me this was a reminder of the importance of context and assumptions in good communication. Never having heard of this org, I clicked the link for this post, saw the top-level blurb describing the project and assumed that a 'language' which generates diagrams from declarations would be something I could _run_. I clicked on the 'Getting Started' section and was annoyed that there was no 'Installation' section. I started from a context that inclined me to think of this as a stand-alone project which ought to have certain characteristics.

I think the author of this page started with the assumption that of _course_ given their business and product, a 'language' for diagrams is only giving users access to something that maps on to whatever internal representation their tool already uses, and allows technically inclined users to work with text and fewer clicks. To them, the assumption seems to have been that readers will already be users of their product, and the assumption that the 'language' is built into their tool _and nowhere else_ is so far in the background that it's only somewhat obliquely addressed as the last question in a FAQ.


People seem to be missing that this is a preview, not a product (yet). And that: "When the language is more stable, we intend to open source D2. This will happen sometime in 2022."


In D2 Tour video, at 4:30, they say

> When it's more stable, we will be open-sourcing the language.

If thats the case, that only the language will be open-sourced, not the visualization, then I'm not entirely sure what that really gets you, beyond perhaps alternative editors?

But its the layout algorithms that are actually notable.


Terrastruct engineer here. The visualization will be open source though I can't say for sure yet whether it'll be with our layout algorithm or with https://github.com/dagrejs/dagre.


Perhaps then "Preview/Beta online service" should be part of the Headline/title.


Perhaps reading the article is a useful way to get information? If the headline contained everything everyone would conceivably want to know, it would be the article. It's not like the headline was misleading: "a new $tool" is a common phrase for software in alpha and beta stages.


So, to you, "Tool" or "Language" do NOT imply that you can use it independently of a specific online service?

I mean, I agree, that "new" is marketing speak for "alpha/beta", but -to me- there is a difference between a "language/tool" and a "Single-Vendor-WebService". Or is my understanding of the semantics of the English language outdated?


Not even outdated - just incorrect. There have been proprietary tools longer than there have been computers, it's the point of patents - grant a monopoly on your proprietary tool for X years in exchange for making it's workings public knowledge.

Even patents aside, why wouldn't this D2 thing qualify as:

   COMPUTING
    a piece of software that carries out a particular function, typically creating
    or modifying another program.
(source: google "define tool")

While it isn't creating or modifying a program, I'd consider "parsing text in a specific syntax to create a diagram" more like a compiler than a site that just provides information or crud sites with some forms. I'm not entirely certain how where it runs affects it's tool status, but it certainly is a consideration to be made while evaluating it for any particular use case.

(also from define tool:

   a thing used in an occupation or pursuit.
and depending on where you stand on the "thingness" of software may also apply here, but that feels diversionary)

I can think of quite a few single vendor languages - various IBM mainframe languages like JCL, K, matlab, multiple .Net and MS languages until recently, applescript, etc.


Agree. To be honest, I'd find it useful if it were closed source but native installable tool that can convert text to diagram which then could be exported to image/pdf etc.


Yup. I use many paid, local tools. And because there’s no network service nonsense it’s not a problem at work.


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.


> Mermaid, Graphviz, PlantUML which are all open source, locally runnable, etc

And there's C4 Model for Visualising Architecture [0] that has upcoming tool support, for instance Structurizr DSL [1]. It has an online editor [2] that can export to Mermaid, PlantUML and other formats. And has various open source repo's, like this Java codebase for the DSL itself [3].

[0] https://c4model.com/

[1] https://structurizr.com/help/dsl

[2] https://structurizr.com/dsl

[3] https://github.com/structurizr/dsl


Yikes. This looks like an amazing idea, but the online limitation kneecaps it.

When I want to make diagrams graphically, I use diagrams.net. when I want to make diagrams from code, I use PIC. What else do people use? PIC works pretty well, but it has its limits and it's ancient.


https://pikchr.org/home/doc/trunk/homepage.md

Is a modern implementatiom that's pretty nice.


could you share a link to PIC ?


https://pikchr.org/home/doc/trunk/homepage.md

An alternative implementation with good docs.


Here is the Wikipedia article, maybe a good starting point.

https://en.wikipedia.org/wiki/PIC_(markup_language)


Agreed! Interesting idea, but charging for this is not going to get them very far.

Gotta find a way to do an "open core" or similar.


A simple check for an infrastructure tool (and a programming language is a king of infrastructure tools): does it have an open-source, unencumbered implementation?

If not, I won't use it for anything serious.


Good to know. Thanks for the list of alternatives.


Services as a software substitute...




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: