Skip to content

Commit e17c32e

Browse files
author
Quarto GHA Workflow Runner
committed
Built site for gh-pages
1 parent 2096074 commit e17c32e

File tree

14 files changed

+293
-354
lines changed

14 files changed

+293
-354
lines changed

.nojekyll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
cb846b71
1+
dd087de9

clojure+/print/objects_and_protocols.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ <h1 class="title">Printing Objects and Protocols in Clojure</h1>
456456
<span id="cb14-3"><a href="#cb14-3" aria-hidden="true" tabindex="-1"></a> (.getName))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
457457
</div>
458458
<div class="printedClojure">
459-
<div class="sourceCode" id="cb15"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true" tabindex="-1"></a><span class="st">"clojure_PLUS_.print.objects_and_protocols$eval73255$_PERCENT__PERCENT___73256$_PERCENT__PERCENT__PERCENT___73257"</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
459+
<div class="sourceCode" id="cb15"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true" tabindex="-1"></a><span class="st">"clojure_PLUS_.print.objects_and_protocols$eval73260$_PERCENT__PERCENT___73261$_PERCENT__PERCENT__PERCENT___73262"</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
460460
</div>
461461
<p>Whoa, that’s pretty gross. We’d prefer to demunge the names at least.</p>
462462
<div class="sourceClojure">
@@ -469,7 +469,7 @@ <h1 class="title">Printing Objects and Protocols in Clojure</h1>
469469
<span id="cb17-2"><a href="#cb17-2" aria-hidden="true" tabindex="-1"></a> (class-name))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
470470
</div>
471471
<div class="printedClojure">
472-
<div class="sourceCode" id="cb18"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true" tabindex="-1"></a><span class="st">"clojure+.print.objects-and-protocols/eval73262/%%--73263/%%%--73264"</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
472+
<div class="sourceCode" id="cb18"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true" tabindex="-1"></a><span class="st">"clojure+.print.objects-and-protocols/eval73267/%%--73268/%%%--73269"</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
473473
</div>
474474
<p>Notice the <code>/evalNNNNN/</code> part? To create a function, Clojure creates a new class. The <code>/evalNNNNN/</code> counts every time it evaluates. This is useful in the sense that it identifies the class for that evaluation. But we almost never care for that detail (more on that later). For the same reason our strangely named functions have <code>--NNNNN</code> appended to them, because they are sub evaluations of the top-level evaluation.</p>
475475
<p>Let’s do away with that noise for the moment:</p>

clojure/print_object/remove_extraneous.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ <h1 class="title">Clean object printing by removing extraneous</h1>
458458
<div class="printedClojure">
459459
<div class="sourceCode" id="cb13"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a>[[clojure.lang.Numbers add <span class="st">"Numbers.java"</span> <span class="dv">155</span>]</span>
460460
<span id="cb13-2"><a href="#cb13-2" aria-hidden="true" tabindex="-1"></a> [clojure.lang.Numbers add <span class="st">"Numbers.java"</span> <span class="dv">3747</span>]</span>
461-
<span id="cb13-3"><a href="#cb13-3" aria-hidden="true" tabindex="-1"></a> [clojure.print_object.remove_extraneous$caesar_cipher$add2__72845 invoke <span class="st">"NO_SOURCE_FILE"</span> <span class="dv">50</span>]</span>
461+
<span id="cb13-3"><a href="#cb13-3" aria-hidden="true" tabindex="-1"></a> [clojure.print_object.remove_extraneous$caesar_cipher$add2__72850 invoke <span class="st">"NO_SOURCE_FILE"</span> <span class="dv">50</span>]</span>
462462
<span id="cb13-4"><a href="#cb13-4" aria-hidden="true" tabindex="-1"></a> [clojure.core$mapv$fn__8569 invoke <span class="st">"core.clj"</span> <span class="dv">7059</span>]]</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
463463
</div>
464464
<p>See that part <code>caesar_cipher$add2</code>? That is <strong>very</strong> useful information. It tells us that the exception was inside <code>add2</code>, which is inside <code>caesar-cipher</code>. The stack trace doesn’t print functions as objects, but it illustrates that the thing that we care about is that they are a function, what their name is, and whether they were created from inside another function.</p>
@@ -472,7 +472,7 @@ <h1 class="title">Clean object printing by removing extraneous</h1>
472472
<div class="sourceCode" id="cb15"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true" tabindex="-1"></a>(class-name ((<span class="kw">fn</span> [] (<span class="kw">fn</span> [y] y))))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
473473
</div>
474474
<div class="printedClojure">
475-
<div class="sourceCode" id="cb16"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true" tabindex="-1"></a><span class="st">"clojure.print-object.remove-extraneous/eval72851/fn--72852/fn--72853"</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
475+
<div class="sourceCode" id="cb16"><pre class="sourceCode clojure code-with-copy"><code class="sourceCode clojure"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true" tabindex="-1"></a><span class="st">"clojure.print-object.remove-extraneous/eval72856/fn--72857/fn--72858"</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
476476
</div>
477477
<p>Next, we don’t need the eval identities.</p>
478478
<div class="sourceClojure">

clojure/transducers/what_if.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ <h1 class="title">What if… we were taught transducers first?</h1>
491491
<div class="callout-body-container callout-body">
492492
<pre><code> clojure.core/eval core.clj: 3232
493493
...
494-
clojure.transducers.what-if/eval72771 REPL Input:
494+
clojure.transducers.what-if/eval72776 REPL Input:
495495
clojure.core/transduce core.clj: 7025
496496
...
497497
clojure.core/map/fn{x2} core.clj: 2759
@@ -513,19 +513,19 @@ <h1 class="title">What if… we were taught transducers first?</h1>
513513
<i class="callout-icon"></i>
514514
</div>
515515
<div class="callout-title-container flex-fill">
516-
Wrong number of args (1) passed to: clojure.transducers.what-if/eval72773/fn–72774
516+
Wrong number of args (1) passed to: clojure.transducers.what-if/eval72778/fn–72779
517517
</div>
518518
<div class="callout-btn-toggle d-inline-block border-0 py-1 ps-1 pe-0 float-end"><i class="callout-toggle"></i></div>
519519
</div>
520520
<div id="callout-2" class="callout-2-contents callout-collapse collapse">
521521
<div class="callout-body-container callout-body">
522522
<pre><code> clojure.core/eval core.clj: 3232
523523
...
524-
clojure.transducers.what-if/eval72773 REPL Input:
524+
clojure.transducers.what-if/eval72778 REPL Input:
525525
clojure.core/transduce core.clj: 7027
526526
clojure.core/map/fn{x2} core.clj: 2757
527527
...
528-
clojure.lang.ArityException: Wrong number of args (1) passed to: clojure.transducers.what-if/eval72773/fn--72774
528+
clojure.lang.ArityException: Wrong number of args (1) passed to: clojure.transducers.what-if/eval72778/fn--72779
529529

530530
</code></pre>
531531
</div>

code_interview/beating/with_stupid_stuff/z_combinator_gambit.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -511,18 +511,18 @@ <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__73427 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__73427 is in unnamed module of loader clojure.lang.DynamicClassLoader <span class="citation" data-cites="1b7c3638">@1b7c3638</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__73432 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__73432 is in unnamed module of loader clojure.lang.DynamicClassLoader <span class="citation" data-cites="139bee8f">@139bee8f</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>
518518
<div id="callout-1" class="callout-1-contents callout-collapse collapse">
519519
<div class="callout-body-container callout-body">
520520
<pre><code> clojure.core/eval core.clj: 3232
521521
...
522-
code-interview.beating.with-stupid-stuff.z-combinator-gambit/eval73430 REPL Input:
522+
code-interview.beating.with-stupid-stuff.z-combinator-gambit/eval73435 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__73427 cannot be cast to class clojure.lang.IPersistentCollection (code_interview.beating.with_stupid_stuff.z_combinator_gambit$REV_SINGLEQUOTE_$fn__73427 is in unnamed module of loader clojure.lang.DynamicClassLoader @1b7c3638; 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__73432 cannot be cast to class clojure.lang.IPersistentCollection (code_interview.beating.with_stupid_stuff.z_combinator_gambit$REV_SINGLEQUOTE_$fn__73432 is in unnamed module of loader clojure.lang.DynamicClassLoader @139bee8f; clojure.lang.IPersistentCollection is in unnamed module of loader 'app')
526526

527527
</code></pre>
528528
</div>
@@ -608,18 +608,18 @@ <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__73437 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__73437 is in unnamed module of loader clojure.lang.DynamicClassLoader <span class="citation" data-cites="2e734540">@2e734540</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__73442 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__73442 is in unnamed module of loader clojure.lang.DynamicClassLoader <span class="citation" data-cites="64029bfd">@64029bfd</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>
615615
<div id="callout-2" class="callout-2-contents callout-collapse collapse">
616616
<div class="callout-body-container callout-body">
617617
<pre><code> clojure.core/eval core.clj: 3232
618618
...
619-
code-interview.beating.with-stupid-stuff.z-combinator-gambit/eval73448 REPL Input:
619+
code-interview.beating.with-stupid-stuff.z-combinator-gambit/eval73453 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__73437 cannot be cast to class clojure.lang.IPersistentCollection (code_interview.beating.with_stupid_stuff.z_combinator_gambit$REV_LOGIC$fn__73437 is in unnamed module of loader clojure.lang.DynamicClassLoader @2e734540; 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__73442 cannot be cast to class clojure.lang.IPersistentCollection (code_interview.beating.with_stupid_stuff.z_combinator_gambit$REV_LOGIC$fn__73442 is in unnamed module of loader clojure.lang.DynamicClassLoader @64029bfd; clojure.lang.IPersistentCollection is in unnamed module of loader 'app')
623623

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

0 commit comments

Comments
 (0)