Skip to content

Commit

Permalink
rerendered docs
Browse files Browse the repository at this point in the history
  • Loading branch information
daslu committed Jan 19, 2025
1 parent 2ef4632 commit 5d07ea6
Show file tree
Hide file tree
Showing 11 changed files with 1,302 additions and 1,217 deletions.
13 changes: 7 additions & 6 deletions docs/clay_book.emmy_viewers.html
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ <h1 class="title"><span class="chapter-number">3</span>&nbsp; <span class="chapt
<script src="clay_book.emmy_viewers_files/reagent7.js" type="text/javascript"></script>
<script src="clay_book.emmy_viewers_files/emmy-viewers8.js" type="text/javascript"></script>
<script src="clay_book.emmy_viewers_files/emmy-viewers9.js" type="text/javascript"></script>
<p><link href="clay_book.emmy_viewers_files/emmy-viewers10.css" rel="stylesheet" type="text/css"><link href="clay_book.emmy_viewers_files/emmy-viewers11.css" rel="stylesheet" type="text/css"><link href="clay_book.emmy_viewers_files/emmy-viewers12.css" rel="stylesheet" type="text/css"><link href="clay_book.emmy_viewers_files/emmy-viewers13.css" rel="stylesheet" type="text/css"><link href="clay_book.emmy_viewers_files/emmy-viewers14.css" rel="stylesheet" type="text/css"></p>
<link href="clay_book.emmy_viewers_files/emmy-viewers10.css" rel="stylesheet" type="text/css"><link href="clay_book.emmy_viewers_files/emmy-viewers11.css" rel="stylesheet" type="text/css"><link href="clay_book.emmy_viewers_files/emmy-viewers12.css" rel="stylesheet" type="text/css"><link href="clay_book.emmy_viewers_files/emmy-viewers13.css" rel="stylesheet" type="text/css"><link href="clay_book.emmy_viewers_files/emmy-viewers14.css" rel="stylesheet" type="text/css">
<script type="application/x-scittle">(defn kindly-compute [input callback] (ajax.core/POST "/kindly-compute" {:headers {"Accept" "application/json"}, :params (pr-str input), :handler (fn [response] (-> response read-string callback)), :error-handler (fn [e] (.log js/console (str "error on compute: " e)))}))</script>
<p>This namespace discusses Clay’s support for <a href="https://github.com/mentat-collective/emmy-viewers">Emmy-viewers</a>.</p>
<div class="sourceClojure">
<div class="sourceCode" id="cb1"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a>(<span class="kw">ns</span> clay-book.emmy-viewers</span>
Expand All @@ -235,7 +236,7 @@ <h2 data-number="3.1" class="anchored" data-anchor-id="usage"><span class="heade
<div class="sourceClojure">
<div class="sourceCode" id="cb2"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a>(mafs/of-x e/sin {<span class="at">:color</span> <span class="at">:blue</span>})</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div id="id18"><script type="application/x-scittle">(reagent.dom/render [(fn [] [mafs.core/Mafs [mafs.coordinates/Cartesian] (reagent.core/with-let [G__88420 (js/Function. "y0001" " return Math.sin(y0001);")] [mafs.plot/OfX {:color :blue, :y G__88420}])])] (js/document.getElementById "id18"))</script></div>
<div id="id32"><script type="application/x-scittle">(reagent.dom/render [(fn [] [mafs.core/Mafs [mafs.coordinates/Cartesian] (reagent.core/with-let [G__92155 (js/Function. "y0001" " return Math.sin(y0001);")] [mafs.plot/OfX {:color :blue, :y G__92155}])])] (js/document.getElementById "id32"))</script></div>
</section>
<section id="a-few-detials-behind-the-scenes" class="level2" data-number="3.2">
<h2 data-number="3.2" class="anchored" data-anchor-id="a-few-detials-behind-the-scenes"><span class="header-section-number">3.2</span> A few detials behind the scenes</h2>
Expand All @@ -246,8 +247,8 @@ <h2 data-number="3.2" class="anchored" data-anchor-id="a-few-detials-behind-the-
</div>
<div class="printedClojure">
<div class="sourceCode" id="cb4"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a>(reagent.core/with-let</span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a> [G__88424 (js/Function. <span class="st">"y0001"</span> <span class="st">" return Math.sin(y0001);"</span>)]</span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a> [mafs.plot/OfX {<span class="at">:y</span> G__88424}])</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a> [G__92159 (js/Function. <span class="st">"y0001"</span> <span class="st">" return Math.sin(y0001);"</span>)]</span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a> [mafs.plot/OfX {<span class="at">:y</span> G__92159}])</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<p>By default, it is inferred to be of <code>:kind/emmy-viewers</code>, and is handle accordingly.</p>
<p>Equivalently, we could also handle it more explicitly with <code>:kind/reagent</code>:</p>
Expand All @@ -257,7 +258,7 @@ <h2 data-number="3.2" class="anchored" data-anchor-id="a-few-detials-behind-the-
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a> ~(ev/expand (mafs/of-x e/sin)))]</span>
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a> {<span class="at">:html/deps</span> [<span class="at">:emmy-viewers</span>]})</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div id="id19"><script type="application/x-scittle">(reagent.dom/render [(clojure.core/fn [] [mafs.core/Mafs [mafs.coordinates/Cartesian] (reagent.core/with-let [G__88428 (js/Function. "y0001" " return Math.sin(y0001);")] [mafs.plot/OfX {:y G__88428}])])] (js/document.getElementById "id19"))</script></div>
<div id="id33"><script type="application/x-scittle">(reagent.dom/render [(clojure.core/fn [] [mafs.core/Mafs [mafs.coordinates/Cartesian] (reagent.core/with-let [G__92163 (js/Function. "y0001" " return Math.sin(y0001);")] [mafs.plot/OfX {:y G__92163}])])] (js/document.getElementById "id33"))</script></div>
</section>
<section id="more-examples" class="level2" data-number="3.3">
<h2 data-number="3.3" class="anchored" data-anchor-id="more-examples"><span class="header-section-number">3.3</span> More examples</h2>
Expand All @@ -276,7 +277,7 @@ <h2 data-number="3.3" class="anchored" data-anchor-id="more-examples"><span clas
<span id="cb6-12"><a href="#cb6-12" aria-hidden="true" tabindex="-1"></a> (mafs/inequality</span>
<span id="cb6-13"><a href="#cb6-13" aria-hidden="true" tabindex="-1"></a> {<span class="at">:y</span> {:&lt;= shifted :&gt; cos} <span class="at">:color</span> <span class="at">:blue</span>}))))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div id="id20"><script type="application/x-scittle">(reagent.dom/render [(fn [] (reagent.core/with-let [G__88438 (reagent.core/atom [0 0])] [mafs.core/Mafs {:height 400} [mafs.coordinates/Cartesian {}] (reagent.core/with-let [G__88439 (js/Function. "[y0001]" "[p0002]" " const _0006 = - p0002;\n const _0008 = _0006 + y0001;\n const _0013 = Math.sinh(_0008);\n const _0014 = Math.cosh(_0008);\n const _0015 = Math.pow(_0014, 4.0);\n return (- 6.0 * Math.pow(_0013, 4.0) + 8.0 * Math.pow(_0013, 2.0) * Math.pow(_0014, 2.0) - 2.0 * _0015) / _0015;")] [mafs.plot/OfX {:y (clojure.core/let [psym__87010__auto__ (clojure.core/mapv (clojure.core/deref G__88438) [0])] (clojure.core/fn [x__87011__auto__] (G__88439 [x__87011__auto__] psym__87010__auto__)))}]) [mafs.core/MovablePoint {:atom G__88438, :constrain "horizontal"}] (reagent.core/with-let [G__88440 (js/Function. "[y0001]" "[p0002]" " const _0006 = - p0002;\n const _0008 = _0006 + y0001;\n const _0013 = Math.sinh(_0008);\n const _0014 = Math.cosh(_0008);\n const _0015 = Math.pow(_0014, 4.0);\n return (- 6.0 * Math.pow(_0013, 4.0) + 8.0 * Math.pow(_0013, 2.0) * Math.pow(_0014, 2.0) - 2.0 * _0015) / _0015;") G__88441 (js/Function. "y0001" " return Math.cos(y0001);")] [mafs.plot/Inequality {:y {:<= (clojure.core/let [psym__87010__auto__ (clojure.core/mapv (clojure.core/deref G__88438) [0])] (clojure.core/fn [x__87011__auto__] (G__88440 [x__87011__auto__] psym__87010__auto__))), :> G__88441}, :color :blue}])]))] (js/document.getElementById "id20"))</script></div>
<div id="id34"><script type="application/x-scittle">(reagent.dom/render [(fn [] (reagent.core/with-let [G__92173 (reagent.core/atom [0 0])] [mafs.core/Mafs {:height 400} [mafs.coordinates/Cartesian {}] (reagent.core/with-let [G__92174 (js/Function. "[y0001]" "[p0002]" " const _0006 = - p0002;\n const _0008 = _0006 + y0001;\n const _0013 = Math.sinh(_0008);\n const _0014 = Math.cosh(_0008);\n const _0015 = Math.pow(_0014, 4.0);\n return (- 6.0 * Math.pow(_0013, 4.0) + 8.0 * Math.pow(_0013, 2.0) * Math.pow(_0014, 2.0) - 2.0 * _0015) / _0015;")] [mafs.plot/OfX {:y (clojure.core/let [psym__91208__auto__ (clojure.core/mapv (clojure.core/deref G__92173) [0])] (clojure.core/fn [x__91209__auto__] (G__92174 [x__91209__auto__] psym__91208__auto__)))}]) [mafs.core/MovablePoint {:atom G__92173, :constrain "horizontal"}] (reagent.core/with-let [G__92175 (js/Function. "[y0001]" "[p0002]" " const _0006 = - p0002;\n const _0008 = _0006 + y0001;\n const _0013 = Math.sinh(_0008);\n const _0014 = Math.cosh(_0008);\n const _0015 = Math.pow(_0014, 4.0);\n return (- 6.0 * Math.pow(_0013, 4.0) + 8.0 * Math.pow(_0013, 2.0) * Math.pow(_0014, 2.0) - 2.0 * _0015) / _0015;") G__92176 (js/Function. "y0001" " return Math.cos(y0001);")] [mafs.plot/Inequality {:y {:<= (clojure.core/let [psym__91208__auto__ (clojure.core/mapv (clojure.core/deref G__92173) [0])] (clojure.core/fn [x__91209__auto__] (G__92175 [x__91209__auto__] psym__91208__auto__))), :> G__92176}, :color :blue}])]))] (js/document.getElementById "id34"))</script></div>
<p>Try moving the pink mark. 👆</p>
<div style="background-color:grey;height:2px;width:100%;"></div>
<div><pre><small><small>source: <a href="https://github.com/scicloj/clay/blob/main/notebooks/clay_book/emmy_viewers.clj">notebooks/clay_book/emmy_viewers.clj</a></small></small></pre></div>
Expand Down
Loading

0 comments on commit 5d07ea6

Please sign in to comment.