Live data from Hacker News

The Unreasonable Effectiveness of Sequence Diagrams in MermaidJS

jessems.com

11–20 of 113 posts

Re: The Unreasonable Effectiveness of Sequence Diagrams in MermaidJS

#12
I have used Mermaid diagrams quite a bit lately because ChatGPT can generate them. It's been an easy way to get it to visualize things before I have access to the image generation stuff. It works really well, try it if you haven't!

I only wish the renderer could render "sketch" style like Excalidraw, I don't like the default appearance. Obviously a small detail, though.

Re: The Unreasonable Effectiveness of Sequence Diagrams in MermaidJS

#13
post #6
post #3

I really, _really_ wish I could generate SVGs of these without JavaScript and a headless browser.

Have you looked at d2lang - it supports SVG output: https://d2lang.com/tour/exports/ The syntax is a bit different though, so it depends on where your source is coming from, see here: https://text-to-diagram.com/?example=sequence&b=mermaid

I really like d2 a lot more than its alternatives.

However the big problem here being that d2 is still quite new and isn't as well supported as Mermaid JS

Re: The Unreasonable Effectiveness of Sequence Diagrams in MermaidJS

#14
I really enjoy MermaidJS. I've been trying to shoehorn representing vlan flows over switches recently and haven't been very successful. My basic goal is to show [p1]switch1[p2] [p9]switch3[p12] in a graphical manner (and more intermediate switches). MermaidJS kind of works. I'm tempted to use something like Visio or Google Drawings but they take too much manual work.

Re: The Unreasonable Effectiveness of Sequence Diagrams in MermaidJS

#16
post #3

I really, _really_ wish I could generate SVGs of these without JavaScript and a headless browser.

Check out seqdiag, part of blockdiag [1]. It's python-based and uses graphviz (AFAIK) to generate sequence diagrams in SVG. I've used it several times and found it very good.

1. http://blockdiag.com/en/seqdiag/index.html

Re: The Unreasonable Effectiveness of Sequence Diagrams in MermaidJS

#17

I can highly recommend PlantUML as a simple language for creating sequence diagrams. It also supports other UML diagram types, which, despite what the article says, are also useful sometimes (so long as you don't worry about every last silly detail that's specified in the standard). @startuml Alice -> Bob: Authentication Request Bob --> Alice: Authentication Response Alice -> Bob: Another authentication Request Alice…

Cool, I'll check it out.

Re: The Unreasonable Effectiveness of Sequence Diagrams in MermaidJS

#18
I really like using Mermaid to create state diagrams. I'd been looking for a tool like it for quite some time, and I think it slipped under my radar because it's more focused on sequence / flow diagrams and doesn't hype its state diagram capabilities as much. Using a text-based tool for this is so much better than my previous workflow of Visio or Powerpoint.
Post reply on HN