Live data from Hacker News

D2 (text to diagram tool) now supports ASCII renders

d2lang.com

61–70 of 74 posts

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

#61

Earlier quoted context omitted.

Vim is basically dead. Most new plugins are written in Lue (for Neovim). I don’t like Lue much but it’s 1000x better than vim script. I occasionally tweak my Neovim plugins but don’t bother with those written in Vimscript.

1. Vim is extremely alive 2. “Lue” is actually Lua 3. It’s very possible to use both Vimscript and Lua in the same Neovim setup, so transition (or don’t) at your leisure. 4. New plugins tend to be written in Lua (for Neovim).

Yes, new plugins are written in Lua, and this one wasn't. That is what is too bad.

Previous comment was written on my phone and it decided to autocorrect Lua to Lue.

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

#62

Earlier quoted context omitted.

Further update -- I see an emacs plugin. :-) I am happy. Something to play with tonight.

Using it - better: used it. It's outdated, doesn't understand key words of recent D2 - versions and doesn't integrate well with emacs, i.e. default key bindings are IMHO not very emacsish.

Thanks for the heads up.

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

#63

Earlier quoted context omitted.

Further update -- I see an emacs plugin. :-) I am happy. Something to play with tonight.

Using it - better: used it. It's outdated, doesn't understand key words of recent D2 - versions and doesn't integrate well with emacs, i.e. default key bindings are IMHO not very emacsish.

Yeah that one's a community plugin vs an officially maintained one, which can have a range of activity from graveyard to some being maintained better than many of our official ones. That maintainer seems active on GitHub though and the d2-emacs plugin is his top pinned repo (https://github.com/andorsk), I think he'd be receptive if you let him know your interest!

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

#64
post #56

I maintain a list of browser based text to diagram tools (which I have shared a number of times here). I recently realised that the online version of D2 does NOT work solely in browser, diagram's are generated by backend servers. Can D2 work in browser by itself? Does the extension mentioned in the post work offline? (lots of tools do)

Clearly things have changed a bit recently but since a long time I use D2 exclusively locally. The binary has a watch mode that starts a web server and pushes changes on save so you can interactively develop your diagrams and e.g. share the web browser over a video conference or such. I don't know about that Mermaid thing others are talking about in the thread so I can't compare but D2 is very easy to learn the basic…

Yes, but why have all that effort in spinning a web server when I can just give a link to a place where I have embedded the chart? Or even embed it in whatever chat you have that presentation on? Don't need the binary anywhere, that's the strength of Mermaid

Until that D2 wasm port is officially released, I don't think it's even fair to call D2 competition to Mermaid, it's on a complete other level of useability. I'm glad to see that it's close to releasing.

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

#65

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...

Just wanted to thank you for a great tool :-). I love d2 and ever since I discovered it a couple of years back I've been using it for all my diagramming needs.

Thanks again and keep up the good work!

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

#66
post #59
post #27

Earlier quoted context omitted.

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

Don't have to imagine, it's been a thing since Java 8. https://www.baeldung.com/java-nashorn

Sunsetted in Java 14. Now it’s Graal.

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

#67

Earlier quoted context omitted.

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

Vim is basically dead. Most new plugins are written in Lue (for Neovim). I don’t like Lue much but it’s 1000x better than vim script. I occasionally tweak my Neovim plugins but don’t bother with those written in Vimscript.

There are far more vim users in the world than you realize. Every time I’m on ssh, I’m on vim. So daily, for the last 30 years.

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

#68
post #47

1. how does this add value over mermaid? I like how it looks and works, but is there any real reason to switch over. 2. in my opinion, what all these tools are missing is the ability to add a manual „corrective“ layer, meaning to be able to adjust the automatically created output by moving and resizing boxes by a certain x/y amount.

1. It depends on what you value =). For some, those 2 you mentioned are enough. For others, it can be something like the our CLI doesn't require a chromium browser to render SVGs ( https://news.ycombinator.com/item?id=31275754 ). It doesn't cover every difference, but we made a little comparison site if it helps: https://text-to-diagram.com 2. I'm not trying to advertise our paid product in this post about the open s…

By the way, it looks like the MermaidJS implementation of the WiiU example is broken due to subgraphs not creating namespaces. That is, the `rom` node in the `amd` subgraph is overwriting the one in the `ibm` subgraph.

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

#69
post #47

1. how does this add value over mermaid? I like how it looks and works, but is there any real reason to switch over. 2. in my opinion, what all these tools are missing is the ability to add a manual „corrective“ layer, meaning to be able to adjust the automatically created output by moving and resizing boxes by a certain x/y amount.

I like that it seems to support inline latex formulas, which seems like a great feature

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

#70

Earlier quoted context omitted.

1. It depends on what you value =). For some, those 2 you mentioned are enough. For others, it can be something like the our CLI doesn't require a chromium browser to render SVGs ( https://news.ycombinator.com/item?id=31275754 ). It doesn't cover every difference, but we made a little comparison site if it helps: https://text-to-diagram.com 2. I'm not trying to advertise our paid product in this post about the open s…

By the way, it looks like the MermaidJS implementation of the WiiU example is broken due to subgraphs not creating namespaces. That is, the `rom` node in the `amd` subgraph is overwriting the one in the `ibm` subgraph.

Thank you, made an issue: https://github.com/terrastruct/text-to-diagram-site/issues/6...
Post reply on HN