TALA Is Open-Source(d2lang.com)
304 points by alixanderwang 2 days ago | 23 comments
tl;dr: Terrastruct has open-sourced TALA, its autolayout algorithm for software architecture diagrams, under MPL-2.0 and bundled it into D2 v0.9.0 (usable via `--layout=tala`). Unlike Dagre and ELK, TALA is an orthogonal layout engine optimized for whiteboard-style diagrams and supports custom or partial node positioning—useful for AI-generated diagrams where models place nodes but struggle with routing. Tradeoffs include nondeterministic-feeling output when inputs change, weaker DAG handling, and nonlinear runtime scaling on larger diagrams.
HN Discussion:
  • TALA produces impressively tidy layouts for most diagrams shown
  • TALA's output can be worse than alternatives for certain diagram types like the Go queue example
  • Enthusiasm for D2 and TALA being open-sourced, filling a gap in layout tools
  • ~Automatic layout algorithms fundamentally don't scale well; interactive editors would be better
  • Curiosity about integration with existing tools like Graphviz or the underlying heuristics