clerk

Casey 2024-05-27T08:43:39.031479Z

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?

2024-05-27T09:05:18.187269Z

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. πŸ™‚

Casey 2024-05-27T09:10:03.503419Z

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.

Casey 2024-05-27T09:14:48.938529Z

Or load quil's cljs with eval-cljs, maybe that will work

mkvlr 2024-05-27T11:20:19.081949Z

or use quil on the JVM?

Casey 2024-05-27T11:25:22.324959Z

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.

πŸ‘ 1
2024-05-27T11:25:35.491939Z

For quil on the JVM, you can target SVG and emit to Clerk pretty easily. The downside is with interactivity/animation.

Casey 2024-05-27T11:36:54.133979Z

πŸŽ‰

❀️ 1
πŸ™Œ 2
Casey 2024-05-29T10:42:34.161209Z

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

πŸ–€ 2
mkvlr 2024-05-29T10:54:53.208079Z

very cool, thanks for sharing! We should add this to the book of clerk.

πŸ’― 1
dobladez 2024-05-27T22:07:03.769019Z

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!