mermaid-js / mermaid

Generation of diagrams like flowcharts or sequence diagrams from text in a similar manner as markdown
https://mermaid.js.org
MIT License
70.16k stars 6.24k forks source link

Graphviz DOT syntax #5

Closed timdp closed 6 years ago

timdp commented 9 years ago

It looks like Mermaid is in many ways similar to Graphviz's DOT language. I just came across Viz.js, which attempts to bring that to the Web. Any reason you're not adopting DOT syntax? It seems like it would be more useful to collaborate on this.

knsv commented 9 years ago

I was striving for simplicity and was prepared to sacrifice some functionality to achieve that. DOT is great and very versatile but I wanted something you can grasp without much explanations.

Perhaps you can see mermaid syntax vs DOT as markdown vs HTML/CSS. That was the original intention anyway. :)

timdp commented 9 years ago

Basic DOT is highly readable though. Personally, I'd prefer a subset of DOT over an "entirely new" language. That's not to say that I don't appreciate your effort, of course.

dmd commented 9 years ago

Yeah, I agree with timdp. I think forking the DOT language is actively harmful. It's a very simple language, unlike HTML, and the changes you've made don't really simplify it, they just change it. I'd focus on making a good renderer, but stick to DOT syntax.

zzamboni commented 9 years ago

I have to agree. I just learned about mermaid and my first thought was "this looks a lot like Dot". Mermaid looks really nice and it allow inline processing, which is awesome for web-based applications. But having a Dot-compatible language would make it possible to easily acquire thousands of users and tools that know and generate Dot.

knsv commented 9 years ago

Mermaid will have different graph types with different grammars. One example is sequence diagrams. On that note there will be an architecture permitting this. In that light it would be "inline" with the concept to have a dot grammar using the same rendered as the current flow chart renderer. Will provide stubs for the grammar as alpha and lets see where it goes.

knsv commented 9 years ago

Look at the experimental support. See it as a proof of concept/prototype.

sleepyfox commented 9 years ago

I concur with the above comment, Mermaid is very similar in concept to graphviz (an AT&T project which was the originator of DOT). This happens a lot is the JS world q.v. the proliferation of JS build systems that do not learn from the mistakes of the past and offer a meagre portion of the functionality of Make.

"Although in Science they have seen further by standing on the shoulders of giants; in computing, we mostly stand on each other's feet." -- Richard Wesley Hamming

Hunter-Github commented 9 years ago

Graphviz/Viz.js fit the niche quite easily. There is nothing in this project that would constitute an improvement over Graphviz and its descendants.

jasonm23 commented 9 years ago

:+1: for incorporating DOT syntax, there seems no reasonable excuse not to.

As @sleepyfox noted, let's stand on shoulders not on feet.

greacen commented 9 years ago

:+1: for DOT support. Even if this is an add-on. Seems like there's some similarities with the relationship notation you've done for mermaid. Though I agree with the sentiment of most of these comments, I still think there's room for a new (more web-centric?) approach to making these kind of graph notations clear, useful, and interconnected with more data.

tylerlong commented 6 years ago

Close it. Since it is a question and there hasn't been active activity here for almost 3 years.

Utopiah commented 3 years ago

Naive question as I'm just discovered the project but mermaid depends on graphlib and graphli` does have a DOT parser so I'm wondering if it's now being support and if not, what's blocking?

ooker777 commented 2 years ago

"Although in Science they have seen further by standing on the shoulders of giants; in computing, we mostly stand on each other's feet." -- Richard Wesley Hamming

FWIW I'm unable to confirm if this quote was actually said by him. Nevertheless he did say this:

Indeed, one of my major complaints about the computer field is that whereas Newton could say, "If I have seen a little farther than others, it is because I have stood on the shoulders of giants," I am forced to say, "Today we stand on each other's feet." Perhaps the central problem we face in all of computer science is how we are to get to the situation where we build on top of the work of others rather than redoing so much of it in a trivially different way. Science is supposed to be cumulative, not almost endless duplication of the same kind of things.

ooker777 commented 2 years ago

Anyway, I wonder why there isn't a tool to convert mermaid and dot formats online?

timdp commented 2 years ago

There's at least one: https://kroki.io/

jasonm23 commented 2 years ago

I mean there's github. 👍🏻