Hacker News new | ask | show | jobs
by awwaiid 654 days ago
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?

1 comments

Thank you for pointing this out - it was an error. I actually even forgot to credit the dependencies the binary was built from!

However, that is now resolved. The latest distribution has license mentions for:

- Dagrejs

- NotoSans Font

- *Others (an html file generated via `cargo about` that list all deps used in the final dist)

That being said, I did want to point out that I did take significant influence from Dagrejs which is why you see that the layouts produced look very similar - it is a rough translation into rust. There are changes to some DFS traversals, other optimizations that are rust-specific, and countless bug fixes. I actually spent a lot of time attempting to reproduce the layouts that Dagre generates, but there are some examples that do not produce the same results. At this point, I think it is close enough and would rather spend time writing a new set of algos for better edge crossing minimization and cluster support.

Cool, thanks - it makes sense to build on or be (directly) inspired by these other projects.