4 ms·
> Finally I'm not really sure of the point of being declarative if it only supports JavaScript anyway. Maybe they plan a WASM implementation? Vega schemas are
by simongray 6y ago
> Finally I'm not really sure of the point of being declarative if it only supports JavaScript anyway. Maybe they plan a WASM implementation?
Vega schemas are JSON and JSON is quite portable, despite its JS origins.
Vega has actually become fairly popular in the Clojure ecosystem (see e.g. https://github.com/metasoarous/oz https://github.com/metasoarous/oz) due to how well the data-orientation fits the Clojure philosophy. I also think Altair for Python is quite popular (https://github.com/altair-viz/altair https://github.com/altair-viz/altair) and that is a Vega-lite library.
- geokon 6y agothat still needs to call JS though... It's not like they rewrote the renderer in Clojure A simpler and easy to grok alternative with minimal dependencies is thing-geom https://github.com/thi-ng/geom/blob/master/geom-viz/src/core.org https://github.com/thi-ng/geom/blob/master/geom-viz/src/core... You just declare what you want drawn and you get back an svg tree which you can either modify further or transform to xml to get an actual .svg format string It's very unopinionated and can be easily inserted in both Clojure and Clojurescript applications. You can render with the browser, webview, batik, svgsalamander or I even quickly wrote a converter to Javafx bc I have the svg tree I can directly traverse
- simongray 6y ago> that still needs to call JS though... It's not like they rewrote the renderer in Clojure But why exactly is that an issue...? Some people also think the JVM is icky so they won't touch Clojure. I don't really care much myself what underlying technology is used, I just like to get things done. > A simpler and easy to grok alternative with minimal dependencies is thing-geom Thanks for reminding me of thi.ng. I am both in awe at how prolific he is, while at the same time frustrated with the non-standard org-mode-driven development style. > You just declare what you want drawn and you get back an svg tree which you can either modify further or transform to xml to get an actual .svg format string Probably worth mentioning that Vega can also give you an SVG. > I even quickly wrote a converter to Javafx bc I have the svg tree I can directly traverse Can you link your code? I would like to explore this some more.
- harperlee 6y agoApparently org-mode no longer drives it, from what I read in the link above! > Originally developed in a Literate Programming style using Emacs & Org-mode, it has recently (May 1) decided to revert to a traditional Clojure project setup to encourage more contributions from other interested parties. The original ORG source files are kept for reference in the ./org/ directory until further notice.
- IshKebab 6y ago> But why exactly is that an issue...? It's not an issue as such, it's just that you are doing extra work to avoid Javascript by having a fully declarative system (there's no Javascript in the Vega specs - it even has a custom language for expressions). That's great if you intend to rewrite the renderer in Clojure. But if you don't do that - if you just call into Javascript anyway then what's the point? It's very future-looking, but feels quite YAGNI at the moment.
- simongray 6y agoWhat's the point? The point is being able to use it from Clojure or whatever language you fancy. I'm not gonna switch to JS for something like this.
- IshKebab 6y agoBut the Clojure Vega implementation still uses Javascript!
- simongray 6y agoAnd every language is equivalent to machine code which is represented as electricity in a circuit. Who cares what's further down the layers? It's about what abstractions your work with, not what libraries your code calls into.
- Arkdy 6y agoIf you think that the JVM is icky, GraalVM may satisfy some of your concerns. Just getting access to Clojure on Windows through a single graal executable saved me some heartache this week, and I can't wait to start packaging apps with it.