3 ms·
I'm curious why you chose json as apposed to just working directly within SVG, or perhaps using a template language or some other DSL. I've been thinking of ma
by 20after4 7y ago
I'm curious why you chose json as apposed to just working directly within SVG, or perhaps using a template language or some other DSL.
I've been thinking of making a tool that will output g-code based on similar ideas to what you have here, however, I think I would try to work directly in go or python instead of expressing the shapes as json.
- dustismo 7y agoI chose json mostly for convenience, but also to give me some easy future possibilities. Making thinking was something like: pros: 1. json has lots of tooling and is generally easy to work with 2. if I put up a ui/webapp around hfd, then json will work well for that. 3. if I want a custom DSL, I can always have the grammar convert to json as the underlying representation. CONS: 1. the json ends up being deeply nested and hard to work with 2. lack of multiline strings and comments (I went ahead added comment support though :))