Skip to content

Instantly share code, notes, and snippets.

@sritchie
Created May 4, 2023 14:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sritchie/af5034ef6f477ac42a2931f2bf0f82bf to your computer and use it in GitHub Desktop.
Save sritchie/af5034ef6f477ac42a2931f2bf0f82bf to your computer and use it in GitHub Desktop.
;; Composing viewers!
;; - something like clerk/sync
;; - take requires from namespace form and set up corresponding SCI namespace
(defn func [x]
(if (= x 3)
))
(def shared-opts {...})
;; come see my nice general relativity scene...
(defn series-plots [f n]
(let [f (taylor-series f)]
(mafs.core/fragment
(for [i (range n)]
(mafs.plot/of-y
{:x
(->fn
(take i f))})))))
(mafs.core/scene
{:opt1 ...}
[(mafs.core/cartesian ...)
(series-plots ...)])
;; build a bunch of canned "scenes" for people
(eval-cljs
(q [:mafs.core/Mafs {:f ~'fn-name}
[:pre ...]]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment