NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
Show HN: Mermaid ASCII Diagrams (mermaid-ascii.art)
virtualritz 6 hours ago [-]
This obviously needs a direct pipe into Svgbob!

https://ivanceras.github.io/svgbob-editor/

quuxplusone 8 hours ago [-]
Some nits:

The "Example" buttons don't jump out at me; I found them but it took a while. Also consider labeling them with their point, e.g. "Example 3: Color"

If you change the input text to something well-formed, the graph seems to update immediately. But if you change it to something ill-formed, the graph doesn't update immediately — and then if you click "Generate" manually, it blanks the input box. Either this is a bug, or the "Generate" button doesn't do what I think it does (i.e. generate output). Again, adding a noun to the verb might help. Or just adding some usage information somewhere on the page.

For those like me who've never heard of "Mermaid," apparently it's like GraphViz's dot language but different. https://github.com/mermaid-js/mermaid I tried the flowchart example from Mermaid's own README, but it didn't come out right: looks like the shape characters [] and {} aren't handled.

lordswork 4 hours ago [-]
Counter-nit: I found the examples within a few seconds.
matt3210 4 hours ago [-]
Same, I had no idea there were examples until I read this.
AlexanderGrooff 8 hours ago [-]
Thanks for the feedback! I agree that the web UI can be improved (quite) a bit, most of my efforts went into the actual generation of the diagrams. I'll have a look at prettifying it.
nunobrito 7 hours ago [-]
Hey, where are the mermaids?!?

But now seriously.. the diagrams are working really well for simple examples, thank you so much for sharing this tool. I have bookmarked your page, my documentation is based on text files and often have to build these kind of diagrams too.

The example buttons took me a while to be found, but are good for syntax explanation. Thank you for making this available.

AlexanderGrooff 6 hours ago [-]
Thanks for the kind words!
jonahx 7 hours ago [-]
Nice work, I love ascii diagrams. Especially useful when you want a visual explanation that can be embedded directly in source code.

Small nit on layout: 90 degree joints should use "+" in the connecting lines, as they do in the boxes.

abraxas 1 hours ago [-]
In the age of AI someone automated Mentifex[1]!

[1] https://nothingisreal.com/mentifex_faq.html

tiagoafpereira 3 hours ago [-]
zczc 3 hours ago [-]
nlake906 5 hours ago [-]
love it, will definitely be using it for sketching documentation in comments for SQL sprocs, etc.

One request: support for self-reference, i.e. "A --> A", "A --> A & B"

AlexanderGrooff 5 hours ago [-]
Thanks, that's a good suggestion. I'm also noticing that's not working as intended.
AlexanderGrooff 3 hours ago [-]
Fixed in 0.5.0. Give it a try!
piedpiper99 8 hours ago [-]
I supposed it's good for basic usage. I just tried a more complex graph and it didn't render well.
ewalk153 9 hours ago [-]
This would be great to build into project readme workflows.
kitd 8 hours ago [-]
You can already use Mermaid in GitHub markdown:

https://docs.github.com/en/get-started/writing-on-github/wor...

mcraiha 7 hours ago [-]
edflsafoiewq 7 hours ago [-]
I don't like that it renders controls on top of the diagram.
7 hours ago [-]
octopusRex 8 hours ago [-]
I'm disappointed. I was actually expecting lovely ascii art pictures of mermaids.
derfnugget 7 hours ago [-]
Same. This is more than a nit. It's pretty much a need.
kleiba 7 hours ago [-]
m4tthumphrey 8 hours ago [-]
[flagged]
airstrike 6 hours ago [-]
[flagged]
6 hours ago [-]
Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 22:44:24 GMT+0000 (Coordinated Universal Time) with Vercel.