News for hackers. Stuff that matters.
Re:Diagrams · Diagram as Code by nshkrdotcom on Monday November 04, 2024 @04:52PM (#42046353)
Mermaid is great, but is quirky.

LLM's are well-trained on Mermaid. Gemini specifically is fantastic as a 'diagram assistant'. I was able to create this diagram and a ton of other such diagrams quite easily with Gemini and Mermaid's live editor: https://nshkr.com/SecureSphere-Overview-20241102.png

Re:Diagrams · Diagram as Code by renjimen on Monday November 04, 2024 @06:37PM (#42047230)
I frequently turn notes about infrastructure, pipelines or databases into diagrams with an LLM to ground my team's understanding.

The VSCode Mermaid plugin and the GH integration make this very simple to do.

Re:Diagrams · Diagram as Code by shepherdjerred on Monday November 04, 2024 @08:30PM (#42047841)
VS Code recently added some AI-related features for Mermaid

https://code.visualstudio.com/updates/v1_95#_mermaid-diagram...

Re:Diagrams · Diagram as Code by 3abiton on Tuesday November 05, 2024 @01:29AM (#42049070)
I've been using the same, but with Chatgpt. Multiple iterations are needed to get what I want though. Cool trick is that you could import Mermaid using drawio.
Re:Diagrams · Diagram as Code by throwaway86530 on Tuesday November 05, 2024 @11:00AM (#42052529)
Sometimes I feel they are even too much trained on Mermaid. I prefer graphviz but claude very often output a mermaid diagram even if I gave a valid graphviz example in my prompt.