3 ms·
The idea of supplying a spec to transform arbitrary data is interesting to me. I did one in JavaScript called Reshaper[1], and then hooked it up to a library wr
by JayOtter 10y ago
The idea of supplying a spec to transform arbitrary data is interesting to me. I did one in JavaScript called Reshaper[1], and then hooked it up to a library wrapper called Smolder[2].
The result was a sort of system whereby data going into a function would be automatically 'reshaped'. It worked well as a proof-of-concept, but obviously was too fragile for most uses (though it's used in the automatic graphs in Kajero[3]).
The difference here seems to be that the spec defines the actual transformations, rather than just the desired final structure.
[1] https://github.com/joelotter/reshaper https://github.com/joelotter/reshaper
[2] https://github.com/joelotter/smolder https://github.com/joelotter/smolder
[3] https://github.com/joelotter/kajero https://github.com/joelotter/kajero
- marktangotango 10y agoAre you familiar with Xml and xsl/xslt? They took this concept a long, long way.
- ygra 10y agoAnd DSSSL before that. But I guess XML is just not hip enough anymore. Actually, having done some work on XSLT these days again I was joking to a colleague at work that one day someone will surely think what a great idea it would be to create a programming language in JSON to transform JSON to other JSON. And lo and behold, a few days later I stumble over this. I have to admit, XSLT looks far nicer to me, but that might be familiarity and a proper specification to read to understand things instead of just a bunch of examples.