Live data from Hacker News

D2 (text to diagram tool) now supports ASCII renders

d2lang.com

21–30 of 74 posts

Re: D2 (text to diagram tool) now supports ASCII renders

#23

Llm to text to diagram is the killer workflow these days. The key challenge is making these things presentable. Optimizing them for human editability is a secondary concern at this point. This is where a lot of these tools fall apart.

> Llm to text to diagram is the killer workflow these days. It's useful, but I think only marginally. When using a diagrams-as-code tool, having an LLM write it for you gets you up and running faster, but long term you have more control (and no hallucinations) just writing the code yourself. It'll probably be fewer keystrokes in the end. Doubly so if your diagrams-as-code tool has decent autocomplete.

i think d2 looks sick , and i'm not op, but i do love just describing my system and telling the LLM to draw it. so having it "draw" d2 seems like a great new step?

when you want to make changes, you update your docs/design and repeat. think system design interview but you skip drawing it yourself at all and then sanity check your own work by interpreting the resulting graph etc

Re: D2 (text to diagram tool) now supports ASCII renders

#24
post #21

This is awesome. I hadn't heard of D2, but I love the idea that I can create my charts directly in Neovim in the terminal to get a rough draft, and do a final render with a pretty picture. I will be playing with this shortly.

I typically use Moondraw for ASCII diagrams but this is pretty great for when you're already in Vim.

Re: D2 (text to diagram tool) now supports ASCII renders

#27

Earlier quoted context omitted.

Yeah, but weird/unfortunate that it's written in vimscript.

How on earth can it be weird that a vim extension is written in vimscript?!

Well imagine a Java extension being written in Javascript...

Re: D2 (text to diagram tool) now supports ASCII renders

#28

Hello fellow devs. Just wanted to share a new feature we added this morning, though it's very alpha stage (already someone's filed a github issue for it hah) If you want to skip the blog post and poke around directly: https://play.d2lang.com/?script=qlDQtVOotFLIyFTwSEzOTi1S8Est... For a bigger example: https://play.d2lang.com/?script=rJJBjtswDEX3OgWBrm2kzU4Feoru...

So from TFA it just downscales from ELK? Do I have to specify ELK for this to work, or will it automagically enable if I try to output a .txt? (Really I'm just curious becasue I use ELK already for most of my d2 diagrams).

Re: D2 (text to diagram tool) now supports ASCII renders

#29
post #21

This is awesome. I hadn't heard of D2, but I love the idea that I can create my charts directly in Neovim in the terminal to get a rough draft, and do a final render with a pretty picture. I will be playing with this shortly.

D2 already supports a live-updating HTTP server serving a live-updating .svg, so if you tile a browser with vim, you can already get live-updates.

I discovered D2 about a year ago, and I use it for all of my diagrams now.

Re: D2 (text to diagram tool) now supports ASCII renders

#30
post #28

Hello fellow devs. Just wanted to share a new feature we added this morning, though it's very alpha stage (already someone's filed a github issue for it hah) If you want to skip the blog post and poke around directly: https://play.d2lang.com/?script=qlDQtVOotFLIyFTwSEzOTi1S8Est... For a bigger example: https://play.d2lang.com/?script=rJJBjtswDEX3OgWBrm2kzU4Feoru...

So from TFA it just downscales from ELK? Do I have to specify ELK for this to work, or will it automagically enable if I try to output a .txt? (Really I'm just curious becasue I use ELK already for most of my d2 diagrams).

It switches to ELK: https://github.com/terrastruct/d2/blob/master/d2cli/main.go#...
Post reply on HN