News for hackers. Stuff that matters.
Re:Show HN: A Graphviz Implementation in Rust by wswope on Thursday March 17, 2022 @04:31PM (#30715563)
Does the standard implementation include any similar debug rendering? Seems like the coolest part of the project!

I tend to stay away from Graphviz a lot more than I otherwise would these days due to the lack of manual formatting controls (have spent waaaayyy too many hours writing code to add invisible edges between certain nodes to force row-ordered layouts).

Re:Show HN: A Graphviz Implementation in Rust by jrockway on Thursday March 17, 2022 @05:09PM (#30715912)
Hah, that's hilarious. I also like graphs but hate manually laying them out, so I always use Graphviz and live with the results. Sometimes I think I could do better, but typing "foo -> bar" a few times is so much easier than spending any time thinking about what would look nicest. One time I added colors though, that was kind of nice.
Re:Show HN: A Graphviz Implementation in Rust by tejtm on Thursday March 17, 2022 @06:46PM (#30716708)
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.

Re:Show HN: A Graphviz Implementation in Rust by graphviz on Thursday March 17, 2022 @10:04PM (#30717999)
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 Graphviz authors are timing out, so we very few people are around now to fix relatively deep semantic or logical bugs, c.f. https://xkcd.com/2347/

Best regards, Graphviz the Project

Re:Show HN: A Graphviz Implementation in Rust by tejtm on Friday March 18, 2022 @04:06PM (#30726890)
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 by touisteur on Thursday March 17, 2022 @10:02PM (#30717983)
I wish it would output to graphml or something I could slightly edit with yEd or some manual tool. Does anybody have recipes for that? Or having generate some tikz simple layout and then moving on without dot? I can't say I have good memories of inkscape + dot svg output...
Re:Show HN: A Graphviz Implementation in Rust by Q26124 on Thursday March 17, 2022 @04:41PM (#30715648)
The standard implementation does not have debug mode. Reverse engineering GV by reading the 90's style c code is not fun either.
Re:Show HN: A Graphviz Implementation in Rust by graphviz on Thursday March 17, 2022 @10:04PM (#30718004)
Sure it is
Re:Show HN: A Graphviz Implementation in Rust by monkeycantype on Thursday March 17, 2022 @10:56PM (#30718303)
You can position everything manually exactly where you want it in graphviz without any of those tricks by using the neato engine.

I use scripts to manually place everything from data in csv files.

https://github.com/mathew-j-davis/boxesandarrows

Re:Show HN: A Graphviz Implementation in Rust by enriquto on Thursday March 17, 2022 @05:55PM (#30716298)
> 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.
Re:Show HN: A Graphviz Implementation in Rust by wswope on Thursday March 17, 2022 @06:42PM (#30716680)
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 intact.

Re:Show HN: A Graphviz Implementation in Rust by enriquto on Friday March 18, 2022 @04:31AM (#30719817)
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 by steveroush on Saturday March 19, 2022 @04:19PM (#30737230)
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 by wswope on Saturday March 19, 2022 @11:12PM (#30739735)
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?