I'd like to create Clerk notebooks with embedded, interactive Quil sketches (and develop them live). I was somewhat surprised to see that I couldn't find any prior art here. Is this even possible given the current state of clerk's cljs support via cherry?
Clerkβs cljs support is via SCI. I donβt know of anyone who has loaded CLJS Quil on the browser side, but it should be doable. π
I just wrote a little p5-viewer for clerk that uses nextjournal.clerk.render/with-dynamic-import to load the p5.js library. That works, which is a nice step, but of course I'd much rather write quil code than p5.js code.
I suppose I need to produce a .js artifact of quil somehow.
Or load quil's cljs with eval-cljs, maybe that will work
or use quil on the JVM?
I'd like to be able to publish static clerk notebooks to the web with embedded and interactive quil sketches, so JVM quil won't work.
For quil on the JVM, you can target SVG and emit to Clerk pretty easily. The downside is with interactivity/animation.
π
For those in the future wondering how to make quil work with clerk, you can see how I got this working at https://github.com/Ramblurr/nature-of-code
very cool, thanks for sharing! We should add this to the book of clerk.
Is there a reliable way to link to another ns (notebook) from Clojure markdown comments? and hiccup?. I tried a few options, some work on v0.15.957 but none on the latest commit on master (some do work on dev mode, but not on static builds). Thanks!