Skip to content

Commit 0013a2e

Browse files
author
Quarto GHA Workflow Runner
committed
Built site for gh-pages
1 parent 18c0f31 commit 0013a2e

16 files changed

Lines changed: 543 additions & 336 deletions

File tree

.nojekyll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8c31c1dd
1+
bad3b12e

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$eval73226$_PERCENT__PERCENT___73227$_PERCENT__PERCENT__PERCENT___73228"</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$eval73227$_PERCENT__PERCENT___73228$_PERCENT__PERCENT__PERCENT___73229"</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/eval73233/%%--73234/%%%--73235"</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/eval73234/%%--73235/%%%--73236"</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__72816 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__72817 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/eval72822/fn--72823/fn--72824"</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/eval72823/fn--72824/fn--72825"</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/eval72742 REPL Input:
494+
clojure.transducers.what-if/eval72743 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/eval72744/fn–72745
516+
Wrong number of args (1) passed to: clojure.transducers.what-if/eval72745/fn–72746
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/eval72744 REPL Input:
524+
clojure.transducers.what-if/eval72745 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/eval72744/fn--72745
528+
clojure.lang.ArityException: Wrong number of args (1) passed to: clojure.transducers.what-if/eval72745/fn--72746
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__73398 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__73398 is in unnamed module of loader clojure.lang.DynamicClassLoader <span class="citation" data-cites="7e0ebd83">@7e0ebd83</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__73399 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__73399 is in unnamed module of loader clojure.lang.DynamicClassLoader <span class="citation" data-cites="51503f0b">@51503f0b</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/eval73401 REPL Input:
522+
code-interview.beating.with-stupid-stuff.z-combinator-gambit/eval73402 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__73398 cannot be cast to class clojure.lang.IPersistentCollection (code_interview.beating.with_stupid_stuff.z_combinator_gambit$REV_SINGLEQUOTE_$fn__73398 is in unnamed module of loader clojure.lang.DynamicClassLoader @7e0ebd83; 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__73399 cannot be cast to class clojure.lang.IPersistentCollection (code_interview.beating.with_stupid_stuff.z_combinator_gambit$REV_SINGLEQUOTE_$fn__73399 is in unnamed module of loader clojure.lang.DynamicClassLoader @51503f0b; 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__73408 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__73408 is in unnamed module of loader clojure.lang.DynamicClassLoader <span class="citation" data-cites="456369c9">@456369c9</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__73409 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__73409 is in unnamed module of loader clojure.lang.DynamicClassLoader <span class="citation" data-cites="1288fc94">@1288fc94</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/eval73419 REPL Input:
619+
code-interview.beating.with-stupid-stuff.z-combinator-gambit/eval73420 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__73408 cannot be cast to class clojure.lang.IPersistentCollection (code_interview.beating.with_stupid_stuff.z_combinator_gambit$REV_LOGIC$fn__73408 is in unnamed module of loader clojure.lang.DynamicClassLoader @456369c9; 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__73409 cannot be cast to class clojure.lang.IPersistentCollection (code_interview.beating.with_stupid_stuff.z_combinator_gambit$REV_LOGIC$fn__73409 is in unnamed module of loader clojure.lang.DynamicClassLoader @1288fc94; clojure.lang.IPersistentCollection is in unnamed module of loader 'app')
623623

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

0 commit comments

Comments
 (0)