42 karma · joined December 27, 2023
I think you missed the point - this is what they mean by "defined so loosely as to be uninformative." By saying "in some sense" you are allowing arbitrarily abstract definitions of the term "computer" thereby making the term itself no longer useful.
I can't speak for Google's official implementation though.
At that point you could just use an SVG charting library. Good charting libraries will have code snippets readily available for line charts that you can copy/paste. SVG can be styled with CSS just like text.
"Simpler code" seems like the main benefit but it comes with a big "weirdness" factor as the tradeoff. I'd bet there's a super lightweight SVG charting lib somewhere out there which is about as simple as this while being much more standard. i.e. supports line charts only, and has the simple type signature `(number[]) => SVGElement`.
By the way the answer to the question "why are we templating yaml?" is: people are just more familiar with it and don't want to have to translate examples to jsonnet that they copy and paste from the web. Do not underestimate this downside :) Same downside would probably apply to TypeScript-generated configs I bet.
More info here: https://go.dev/blog/constants