Live data from Hacker News

Show HN: A Graphviz Implementation in Rust

github.com

51–56 of 56 posts

Re: Show HN: A Graphviz Implementation in Rust

#52
post #20

Earlier quoted context omitted.

> lack of manual formatting controls What do you mean? You can always specify the exact coordinates of some vertices: 3 [pos="20,30"] This line of code, anywhere within your graph specification, forces vertex 3 to be placed at position (20,30). It doesn't get more manual than that.

Have you tried it before? Pos doesn’t work with most layout engines (most notably dot), making it kinda useless, and graphviz doesn’t easily expose the dimensions of a node to accommodate dynamic layout. You can work around that, but that’s nowhere near as ergonomic as some sort of “tree level”-like argument that would force a node to position at a certain Y-coord while leaving the automatic layout process otherwise…

I've used it many times with neato and it works alright. Of course, there's always some "tweaking" to do if you want the end graph to look right, but this is always the case.

Re: Show HN: A Graphviz Implementation in Rust

#53
post #24

Author of a web-based GraphViz editor [1] here. We're currently using viz.js [2], which is the original GraphViz compiled to WASM. Since viz.js is unmaintained, we're looking for a replacement. This library looks really promising! As it's written in rust, it should be possible to port it to WASM. Are there plans in that direction? Is it planned to be a drop-in replacement for GraphViz (or the dot engine)? [1]: https:…

awesome-graphviz #language-bindings, https://github.com/CodeFreezr/awesome-graphviz#language-bind...

awesome-network-analysis #javascript lists a few libraries. https://github.com/briatte/awesome-network-analysis#javascri...

FWIW, JupyterLite builds WASM as well

Re: Show HN: A Graphviz Implementation in Rust

#54
post #22

Earlier quoted context omitted.

yep exactly. paraphrasing something I read somewhere ... "Best to think of Graphviz as a competent but unruly teenager" and then just be glad you did not have to do the work yourself.

Heh heh. It would probably be helpful to the community if we could add a layout plugin to allow users to specify layouts in some absolute or relative grid format, to avoid all the invisible edge and edge length hackery. We just need appropriate funding. We have some amazing maintainers who work on gitlab.com/graphviz/graphviz now, but the think is, there are far more bug reporters than bug fixers. The first gen of Gr…

Dearest Graphviz Project,

In case you come back to revisit ... First I will note my comment appears nested one level deeper than I had been aiming for which may make it sound less positive than I intended. Second, Graphviz doesn't need to do anything to appease control freaks. You have been absolutely rocking it for decades. The important part of my glib description is 'competent' and to accept the very, very fair tradeoff between; already done with minimal effort and satisfying some fashion police insisting you do it their way when in reality they can't produce results themselves.

The bottom line is, I can not thank you enough for releasing your software way back when I built it on my Amiga, you have been a constant companion in my career.

Re: Show HN: A Graphviz Implementation in Rust

#55
post #20

Earlier quoted context omitted.

> lack of manual formatting controls What do you mean? You can always specify the exact coordinates of some vertices: 3 [pos="20,30"] This line of code, anywhere within your graph specification, forces vertex 3 to be placed at position (20,30). It doesn't get more manual than that.

Have you tried it before? Pos doesn’t work with most layout engines (most notably dot), making it kinda useless, and graphviz doesn’t easily expose the dimensions of a node to accommodate dynamic layout. You can work around that, but that’s nowhere near as ergonomic as some sort of “tree level”-like argument that would force a node to position at a certain Y-coord while leaving the automatic layout process otherwise…

Dot will set relative Y value via ranking. All nodes with the same rank share a common Y.

Re: Show HN: A Graphviz Implementation in Rust

#56
post #20

Earlier quoted context omitted.

Have you tried it before? Pos doesn’t work with most layout engines (most notably dot), making it kinda useless, and graphviz doesn’t easily expose the dimensions of a node to accommodate dynamic layout. You can work around that, but that’s nowhere near as ergonomic as some sort of “tree level”-like argument that would force a node to position at a certain Y-coord while leaving the automatic layout process otherwise…

Dot will set relative Y value via ranking. All nodes with the same rank share a common Y.

Despite some effort, I couldn't figure out how to get the rank attribute working for my use case. Any good references/examples you'd recommend?
Post reply on HN