I did this years ago, in a project called Claro, and then again in http://ihate.rubyforge.org/profligacy/lel.html and pretty much every GUI framework I've done. I got the idea from Wiki syntax and the Cassowary constraint solver as well as Knuth's algorithm.
This is awesome. This concept of building elastic layouts with ASCII code is new to me and I agree with @jamesaguilar that it's one of those obvious yet genius ideas.
Has anything been done towards this direction to generate CSS layouts? It seems like it could cure some headaches.