Hacker News new | ask | show | jobs
by mLuby 1268 days ago
Very nice. I just solved it with GraphViz: https://gist.github.com/mLuby/d184c08c507fa03292c72acb38a146...
2 comments

FYI, you can abbreviate some of that:

  Vixen -> Rudolph;
  Vixen -> Prancer;
  Vixen -> Dasher;
Is equivalent to:

  Vixen -> {Rudolph Prancer Dasher}
You can also do:

  {Comet Dancer} -> Vixen -> {Rudolph Prancer Dasher}
Very nice when dealing with larger graphs.
Oh cool, didn't know it could do that so easily. GraphViz is really something.
I spent a lot of time with it a few years back developing some documentation. I had actually forgotten the correct syntax and had to look it up. It was a lot of fun to use, though.

I should probably brush up on it a bit and maybe use it for some crap we have at work that's incomprehensible ("What calls what again? Does anyone know? And it's a bespoke language so there is no tooling to help? Shit.")

That's super interesting!

I like how straightforward the solution is. The problem almost fades away! :)

That's because fundamentally it's a topological sort problem, and it seems like graphviz sorts the nodes appropriately before drawing the digraph.