Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Having worked with many different graph tools and languages (Matlab, Matplotlib, ggplot, gnuplot, Origin, D3, Raphael, Three.js, ...), I strongly believe that declarative languages are the right tool for describing visualizations. This library therefore seems to be a step in the right direction. As some people here already pointed out, pure JSON might not be flexible enough to avoid a lot of repetition for real-world use cases though, but I think it's a good start.

I think what could make this into something really useful would be the addition of special directives. MongoDB is a good example for this, as they have enriched their query language with a special operator syntax (e.g. $in, $all, $or) that allows the user to specify e.g. logical constraints.

Recently I developed a similar descriptive language for describing patterns in source code ASTs, which uses YAML as a default output format and features some regular-expression like operators that make matching of complex patterns containing e.g. repetitions, references and loops possible (for some examples, see http://docs.quantifiedcode.com/patterns/language/index.html).

Personally, I have always preferred YAML over JSON as a serialization language, since it is much more concise, easier to write (after some getting used to) and comes with handy features like anchors/references, which make e.g. self-referencing documents or variable definition much easier.



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: