Live data from Hacker News

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

github.com

81–90 of 110 posts

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

#83
post #6

Little weird to see this on the lead page… mermaid has been around for a long time. And in general I’ve found its real world use pretty lacking.

We use it a lot for internal documentation, eg in Markdown on GitHub (renders natively), Notion, and Jira.

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

#85
post #82
post #78

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

That’s a pretty major downside, since broad in-browser support (GitHub, Notion etc) is arguably Mermaid‘s USP.

It's not too bad if you're prepared to set up a rendering pipeline using a static site generator like mkdocs. This will get you much better results than just letting GitHub et al render markdown in whatever style they please.

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

#86
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

https://play.d2lang.com/ loads https://play.d2lang.com/d2.wasm so presumably "all done"

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

#87
post #54

Check out Kroki for a multi-syntax wrapper around a bunch of text driven diagram generators —- including Mermaid, PlantUML, Ditaa, GraphViz, SVGBob, etc, etc https://kroki.io/

That's pretty slick, thanks for sharing. https://github.com/yuzutech/kroki (MIT) and they thankfully use Zulip for their chat!

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

#88
post #66
post #57

Earlier quoted context omitted.

No, it's an independent, JS-only implementation, and it's way, way less featureful.

I believe it uses an cross compiled version of dot in js

I don't see the infrastructure for that, rather it seems to be relying on d3 and DAG renderers targeting it https://github.com/mermaid-js/mermaid/blob/mermaid%4011.6.0/...

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

#89
post #58
post #28

I'm slightly surprised excalidraw ( https://excalidraw.com/ ) is not in the comments. I use it regularly to convey ideas to my devs and designers. Plus, it exports to json! Someone wrote a library to convert mermaid to excalidraw as well. We're now experimenting with creating design questions to ask in interviews with excalidraw/mermaid

I love excalidraw. But does it have an editable, diffable textual representation? Can it be generated with little ceremony, and laid out automatically?

The sibling submission about https://kroki.io has an Excalidraw in https://kroki.io/#examples and the input is the following, so presumably "yes" and "no"

  {
    "type": "excalidraw",
    "version": 2,
    "source": "https://excalidraw.com",
    "elements": [
        {
          "type": "rectangle",
          "version": 175,
          "versionNonce": 279344008,
          "isDeleted": false,
          "id": "2ZYh24ed28FJ0yE-S3YNY",
Yes, textual, but no, the diffs aren't going to mean anything. It'll be like diffing svg from Inkscape

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

#90
post #59

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/

I was wondering, are there any tools that could help to draw decent looking genealogical tree ? My main issue are the updates, where adding one of the ancestors or newborns causes full rework of entire tree. I'd like to feed data to some script and have it render a family tree, with all the regular updates.

https://www.familyecho.com/ is the lightest one. It's almost offline. Some light reverse engineering can make it work totally offline. I saw a version of it on Github too. Some features had problems, I think it was printing which was failing.
Post reply on HN