This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-21
Channels
- # announcements (51)
- # asami (5)
- # babashka (25)
- # babashka-sci-dev (26)
- # beginners (33)
- # calva (10)
- # clj-kondo (51)
- # clj-yaml (99)
- # clojure (96)
- # clojure-australia (3)
- # clojure-berlin (5)
- # clojure-europe (151)
- # clojure-norway (58)
- # clojurescript (20)
- # cursive (13)
- # datalevin (1)
- # datomic (19)
- # docker (6)
- # emacs (55)
- # events (1)
- # fulcro (50)
- # gratitude (8)
- # juxt (7)
- # leiningen (5)
- # malli (6)
- # membrane (1)
- # nbb (28)
- # off-topic (22)
- # pathom (7)
- # polylith (20)
- # portal (1)
- # reagent (37)
- # reitit (2)
- # releases (2)
- # reveal (32)
- # scittle (34)
- # shadow-cljs (46)
- # testing (10)
- # tools-deps (33)
- # xtdb (18)
Hi, checking out nbb. What's the minimal workflow to target a web browser? I would like to try a ClojureScript graphics or animation library. Is nbb a good fit for this use case?
But for command line / server side libraries Node.js might have some graphical stuff
Thanks!
So @U066L8B18 - do you have any suggestions for @dennisa?
It looks wonderful. I'll try to think about possible use cases. :thinking_face: 🙏 Mentioning also @U7CAHM72M who created an EDN version of the Vega-Lite official examples: https://behrica.github.io/vl-galery/convert/ and @U06C63VL4, the author of https://github.com/jsa-aerial/hanami.
@U066L8B18 What I was getting it is I think you made some stuff with scittle + vega-lite, which I hoped you could share with @dennisa
https://github.com/cldwalker/bb-clis/blob/master/doc/scripts.md#bb-vis is the updated readme to that script. I haven't used it in awhile unfortunately. For what I was doing, vl2*
commands were all that I needed to interface with. If I ever need to dip into the vega-lite api I'd definitely switch to nbb 🙂
Oh, sorry. Yes, I do use Vega-Lite from Scittle, simply to render plots in an html page. How would that be useful in an #nbb script?
Well, I first pointed @dennisa to #nbb but it wasn't clear to me he wished to target the browser
Here is a piece of cljs code I'm using from #scittle to render a Vega / Vega-Lite spec: https://github.com/scicloj/clay/blob/d09b981342124ba8fb4769e682c7a52d7070aedd/src/scicloj/clay/v1/tool/scittle/cljs_generation.clj#L19
(defn vega [spec]
[:div
{:ref (fn [el]
(-> el
(js/vegaEmbed (clj->js spec)
(clj->js {:renderer :svg}))
(.then (fn [res]))
(.catch (fn [err] (println (str "vegaEmbed error: " err))))))}])
It works when the following dependencies are in the page:
Please tell me if I can help some how. I'm curious to hear about troubles & surprises.
Hi! actually browser does not matter that much, nice to have. I want to create a minimal setup that is easy to install and can render graphics and simple animation based on primitives
Vega appears to be geared towards business chart. But if it can render other sort of graphics it would be interesting to learn more
For browser-free uses of Vega, there is also Darkstar: https://github.com/applied-science/darkstar
> But if it can render other sort of graphics it would be interesting to learn more Curious to hear more about what you have in mind and would find useful.