Top
Best
New

Posted by pdubroy 5 hours ago

Who needs Graphviz when you can build it yourself?(spidermonkey.dev)
166 points | 18 comments
zvr 10 minutes ago|
To be more accurate, the comparison is not with Graphviz, but with dot(1).

Graphviz is a visualization framework and it includes many layout engines, implementing different algorithms: dot, neato, fdp, sfdp, circo, twopi, ...

It would be great if this new custom algorithm were to be contributed to Graphviz.

ctenb 3 hours ago||
This is a cool example of how specializing a generic algorithm to a specific subspace can yield much better results. This is quite often the case in my experience, but we often don't bother utilizing properties that are specific to our problem space, and just apply the generic algorithm out of convenience (and because it is often good enough)
zem 1 hour ago||
I would love to see this evolve into a more general purpose control flow graph viewer - pretty much any language implementation would find it a great debugging tool. it's probably most of the way there already.
stefs 9 minutes ago|
this tool works by replacing the "general purpose" algorithm by specializing it, which made it less general purpose but simpler and more efficient ... and now there's the request to make it more general purpose.

(it's a joke! and the joke is that those are two different general purpose. but still.)

lexh 59 minutes ago||
This is a great write up.

I wonder if any of these techniques turn up in whatever the magic sauce is in D2’s TALA layout engine, which is in a league of its own IMO.

https://d2lang.com/examples/tala/

thw_9a83c 2 hours ago||
Nice work! The examples look better than the Graphviz output, indeed. This is a good example of how you can always beat a long-developed, generic tool by specializing for a much narrower use case.
xlii 3 hours ago||
This is a concept I'm working around with Microdiagram (microdiagram.com) prototype.

i.e. having a general purpose diagram/graph layout is hellishly difficult, but most of the diagrams/charts follow much simpler rules, thus it's much easier to have N languages, each for 1 type of diagram, than 1 language for N types of diagrams.

JohnKemeny 3 hours ago|
Sounds intriguing. What is an example of a chart and its language that you have designed so far?
xlii 1 hour ago||
The Piano chart on prototype is an example, that's for discussing piano keys and chords on basic level.

I already implemented (in other prototype) diagram for event calculus (i.e. consideration of event stream through addition of new events like rollback, modify etc.)

On paper I have designs for point-in-time designs, scenario divergence and also some fun ones like a bingo card template. Diagrams are one thing, but there's also a design for collaboration and play-replay capabilities.

That being said, that's only a design right now with a simple prototype on the website :)

rs186 19 minutes ago||
We looked at using Graphviz, but the copyleft nature of Graphviz license (Eclipse Public License) means that this will never be allowed in our company's software.
nirava 2 hours ago||
anyone working on this space easily gets a +1!

I have struggled with code to diagram tools for a while [mermaid and graphviz], and usually return to figjam when I need the readabilty and aesthetics.

graph-viz is MASSIVE and a binary. mermaid requires the browser's svg rendering system to work. I just need something that builds diagrams from description easily ...

rapnie 1 hour ago||
You might also check out D2, which had a recent run on the HN front page.

https://news.ycombinator.com/item?id=45707539

a_t48 2 hours ago||
I used mermaid for https://basisrobotics.tech/2024/11/24/basis-robot-02-softwar... (autogenerated) and it worked out pretty well, but notably I wasn't trying to handle loops. There have to be mermaid to png renderers out there. Beyond that, I view svg/html output as a huge advantage - I can restyle it and it's copyable.
eisbaw 2 hours ago||
Wow, thank you very much. I like the graphviz dot language. I may translate this to Rust.
IshKebab 1 hour ago|
This is great. I've been trying to generate diagrams for HDL hierarchies and neither Graphviz nor ELK can do a remotely good job. In fact I've never got good results from Graphviz for any graphs over a handful of nodes. I think it just isn't actually very good. But it has such huge mindshare even if there was a better option I wouldn't be able to find it.
More comments...