Live data from Hacker News

Vizdom: Diagrams as Code

vizdom.dev

51–60 of 68 posts

Re: Vizdom: Diagrams as Code

#51

I still don’t get what exactly this does. There are Graphviz wrappers so I can already create Diagrams programmatically, what is the advantage of using this?

If you're already happy with Graphviz wrappers, then the only real benefit is that you can sync the graph to a Vizdom account so you don't have to build anything to view the diagram somewhere outside of local development - it saves you from needing to save the positioned graph to a file to view it (then delete it) or coming up with a way to serve the SVG.

Not to mention the act of performing layout (obtaining positioning data) is relatively expensive for non-trivial graphs. When syncing to a Vizdom account, your application doesn't need to spend cycles to position/render anything. Instead, your graph is positioned and rendered in the dashboard in your browser upon loading (technically, it is also rendered on the server due to my global SSR config).

Also a few of the JS wrappers don't come with a build of Graphviz that allows memory growth, so for somewhat medium/large graphs, the WebAssembly panics. For all other wrappers, it works just fine I'd assume - mainly an issue with not passing the correct build args to Emscripten.

Re: Vizdom: Diagrams as Code

#52
post #22

Earlier quoted context omitted.

Neat product! I like the interactivity. For me (and my narrow use-case), I just couldn’t find a simple tool to sync my graph to somewhere that I could view it easily - especially after I’ve instrumented my application and deployed to the cloud.

I’ve been using this GitHub service https://github.com/dreampuf/GraphvizOnline

Yeah that and http://magjac.com/graphviz-visual-editor/ are decent. But they will crash on medium/large graphs because the WebAssembly build of Graphviz that they use under the hood isn't compiled to allow memory growth.

Re: Vizdom: Diagrams as Code

#53
post #43
post #42

This is very nice and something I’ve been looking for for a while. Any chance icons can be included? I want to design AWS diagrams and use service logos.

Thank you! Custom icons - not yet. I’ve been mulling over how to do it on server and client that isn’t hacky and that plays nice with edge intersections (how edges will point to the bounding box of the icon/logos) It’s definitely something I want to support.

Also, if you're using python today, take a look at https://diagrams.mingrammer.com/

It's pretty good - uses Graphviz under the hood, but supports many cloud icons/logos. Not completely sure if it allows you to provide any icon, but it wouldn't surprise me.

Re: Vizdom: Diagrams as Code

#54
post #30
post #26

the diagram on the front page I thought was documenting the huge amount of code next to it but it turns out it's the other way around! huge amount of code is generating the simple diagram. you must really hate dsl's. the point of the DSL is it saves you writing the huge amount of code to do something simple. so your premise here is people aren't writing enough code that's right more code that we have to maintain just…

Tradeoffs are real. My example displays a few more knobs and yes, it’s more verbose. I’d say my premise isn’t that “DSLs are bad”, but more along the lines of if a DSL isn’t what you’re looking for, I may have something for you. Particularly if you need your application to generate a view of a graph _during runtime_ so that it is your real-time source of truth. I find that DSLs and “as code” solutions for several pro…

The L in DSL is "Language", so it's a programming language that is domain, or niche, specific. These are code.

Diagramming is a domain, and within diagramming are any number of diagram type domains, leading to concise code for particular niches.

Compare 25+ of these niches here: https://kroki.io/

Re: Vizdom: Diagrams as Code

#55
for new register: password require at least 16 characters and contain: an uppercase letter, a lowercase letter, a number, and a symbol. Its too complex for even Chrome built-in secure password generator to come up with, let alone a human.

Re: Vizdom: Diagrams as Code

#56
post #24
post #8

Earlier quoted context omitted.

The npm package is free to use, but closed source until I have bandwidth. To be clear, you don’t need an account to use the npm package which has all of the functionality to perform layout and rendering. An account is only needed if you want to sync the graph and have a web page to view renderings. This is useful if you’ve instrumented a long lived application with Vizdom, but don’t want to produce a local layout/ren…

an account. to make a diagram. sigh diagrams-as-a-service. sign . "turn your OCD side project into a business: turn something that people do for free and don't really care that much about into a paid subscription service because..."

This seems unjustified. If people want it, they'll buy it. If not, no harm done. If you could e.g. embed the diagrams into Confluence pages, that's something people will definitely pay for.

Re: Vizdom: Diagrams as Code

#57
post #53
post #43

Earlier quoted context omitted.

Thank you! Custom icons - not yet. I’ve been mulling over how to do it on server and client that isn’t hacky and that plays nice with edge intersections (how edges will point to the bounding box of the icon/logos) It’s definitely something I want to support.

Also, if you're using python today, take a look at https://diagrams.mingrammer.com/ It's pretty good - uses Graphviz under the hood, but supports many cloud icons/logos. Not completely sure if it allows you to provide any icon, but it wouldn't surprise me.

Yes, that's my ideal, but I use TS :)

Re: Vizdom: Diagrams as Code

#59
Doing a layout algorithm is very difficult, and the DOT code made me curious, so I decompiled the wasm and looked around a bit. I see this appears to use or build on Dagre (https://github.com/dagrejs/dagre/wiki), though I've seen no citation of that work.

What's up with that? How much of this is original work vs pulling together tools in a new way or improving their API?

Re: Vizdom: Diagrams as Code

#60
post #6

I’m the author, I just got tired of using a DSL and wanted a way to programmatically write/build a graph and quickly see the rendering. DLS-based diagramming tools like Terrastruct, mermaid, or graphviz definitely have their perks and are very well established for manual graph curation. But I found the lack of programmatic tooling (except terrastruct) a bit of a pain point.

Sounds like an interesting app. But I just wanted to comment that I don't need an account to use draw.io and I can download an xml of the diagram just fine from them. I noticed you didn't mention them in your comment, so perhaps they are not a competition?
Post reply on HN