News for hackers. Stuff that matters.
Re:D2: A new declarative language to turn text into diagrams by abeppu on Tuesday August 30, 2022 @12:51PM (#32652502)
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.

Re:D2: A new declarative language to turn text into diagrams by geraldwhen on Tuesday August 30, 2022 @12:54PM (#32652541)
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.

Re:D2: A new declarative language to turn text into diagrams by cush on Tuesday August 30, 2022 @03:11PM (#32653875)
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.
Re:D2: A new declarative language to turn text into diagrams by kyriakos on Wednesday August 31, 2022 @06:50AM (#32660535)
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.
Re:D2: A new declarative language to turn text into diagrams by cush on Wednesday August 31, 2022 @05:28PM (#32668598)
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.

Re:D2: A new declarative language to turn text into diagrams by tonerow on Tuesday August 30, 2022 @02:32PM (#32653501)
It won't work for every use case but https://flowchart.fun is one open-source alternative
Re:D2: A new declarative language to turn text into diagrams by JohnHaugeland on Tuesday August 30, 2022 @02:15PM (#32653347)
Re:D2: A new declarative language to turn text into diagrams by Veuxdo on Tuesday August 30, 2022 @07:34PM (#32656545)
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

Re:D2: A new declarative language to turn text into diagrams by alixanderwang on Tuesday August 30, 2022 @03:39PM (#32654159)
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

Re:D2: A new declarative language to turn text into diagrams by abeppu on Wednesday August 31, 2022 @06:24PM (#32669126)
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.

Re:D2: A new declarative language to turn text into diagrams by BarryMilo on Tuesday August 30, 2022 @04:38PM (#32654738)
How is this different/better than, say, Mermaid?
Re:D2: A new declarative language to turn text into diagrams by Aeolun on Tuesday August 30, 2022 @08:19PM (#32656848)
For one thing, the output looks lightyears better.
Re:D2: A new declarative language to turn text into diagrams by marktolson on Tuesday August 30, 2022 @08:48PM (#32657038)
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.
Re:D2: A new declarative language to turn text into diagrams by jacquesc on Tuesday August 30, 2022 @06:08PM (#32655796)
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

Re:D2: A new declarative language to turn text into diagrams by bunsenhoneydew on Tuesday August 30, 2022 @10:30PM (#32657667)
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.

Re:D2: A new declarative language to turn text into diagrams by abeppu on Tuesday August 30, 2022 @01:39PM (#32652988)
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.

Re:D2: A new declarative language to turn text into diagrams by Per_Bothner on Tuesday August 30, 2022 @02:09PM (#32653283)
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."
Re:D2: A new declarative language to turn text into diagrams by setr on Tuesday August 30, 2022 @03:10PM (#32653863)
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.

Re:D2: A new declarative language to turn text into diagrams by nhooyr on Sunday September 04, 2022 @03:13PM (#32716634)
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.
Re:D2: A new declarative language to turn text into diagrams by stragies on Tuesday August 30, 2022 @02:12PM (#32653310)
Perhaps then "Preview/Beta online service" should be part of the Headline/title.
Re:D2: A new declarative language to turn text into diagrams by sophacles on Tuesday August 30, 2022 @03:24PM (#32654000)
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.
Re:D2: A new declarative language to turn text into diagrams by stragies on Tuesday August 30, 2022 @03:59PM (#32654364)
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?

Re:D2: A new declarative language to turn text into diagrams by sophacles on Tuesday August 30, 2022 @11:18PM (#32657978)
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.

Re:D2: A new declarative language to turn text into diagrams by geodel on Tuesday August 30, 2022 @01:25PM (#32652850)
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.
Re:D2: A new declarative language to turn text into diagrams by geraldwhen on Tuesday August 30, 2022 @02:01PM (#32653206)
Yup. I use many paid, local tools. And because there’s no network service nonsense it’s not a problem at work.
Re:D2: A new declarative language to turn text into diagrams by sieabahlpark on Tuesday August 30, 2022 @01:30PM (#32652902)
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"

Re:D2: A new declarative language to turn text into diagrams by armchairhacker on Tuesday August 30, 2022 @02:26PM (#32653465)
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

Re:D2: A new declarative language to turn text into diagrams by rch on Tuesday August 30, 2022 @05:11PM (#32655123)
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 by rapnie on Wednesday August 31, 2022 @02:12AM (#32658978)
> 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

Re:D2: A new declarative language to turn text into diagrams by ryukoposting on Tuesday August 30, 2022 @08:29PM (#32656904)
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.

Re:D2: A new declarative language to turn text into diagrams by tubs on Wednesday August 31, 2022 @02:57AM (#32659217)
https://pikchr.org/home/doc/trunk/homepage.md

Is a modern implementatiom that's pretty nice.

Re:D2: A new declarative language to turn text into diagrams by anjanb on Wednesday August 31, 2022 @12:50AM (#32658491)
could you share a link to PIC ?
Re:D2: A new declarative language to turn text into diagrams by tubs on Wednesday August 31, 2022 @02:58AM (#32659223)
https://pikchr.org/home/doc/trunk/homepage.md

An alternative implementation with good docs.

Re:D2: A new declarative language to turn text into diagrams by personalidea on Wednesday August 31, 2022 @02:33AM (#32659095)
Here is the Wikipedia article, maybe a good starting point.

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

Re:D2: A new declarative language to turn text into diagrams by kevmoo1 on Tuesday August 30, 2022 @12:58PM (#32652588)
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.

Re:D2: A new declarative language to turn text into diagrams by nine_k on Tuesday August 30, 2022 @08:01PM (#32656732)
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.

Re:D2: A new declarative language to turn text into diagrams by ww520 on Tuesday August 30, 2022 @10:21PM (#32657623)
Good to know. Thanks for the list of alternatives.
Re:D2: A new declarative language to turn text into diagrams by rvense on Tuesday August 30, 2022 @01:54PM (#32653128)
Services as a software substitute...