Re:D2 is now open source – a new, modern language that turns...
by alixanderwang on Tuesday November 22, 2022 @07:11AM
(#33704895)
do you have an example of the rich text for PlantUML? happy to correct
i've added a TODO for the class diagrams, will be included this week. https://github.com/terrastruct/text-to-diagram-site/issues/2...
AFAIK they all have comments (see the "Chess" example). what is the limitation of comments you're referring to?
Re:D2 is now open source – a new, modern language that turns...
by pizza234 on Tuesday November 22, 2022 @07:38AM
(#33705102)
This is a styling example in PlantUML:
class TestClass {
""Monospaced""
<color:green>Colored
}
See here: https://plantuml.com/creole.Regarding the comments, here's a PlantUML example:
class TestClass {
""Monospaced"" ' comment not supported; displayed
<color:green>Colored
}
class TestClass2 {
' comment supported
Type varname ' comment not supported; displayed
}
' comment supported
foo::bar --> baz ' comment not supported; breaks diagram (!)
Re:D2 is now open source – a new, modern language that turns...
by Veuxdo on Tuesday November 22, 2022 @07:57AM
(#33705248)
Have you taken a look at Ilograph [0]? It's also a "next gen" diagrams-as-code alternative that goes in a different direction: interactive, model-based, and multi-perspective. It also has in an IDE for autocomplete.
Re:D2 is now open source – a new, modern language that turns...
by alixanderwang on Tuesday November 22, 2022 @08:19AM
(#33705423)
feel free to submit a PR to make comparisons against tools on text-to-diagram.com, happy to include you!
Re:D2 is now open source – a new, modern language that turns...
by michael_j_ward on Tuesday November 22, 2022 @08:57AM
(#33705803)
Is Ilograph open source?
Re:D2 is now open source – a new, modern language that turns...
by Veuxdo on Tuesday November 22, 2022 @09:06AM
(#33705889)
Only a small part of it: the standard diagramming libraries (or, presently, library): https://github.com/billy-pilger/ilograph-standard-libraries
Re:D2 is now open source – a new, modern language that turns...
by afandian on Tuesday November 22, 2022 @10:44AM
(#33706967)
It looks amazing for exploring arbitrary graphs. Do you have plans to open any part of the diagramming engine?
Re:D2 is now open source – a new, modern language that turns...
by vladsanchez on Tuesday November 22, 2022 @09:06AM
(#33705880)
It's not!
Re:D2 is now open source – a new, modern language that turns...
by vladsanchez on Tuesday November 22, 2022 @09:05AM
(#33705876)
Ilograph is what all these diagram-as-code tools should aspire to. It's ability to contextualize is unlike anything I've seen.
Re:D2 is now open source – a new, modern language that turns...
by philsnow on Tuesday November 22, 2022 @01:08PM
(#33708809)
wow, I'm just walking through the demo linked by Veuxdo and that's exactly what I was thinking: each step in the walkthrough drills context down deeper or widens context in a very clear way.
I've tried to do similar things in graphviz but pulling out individual subgraphs or subsets of nodes + edges isn't easy and I always end up with multiple files for each view that I want to show and they get out of sync.
Re:D2 is now open source – a new, modern language that turns...
by stavros on Tuesday November 22, 2022 @05:49PM
(#33712671)
This looks great, but I'm not terribly jazzed about having my diagrams permanently hosted on a third-party site. I know it's hard to make self-hosted interactive diagrams like this, but I'd like my documentation to last longer than this site.
Re:D2 is now open source – a new, modern language that turns...
by Veuxdo on Tuesday November 22, 2022 @06:34PM
(#33713078)
Yeah, self-hosting is a bit of a nightmare. There is a Desktop version that allows you to export diagrams to HTML, which you then can be host or share.
Re:D2 is now open source – a new, modern language that turns...
by stavros on Tuesday November 22, 2022 @06:43PM
(#33713158)
Oh, that's actually an excellent solution, thanks!
Re:D2 is now open source – a new, modern language that turns...
by infogulch on Tuesday November 22, 2022 @09:01PM
(#33714192)
Very interesting project! Could you render Ilograph yaml files to HTML in a CI job?
Re:D2 is now open source – a new, modern language that turns...
by Veuxdo on Tuesday November 22, 2022 @09:55PM
(#33714582)
Thanks! Yes, you can using the export API (paid): https://www.ilograph.com/export-api/
The Desktop version can also export diagrams when called via CLI, though that is less suitable for CI/CD.
Re:D2 is now open source – a new, modern language that turns...
by tarasglek on Wednesday November 23, 2022 @02:58AM
(#33716405)
This looks amazing, thank you
Re:D2 is now open source – a new, modern language that turns...
by wongarsu on Tuesday November 22, 2022 @08:52AM
(#33705756)
As they say, the best diagram language is the one your tool supports; and by that metric Mermaid and graphviz seem to be winning (depending on which ecosystem you are in, Mermaid seems to have the edge in the Markdown world, graphviz everywhere else).
D2 looks like a nice upgrade, but to be as useful as e.g. Mermaid a bunch of plugins will need to be written.
Re:D2 is now open source – a new, modern language that turns...
by alixanderwang on Tuesday November 22, 2022 @09:06AM
(#33705890)
yup agreed. we prioritized IDE plugins, and have a native plugin system, recognizing the importance of ecosystem. e.g. a proof of concept plugin to make diagrams look hand-drawn: https://github.com/terrastruct/d2/pull/91
Re:D2 is now open source – a new, modern language that turns...
by xcdzvyn on Tuesday November 22, 2022 @10:43AM
(#33706954)
Any chance of getting an Obsidian plugin?
Re:D2 is now open source – a new, modern language that turns...
by alixanderwang on Tuesday November 22, 2022 @10:52AM
(#33707063)
Mermaid is quite basic; it lacks functionalities that for me were necessary; for example, direct connection between attributes of different classes.
All in all, PlantUML seems superior to Mermaid, at no cost (both languages are relatively simple to learn).
Mermaid is supported by Github, which may be a necessary requirement for some. On the other hand, among the many functionalities, PlantUML's JSON is unusually good looking out of the box, and if one required the diagram it outputs, it's a great feature, because it requires no syntax knowledge.
Both PlantUML and Mermaid produce, mostly produce (Mermaid more) ugly-looking diagrams (dated, to say the least). In PlantUML, this problem is compounded by the explicit lack of layout, by design.
Other warts: both (PlantUML and Mermaid) languages have limited comment support - they are only supported in specific locations of the diagram declarations.
D2 could be a very welcome "next gen" diagramming language. However, the devil is in the details - text-to-diagram.com show a very basic functionality, so one must carefully check the requirements.
Regarding text-to-diagram.com:
- there's a mistake - PlantUML does support rich text (although "rich" is a fuzzy definition)
- class diagrams are an important use case, which is currently missing
EDIT: clarification about the comment limitations.