Fork me on GitHub

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?


nbb doesn't target the browser, it runs on Node.js


Perhaps #scittle is more what you want combined with e.g. vega-lite


But for command line / server side libraries Node.js might have some graphical stuff


I think some folks have also used #scittle with vega-lite


So @U066L8B18 - do you have any suggestions for @dennisa?

Daniel Slutsky17:09:14

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: and @U06C63VL4, the author of


@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


But I could be misremembering it

cldwalker17:09:29 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 🙂

Daniel Slutsky17:09:31

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

Daniel Slutsky17:09:05

Here is a piece of cljs code I'm using from #scittle to render a Vega / Vega-Lite spec:

(defn vega [spec]
      {: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:

🙏 1
Daniel Slutsky17:09:39

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

👍 1

Vega appears to be geared towards business chart. But if it can render other sort of graphics it would be interesting to learn more

Daniel Slutsky17:09:19

For browser-free uses of Vega, there is also Darkstar:

Daniel Slutsky17:09:25

> 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.


These projects look pretty great, and elaborate, thank you. I guess I am looking for smth more simple. Like, but run locally with VSC and minimal installation, that kids can use without being overwhelmed. I have to backtrack a little.

👍 1