Live data from Hacker News

Who needs Graphviz when you can build it yourself?

spidermonkey.dev

31–40 of 114 posts

Re: Who needs Graphviz when you can build it yourself?

#31
post #21

It is one of the game changers of AI. It used to be a that the barrier of entry of creating a new tool was high - so we had to use popular pieces of software, often stretching them, or writing plugins (that had their own constraints). Now it is often easier to write from scratch a new piece of software, for which with have full control. We can stand on the shoulders of giants - not just "a giant".

I'm sorry, I don't get your comment. What makes you think the approach or the code described in the article were developed by an LLM?

I don't know how the code was created.

But based on my experience with multiple project, both current frameworks and AI changed the game. I used to much more reply on existing software and cursing that they don't do what I want - as the time to create a personalized tool was simply much to afford. Now often it is quicker to create a personalized tool than fight with existing one.

Re: Who needs Graphviz when you can build it yourself?

#33
post #19

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.

Yes, that would be great. Iongraph is MPL, graphviz is EPL. But Iongraph is Javascript anyway, so you would need to use Claude to translate it to C

Re: Who needs Graphviz when you can build it yourself?

#34
post #24

This is a great write up and thank you to the author! Just a note that graphviz dot is not purely Sugiyama’s, there is a paper on the site that details the actual implementation. Also judging from the final two images (dot vs iongraph for the same large graph) it’s clear that dot is optimized for minimal area where iongraph does not. That’s the trade off. The author claims one is more easy to navigate than the other,…

I agree that we haven’t gained much yet from looking at large graphs. Usually we can reduce any problem of interest to something small. Still, Graphviz produces very ugly results even for small graphs, whereas this is where iongraph shines.

To be clear, what I think makes the latter graph more readable is particularly that the wires are easier to follow. Yes, it’s subjective, but backed up by my own personal experience. Long term I think we can add more interactive features to help us in such cases, e.g. search and dimming irrelevant wires.

Re: Who needs Graphviz when you can build it yourself?

#35
post #33
post #19

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.

Yes, that would be great. Iongraph is MPL, graphviz is EPL. But Iongraph is Javascript anyway, so you would need to use Claude to translate it to C

Why would you need Claude for that?

Re: Who needs Graphviz when you can build it yourself?

#36

I added one statement and it only says `timed out`. I'll stick with Graphviz, which certainly doesn't time out.

The part that is timing out is actually the JS interpreter, not the graph viewer. It’s a total hack to get SpiderMonkey running on the page at all.

The full Frankenstein stack is: SpiderMonkey compiled in arm emulation mode, to a WASI 0.1 module, adapted to a WASI 0.2 component, transpiled to the web with jco, running in some random WASI shim.

We do this because the JS runtime needs inline caches to be filled out before optimization, which requires an JIT and actual execution of machine code. Otherwise you just get a graph full of Unreachable. Frankly I’m amazed it works at all.

Re: Who needs Graphviz when you can build it yourself?

#37
post #30
post #21

It is one of the game changers of AI. It used to be a that the barrier of entry of creating a new tool was high - so we had to use popular pieces of software, often stretching them, or writing plugins (that had their own constraints). Now it is often easier to write from scratch a new piece of software, for which with have full control. We can stand on the shoulders of giants - not just "a giant".

To me, this article demonstrated the value of knowing your domain and its particular constraints, as well as a good understanding of prior art. Together with the only 1000 line demo it took to produce (which I suppose could have been aided by an LLM), I did not finish reading with any specific appreciation for AI.

No LLMs were used, at least not in any substantial way.

Re: Who needs Graphviz when you can build it yourself?

#38
post #19

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.

I’m not sure how far you can push the generality of the iongraph algorithm. My gut is that it could be made to work somewhat well for any control flow graph with reducible control flow, but I expect there would be many complications.

Re: Who needs Graphviz when you can build it yourself?

#40
post #27

Layout is one of those things humans do so easily and intuitively, yet you couldn't write an easy algorithm for it. I wonder if there's potential to use gen ai to achieve human like results. Anyone has any thoughts on feasibility and complexity of such an approach?

I dabbled in this area, there are poster layout generation attempts that use gen ai to come up with an initial layout plan, and even feed the visualization back into the llm for iterative fine-tuning.

I was intrigued, but couldn't make it work reliably. Perhaps I forgot to add "make it look nice" to my prompts.

https://arxiv.org/abs/2412.04237v3

https://haoyuchen.com/POSTA

https://github.com/microsoft/LayoutGeneration/blob/main/Layo...

Post reply on HN