Live data from Hacker News

Mermaid: Generation of diagrams like flowcharts or sequence diagrams from text

github.com

71–80 of 110 posts

Re: Mermaid: Generation of diagrams like flowcharts or sequence diagrams from text

#71
post #20

Earlier quoted context omitted.

I like Mermaid fine, but nothing is perfect. I will look at your list. The tool I always wanted would let me paste in the SQL of my database schema and output a diagram of the tables and relationships. That's SQL and not Markdown or JSON or any other format. Note that DrawDB (www.drawdb.app) does this, although it does not yet handle views. But I have been happy with what it offers so far. Still, I would welcome sugg…

If it's sqlite compatible, then there a many solutions. In general it's trickier. plug: https://github.com/dgoffredo/sqliteviz Not web based, though.

This is based on graphviz, and with the available layout algorithms, any schema with more than 5 tables and a few foreign key relation becomes a jumbled, unreadable mess.

Re: Mermaid: Generation of diagrams like flowcharts or sequence diagrams from text

#72
post #56

Earlier quoted context omitted.

I recently did a variation of this where instead of drawing, I just drafted a quick few bullet points and text describing at a high level what the system should do. And then I asked chat GPT to identify use cases and generate sequence diagrams for each use case in puml format (plantuml). Shockingly effective and it took about five minutes. This was a technical proposal that I shared with a few partner companies to pr…

> write only documentation (nobody will ever read or truly value it) But what's the point of producing such documentation? I could imagine that the process of creating it could be somehow beneficial (committing to memory, finding discrepancies, etc). If it's not, why can't it just be skipped?

The answer is literally in the same sentence you quoted…

Re: Mermaid: Generation of diagrams like flowcharts or sequence diagrams from text

#73

I have an almost exhaustive list [1] of browser based text to diagram tools. Some specialised tools (like https://sequencediagram.org/ ) so much better at what they do than any generic ones like mermaid. [1] https://xosh.org/text-to-diagram/

They might be "better", but Mermaid works offline (there's a cli) which makes it a much better choice, along with PlantUML. An online tool might be good for making one off things you know you won't ever need to change, but my main use case for these tools is documentation which, naturally, needs to change over time.

Re: Mermaid: Generation of diagrams like flowcharts or sequence diagrams from text

#74

IMO mermaid is awesome, but for two somewhat indirect reasons: - There’s an almost wysiwig editor for mermaid at https://www.mermaidchart.com/play . It’s very convenient and appropriately changes the layout as you draw arrows! - Notion supports inline mermaid charts in code blocks (with preview!) It’s awesome for putting some architecture diagrams in Eng docs.

About Notion, they do indeed support Mermaid, but their included version is quite obsolete and they don’t seems so eager to update it. A shame.

Re: Mermaid: Generation of diagrams like flowcharts or sequence diagrams from text

#75
post #56

Earlier quoted context omitted.

I recently did a variation of this where instead of drawing, I just drafted a quick few bullet points and text describing at a high level what the system should do. And then I asked chat GPT to identify use cases and generate sequence diagrams for each use case in puml format (plantuml). Shockingly effective and it took about five minutes. This was a technical proposal that I shared with a few partner companies to pr…

> write only documentation (nobody will ever read or truly value it) But what's the point of producing such documentation? I could imagine that the process of creating it could be somehow beneficial (committing to memory, finding discrepancies, etc). If it's not, why can't it just be skipped?

None other than ticking boxes and shutting up the people that keep asking for such things to be produced. Who then invariably don't have the attention span to do anything with the diagram. That's literally the only reason I have for creating them. Otherwise it's a tedious activity that gets in the way of developing, slows me down, and just interrupts my creative process. I usually have better things to do.

And as you might understand from what I just said, I rarely produce any diagrams. I've been active as a developer since before UML got popular and then peaked and then faded into obscurity. I still have a signed (by Martin Fowler) copy of UML distilled on a shelf somewhere gathering dust. First edition and everything. I don't think it's very valuable. Waste paper basically. But contact me if you feel otherwise. It's in pristine condition because I never did much more than thumb though it and shelve it.

25 years ago, any self respecting architect had expensive licenses for things like rational rose or visio. And they'd be fiddling with those tools for hours to produce detailed class and other diagrams. And those diagrams were as useless then as they are now. Epic waste of time. People stopped buying and using those tools. This was once a very big industry that has now imploded to next to nothing. Nobody is buying, very few people waste budget on this crap. It's a niche market with some niche revenue. Tens of millions of developers ignore these tools.

What do plantuml, mermaid, and other OSS diagramming tools have in common? The people that make them don't eat their own dogfood to document how their own software works. You can have some fun looking for diagrams in OSS projects. With few exceptions, this is not a thing (devops people seem to have a weird obsession with diagramming. And overengineering). I'm not aware of many serious OSS project where developers have bothered to document even a tiny fraction of their software with diagrams. Including all the major OSS UML diagramming tools.

The documentation for these contains plenty of examples of course (typically very simplistic). Just not any that document how the tool is designed or works. I'm not judging. I wouldn't bother either for reasons that I articulated above. But I find it ironic that even diagram tool developers don't seem to feel an urge to use diagrams for their own stuff. Makes you wonder why they bother creating the tool? You'd have to be passionate about diagramming tools but not so that you'd want to use them for your own software.

Re: Mermaid: Generation of diagrams like flowcharts or sequence diagrams from text

#76
post #60
post #56

Earlier quoted context omitted.

> write only documentation (nobody will ever read or truly value it) But what's the point of producing such documentation? I could imagine that the process of creating it could be somehow beneficial (committing to memory, finding discrepancies, etc). If it's not, why can't it just be skipped?

Documentation is a tool for creating shared understanding. If you don’t need to share your understanding, don’t write docs. Note however that sharing understanding works on the people axis and on the time axis. Docs allow you to share your current understanding with your future self. They’d better be general enough to be true then, though. Nowadays I find Gemini pro to be able to accurately document a complex workflo…

I write and read lots of documentation. Diagrams are not a common feature of that.

Re: Mermaid: Generation of diagrams like flowcharts or sequence diagrams from text

#77
post #67

I have an almost exhaustive list [1] of browser based text to diagram tools. Some specialised tools (like https://sequencediagram.org/ ) so much better at what they do than any generic ones like mermaid. [1] https://xosh.org/text-to-diagram/

The main benefit for me to just know and primarily use mermaid is that it integrates with markdown in Azure DevOps and GitHub seamlessly. No need for a text to image build step or similar.

Same reason. I can add to this list Readme.com and Notion.

Re: Mermaid: Generation of diagrams like flowcharts or sequence diagrams from text

#79

I have an almost exhaustive list [1] of browser based text to diagram tools. Some specialised tools (like https://sequencediagram.org/ ) so much better at what they do than any generic ones like mermaid. [1] https://xosh.org/text-to-diagram/

Thank you, that's handy!

Re: Mermaid: Generation of diagrams like flowcharts or sequence diagrams from text

#80
post #78

I much prefer d2 https://d2lang.com/ Only downside is AFAIK no in-browser renderer.

They were working on a wasm version some time ago I believe [0]. Not sure how usable this is insofar, but it may be of interest.

[0]: https://github.com/terrastruct/d2/pull/436/files

Post reply on HN