News for hackers. Stuff that matters.
Re:D2: Diagram Scripting Language by benzguo on Saturday October 25, 2025 @07:50PM (#45707867)
D2 has been around for a while (and has been posted here before) but still surprisingly unknown. It's so much better than mermaid – giving them a boost with this post!
Re:D2: Diagram Scripting Language by 0x696C6961 on Saturday October 25, 2025 @07:53PM (#45707877)
I like d2 better than mermaid, but mermaid is natively supported in so many places making it the pragmatic choice.
Re:D2: Diagram Scripting Language by benzguo on Saturday October 25, 2025 @07:58PM (#45707897)
true, unfortunately not supported in most markdown renderers... generally i've chosen d2 when i want a more intricate/custom diagram
Re:D2: Diagram Scripting Language by kitd on Sunday October 26, 2025 @06:35AM (#45710648)
Mermaid is supported in Github Markdown though. That's a pretty large market by itself.
Re:D2: Diagram Scripting Language by tretiy3 on Sunday October 26, 2025 @01:01AM (#45709282)
last time i was installing mermaid with npm, noted that installation lasts too long. i checked and found that it is installing headless chrome under the hood...
Re:D2: Diagram Scripting Language by liqilin1567 on Sunday October 26, 2025 @09:25AM (#45711665)
I didn't know about D2. Mind sharing features that are better than mermaid?
Re:D2: Diagram Scripting Language by Taikonerd on Sunday October 26, 2025 @10:23AM (#45712134)
I'm not the OP, but the reason I started using D2 as opposed to Mermaid is that D2 supports animations: https://d2lang.com/tour/composition/

In other words, you can have one D2 file that generates `step1.png,` `step2.png`, and `step3.png`. Useful for PowerPoint presentations!

Re:D2: Diagram Scripting Language by liqilin1567 on Sunday October 26, 2025 @09:46PM (#45716574)
Thanks, animation is really an impressive feature.