frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Who needs Graphviz when you can build it yourself?

https://spidermonkey.dev/blog/2025/10/28/iongraph-web.html
233•pdubroy•7h ago

Comments

ctenb•5h 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)
xlii•4h 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•4h ago
Sounds intriguing. What is an example of a chart and its language that you have designed so far?
xlii•3h 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 :)

JohnKemeny•4h ago
I added one statement and it only says `timed out`. I'll stick with Graphviz, which certainly doesn't time out.
rag-hav•3h ago
Hackernews hug of death maybe
bvisness•15m ago
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, otherwise you just get a graph full of Unreachable. Frankly I’m amazed it works at all.

thw_9a83c•4h 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.
nirava•4h 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 ...

a_t48•4h 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.
rapnie•2h ago
You might also check out D2, which had a recent run on the HN front page.

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

benterix•1h ago
The problem with all these tools is that any diagram becomes unreadable past a certain number of nodes. So we need a higher amount of control over the compromise that is inherent in these scenarios. The approach taken by the author is a very good step in this direction and hopefully others will follow.
aqula•1h ago
I've had good results using ELK for a terraform diagram generator. You can see some samples here.

https://marketplace.visualstudio.com/items?itemName=infragra...

eisbaw•4h ago
Wow, thank you very much. I like the graphviz dot language. I may translate this to Rust.
IshKebab•3h 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.
zem•2h 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•1h 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•2h 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/

rs186•2h 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.
zvr•1h 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.

fulafel•1h ago
It's a bit confusing. Dot apparently is both the language name [1] for the Graphviz syntax, and one of the layout engines [2], possibly with different capitalizations.

[1] https://graphviz.org/doc/info/lang.html [2] https://graphviz.org/docs/layouts/dot/

rurban•25m ago
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
Ghoelian•21m ago
Why would you need Claude for that?
bvisness•10m ago
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.
stared•1h ago
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".

benterix•1h ago
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?
stared•1h ago
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.

jrrrp•1h ago
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.
bvisness•14m ago
No LLMs were used, at least not in any substantial way.
frumiousirc•1h ago
Looks nice. Two things on my wish list:

1. Make graphs from Clang's AST.

2. Invent some style flourish to help follow an edge that becomes part of a bundle of many edges.

HarHarVeryFunny•1h ago
If you can get the AST output into a text file, then it should be easy to convert it to the DOT input that GraphViz takes, which at heart is just a list of node connections (A -> B).
le-mark•1h ago
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 think that’s debatable.

Ultimately I found that visualizing large graphs is rarely helpful in practice; they can certainly look nice for some well defined graphs, but I rarely saw well defined graphs in the wild. Ymmv but maybe some would agree?

bvisness•22m ago
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.

aqula•1h ago
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?
amelius•43m ago
Cool, but I don't like the generic headline. Graphviz has served many people including me very well over the years and will continue to do so.
phplovesong•10m ago
D2 "should" handle most cases OP was annoyed about. Its written in Go, so its really fast too. I never had to wait for it to finish, but that said i never produced huge diagrams that i could imagine a compiler would.

AWS to bare metal two years later: Answering your questions about leaving AWS

https://oneuptime.com/blog/post/2025-10-29-aws-to-bare-metal-two-years-later/view
92•ndhandala•1h ago•41 comments

Keep Android Open

http://keepandroidopen.org/
1179•LorenDB•8h ago•318 comments

Who needs Graphviz when you can build it yourself?

https://spidermonkey.dev/blog/2025/10/28/iongraph-web.html
233•pdubroy•7h ago•37 comments

What we talk about when we talk about sideloading

https://f-droid.org/2025/10/28/sideloading.html
1251•rom1v•18h ago•505 comments

Tips for stroke-surviving software engineers

https://blog.j11y.io/2025-10-29_stroke_tips_for_engineers/
271•padolsey•8h ago•76 comments

ChatGPT's Atlas: The Browser That's Anti-Web

https://www.anildash.com//2025/10/22/atlas-anti-web-browser/
437•AndrewDucker•4d ago•182 comments

uBlock Origin Lite Apple App Store

https://apps.apple.com/in/app/ublock-origin-lite/id6745342698
210•mumber_typhoon•8h ago•91 comments

EuroLLM: LLM made in Europe built to support all 24 official EU languages

https://eurollm.io/
692•NotInOurNames•21h ago•518 comments

SpiderMonkey Garbage Collector

https://firefox-source-docs.mozilla.org/js/gc.html
25•sebg•3h ago•0 comments

Continuous Nvidia CUDA Profiling in Production

https://www.polarsignals.com/blog/posts/2025/10/22/gpu-profiling
24•brancz•6d ago•0 comments

Tinkering is a way to acquire good taste

https://seated.ro/blog/tinkering-a-lost-art
327•jxmorris12•14h ago•245 comments

UIs Are Not Pure Functions of the Model – React.js and Cocoa Side by Side (2018)

https://blog.metaobject.com/2018/12/uis-are-not-pure-functions-of-model.html
37•PKop•3d ago•9 comments

Boring is what we wanted

https://512pixels.net/2025/10/boring-is-what-we-wanted/
360•Amorymeltzer•16h ago•204 comments

YouTube is taking down videos on performing nonstandard Windows 11 installs

https://old.reddit.com/r/DataHoarder/comments/1oiz0v0/youtube_is_taking_down_videos_on_performing/
203•jjbinx007•2h ago•172 comments

Wacl – A Tcl Distribution for WebAssembly

https://github.com/ecky-l/wacl
54•shakna•7h ago•2 comments

Generative AI Image Editing Showdown

https://genai-showdown.specr.net/image-editing
267•gaws•15h ago•50 comments

Powerful and precise multi-color lasers now fit on a single chip

https://phys.org/news/2025-10-powerful-precise-multi-lasers-chip.html
41•PaulHoule•4d ago•14 comments

Apple will phase out Rosetta 2 in macOS 28

https://developer.apple.com/documentation/apple-silicon/about-the-rosetta-translation-environment
188•summarity•5d ago•212 comments

Keeping the Internet fast and secure: introducing Merkle Tree Certificates

https://blog.cloudflare.com/bootstrap-mtc/
159•tatersolid•13h ago•45 comments

The AirPods Pro 3 flight problem

https://basicappleguy.com/basicappleblog/the-airpods-pro-3-flight-problem
441•andrem•21h ago•238 comments

HTTPS by default

https://security.googleblog.com/2025/10/https-by-default.html
229•jhalderm•18h ago•207 comments

Project Shadowglass

https://shadowglassgame.com
98•layer8•11h ago•34 comments

Fil-C: A memory-safe C implementation

https://lwn.net/SubscriberLink/1042938/658ade3768dd4758/
232•chmaynard•18h ago•77 comments

Nvidia takes $1B stake in Nokia

https://www.cnbc.com/2025/10/28/nvidia-nokia-ai.html
245•kjhughes•20h ago•158 comments

Gluing and framing a 9000-piece jigsaw

https://river.me/blog/puzzle-glue-9000/
59•busymom0•3d ago•28 comments

Wheeled Inverted Pendulum Model

https://scaron.info/robotics/wheeled-inverted-pendulum-model.html
6•pillars•4d ago•1 comments

We need a clearer framework for AI-assisted contributions to open source

https://samsaffron.com/archive/2025/10/27/your-vibe-coded-slop-pr-is-not-welcome
265•keybits•1d ago•141 comments

Why do some radio towers blink?

https://www.jeffgeerling.com/blog/2025/why-do-some-radio-towers-blink
161•warrenm•16h ago•104 comments

The decline of deviance

https://www.experimental-history.com/p/the-decline-of-deviance
216•zdw•20h ago•183 comments

It's insulting to read AI-generated blog posts

https://blog.pabloecortez.com/its-insulting-to-read-your-ai-generated-blog-post/
1118•speckx•1d ago•498 comments