Skip to content

Commit 6bf9f7b

Browse files
author
Quarto GHA Workflow Runner
committed
Built site for gh-pages
1 parent 064892e commit 6bf9f7b

File tree

13 files changed

+315
-371
lines changed

13 files changed

+315
-371
lines changed

.nojekyll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
e988195e
1+
326d6b59

civitas/repl.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ <h2 class="anchored" data-anchor-id="wrapping-up">Wrapping Up</h2>
576576
<p><strong>Ready to contribute?</strong> Add your own namespace under <code>src/</code> and it becomes a new post automatically.</p>
577577
<p><strong>Join the conversation:</strong> The best place to discuss this feature, share improvements, or ask questions is the <a href="https://clojurians.zulipchat.com/#narrow/channel/422115-clay-dev">Zulip: clay-dev channel</a></p>
578578
<p>Give it a try and let us know what you think! 🚀</p>
579-
<script type="application/x-scittle">(require (quote [reagent.core :as r]))</script><div id="id3"><script type="application/x-scittle">(reagent.dom/render [(fn [] (let [output-ref (atom nil) editor-ref (atom nil) show-editor? (r/atom true) layout (r/atom :right) repl-output (r/atom []) scroll-to-bottom! (fn* [] (when (clojure.core/deref output-ref) (js/setTimeout (fn [] (set! (.-scrollTop (clojure.core/deref output-ref)) (.-scrollHeight (clojure.core/deref output-ref)))) 10))) eval-code! (fn [code] (let [captured-output (atom []) result (binding [*print-fn* (fn* [p1__37415#] (swap! captured-output conj p1__37415#)) *print-err-fn* (fn* [p1__37416#] (swap! captured-output conj (str "ERR: " p1__37416#)))] (try (pr-str (js/scittle.core.eval_string code)) (catch :default e (str "Error: " (.-message e))))) output-str (when (seq (clojure.core/deref captured-output)) (clojure.string/join "" (clojure.core/deref captured-output)))] (swap! repl-output into (cond-> [(str "> " code)] output-str (conj output-str) :always (conj result))) (scroll-to-bottom!)))] (.addEventListener js/document "click" (fn [e] (when (clojure.core/deref editor-ref) (when-let [code-container (.. e -target (closest ".sourceCode"))] (when-let [code-element (.querySelector code-container "code")] (let [code-text (.-textContent code-element)] (set! (.-value (clojure.core/deref editor-ref)) code-text) (.focus (clojure.core/deref editor-ref)))))))) (fn [] (let [collapsed? (not (clojure.core/deref show-editor?)) is-bottom? (= (clojure.core/deref layout) :bottom) toggle! (fn* [] (swap! show-editor? not)) switch-layout! (fn* [] (reset! layout (if (= (clojure.core/deref layout) :right) :bottom :right))) collapsed-size "40px" full-size "350px"] [:<> [:div#scittle-sidebar.card.shadow-sm {:style (merge {:position "fixed", :z-index "1200", :display "flex", :flex-direction "column"} (if is-bottom? {:left "0", :right "0", :bottom "0", :height (if collapsed? collapsed-size full-size)} {:top "0", :right "0", :width (if collapsed? collapsed-size full-size), :height "100vh", :padding-top "77px"}))} (when (not collapsed?) [:div.d-flex.justify-content-between.align-items-center {:style {:flex "0 0 auto", :order "0"}} [:div.btn-group [:button.btn.btn-outline-primary.btn-sm {:on-click toggle!} (if is-bottom? [:i.bi.bi-chevron-bar-down] [:i.bi.bi-chevron-bar-right]) " Hide"] [:button.btn.btn-outline-secondary.btn-sm {:on-click switch-layout!} " Switch Layout"]] [:small.text-muted "Ctrl+Enter to eval"]]) (when collapsed? [:button.btn.btn-outline-primary.w-100.h-100 {:on-click toggle!} (if is-bottom? [:i.bi.bi-chevron-bar-up] [:i.bi.bi-chevron-bar-left])]) (when (not collapsed?) [:div.card-body.p-0 {:style {:flex "1 1 auto", :order "1", :display "flex", :flex-direction (if is-bottom? "row" "column")}} [:div.position-relative {:style {:flex "1 1 0", :overflow "hidden"}} [:textarea.form-control.border-0 {:ref (fn* [p1__37417#] (reset! editor-ref p1__37417#)), :on-key-down (fn [e] (when (and (.-ctrlKey e) (= (.-key e) "Enter")) (eval-code! (.. e -target -value)))), :placeholder "Type Clojure code here...\nCtrl+Enter to evaluate\nClick copy buttons in code blocks to paste here", :style {:resize "none", :width "100%", :height "100%", :box-sizing "border-box", :font-family "var(--bs-font-monospace)", :font-size "0.875rem", :border-radius "0", :overflow-y "auto"}}]] [:div.position-relative {:style {:flex "1 1 0", :overflow "hidden"}} [:div.position-absolute.top-0.end-0.badge.bg-secondary.m-2 {:style {:font-size "0.65rem", :z-index "10"}} "Output"] [:div#repl-output.sourceCode.border-start {:ref (fn* [p1__37418#] (reset! output-ref p1__37418#)), :class (if is-bottom? "border-start" "border-top"), :style {:height "100%", :padding "0.75rem", :overflow-y "auto", :font-family "var(--bs-font-monospace)", :font-size "0.8125rem", :line-height "1.4"}} (for [[i output] (map-indexed vector (clojure.core/deref repl-output))] [:div.mb-1 {:key i} output])]]]) [:style (str (when (clojure.core/deref show-editor?) (if is-bottom? (str ".content { margin-bottom: " full-size " !important; }") (str ".content { margin-right: " full-size " !important; }"))))]]]))))] (js/document.getElementById "id3"))</script></div>
579+
<script type="application/x-scittle">(require (quote [reagent.core :as r]))</script><div id="id3"><script type="application/x-scittle">(reagent.dom/render [(fn [] (let [output-ref (atom nil) editor-ref (atom nil) show-editor? (r/atom true) layout (r/atom :right) repl-output (r/atom []) scroll-to-bottom! (fn* [] (when (clojure.core/deref output-ref) (js/setTimeout (fn [] (set! (.-scrollTop (clojure.core/deref output-ref)) (.-scrollHeight (clojure.core/deref output-ref)))) 10))) eval-code! (fn [code] (let [captured-output (atom []) result (binding [*print-fn* (fn* [p1__37416#] (swap! captured-output conj p1__37416#)) *print-err-fn* (fn* [p1__37417#] (swap! captured-output conj (str "ERR: " p1__37417#)))] (try (pr-str (js/scittle.core.eval_string code)) (catch :default e (str "Error: " (.-message e))))) output-str (when (seq (clojure.core/deref captured-output)) (clojure.string/join "" (clojure.core/deref captured-output)))] (swap! repl-output into (cond-> [(str "> " code)] output-str (conj output-str) :always (conj result))) (scroll-to-bottom!)))] (.addEventListener js/document "click" (fn [e] (when (clojure.core/deref editor-ref) (when-let [code-container (.. e -target (closest ".sourceCode"))] (when-let [code-element (.querySelector code-container "code")] (let [code-text (.-textContent code-element)] (set! (.-value (clojure.core/deref editor-ref)) code-text) (.focus (clojure.core/deref editor-ref)))))))) (fn [] (let [collapsed? (not (clojure.core/deref show-editor?)) is-bottom? (= (clojure.core/deref layout) :bottom) toggle! (fn* [] (swap! show-editor? not)) switch-layout! (fn* [] (reset! layout (if (= (clojure.core/deref layout) :right) :bottom :right))) collapsed-size "40px" full-size "350px"] [:<> [:div#scittle-sidebar.card.shadow-sm {:style (merge {:position "fixed", :z-index "1200", :display "flex", :flex-direction "column"} (if is-bottom? {:left "0", :right "0", :bottom "0", :height (if collapsed? collapsed-size full-size)} {:top "0", :right "0", :width (if collapsed? collapsed-size full-size), :height "100vh", :padding-top "77px"}))} (when (not collapsed?) [:div.d-flex.justify-content-between.align-items-center {:style {:flex "0 0 auto", :order "0"}} [:div.btn-group [:button.btn.btn-outline-primary.btn-sm {:on-click toggle!} (if is-bottom? [:i.bi.bi-chevron-bar-down] [:i.bi.bi-chevron-bar-right]) " Hide"] [:button.btn.btn-outline-secondary.btn-sm {:on-click switch-layout!} " Switch Layout"]] [:small.text-muted "Ctrl+Enter to eval"]]) (when collapsed? [:button.btn.btn-outline-primary.w-100.h-100 {:on-click toggle!} (if is-bottom? [:i.bi.bi-chevron-bar-up] [:i.bi.bi-chevron-bar-left])]) (when (not collapsed?) [:div.card-body.p-0 {:style {:flex "1 1 auto", :order "1", :display "flex", :flex-direction (if is-bottom? "row" "column")}} [:div.position-relative {:style {:flex "1 1 0", :overflow "hidden"}} [:textarea.form-control.border-0 {:ref (fn* [p1__37418#] (reset! editor-ref p1__37418#)), :on-key-down (fn [e] (when (and (.-ctrlKey e) (= (.-key e) "Enter")) (eval-code! (.. e -target -value)))), :placeholder "Type Clojure code here...\nCtrl+Enter to evaluate\nClick copy buttons in code blocks to paste here", :style {:resize "none", :width "100%", :height "100%", :box-sizing "border-box", :font-family "var(--bs-font-monospace)", :font-size "0.875rem", :border-radius "0", :overflow-y "auto"}}]] [:div.position-relative {:style {:flex "1 1 0", :overflow "hidden"}} [:div.position-absolute.top-0.end-0.badge.bg-secondary.m-2 {:style {:font-size "0.65rem", :z-index "10"}} "Output"] [:div#repl-output.sourceCode.border-start {:ref (fn* [p1__37419#] (reset! output-ref p1__37419#)), :class (if is-bottom? "border-start" "border-top"), :style {:height "100%", :padding "0.75rem", :overflow-y "auto", :font-family "var(--bs-font-monospace)", :font-size "0.8125rem", :line-height "1.4"}} (for [[i output] (map-indexed vector (clojure.core/deref repl-output))] [:div.mb-1 {:key i} output])]]]) [:style (str (when (clojure.core/deref show-editor?) (if is-bottom? (str ".content { margin-bottom: " full-size " !important; }") (str ".content { margin-right: " full-size " !important; }"))))]]]))))] (js/document.getElementById "id3"))</script></div>
580580
<div style="background-color:grey;height:2px;width:100%;"></div>
581581
<div><pre><small><small>source: <a href="https://github.com/ClojureCivitas/clojurecivitas.github.io/blob/main/src/civitas/repl.clj">src/civitas/repl.clj</a></small></small></pre></div>
582582

code_interview/beating/with_stupid_stuff/z_combinator_gambit.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ <h1 class="title">The Z-Combinator Gambit</h1>
511511
<i class="callout-icon"></i>
512512
</div>
513513
<div class="callout-title-container flex-fill">
514-
class code_interview.beating.with_stupid_stuff.z_combinator_gambit<span class="math inline">\(REV_SINGLEQUOTE_\)</span>fn__76298 cannot be cast to class clojure.lang.IPersistentCollection (code_interview.beating.with_stupid_stuff.z_combinator_gambit<span class="math inline">\(REV_SINGLEQUOTE_\)</span>fn__76298 is in unnamed module of loader clojure.lang.DynamicClassLoader <span class="citation" data-cites="719d676e">@719d676e</span>; clojure.lang.IPersistentCollection is in unnamed module of loader ‘app’)
514+
class code_interview.beating.with_stupid_stuff.z_combinator_gambit<span class="math inline">\(REV_SINGLEQUOTE_\)</span>fn__76298 cannot be cast to class clojure.lang.IPersistentCollection (code_interview.beating.with_stupid_stuff.z_combinator_gambit<span class="math inline">\(REV_SINGLEQUOTE_\)</span>fn__76298 is in unnamed module of loader clojure.lang.DynamicClassLoader <span class="citation" data-cites="14da4712">@14da4712</span>; clojure.lang.IPersistentCollection is in unnamed module of loader ‘app’)
515515
</div>
516516
<div class="callout-btn-toggle d-inline-block border-0 py-1 ps-1 pe-0 float-end"><i class="callout-toggle"></i></div>
517517
</div>
@@ -522,7 +522,7 @@ <h1 class="title">The Z-Combinator Gambit</h1>
522522
code-interview.beating.with-stupid-stuff.z-combinator-gambit/eval76301 REPL Input:
523523
code-interview.beating.with-stupid-stuff.z-combinator-gambit/REV'/fn REPL Input:
524524
clojure.core/conj core.clj: 84
525-
java.lang.ClassCastException: class code_interview.beating.with_stupid_stuff.z_combinator_gambit$REV_SINGLEQUOTE_$fn__76298 cannot be cast to class clojure.lang.IPersistentCollection (code_interview.beating.with_stupid_stuff.z_combinator_gambit$REV_SINGLEQUOTE_$fn__76298 is in unnamed module of loader clojure.lang.DynamicClassLoader @719d676e; clojure.lang.IPersistentCollection is in unnamed module of loader 'app')
525+
java.lang.ClassCastException: class code_interview.beating.with_stupid_stuff.z_combinator_gambit$REV_SINGLEQUOTE_$fn__76298 cannot be cast to class clojure.lang.IPersistentCollection (code_interview.beating.with_stupid_stuff.z_combinator_gambit$REV_SINGLEQUOTE_$fn__76298 is in unnamed module of loader clojure.lang.DynamicClassLoader @14da4712; clojure.lang.IPersistentCollection is in unnamed module of loader 'app')
526526

527527
</code></pre>
528528
</div>
@@ -608,7 +608,7 @@ <h1 class="title">The Z-Combinator Gambit</h1>
608608
<i class="callout-icon"></i>
609609
</div>
610610
<div class="callout-title-container flex-fill">
611-
class code_interview.beating.with_stupid_stuff.z_combinator_gambit<span class="math inline">\(REV_LOGIC\)</span>fn__76308 cannot be cast to class clojure.lang.IPersistentCollection (code_interview.beating.with_stupid_stuff.z_combinator_gambit<span class="math inline">\(REV_LOGIC\)</span>fn__76308 is in unnamed module of loader clojure.lang.DynamicClassLoader <span class="citation" data-cites="6e9b81f7">@6e9b81f7</span>; clojure.lang.IPersistentCollection is in unnamed module of loader ‘app’)
611+
class code_interview.beating.with_stupid_stuff.z_combinator_gambit<span class="math inline">\(REV_LOGIC\)</span>fn__76308 cannot be cast to class clojure.lang.IPersistentCollection (code_interview.beating.with_stupid_stuff.z_combinator_gambit<span class="math inline">\(REV_LOGIC\)</span>fn__76308 is in unnamed module of loader clojure.lang.DynamicClassLoader <span class="citation" data-cites="12d16e3">@12d16e3</span>; clojure.lang.IPersistentCollection is in unnamed module of loader ‘app’)
612612
</div>
613613
<div class="callout-btn-toggle d-inline-block border-0 py-1 ps-1 pe-0 float-end"><i class="callout-toggle"></i></div>
614614
</div>
@@ -619,7 +619,7 @@ <h1 class="title">The Z-Combinator Gambit</h1>
619619
code-interview.beating.with-stupid-stuff.z-combinator-gambit/eval76319 REPL Input:
620620
code-interview.beating.with-stupid-stuff.z-combinator-gambit/REV-LOGIC/fn REPL Input:
621621
clojure.core/conj core.clj: 84
622-
java.lang.ClassCastException: class code_interview.beating.with_stupid_stuff.z_combinator_gambit$REV_LOGIC$fn__76308 cannot be cast to class clojure.lang.IPersistentCollection (code_interview.beating.with_stupid_stuff.z_combinator_gambit$REV_LOGIC$fn__76308 is in unnamed module of loader clojure.lang.DynamicClassLoader @6e9b81f7; clojure.lang.IPersistentCollection is in unnamed module of loader 'app')
622+
java.lang.ClassCastException: class code_interview.beating.with_stupid_stuff.z_combinator_gambit$REV_LOGIC$fn__76308 cannot be cast to class clojure.lang.IPersistentCollection (code_interview.beating.with_stupid_stuff.z_combinator_gambit$REV_LOGIC$fn__76308 is in unnamed module of loader clojure.lang.DynamicClassLoader @12d16e3; clojure.lang.IPersistentCollection is in unnamed module of loader 'app')
623623

624624
</code></pre>
625625
</div>

0 commit comments

Comments
 (0)