News for hackers. Stuff that matters.
Re:Pretty Fish: A better mermaid diagram editor by Myrmornis on Wednesday April 15, 2026 @11:21AM (#47780379)
https://d2lang.com/ is a nicer language than Mermaid with much nicer visual appearance. It would be great if it became more widely supported.
Re:Pretty Fish: A better mermaid diagram editor by neuronexmachina on Wednesday April 15, 2026 @12:17PM (#47781254)
I agree that it's nicer and more powerful, but it's a little concerning it hasn't had any commits in the past 6 months: https://github.com/terrastruct/d2/commits/master/
Re:Pretty Fish: A better mermaid diagram editor by 16bitvoid on Wednesday April 15, 2026 @02:18PM (#47783048)
I think the founder/lead developer, Alexander Wang, works at OpenAI now.

Plus, according to this comment on an issue, folks in their discord say it's not being actively maintained.

https://github.com/terrastruct/d2/issues/2735#issuecomment-4...

Re:Pretty Fish: A better mermaid diagram editor by vladsanchez on Wednesday April 15, 2026 @03:10PM (#47783774)
Never imagined Scale.ai CEO was D2Lang creator nor that he joined his room-mate at OpenAI (giggle).

Thanks for sharing

Re:Pretty Fish: A better mermaid diagram editor by 16bitvoid on Thursday April 16, 2026 @12:24AM (#47788647)
Scale AI is a different Alex. Their first names are spelled slightly different. Alexandr vs Alexander
Re:Pretty Fish: A better mermaid diagram editor by nine_k on Wednesday April 15, 2026 @01:58PM (#47782777)
Maybe it doesn't need constant fixing? Are there many issues in the tracker?
Re:Pretty Fish: A better mermaid diagram editor by erajasekar on Wednesday April 15, 2026 @11:41AM (#47780684)
I reached the same conclusion after comparing diagram-as-code tools — D2 feels cleaner and more expressive than Mermaid.

I’ve been working on an AI diagramming tool built around D2: https://aidiagrammaker.com/ You describe a system in plain English, and it generates architecture diagrams, flowcharts, and sequence diagrams in D2.

Edits can be made either directly in the D2 code or via a context-aware editor.

Re:Pretty Fish: A better mermaid diagram editor by lugao on Wednesday April 15, 2026 @11:23AM (#47780404)
Does it produce real svgs as opposed to foreign object html in svg mess that mermaid compilers produce?
Re:Pretty Fish: A better mermaid diagram editor by troyvit on Thursday April 16, 2026 @11:08AM (#47794293)
d2 produces real svgs but I've found them to have a hard time displaying in other svg editors. The d2 folks talk about that somewhere and they have some fixes for it.
Re:Pretty Fish: A better mermaid diagram editor by growrow on Wednesday April 15, 2026 @11:23AM (#47780403)
What makes it nicer?
Re:Pretty Fish: A better mermaid diagram editor by Myrmornis on Wednesday April 15, 2026 @11:40AM (#47780666)
Take a look at https://d2lang.com/examples/dagre/ and https://d2lang.com/tour/intro/

The language is richer and all diagram types are implemented consistently in the same language in a way that can be composed, as opposed to being a collection of unrelated DSLs.

The improved visual appearance is clear from inspecting example diagrams, I believe.

Re:Pretty Fish: A better mermaid diagram editor by spacecow on Wednesday April 15, 2026 @12:48PM (#47781720)
Oh, finally, something that supports actual hierarchical state diagrams (that isn't Graphviz, no offense)... Mermaid's "You cannot define transitions between internal states belonging to different composite states" [1] has driven me up a wall for years.

  parentA.childA -> parentB.childB: voop
  parentB.childB -> parentA: vorp 
shouldn't be that hard!

[1] https://mermaid.ai/open-source/syntax/stateDiagram.html#comp...

Re:Pretty Fish: A better mermaid diagram editor by jauntywundrkind on Wednesday April 15, 2026 @01:00PM (#47781906)
How good is the LLM at creating d2? What if any skills/material can folks recommend? (Follow-up: D2-mcp has a cheat sheet, https://github.com/h0rv/d2-mcp/blob/main/d2/CHEATSHEET.md)

And, does GitHub support it? (Follow up: alas not! Sadness. Please add!)

Re:Pretty Fish: A better mermaid diagram editor by elcritch on Tuesday April 21, 2026 @07:58AM (#47847562)
For me that's the deal breaker :/
Re:Pretty Fish: A better mermaid diagram editor by wps on Wednesday April 15, 2026 @02:29PM (#47783172)
Has anyone here used https://pikchr.org/ from the creator of SQLite?
Re:Pretty Fish: A better mermaid diagram editor by pastelsky on Wednesday April 15, 2026 @07:24PM (#47786684)
Thanks for sharing! I haven’t looked into that before but looks neat.