diff options
Diffstat (limited to 'html')
38 files changed, 298 insertions, 298 deletions
diff --git a/html/061text.mu.html b/html/061text.mu.html index 61022255..3852f0d6 100644 --- a/html/061text.mu.html +++ b/html/061text.mu.html @@ -87,9 +87,9 @@ if ('onhashchange' in window) { <span id="L25" class="LineNr"> 25 </span> <span class="Conceal">¦</span> chars-match?:bool <span class="Special"><-</span> equal a2, b2 <span id="L26" class="LineNr"> 26 </span> <span class="Conceal">¦</span> <span class="muControl">return-unless</span> chars-match?, <span class="Constant">0/false</span> <span id="L27" class="LineNr"> 27 </span> <span class="Conceal">¦</span> i <span class="Special"><-</span> add i,<span class="Constant"> 1</span> -<span id="L28" class="LineNr"> 28 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L28" class="LineNr"> 28 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L29" class="LineNr"> 29 </span> <span class="Delimiter">}</span> -<span id="L30" class="LineNr"> 30 </span> <span class="muControl">return</span> <span class="Constant">1/true</span> +<span id="L30" class="LineNr"> 30 </span> <span class="muControl"> return</span> <span class="Constant">1/true</span> <span id="L31" class="LineNr"> 31 </span>] <span id="L32" class="LineNr"> 32 </span> <span id="L33" class="LineNr"> 33 </span><span class="muScenario">scenario</span> text-equal-reflexive [ @@ -196,7 +196,7 @@ if ('onhashchange' in window) { <span id="L134" class="LineNr"> 134 </span> <span class="Delimiter">}</span> <span id="L135" class="LineNr"> 135 </span> data:&:@:_elem <span class="Special"><-</span> new <span class="Constant">_elem:type</span>, <a href='075channel.mu.html#L399'>capacity</a> <span id="L136" class="LineNr"> 136 </span> *result <span class="Special"><-</span> put *result, <span class="Constant">data:offset</span>, data -<span id="L137" class="LineNr"> 137 </span> <span class="muControl">return</span> result +<span id="L137" class="LineNr"> 137 </span> <span class="muControl"> return</span> result <span id="L138" class="LineNr"> 138 </span>] <span id="L139" class="LineNr"> 139 </span> <span id="L140" class="LineNr"> 140 </span><span class="muRecipe">def</span> <a href='061text.mu.html#L140'>grow-buffer</a> buf:&:<a href='061text.mu.html#L120'>buffer</a>:_elem<span class="muRecipe"> -> </span>buf:&:<a href='061text.mu.html#L120'>buffer</a>:_elem [ @@ -216,7 +216,7 @@ if ('onhashchange' in window) { <span id="L154" class="LineNr"> 154 </span> <span class="Conceal">¦</span> src:_elem <span class="Special"><-</span> index *olddata, i <span id="L155" class="LineNr"> 155 </span> <span class="Conceal">¦</span> *newdata <span class="Special"><-</span> put-index *newdata, i, src <span id="L156" class="LineNr"> 156 </span> <span class="Conceal">¦</span> i <span class="Special"><-</span> add i,<span class="Constant"> 1</span> -<span id="L157" class="LineNr"> 157 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L157" class="LineNr"> 157 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L158" class="LineNr"> 158 </span> <span class="Delimiter">}</span> <span id="L159" class="LineNr"> 159 </span>] <span id="L160" class="LineNr"> 160 </span> @@ -268,7 +268,7 @@ if ('onhashchange' in window) { <span id="L206" class="LineNr"> 206 </span> <span class="Conceal">¦</span> <span class="muControl">return-if</span> empty? <span id="L207" class="LineNr"> 207 </span> <span class="Conceal">¦</span> len <span class="Special"><-</span> subtract len,<span class="Constant"> 1</span> <span id="L208" class="LineNr"> 208 </span> <span class="Conceal">¦</span> *buf <span class="Special"><-</span> put *buf, <span class="Constant">length:offset</span>, len -<span id="L209" class="LineNr"> 209 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L209" class="LineNr"> 209 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L210" class="LineNr"> 210 </span> <span class="Delimiter">}</span> <span id="L211" class="LineNr"> 211 </span> <span class="Delimiter">{</span> <span id="L212" class="LineNr"> 212 </span> <span class="Conceal">¦</span> <span class="Comment"># grow buffer if necessary</span> @@ -293,7 +293,7 @@ if ('onhashchange' in window) { <span id="L231" class="LineNr"> 231 </span> <span class="Conceal">¦</span> x:_elem <span class="Special"><-</span> index *t, i <span id="L232" class="LineNr"> 232 </span> <span class="Conceal">¦</span> buf <span class="Special"><-</span> append buf, x <span id="L233" class="LineNr"> 233 </span> <span class="Conceal">¦</span> i <span class="Special"><-</span> add i,<span class="Constant"> 1</span> -<span id="L234" class="LineNr"> 234 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L234" class="LineNr"> 234 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L235" class="LineNr"> 235 </span> <span class="Delimiter">}</span> <span id="L236" class="LineNr"> 236 </span>] <span id="L237" class="LineNr"> 237 </span> @@ -413,7 +413,7 @@ if ('onhashchange' in window) { <span id="L351" class="LineNr"> 351 </span> <span class="Conceal">¦</span> src:_elem <span class="Special"><-</span> index *s, i <span id="L352" class="LineNr"> 352 </span> <span class="Conceal">¦</span> *result <span class="Special"><-</span> put-index *result, i, src <span id="L353" class="LineNr"> 353 </span> <span class="Conceal">¦</span> i <span class="Special"><-</span> add i,<span class="Constant"> 1</span> -<span id="L354" class="LineNr"> 354 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L354" class="LineNr"> 354 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L355" class="LineNr"> 355 </span> <span class="Delimiter">}</span> <span id="L356" class="LineNr"> 356 </span>] <span id="L357" class="LineNr"> 357 </span> @@ -448,7 +448,7 @@ if ('onhashchange' in window) { <span id="L386" class="LineNr"> 386 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> arg-found? <span id="L387" class="LineNr"> 387 </span> <span class="Conceal">¦</span> <span class="muControl">loop-unless</span> arg <span id="L388" class="LineNr"> 388 </span> <span class="Conceal">¦</span> buf <span class="Special"><-</span> append buf, arg -<span id="L389" class="LineNr"> 389 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L389" class="LineNr"> 389 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L390" class="LineNr"> 390 </span> <span class="Delimiter">}</span> <span id="L391" class="LineNr"> 391 </span> result <span class="Special"><-</span> <a href='061text.mu.html#L338'>buffer-to-array</a> buf <span id="L392" class="LineNr"> 392 </span>] @@ -593,7 +593,7 @@ if ('onhashchange' in window) { <span id="L531" class="LineNr"> 531 </span> <span class="Conceal">¦</span> a-len:num <span class="Special"><-</span> length *a <span id="L532" class="LineNr"> 532 </span> <span class="Conceal">¦</span> result-len <span class="Special"><-</span> add result-len, a-len <span id="L533" class="LineNr"> 533 </span> <span class="Conceal">¦</span> result-len <span class="Special"><-</span> subtract result-len,<span class="Constant"> 1</span> -<span id="L534" class="LineNr"> 534 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L534" class="LineNr"> 534 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L535" class="LineNr"> 535 </span> <span class="Delimiter">}</span> <span id="L536" class="LineNr"> 536 </span> <span class="Constant">rewind-inputs</span> <span id="L537" class="LineNr"> 537 </span> _ <span class="Special"><-</span> <span class="Constant">next-input</span> <span class="Comment"># skip template</span> @@ -618,7 +618,7 @@ if ('onhashchange' in window) { <span id="L556" class="LineNr"> 556 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> *result <span class="Special"><-</span> put-index *result, result-idx, in <span id="L557" class="LineNr"> 557 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> i <span class="Special"><-</span> add i,<span class="Constant"> 1</span> <span id="L558" class="LineNr"> 558 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> result-idx <span class="Special"><-</span> add result-idx,<span class="Constant"> 1</span> -<span id="L559" class="LineNr"> 559 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L559" class="LineNr"> 559 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L560" class="LineNr"> 560 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L561" class="LineNr"> 561 </span> <span class="Conceal">¦</span> <span class="Comment"># copy 'a' into result</span> <span id="L562" class="LineNr"> 562 </span> <span class="Conceal">¦</span> j:num <span class="Special"><-</span> copy<span class="Constant"> 0</span> @@ -631,11 +631,11 @@ if ('onhashchange' in window) { <span id="L569" class="LineNr"> 569 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> *result <span class="Special"><-</span> put-index *result, result-idx, in <span id="L570" class="LineNr"> 570 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> j <span class="Special"><-</span> add j,<span class="Constant"> 1</span> <span id="L571" class="LineNr"> 571 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> result-idx <span class="Special"><-</span> add result-idx,<span class="Constant"> 1</span> -<span id="L572" class="LineNr"> 572 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L572" class="LineNr"> 572 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L573" class="LineNr"> 573 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L574" class="LineNr"> 574 </span> <span class="Conceal">¦</span> <span class="Comment"># skip '_' in template</span> <span id="L575" class="LineNr"> 575 </span> <span class="Conceal">¦</span> i <span class="Special"><-</span> add i,<span class="Constant"> 1</span> -<span id="L576" class="LineNr"> 576 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> <span class="Comment"># interpolate next arg</span> +<span id="L576" class="LineNr"> 576 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span class="Comment"># interpolate next arg</span> <span id="L577" class="LineNr"> 577 </span> <span class="Delimiter">}</span> <span id="L578" class="LineNr"> 578 </span><span class="Constant"> +done</span> <span id="L579" class="LineNr"> 579 </span> <span class="Comment"># done with holes; copy rest of template directly into result</span> @@ -648,7 +648,7 @@ if ('onhashchange' in window) { <span id="L586" class="LineNr"> 586 </span> <span class="Conceal">¦</span> *result <span class="Special"><-</span> put-index *result, result-idx, in <span id="L587" class="LineNr"> 587 </span> <span class="Conceal">¦</span> i <span class="Special"><-</span> add i,<span class="Constant"> 1</span> <span id="L588" class="LineNr"> 588 </span> <span class="Conceal">¦</span> result-idx <span class="Special"><-</span> add result-idx,<span class="Constant"> 1</span> -<span id="L589" class="LineNr"> 589 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L589" class="LineNr"> 589 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L590" class="LineNr"> 590 </span> <span class="Delimiter">}</span> <span id="L591" class="LineNr"> 591 </span>] <span id="L592" class="LineNr"> 592 </span> @@ -765,13 +765,13 @@ if ('onhashchange' in window) { <span id="L703" class="LineNr"> 703 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> at-end?:bool <span class="Special"><-</span> greater-or-equal start, len <span id="L704" class="LineNr"> 704 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> at-end? <span id="L705" class="LineNr"> 705 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> result <span class="Special"><-</span> new <span class="Constant">character:type</span>,<span class="Constant"> 0</span> -<span id="L706" class="LineNr"> 706 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L706" class="LineNr"> 706 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L707" class="LineNr"> 707 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L708" class="LineNr"> 708 </span> <span class="Conceal">¦</span> curr:char <span class="Special"><-</span> index *s, start <span id="L709" class="LineNr"> 709 </span> <span class="Conceal">¦</span> whitespace?:bool <span class="Special"><-</span> <a href='061text.mu.html#L634'>space?</a> curr <span id="L710" class="LineNr"> 710 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> whitespace? <span id="L711" class="LineNr"> 711 </span> <span class="Conceal">¦</span> start <span class="Special"><-</span> add start,<span class="Constant"> 1</span> -<span id="L712" class="LineNr"> 712 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L712" class="LineNr"> 712 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L713" class="LineNr"> 713 </span> <span class="Delimiter">}</span> <span id="L714" class="LineNr"> 714 </span> <span class="Comment"># right trim: compute end</span> <span id="L715" class="LineNr"> 715 </span> end:num <span class="Special"><-</span> subtract len,<span class="Constant"> 1</span> @@ -782,7 +782,7 @@ if ('onhashchange' in window) { <span id="L720" class="LineNr"> 720 </span> <span class="Conceal">¦</span> whitespace?:bool <span class="Special"><-</span> <a href='061text.mu.html#L634'>space?</a> curr <span id="L721" class="LineNr"> 721 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> whitespace? <span id="L722" class="LineNr"> 722 </span> <span class="Conceal">¦</span> end <span class="Special"><-</span> subtract end,<span class="Constant"> 1</span> -<span id="L723" class="LineNr"> 723 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L723" class="LineNr"> 723 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L724" class="LineNr"> 724 </span> <span class="Delimiter">}</span> <span id="L725" class="LineNr"> 725 </span> <span class="Comment"># result = new character[end+1 - start]</span> <span id="L726" class="LineNr"> 726 </span> new-len:num <span class="Special"><-</span> subtract end, start,<span class="Constant"> -1</span> @@ -799,7 +799,7 @@ if ('onhashchange' in window) { <span id="L737" class="LineNr"> 737 </span> <span class="Conceal">¦</span> *result <span class="Special"><-</span> put-index *result, j, src <span id="L738" class="LineNr"> 738 </span> <span class="Conceal">¦</span> i <span class="Special"><-</span> add i,<span class="Constant"> 1</span> <span id="L739" class="LineNr"> 739 </span> <span class="Conceal">¦</span> j <span class="Special"><-</span> add j,<span class="Constant"> 1</span> -<span id="L740" class="LineNr"> 740 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L740" class="LineNr"> 740 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L741" class="LineNr"> 741 </span> <span class="Delimiter">}</span> <span id="L742" class="LineNr"> 742 </span>] <span id="L743" class="LineNr"> 743 </span> @@ -875,9 +875,9 @@ if ('onhashchange' in window) { <span id="L813" class="LineNr"> 813 </span> <span class="Conceal">¦</span> found?:bool <span class="Special"><-</span> equal curr, pattern <span id="L814" class="LineNr"> 814 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> found? <span id="L815" class="LineNr"> 815 </span> <span class="Conceal">¦</span> idx <span class="Special"><-</span> add idx,<span class="Constant"> 1</span> -<span id="L816" class="LineNr"> 816 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L816" class="LineNr"> 816 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L817" class="LineNr"> 817 </span> <span class="Delimiter">}</span> -<span id="L818" class="LineNr"> 818 </span> <span class="muControl">return</span> idx +<span id="L818" class="LineNr"> 818 </span> <span class="muControl"> return</span> idx <span id="L819" class="LineNr"> 819 </span>] <span id="L820" class="LineNr"> 820 </span> <span id="L821" class="LineNr"> 821 </span><span class="muScenario">scenario</span> text-find-next [ @@ -985,9 +985,9 @@ if ('onhashchange' in window) { <span id="L923" class="LineNr"> 923 </span> <span class="Conceal">¦</span> idx <span class="Special"><-</span> add idx,<span class="Constant"> 1</span> <span id="L924" class="LineNr"> 924 </span> <span class="Conceal">¦</span> <span class="Comment"># optimization: skip past indices that definitely won't match</span> <span id="L925" class="LineNr"> 925 </span> <span class="Conceal">¦</span> idx <span class="Special"><-</span> find-next text, first, idx -<span id="L926" class="LineNr"> 926 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L926" class="LineNr"> 926 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L927" class="LineNr"> 927 </span> <span class="Delimiter">}</span> -<span id="L928" class="LineNr"> 928 </span> <span class="muControl">return</span> idx +<span id="L928" class="LineNr"> 928 </span> <span class="muControl"> return</span> idx <span id="L929" class="LineNr"> 929 </span>] <span id="L930" class="LineNr"> 930 </span> <span id="L931" class="LineNr"> 931 </span><span class="muScenario">scenario</span> find-next-text-1 [ @@ -1071,9 +1071,9 @@ if ('onhashchange' in window) { <span id="L1009" class="LineNr">1009 </span> <span class="Conceal">¦</span> <span class="muControl">return-unless</span> match?, <span class="Constant">0/not-found</span> <span id="L1010" class="LineNr">1010 </span> <span class="Conceal">¦</span> idx <span class="Special"><-</span> add idx,<span class="Constant"> 1</span> <span id="L1011" class="LineNr">1011 </span> <span class="Conceal">¦</span> pattern-idx <span class="Special"><-</span> add pattern-idx,<span class="Constant"> 1</span> -<span id="L1012" class="LineNr">1012 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L1012" class="LineNr">1012 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L1013" class="LineNr">1013 </span> <span class="Delimiter">}</span> -<span id="L1014" class="LineNr">1014 </span> <span class="muControl">return</span> <span class="Constant">1/found</span> +<span id="L1014" class="LineNr">1014 </span> <span class="muControl"> return</span> <span class="Constant">1/found</span> <span id="L1015" class="LineNr">1015 </span>] <span id="L1016" class="LineNr">1016 </span> <span id="L1017" class="LineNr">1017 </span><span class="muScenario">scenario</span> match-at-checks-pattern-at-index [ @@ -1191,7 +1191,7 @@ if ('onhashchange' in window) { <span id="L1129" class="LineNr">1129 </span> <span class="Conceal">¦</span> empty?:bool <span class="Special"><-</span> equal len,<span class="Constant"> 0</span> <span id="L1130" class="LineNr">1130 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> empty? <span id="L1131" class="LineNr">1131 </span> <span class="Conceal">¦</span> result <span class="Special"><-</span> new <span class="Delimiter">{</span>(address array character): type<span class="Delimiter">}</span>,<span class="Constant"> 0</span> -<span id="L1132" class="LineNr">1132 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L1132" class="LineNr">1132 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L1133" class="LineNr">1133 </span> <span class="Delimiter">}</span> <span id="L1134" class="LineNr">1134 </span> <span class="Comment"># count #pieces we need room for</span> <span id="L1135" class="LineNr">1135 </span> count:num <span class="Special"><-</span> copy<span class="Constant"> 1</span> <span class="Comment"># n delimiters = n+1 pieces</span> @@ -1202,7 +1202,7 @@ if ('onhashchange' in window) { <span id="L1140" class="LineNr">1140 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> done? <span id="L1141" class="LineNr">1141 </span> <span class="Conceal">¦</span> idx <span class="Special"><-</span> add idx,<span class="Constant"> 1</span> <span id="L1142" class="LineNr">1142 </span> <span class="Conceal">¦</span> count <span class="Special"><-</span> add count,<span class="Constant"> 1</span> -<span id="L1143" class="LineNr">1143 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L1143" class="LineNr">1143 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L1144" class="LineNr">1144 </span> <span class="Delimiter">}</span> <span id="L1145" class="LineNr">1145 </span> <span class="Comment"># allocate space</span> <span id="L1146" class="LineNr">1146 </span> result <span class="Special"><-</span> new <span class="Delimiter">{</span>(address array character): type<span class="Delimiter">}</span>, count @@ -1220,7 +1220,7 @@ if ('onhashchange' in window) { <span id="L1158" class="LineNr">1158 </span> <span class="Conceal">¦</span> <span class="Comment"># slide over to next slice</span> <span id="L1159" class="LineNr">1159 </span> <span class="Conceal">¦</span> start <span class="Special"><-</span> add end,<span class="Constant"> 1</span> <span id="L1160" class="LineNr">1160 </span> <span class="Conceal">¦</span> curr-result <span class="Special"><-</span> add curr-result,<span class="Constant"> 1</span> -<span id="L1161" class="LineNr">1161 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L1161" class="LineNr">1161 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L1162" class="LineNr">1162 </span> <span class="Delimiter">}</span> <span id="L1163" class="LineNr">1163 </span>] <span id="L1164" class="LineNr">1164 </span> @@ -1324,7 +1324,7 @@ if ('onhashchange' in window) { <span id="L1262" class="LineNr">1262 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> empty? <span id="L1263" class="LineNr">1263 </span> <span class="Conceal">¦</span> x:text <span class="Special"><-</span> new <span class="Constant">[]</span> <span id="L1264" class="LineNr">1264 </span> <span class="Conceal">¦</span> y:text <span class="Special"><-</span> new <span class="Constant">[]</span> -<span id="L1265" class="LineNr">1265 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L1265" class="LineNr">1265 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L1266" class="LineNr">1266 </span> <span class="Delimiter">}</span> <span id="L1267" class="LineNr">1267 </span> idx:num <span class="Special"><-</span> find-next text, delim,<span class="Constant"> 0</span> <span id="L1268" class="LineNr">1268 </span> x:text <span class="Special"><-</span> <a href='061text.mu.html#L1287'>copy-range</a> text,<span class="Constant"> 0</span>, idx @@ -1365,7 +1365,7 @@ if ('onhashchange' in window) { <span id="L1303" class="LineNr">1303 </span> <span class="Conceal">¦</span> *result <span class="Special"><-</span> put-index *result, dest-idx, src <span id="L1304" class="LineNr">1304 </span> <span class="Conceal">¦</span> src-idx <span class="Special"><-</span> add src-idx,<span class="Constant"> 1</span> <span id="L1305" class="LineNr">1305 </span> <span class="Conceal">¦</span> dest-idx <span class="Special"><-</span> add dest-idx,<span class="Constant"> 1</span> -<span id="L1306" class="LineNr">1306 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L1306" class="LineNr">1306 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L1307" class="LineNr">1307 </span> <span class="Delimiter">}</span> <span id="L1308" class="LineNr">1308 </span>] <span id="L1309" class="LineNr">1309 </span> @@ -1422,7 +1422,7 @@ if ('onhashchange' in window) { <span id="L1360" class="LineNr">1360 </span> <span class="Conceal">¦</span> result <span class="Special"><-</span> multiply result,<span class="Constant"> 10</span> <span id="L1361" class="LineNr">1361 </span> <span class="Conceal">¦</span> result <span class="Special"><-</span> add result, digit <span id="L1362" class="LineNr">1362 </span> <span class="Conceal">¦</span> i <span class="Special"><-</span> add i,<span class="Constant"> 1</span> -<span id="L1363" class="LineNr">1363 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L1363" class="LineNr">1363 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L1364" class="LineNr">1364 </span> <span class="Delimiter">}</span> <span id="L1365" class="LineNr">1365 </span> <span class="Comment"># no error; all digits were valid</span> <span id="L1366" class="LineNr">1366 </span> out <span class="Special"><-</span> copy result diff --git a/html/063array.mu.html b/html/063array.mu.html index a80e9678..2542328c 100644 --- a/html/063array.mu.html +++ b/html/063array.mu.html @@ -82,7 +82,7 @@ if ('onhashchange' in window) { <span id="L21" class="LineNr"> 21 </span> <span class="Conceal">¦</span> curr-value:_elem, exists?:bool <span class="Special"><-</span> <span class="Constant">next-input</span> <span id="L22" class="LineNr"> 22 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> exists? <span id="L23" class="LineNr"> 23 </span> <span class="Conceal">¦</span> <a href='075channel.mu.html#L399'>capacity</a> <span class="Special"><-</span> add <a href='075channel.mu.html#L399'>capacity</a>,<span class="Constant"> 1</span> -<span id="L24" class="LineNr"> 24 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L24" class="LineNr"> 24 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L25" class="LineNr"> 25 </span> <span class="Delimiter">}</span> <span id="L26" class="LineNr"> 26 </span> result <span class="Special"><-</span> new <span class="Constant">_elem:type</span>, <a href='075channel.mu.html#L399'>capacity</a> <span id="L27" class="LineNr"> 27 </span> <span class="Constant">rewind-inputs</span> @@ -95,9 +95,9 @@ if ('onhashchange' in window) { <span id="L34" class="LineNr"> 34 </span> <span class="Conceal">¦</span> assert exists?, <span class="Constant">[error in rewinding inputs to new-array]</span> <span id="L35" class="LineNr"> 35 </span> <span class="Conceal">¦</span> *result <span class="Special"><-</span> put-index *result, i, curr-value <span id="L36" class="LineNr"> 36 </span> <span class="Conceal">¦</span> i <span class="Special"><-</span> add i,<span class="Constant"> 1</span> -<span id="L37" class="LineNr"> 37 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L37" class="LineNr"> 37 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L38" class="LineNr"> 38 </span> <span class="Delimiter">}</span> -<span id="L39" class="LineNr"> 39 </span> <span class="muControl">return</span> result +<span id="L39" class="LineNr"> 39 </span> <span class="muControl"> return</span> result <span id="L40" class="LineNr"> 40 </span>] <span id="L41" class="LineNr"> 41 </span> <span id="L42" class="LineNr"> 42 </span><span class="Comment"># fill an existing array with a set of numbers</span> @@ -114,7 +114,7 @@ if ('onhashchange' in window) { <span id="L53" class="LineNr"> 53 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> arg-received? <span id="L54" class="LineNr"> 54 </span> <span class="Conceal">¦</span> *array <span class="Special"><-</span> put-index *array, loopn, object <span id="L55" class="LineNr"> 55 </span> <span class="Conceal">¦</span> loopn <span class="Special"><-</span> add loopn,<span class="Constant"> 1</span> -<span id="L56" class="LineNr"> 56 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L56" class="LineNr"> 56 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L57" class="LineNr"> 57 </span> <span class="Delimiter">}</span> <span id="L58" class="LineNr"> 58 </span>] <span id="L59" class="LineNr"> 59 </span> @@ -204,7 +204,7 @@ if ('onhashchange' in window) { <span id="L143" class="LineNr">143 </span> <span class="Conceal">¦</span> array <span class="Special"><-</span> <a href='063array.mu.html#L108'>swap</a> array, start, end <span id="L144" class="LineNr">144 </span> <span class="Conceal">¦</span> start <span class="Special"><-</span> add start,<span class="Constant"> 1</span> <span id="L145" class="LineNr">145 </span> <span class="Conceal">¦</span> end <span class="Special"><-</span> subtract end,<span class="Constant"> 1</span> -<span id="L146" class="LineNr">146 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L146" class="LineNr">146 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L147" class="LineNr">147 </span> <span class="Delimiter">}</span> <span id="L148" class="LineNr">148 </span>] <span id="L149" class="LineNr">149 </span> diff --git a/html/064list.mu.html b/html/064list.mu.html index 88228bdb..cc383bf3 100644 --- a/html/064list.mu.html +++ b/html/064list.mu.html @@ -118,7 +118,7 @@ if ('onhashchange' in window) { <span id="L56" class="LineNr"> 56 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> l <span id="L57" class="LineNr"> 57 </span> <span class="Conceal">¦</span> result <span class="Special"><-</span> add result,<span class="Constant"> 1</span> <span id="L58" class="LineNr"> 58 </span> <span class="Conceal">¦</span> l <span class="Special"><-</span> <a href='064list.mu.html#L24'>rest</a> l -<span id="L59" class="LineNr"> 59 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L59" class="LineNr"> 59 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L60" class="LineNr"> 60 </span> <span class="Delimiter">}</span> <span id="L61" class="LineNr"> 61 </span>] <span id="L62" class="LineNr"> 62 </span> @@ -387,7 +387,7 @@ if ('onhashchange' in window) { <span id="L325" class="LineNr">325 </span> <span class="Delimiter">{</span> <span id="L326" class="LineNr">326 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> in <span id="L327" class="LineNr">327 </span> <span class="Conceal">¦</span> buf <span class="Special"><-</span> append buf, <span class="Constant">[[]</span>] -<span id="L328" class="LineNr">328 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L328" class="LineNr">328 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L329" class="LineNr">329 </span> <span class="Delimiter">}</span> <span id="L330" class="LineNr">330 </span> <span class="Comment"># append in.value to buf</span> <span id="L331" class="LineNr">331 </span> val:_elem <span class="Special"><-</span> get *in, <span class="Constant">value:offset</span> @@ -403,14 +403,14 @@ if ('onhashchange' in window) { <span id="L341" class="LineNr">341 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> optional-input-found? <span id="L342" class="LineNr">342 </span> <span class="Conceal">¦</span> <span class="Comment"># unlimited recursion</span> <span id="L343" class="LineNr">343 </span> <span class="Conceal">¦</span> buf <span class="Special"><-</span> to-buffer <a href='065duplex_list.mu.html#L25'>next</a>, buf -<span id="L344" class="LineNr">344 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L344" class="LineNr">344 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L345" class="LineNr">345 </span> <span class="Delimiter">}</span> <span id="L346" class="LineNr">346 </span> <span class="Delimiter">{</span> <span id="L347" class="LineNr">347 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> remaining <span id="L348" class="LineNr">348 </span> <span class="Conceal">¦</span> <span class="Comment"># limited recursion</span> <span id="L349" class="LineNr">349 </span> <span class="Conceal">¦</span> remaining <span class="Special"><-</span> subtract remaining,<span class="Constant"> 1</span> <span id="L350" class="LineNr">350 </span> <span class="Conceal">¦</span> buf <span class="Special"><-</span> to-buffer <a href='065duplex_list.mu.html#L25'>next</a>, buf, remaining -<span id="L351" class="LineNr">351 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L351" class="LineNr">351 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L352" class="LineNr">352 </span> <span class="Delimiter">}</span> <span id="L353" class="LineNr">353 </span> <span class="Comment"># past recursion depth; insert ellipses and stop</span> <span id="L354" class="LineNr">354 </span> append buf, <span class="Constant">[...]</span> diff --git a/html/065duplex_list.mu.html b/html/065duplex_list.mu.html index c0557ad9..bfd37e7b 100644 --- a/html/065duplex_list.mu.html +++ b/html/065duplex_list.mu.html @@ -96,7 +96,7 @@ if ('onhashchange' in window) { <span id="L34" class="LineNr"> 34 </span> <span class="Constant">load-inputs</span> <span id="L35" class="LineNr"> 35 </span> <span class="muControl">return-unless</span> in,<span class="Constant"> 0</span> <span id="L36" class="LineNr"> 36 </span> result <span class="Special"><-</span> get *in, <span class="Constant"><a href='065duplex_list.mu.html#L32'>prev</a>:offset</span> -<span id="L37" class="LineNr"> 37 </span> <span class="muControl">return</span> result +<span id="L37" class="LineNr"> 37 </span> <span class="muControl"> return</span> result <span id="L38" class="LineNr"> 38 </span>] <span id="L39" class="LineNr"> 39 </span> <span id="L40" class="LineNr"> 40 </span><span class="muScenario">scenario</span> duplex-list-handling [ @@ -149,7 +149,7 @@ if ('onhashchange' in window) { <span id="L87" class="LineNr"> 87 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> l <span id="L88" class="LineNr"> 88 </span> <span class="Conceal">¦</span> result <span class="Special"><-</span> add result,<span class="Constant"> 1</span> <span id="L89" class="LineNr"> 89 </span> <span class="Conceal">¦</span> l <span class="Special"><-</span> <a href='065duplex_list.mu.html#L25'>next</a> l -<span id="L90" class="LineNr"> 90 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L90" class="LineNr"> 90 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L91" class="LineNr"> 91 </span> <span class="Delimiter">}</span> <span id="L92" class="LineNr"> 92 </span>] <span id="L93" class="LineNr"> 93 </span> @@ -302,11 +302,11 @@ if ('onhashchange' in window) { <span id="L240" class="LineNr">240 </span> <span class="Delimiter">{</span> <span id="L241" class="LineNr">241 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> prev-node <span id="L242" class="LineNr">242 </span> <span class="Conceal">¦</span> *prev-node <span class="Special"><-</span> put *prev-node, <span class="Constant"><a href='065duplex_list.mu.html#L25'>next</a>:offset</span>, next-node -<span id="L243" class="LineNr">243 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L243" class="LineNr">243 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L244" class="LineNr">244 </span> <span class="Delimiter">}</span> <span id="L245" class="LineNr">245 </span> <span class="Comment"># if prev-node is null, then we removed the head node at 'in'</span> <span id="L246" class="LineNr">246 </span> <span class="Comment"># return the new head rather than the old 'in'</span> -<span id="L247" class="LineNr">247 </span> <span class="muControl">return</span> next-node +<span id="L247" class="LineNr">247 </span> <span class="muControl"> return</span> next-node <span id="L248" class="LineNr">248 </span>] <span id="L249" class="LineNr">249 </span> <span id="L250" class="LineNr">250 </span><span class="muScenario">scenario</span> removing-from-duplex-list [ @@ -420,7 +420,7 @@ if ('onhashchange' in window) { <span id="L358" class="LineNr">358 </span> <span class="Conceal">¦</span> in <span class="Special"><-</span> remove curr, in <span id="L359" class="LineNr">359 </span> <span class="Conceal">¦</span> curr <span class="Special"><-</span> copy <a href='065duplex_list.mu.html#L25'>next</a> <span id="L360" class="LineNr">360 </span> <span class="Conceal">¦</span> i <span class="Special"><-</span> add i,<span class="Constant"> 1</span> -<span id="L361" class="LineNr">361 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L361" class="LineNr">361 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L362" class="LineNr">362 </span> <span class="Delimiter">}</span> <span id="L363" class="LineNr">363 </span>] <span id="L364" class="LineNr">364 </span> @@ -618,7 +618,7 @@ if ('onhashchange' in window) { <span id="L556" class="LineNr">556 </span> <span class="Conceal">¦</span> <span class="Comment"># next iter</span> <span id="L557" class="LineNr">557 </span> <span class="Conceal">¦</span> curr <span class="Special"><-</span> <a href='065duplex_list.mu.html#L25'>next</a> curr <span id="L558" class="LineNr">558 </span> <span class="Conceal">¦</span> idx <span class="Special"><-</span> add idx,<span class="Constant"> 1</span> -<span id="L559" class="LineNr">559 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L559" class="LineNr">559 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L560" class="LineNr">560 </span> <span class="Delimiter">}</span> <span id="L561" class="LineNr">561 </span>] <span id="L562" class="LineNr">562 </span> @@ -639,7 +639,7 @@ if ('onhashchange' in window) { <span id="L577" class="LineNr">577 </span> <span class="Conceal">¦</span> <a href='065duplex_list.mu.html#L25'>next</a>:&:<a href='065duplex_list.mu.html#L3'>duplex-list</a>:_elem <span class="Special"><-</span> <a href='065duplex_list.mu.html#L25'>next</a> result <span id="L578" class="LineNr">578 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> <a href='065duplex_list.mu.html#L25'>next</a> <span id="L579" class="LineNr">579 </span> <span class="Conceal">¦</span> result <span class="Special"><-</span> copy <a href='065duplex_list.mu.html#L25'>next</a> -<span id="L580" class="LineNr">580 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L580" class="LineNr">580 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L581" class="LineNr">581 </span> <span class="Delimiter">}</span> <span id="L582" class="LineNr">582 </span>] <span id="L583" class="LineNr">583 </span> @@ -659,9 +659,9 @@ if ('onhashchange' in window) { <span id="L597" class="LineNr">597 </span> <span class="Conceal">¦</span> <span class="muControl">return-unless</span> curr-matches?, <span class="Constant">0/no-match</span> <span id="L598" class="LineNr">598 </span> <span class="Conceal">¦</span> x <span class="Special"><-</span> <a href='065duplex_list.mu.html#L25'>next</a> x <span id="L599" class="LineNr">599 </span> <span class="Conceal">¦</span> i <span class="Special"><-</span> add i,<span class="Constant"> 1</span> -<span id="L600" class="LineNr">600 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L600" class="LineNr">600 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L601" class="LineNr">601 </span> <span class="Delimiter">}</span> -<span id="L602" class="LineNr">602 </span> <span class="muControl">return</span> <span class="Constant">1/successful-match</span> +<span id="L602" class="LineNr">602 </span> <span class="muControl"> return</span> <span class="Constant">1/successful-match</span> <span id="L603" class="LineNr">603 </span>] <span id="L604" class="LineNr">604 </span> <span id="L605" class="LineNr">605 </span><span class="muScenario">scenario</span> duplex-list-match [ @@ -704,7 +704,7 @@ if ('onhashchange' in window) { <span id="L642" class="LineNr">642 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> $print <span class="Constant">10/newline</span> <span id="L643" class="LineNr">643 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> $print x, <span class="Constant">[: ]</span> <span id="L644" class="LineNr">644 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> -<span id="L645" class="LineNr">645 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L645" class="LineNr">645 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L646" class="LineNr">646 </span> <span class="Delimiter">}</span> <span id="L647" class="LineNr">647 </span> $print <span class="Constant">10/newline</span>, <span class="Constant">[---]</span>, <span class="Constant">10/newline</span> <span id="L648" class="LineNr">648 </span>] @@ -745,7 +745,7 @@ if ('onhashchange' in window) { <span id="L683" class="LineNr">683 </span> <span class="Delimiter">{</span> <span id="L684" class="LineNr">684 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> in <span id="L685" class="LineNr">685 </span> <span class="Conceal">¦</span> buf <span class="Special"><-</span> append buf, <span class="Constant">[[]</span>] -<span id="L686" class="LineNr">686 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L686" class="LineNr">686 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L687" class="LineNr">687 </span> <span class="Delimiter">}</span> <span id="L688" class="LineNr">688 </span> <span class="Comment"># append in.value to buf</span> <span id="L689" class="LineNr">689 </span> val:_elem <span class="Special"><-</span> get *in, <span class="Constant">value:offset</span> @@ -761,14 +761,14 @@ if ('onhashchange' in window) { <span id="L699" class="LineNr">699 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> optional-input-found? <span id="L700" class="LineNr">700 </span> <span class="Conceal">¦</span> <span class="Comment"># unlimited recursion</span> <span id="L701" class="LineNr">701 </span> <span class="Conceal">¦</span> buf <span class="Special"><-</span> to-buffer <a href='065duplex_list.mu.html#L25'>next</a>, buf -<span id="L702" class="LineNr">702 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L702" class="LineNr">702 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L703" class="LineNr">703 </span> <span class="Delimiter">}</span> <span id="L704" class="LineNr">704 </span> <span class="Delimiter">{</span> <span id="L705" class="LineNr">705 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> remaining <span id="L706" class="LineNr">706 </span> <span class="Conceal">¦</span> <span class="Comment"># limited recursion</span> <span id="L707" class="LineNr">707 </span> <span class="Conceal">¦</span> remaining <span class="Special"><-</span> subtract remaining,<span class="Constant"> 1</span> <span id="L708" class="LineNr">708 </span> <span class="Conceal">¦</span> buf <span class="Special"><-</span> to-buffer <a href='065duplex_list.mu.html#L25'>next</a>, buf, remaining -<span id="L709" class="LineNr">709 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L709" class="LineNr">709 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L710" class="LineNr">710 </span> <span class="Delimiter">}</span> <span id="L711" class="LineNr">711 </span> <span class="Comment"># past recursion depth; insert ellipses and stop</span> <span id="L712" class="LineNr">712 </span> append buf, <span class="Constant">[...]</span> diff --git a/html/066stream.mu.html b/html/066stream.mu.html index 02747cbc..bc62e576 100644 --- a/html/066stream.mu.html +++ b/html/066stream.mu.html @@ -93,7 +93,7 @@ if ('onhashchange' in window) { <span id="L32" class="LineNr">32 </span> <span class="Delimiter">{</span> <span id="L33" class="LineNr">33 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> at-end? <span id="L34" class="LineNr">34 </span> <span class="Conceal">¦</span> empty-result:&:_elem <span class="Special"><-</span> new <span class="Constant">_elem:type</span> -<span id="L35" class="LineNr">35 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> *empty-result, <span class="Constant">1/true</span> +<span id="L35" class="LineNr">35 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> *empty-result, <span class="Constant">1/true</span> <span id="L36" class="LineNr">36 </span> <span class="Delimiter">}</span> <span id="L37" class="LineNr">37 </span> result <span class="Special"><-</span> index *s, idx <span id="L38" class="LineNr">38 </span> idx <span class="Special"><-</span> add idx,<span class="Constant"> 1</span> @@ -112,7 +112,7 @@ if ('onhashchange' in window) { <span id="L51" class="LineNr">51 </span> <span class="Delimiter">{</span> <span id="L52" class="LineNr">52 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> at-end? <span id="L53" class="LineNr">53 </span> <span class="Conceal">¦</span> empty-result:&:_elem <span class="Special"><-</span> new <span class="Constant">_elem:type</span> -<span id="L54" class="LineNr">54 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> *empty-result, <span class="Constant">1/true</span> +<span id="L54" class="LineNr">54 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> *empty-result, <span class="Constant">1/true</span> <span id="L55" class="LineNr">55 </span> <span class="Delimiter">}</span> <span id="L56" class="LineNr">56 </span> result <span class="Special"><-</span> index *s, idx <span id="L57" class="LineNr">57 </span>] diff --git a/html/068random.mu.html b/html/068random.mu.html index bad6f85d..ef5f172e 100644 --- a/html/068random.mu.html +++ b/html/068random.mu.html @@ -66,7 +66,7 @@ if ('onhashchange' in window) { <span id="L5" class="LineNr"> 5 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> generator <span id="L6" class="LineNr"> 6 </span> <span class="Conceal">¦</span> <span class="Comment"># generator is 0? use real random-number generator</span> <span id="L7" class="LineNr"> 7 </span> <span class="Conceal">¦</span> result <span class="Special"><-</span> real-random -<span id="L8" class="LineNr"> 8 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> result, <span class="Constant">0/false</span> +<span id="L8" class="LineNr"> 8 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> result, <span class="Constant">0/false</span> <span id="L9" class="LineNr"> 9 </span> <span class="Delimiter">}</span> <span id="L10" class="LineNr">10 </span> result, fail?, generator <span class="Special"><-</span> read generator <span id="L11" class="LineNr">11 </span>] @@ -81,7 +81,7 @@ if ('onhashchange' in window) { <span id="L20" class="LineNr">20 </span> <span class="Conceal">¦</span> _, arg-received?:bool <span class="Special"><-</span> <span class="Constant">next-input</span> <span id="L21" class="LineNr">21 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> arg-received? <span id="L22" class="LineNr">22 </span> <span class="Conceal">¦</span> result-len <span class="Special"><-</span> add result-len,<span class="Constant"> 1</span> -<span id="L23" class="LineNr">23 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L23" class="LineNr">23 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L24" class="LineNr">24 </span> <span class="Delimiter">}</span> <span id="L25" class="LineNr">25 </span> <span class="Constant">rewind-inputs</span> <span id="L26" class="LineNr">26 </span> result-data:&:@:num <span class="Special"><-</span> new <span class="Constant">number:type</span>, result-len @@ -91,7 +91,7 @@ if ('onhashchange' in window) { <span id="L30" class="LineNr">30 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> arg-received? <span id="L31" class="LineNr">31 </span> <span class="Conceal">¦</span> *result-data <span class="Special"><-</span> put-index *result-data, idx, curr <span id="L32" class="LineNr">32 </span> <span class="Conceal">¦</span> idx <span class="Special"><-</span> add idx,<span class="Constant"> 1</span> -<span id="L33" class="LineNr">33 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L33" class="LineNr">33 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L34" class="LineNr">34 </span> <span class="Delimiter">}</span> <span id="L35" class="LineNr">35 </span> result <span class="Special"><-</span> <a href='066stream.mu.html#L7'>new-stream</a> result-data <span id="L36" class="LineNr">36 </span>] diff --git a/html/075channel.mu.html b/html/075channel.mu.html index 6aa979d9..0b432389 100644 --- a/html/075channel.mu.html +++ b/html/075channel.mu.html @@ -149,7 +149,7 @@ if ('onhashchange' in window) { <span id="L85" class="LineNr"> 85 </span> <span class="Conceal">¦</span> reset lock <span id="L86" class="LineNr"> 86 </span> <span class="Conceal">¦</span> current-routine-is-blocked <span id="L87" class="LineNr"> 87 </span> <span class="Conceal">¦</span> switch <span class="Comment"># avoid spinlocking</span> -<span id="L88" class="LineNr"> 88 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L88" class="LineNr"> 88 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L89" class="LineNr"> 89 </span> <span class="Delimiter">}</span> <span id="L90" class="LineNr"> 90 </span> current-routine-is-unblocked <span id="L91" class="LineNr"> 91 </span><span class="CommentedCode">#? $print [performing write], 10/newline</span> @@ -196,7 +196,7 @@ if ('onhashchange' in window) { <span id="L132" class="LineNr">132 </span> <span class="Conceal">¦</span> current-routine-is-blocked <span id="L133" class="LineNr">133 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <a href='075channel.mu.html#L133'><channel-read-empty></a></span> <span id="L134" class="LineNr">134 </span> <span class="Conceal">¦</span> switch <span class="Comment"># avoid spinlocking</span> -<span id="L135" class="LineNr">135 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L135" class="LineNr">135 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L136" class="LineNr">136 </span> <span class="Delimiter">}</span> <span id="L137" class="LineNr">137 </span> current-routine-is-unblocked <span id="L138" class="LineNr">138 </span> <span class="Comment"># pull result off</span> @@ -381,7 +381,7 @@ if ('onhashchange' in window) { <span id="L317" class="LineNr">317 </span> <span class="Conceal">¦</span> empty?:bool <span class="Special"><-</span> <a href='075channel.mu.html#L370'>channel-empty?</a> chan <span id="L318" class="LineNr">318 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> empty? <span id="L319" class="LineNr">319 </span> <span class="Conceal">¦</span> _, _, in <span class="Special"><-</span> read in -<span id="L320" class="LineNr">320 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L320" class="LineNr">320 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L321" class="LineNr">321 </span> <span class="Delimiter">}</span> <span id="L322" class="LineNr">322 </span>] <span id="L323" class="LineNr">323 </span> @@ -424,7 +424,7 @@ if ('onhashchange' in window) { <span id="L360" class="LineNr">360 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> closed? <span id="L361" class="LineNr">361 </span> <span class="Conceal">¦</span> empty-result:&:_elem <span class="Special"><-</span> new <span class="Constant">_elem:type</span> <span id="L362" class="LineNr">362 </span> <span class="Conceal">¦</span> current-routine-is-unblocked -<span id="L363" class="LineNr">363 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> *empty-result, <span class="Constant">1/true</span> +<span id="L363" class="LineNr">363 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> *empty-result, <span class="Constant">1/true</span> <span id="L364" class="LineNr">364 </span> <span class="Delimiter">}</span> <span id="L365" class="LineNr">365 </span>] <span id="L366" class="LineNr">366 </span> @@ -495,13 +495,13 @@ if ('onhashchange' in window) { <span id="L431" class="LineNr">431 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> *line <span class="Special"><-</span> put *line, <span class="Constant">length:offset</span>, buffer-length <span id="L432" class="LineNr">432 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L433" class="LineNr">433 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Comment"># and don't append this one</span> -<span id="L434" class="LineNr">434 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">loop</span> <span class="Constant">+next-character</span> +<span id="L434" class="LineNr">434 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span class="Constant">+next-character</span> <span id="L435" class="LineNr">435 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L436" class="LineNr">436 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Comment"># append anything else</span> <span id="L437" class="LineNr">437 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> line <span class="Special"><-</span> append line, c <span id="L438" class="LineNr">438 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> line-done?:bool <span class="Special"><-</span> equal c, <span class="Constant">10/newline</span> <span id="L439" class="LineNr">439 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> line-done? -<span id="L440" class="LineNr">440 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L440" class="LineNr">440 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L441" class="LineNr">441 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L442" class="LineNr">442 </span> <span class="Conceal">¦</span> <span class="Comment"># copy line into 'buffered-out'</span> <span id="L443" class="LineNr">443 </span> <span class="Conceal">¦</span> i:num <span class="Special"><-</span> copy<span class="Constant"> 0</span> @@ -513,14 +513,14 @@ if ('onhashchange' in window) { <span id="L449" class="LineNr">449 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> c:char <span class="Special"><-</span> index *line-contents, i <span id="L450" class="LineNr">450 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> buffered-out <span class="Special"><-</span> <a href='075channel.mu.html#L67'>write</a> buffered-out, c <span id="L451" class="LineNr">451 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> i <span class="Special"><-</span> add i,<span class="Constant"> 1</span> -<span id="L452" class="LineNr">452 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L452" class="LineNr">452 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L453" class="LineNr">453 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L454" class="LineNr">454 </span> <span class="Conceal">¦</span> <span class="Delimiter">{</span> <span id="L455" class="LineNr">455 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> eof? <span id="L456" class="LineNr">456 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> buffered-out <span class="Special"><-</span> close buffered-out -<span id="L457" class="LineNr">457 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L457" class="LineNr">457 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L458" class="LineNr">458 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> -<span id="L459" class="LineNr">459 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L459" class="LineNr">459 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L460" class="LineNr">460 </span> <span class="Delimiter">}</span> <span id="L461" class="LineNr">461 </span>] <span id="L462" class="LineNr">462 </span> @@ -576,7 +576,7 @@ if ('onhashchange' in window) { <span id="L512" class="LineNr">512 </span> <span class="Conceal">¦</span> c:char, done?:bool <span class="Special"><-</span> read <a href='075channel.mu.html#L43'>source</a> <span id="L513" class="LineNr">513 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> done? <span id="L514" class="LineNr">514 </span> <span class="Conceal">¦</span> buf <span class="Special"><-</span> append buf, c -<span id="L515" class="LineNr">515 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L515" class="LineNr">515 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L516" class="LineNr">516 </span> <span class="Delimiter">}</span> <span id="L517" class="LineNr">517 </span> result <span class="Special"><-</span> <a href='061text.mu.html#L338'>buffer-to-array</a> buf <span id="L518" class="LineNr">518 </span>] diff --git a/html/081print.mu.html b/html/081print.mu.html index a7e278be..b9751aa4 100644 --- a/html/081print.mu.html +++ b/html/081print.mu.html @@ -114,7 +114,7 @@ if ('onhashchange' in window) { <span id="L51" class="LineNr"> 51 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> <a href='081print.mu.html#L16'>screen</a> <span id="L52" class="LineNr"> 52 </span> <span class="Conceal">¦</span> <span class="Comment"># real screen</span> <span id="L53" class="LineNr"> 53 </span> <span class="Conceal">¦</span> clear-display -<span id="L54" class="LineNr"> 54 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L54" class="LineNr"> 54 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L55" class="LineNr"> 55 </span> <span class="Delimiter">}</span> <span id="L56" class="LineNr"> 56 </span> <span class="Comment"># fake screen</span> <span id="L57" class="LineNr"> 57 </span> buf:&:@:<a href='081print.mu.html#L27'>screen-cell</a> <span class="Special"><-</span> get *screen, <span class="Constant">data:offset</span> @@ -126,7 +126,7 @@ if ('onhashchange' in window) { <span id="L63" class="LineNr"> 63 </span> <span class="Conceal">¦</span> curr:<a href='081print.mu.html#L27'>screen-cell</a> <span class="Special"><-</span> merge <span class="Constant">0/empty</span>, <span class="Constant">7/white</span> <span id="L64" class="LineNr"> 64 </span> <span class="Conceal">¦</span> *buf <span class="Special"><-</span> put-index *buf, i, curr <span id="L65" class="LineNr"> 65 </span> <span class="Conceal">¦</span> i <span class="Special"><-</span> add i,<span class="Constant"> 1</span> -<span id="L66" class="LineNr"> 66 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L66" class="LineNr"> 66 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L67" class="LineNr"> 67 </span> <span class="Delimiter">}</span> <span id="L68" class="LineNr"> 68 </span> <span class="Comment"># reset cursor</span> <span id="L69" class="LineNr"> 69 </span> *screen <span class="Special"><-</span> put *screen, <span class="Constant">cursor-row:offset</span>,<span class="Constant"> 0</span> @@ -150,9 +150,9 @@ if ('onhashchange' in window) { <span id="L87" class="LineNr"> 87 </span> <span class="Conceal">¦</span> i <span class="Special"><-</span> add i,<span class="Constant"> 1</span> <span id="L88" class="LineNr"> 88 </span> <span class="Conceal">¦</span> <span class="muControl">loop-unless</span> curr-contents <span id="L89" class="LineNr"> 89 </span> <span class="Conceal">¦</span> <span class="Comment"># not 0</span> -<span id="L90" class="LineNr"> 90 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">0/false</span> +<span id="L90" class="LineNr"> 90 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">0/false</span> <span id="L91" class="LineNr"> 91 </span> <span class="Delimiter">}</span> -<span id="L92" class="LineNr"> 92 </span> <span class="muControl">return</span> <span class="Constant">1/true</span> +<span id="L92" class="LineNr"> 92 </span> <span class="muControl"> return</span> <span class="Constant">1/true</span> <span id="L93" class="LineNr"> 93 </span>] <span id="L94" class="LineNr"> 94 </span> <span id="L95" class="LineNr"> 95 </span><span class="muRecipe">def</span> print <a href='081print.mu.html#L16'>screen</a>:&:<a href='081print.mu.html#L16'>screen</a>, c:char<span class="muRecipe"> -> </span><a href='081print.mu.html#L16'>screen</a>:&:<a href='081print.mu.html#L16'>screen</a> [ @@ -176,7 +176,7 @@ if ('onhashchange' in window) { <span id="L113" class="LineNr">113 </span> <span class="Conceal">¦</span> <span class="Comment"># real screen</span> <span id="L114" class="LineNr">114 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> <a href='081print.mu.html#L16'>screen</a> <span id="L115" class="LineNr">115 </span> <span class="Conceal">¦</span> print-character-to-display c, color, bg-color -<span id="L116" class="LineNr">116 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L116" class="LineNr">116 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L117" class="LineNr">117 </span> <span class="Delimiter">}</span> <span id="L118" class="LineNr">118 </span> <span class="Comment"># fake screen</span> <span id="L119" class="LineNr">119 </span> <span class="Comment"># (handle special cases exactly like in the real screen)</span> @@ -221,14 +221,14 @@ if ('onhashchange' in window) { <span id="L158" class="LineNr">158 </span> <span class="Conceal">¦</span> newline?:bool <span class="Special"><-</span> equal c, <span class="Constant">10/newline</span> <span id="L159" class="LineNr">159 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> newline? <span id="L160" class="LineNr">160 </span> <span class="Conceal">¦</span> <a href='081print.mu.html#L206'>cursor-down-on-fake-screen</a> <a href='081print.mu.html#L16'>screen</a> <span class="Comment"># doesn't modify column</span> -<span id="L161" class="LineNr">161 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L161" class="LineNr">161 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L162" class="LineNr">162 </span> <span class="Delimiter">}</span> <span id="L163" class="LineNr">163 </span> <span class="Comment"># special-case: linefeed</span> <span id="L164" class="LineNr">164 </span> <span class="Delimiter">{</span> <span id="L165" class="LineNr">165 </span> <span class="Conceal">¦</span> linefeed?:bool <span class="Special"><-</span> equal c, <span class="Constant">13/linefeed</span> <span id="L166" class="LineNr">166 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> linefeed? <span id="L167" class="LineNr">167 </span> <span class="Conceal">¦</span> *screen <span class="Special"><-</span> put *screen, <span class="Constant">cursor-column:offset</span>,<span class="Constant"> 0</span> -<span id="L168" class="LineNr">168 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L168" class="LineNr">168 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L169" class="LineNr">169 </span> <span class="Delimiter">}</span> <span id="L170" class="LineNr">170 </span> <span class="Comment"># special-case: backspace</span> <span id="L171" class="LineNr">171 </span> <span class="Comment"># moves cursor left but does not erase</span> @@ -240,7 +240,7 @@ if ('onhashchange' in window) { <span id="L177" class="LineNr">177 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> column <span class="Special"><-</span> subtract column,<span class="Constant"> 1</span> <span id="L178" class="LineNr">178 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> *screen <span class="Special"><-</span> put *screen, <span class="Constant">cursor-column:offset</span>, column <span id="L179" class="LineNr">179 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> -<span id="L180" class="LineNr">180 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L180" class="LineNr">180 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L181" class="LineNr">181 </span> <span class="Delimiter">}</span> <span id="L182" class="LineNr">182 </span> <span class="Comment"># save character in fake screen</span> <span id="L183" class="LineNr">183 </span> top-idx:num <span class="Special"><-</span> get *screen, <span class="Constant">top-idx:offset</span> @@ -303,7 +303,7 @@ if ('onhashchange' in window) { <span id="L240" class="LineNr">240 </span> <span class="Conceal">¦</span> top-idx <span class="Special"><-</span> add top-idx,<span class="Constant"> 1</span> <span id="L241" class="LineNr">241 </span> <span class="Conceal">¦</span> <span class="Comment"># no modulo; top-idx is always a multiple of width,</span> <span id="L242" class="LineNr">242 </span> <span class="Conceal">¦</span> <span class="Comment"># so it can never wrap around inside this loop</span> -<span id="L243" class="LineNr">243 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L243" class="LineNr">243 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L244" class="LineNr">244 </span> <span class="Delimiter">}</span> <span id="L245" class="LineNr">245 </span> <span class="Comment"># top-idx now same as next-top-idx; wrap around if necessary</span> <span id="L246" class="LineNr">246 </span> <a href='075channel.mu.html#L399'>capacity</a>:num <span class="Special"><-</span> multiply width, height @@ -593,7 +593,7 @@ if ('onhashchange' in window) { <span id="L530" class="LineNr">530 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> <a href='081print.mu.html#L16'>screen</a> <span id="L531" class="LineNr">531 </span> <span class="Conceal">¦</span> <span class="Comment"># real screen</span> <span id="L532" class="LineNr">532 </span> <span class="Conceal">¦</span> clear-line-on-display -<span id="L533" class="LineNr">533 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L533" class="LineNr">533 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L534" class="LineNr">534 </span> <span class="Delimiter">}</span> <span id="L535" class="LineNr">535 </span> <span class="Comment"># fake screen</span> <span id="L536" class="LineNr">536 </span> width:num <span class="Special"><-</span> get *screen, <span class="Constant">num-columns:offset</span> @@ -606,7 +606,7 @@ if ('onhashchange' in window) { <span id="L543" class="LineNr">543 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> done? <span id="L544" class="LineNr">544 </span> <span class="Conceal">¦</span> print <a href='081print.mu.html#L16'>screen</a>, space <span id="L545" class="LineNr">545 </span> <span class="Conceal">¦</span> column <span class="Special"><-</span> add column,<span class="Constant"> 1</span> -<span id="L546" class="LineNr">546 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L546" class="LineNr">546 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L547" class="LineNr">547 </span> <span class="Delimiter">}</span> <span id="L548" class="LineNr">548 </span> <span class="Comment"># now back to where the cursor was</span> <span id="L549" class="LineNr">549 </span> *screen <span class="Special"><-</span> put *screen, <span class="Constant">cursor-column:offset</span>, original-column @@ -633,7 +633,7 @@ if ('onhashchange' in window) { <span id="L570" class="LineNr">570 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> done? <span id="L571" class="LineNr">571 </span> <span class="Conceal">¦</span> <a href='081print.mu.html#L16'>screen</a> <span class="Special"><-</span> print <a href='081print.mu.html#L16'>screen</a>, space, <span class="Constant">7/white</span>, bg-color <span class="Comment"># foreground color is mostly unused except if the cursor shows up at this cell</span> <span id="L572" class="LineNr">572 </span> <span class="Conceal">¦</span> column <span class="Special"><-</span> add column,<span class="Constant"> 1</span> -<span id="L573" class="LineNr">573 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L573" class="LineNr">573 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L574" class="LineNr">574 </span> <span class="Delimiter">}</span> <span id="L575" class="LineNr">575 </span>] <span id="L576" class="LineNr">576 </span> @@ -644,7 +644,7 @@ if ('onhashchange' in window) { <span id="L581" class="LineNr">581 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> <a href='081print.mu.html#L16'>screen</a> <span id="L582" class="LineNr">582 </span> <span class="Conceal">¦</span> <span class="Comment"># real screen</span> <span id="L583" class="LineNr">583 </span> <span class="Conceal">¦</span> row, column <span class="Special"><-</span> cursor-position-on-display -<span id="L584" class="LineNr">584 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L584" class="LineNr">584 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L585" class="LineNr">585 </span> <span class="Delimiter">}</span> <span id="L586" class="LineNr">586 </span> <span class="Comment"># fake screen</span> <span id="L587" class="LineNr">587 </span> row:num <span class="Special"><-</span> get *screen, <span class="Constant">cursor-row:offset</span> @@ -659,7 +659,7 @@ if ('onhashchange' in window) { <span id="L596" class="LineNr">596 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> <a href='081print.mu.html#L16'>screen</a> <span id="L597" class="LineNr">597 </span> <span class="Conceal">¦</span> <span class="Comment"># real screen</span> <span id="L598" class="LineNr">598 </span> <span class="Conceal">¦</span> move-cursor-on-display new-row, new-column -<span id="L599" class="LineNr">599 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L599" class="LineNr">599 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L600" class="LineNr">600 </span> <span class="Delimiter">}</span> <span id="L601" class="LineNr">601 </span> <span class="Comment"># fake screen</span> <span id="L602" class="LineNr">602 </span> *screen <span class="Special"><-</span> put *screen, <span class="Constant">cursor-row:offset</span>, new-row @@ -713,7 +713,7 @@ if ('onhashchange' in window) { <span id="L650" class="LineNr">650 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> <a href='081print.mu.html#L16'>screen</a> <span id="L651" class="LineNr">651 </span> <span class="Conceal">¦</span> <span class="Comment"># real screen</span> <span id="L652" class="LineNr">652 </span> <span class="Conceal">¦</span> move-cursor-down-on-display -<span id="L653" class="LineNr">653 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L653" class="LineNr">653 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L654" class="LineNr">654 </span> <span class="Delimiter">}</span> <span id="L655" class="LineNr">655 </span> <span class="Comment"># fake screen</span> <span id="L656" class="LineNr">656 </span> <a href='081print.mu.html#L206'>cursor-down-on-fake-screen</a> <a href='081print.mu.html#L16'>screen</a> @@ -756,7 +756,7 @@ if ('onhashchange' in window) { <span id="L693" class="LineNr">693 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> <a href='081print.mu.html#L16'>screen</a> <span id="L694" class="LineNr">694 </span> <span class="Conceal">¦</span> <span class="Comment"># real screen</span> <span id="L695" class="LineNr">695 </span> <span class="Conceal">¦</span> move-cursor-up-on-display -<span id="L696" class="LineNr">696 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L696" class="LineNr">696 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L697" class="LineNr">697 </span> <span class="Delimiter">}</span> <span id="L698" class="LineNr">698 </span> <span class="Comment"># fake screen</span> <span id="L699" class="LineNr">699 </span> row:num <span class="Special"><-</span> get *screen, <span class="Constant">cursor-row:offset</span> @@ -774,7 +774,7 @@ if ('onhashchange' in window) { <span id="L711" class="LineNr">711 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> <a href='081print.mu.html#L16'>screen</a> <span id="L712" class="LineNr">712 </span> <span class="Conceal">¦</span> <span class="Comment"># real screen</span> <span id="L713" class="LineNr">713 </span> <span class="Conceal">¦</span> move-cursor-right-on-display -<span id="L714" class="LineNr">714 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L714" class="LineNr">714 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L715" class="LineNr">715 </span> <span class="Delimiter">}</span> <span id="L716" class="LineNr">716 </span> <span class="Comment"># fake screen</span> <span id="L717" class="LineNr">717 </span> width:num <span class="Special"><-</span> get *screen, <span class="Constant">num-columns:offset</span> @@ -794,7 +794,7 @@ if ('onhashchange' in window) { <span id="L731" class="LineNr">731 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> <a href='081print.mu.html#L16'>screen</a> <span id="L732" class="LineNr">732 </span> <span class="Conceal">¦</span> <span class="Comment"># real screen</span> <span id="L733" class="LineNr">733 </span> <span class="Conceal">¦</span> move-cursor-left-on-display -<span id="L734" class="LineNr">734 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L734" class="LineNr">734 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L735" class="LineNr">735 </span> <span class="Delimiter">}</span> <span id="L736" class="LineNr">736 </span> <span class="Comment"># fake screen</span> <span id="L737" class="LineNr">737 </span> column:num <span class="Special"><-</span> get *screen, <span class="Constant">cursor-column:offset</span> @@ -836,7 +836,7 @@ if ('onhashchange' in window) { <span id="L773" class="LineNr">773 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> <a href='081print.mu.html#L16'>screen</a> <span id="L774" class="LineNr">774 </span> <span class="Conceal">¦</span> <span class="Comment"># fake screen</span> <span id="L775" class="LineNr">775 </span> <span class="Conceal">¦</span> width <span class="Special"><-</span> get *screen, <span class="Constant">num-columns:offset</span> -<span id="L776" class="LineNr">776 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L776" class="LineNr">776 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L777" class="LineNr">777 </span> <span class="Delimiter">}</span> <span id="L778" class="LineNr">778 </span> <span class="Comment"># real screen</span> <span id="L779" class="LineNr">779 </span> width <span class="Special"><-</span> display-width @@ -850,7 +850,7 @@ if ('onhashchange' in window) { <span id="L787" class="LineNr">787 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> <a href='081print.mu.html#L16'>screen</a> <span id="L788" class="LineNr">788 </span> <span class="Conceal">¦</span> <span class="Comment"># fake screen</span> <span id="L789" class="LineNr">789 </span> <span class="Conceal">¦</span> height <span class="Special"><-</span> get *screen, <span class="Constant">num-rows:offset</span> -<span id="L790" class="LineNr">790 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L790" class="LineNr">790 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L791" class="LineNr">791 </span> <span class="Delimiter">}</span> <span id="L792" class="LineNr">792 </span> <span class="Comment"># real screen</span> <span id="L793" class="LineNr">793 </span> height <span class="Special"><-</span> display-height @@ -879,7 +879,7 @@ if ('onhashchange' in window) { <span id="L816" class="LineNr">816 </span> <span class="Conceal">¦</span> c:char <span class="Special"><-</span> index *s, i <span id="L817" class="LineNr">817 </span> <span class="Conceal">¦</span> print <a href='081print.mu.html#L16'>screen</a>, c, color, bg-color <span id="L818" class="LineNr">818 </span> <span class="Conceal">¦</span> i <span class="Special"><-</span> add i,<span class="Constant"> 1</span> -<span id="L819" class="LineNr">819 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L819" class="LineNr">819 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L820" class="LineNr">820 </span> <span class="Delimiter">}</span> <span id="L821" class="LineNr">821 </span>] <span id="L822" class="LineNr">822 </span> diff --git a/html/084console.mu.html b/html/084console.mu.html index 635710f5..2364af89 100644 --- a/html/084console.mu.html +++ b/html/084console.mu.html @@ -105,16 +105,16 @@ if ('onhashchange' in window) { <span id="L44" class="LineNr"> 44 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> done?:bool <span class="Special"><-</span> greater-or-equal current-event-index, max <span id="L45" class="LineNr"> 45 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> done? <span id="L46" class="LineNr"> 46 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> dummy:&:<a href='084console.mu.html#L4'>event</a> <span class="Special"><-</span> new <span class="Constant"><a href='084console.mu.html#L4'>event</a>:type</span> -<span id="L47" class="LineNr"> 47 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">return</span> *dummy, <span class="Constant">1/found</span>, <span class="Constant">1/quit</span> +<span id="L47" class="LineNr"> 47 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> return</span> *dummy, <span class="Constant">1/found</span>, <span class="Constant">1/quit</span> <span id="L48" class="LineNr"> 48 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L49" class="LineNr"> 49 </span> <span class="Conceal">¦</span> result <span class="Special"><-</span> index *buf, current-event-index <span id="L50" class="LineNr"> 50 </span> <span class="Conceal">¦</span> current-event-index <span class="Special"><-</span> add current-event-index,<span class="Constant"> 1</span> <span id="L51" class="LineNr"> 51 </span> <span class="Conceal">¦</span> *console <span class="Special"><-</span> put *console, <span class="Constant">current-event-index:offset</span>, current-event-index -<span id="L52" class="LineNr"> 52 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> result, <span class="Constant">1/found</span>, <span class="Constant">0/quit</span> +<span id="L52" class="LineNr"> 52 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> result, <span class="Constant">1/found</span>, <span class="Constant">0/quit</span> <span id="L53" class="LineNr"> 53 </span> <span class="Delimiter">}</span> <span id="L54" class="LineNr"> 54 </span> switch <span class="Comment"># real event source is infrequent; avoid polling it too much</span> <span id="L55" class="LineNr"> 55 </span> result:<a href='084console.mu.html#L4'>event</a>, found?:bool <span class="Special"><-</span> check-for-interaction -<span id="L56" class="LineNr"> 56 </span> <span class="muControl">return</span> result, found?, <span class="Constant">0/quit</span> +<span id="L56" class="LineNr"> 56 </span> <span class="muControl"> return</span> result, found?, <span class="Constant">0/quit</span> <span id="L57" class="LineNr"> 57 </span>] <span id="L58" class="LineNr"> 58 </span> <span id="L59" class="LineNr"> 59 </span><span class="Comment"># variant of read-event for just keyboard events. Discards everything that</span> @@ -128,7 +128,7 @@ if ('onhashchange' in window) { <span id="L67" class="LineNr"> 67 </span> <span class="muControl">return-unless</span> found?,<span class="Constant"> 0</span>, found?, quit? <span id="L68" class="LineNr"> 68 </span> c:char, converted?:bool <span class="Special"><-</span> maybe-convert x, <span class="Constant">text:variant</span> <span id="L69" class="LineNr"> 69 </span> <span class="muControl">return-unless</span> converted?,<span class="Constant"> 0</span>, <span class="Constant">0/found</span>, <span class="Constant">0/quit</span> -<span id="L70" class="LineNr"> 70 </span> <span class="muControl">return</span> c, <span class="Constant">1/found</span>, <span class="Constant">0/quit</span> +<span id="L70" class="LineNr"> 70 </span> <span class="muControl"> return</span> c, <span class="Constant">1/found</span>, <span class="Constant">0/quit</span> <span id="L71" class="LineNr"> 71 </span>] <span id="L72" class="LineNr"> 72 </span> <span id="L73" class="LineNr"> 73 </span><span class="muRecipe">def</span> <a href='084console.mu.html#L73'>send-keys-to-channel</a> <a href='084console.mu.html#L23'>console</a>:&:<a href='084console.mu.html#L23'>console</a>, chan:&:<a href='075channel.mu.html#L47'>sink</a>:char, <a href='081print.mu.html#L16'>screen</a>:&:<a href='081print.mu.html#L16'>screen</a><span class="muRecipe"> -> </span><a href='084console.mu.html#L23'>console</a>:&:<a href='084console.mu.html#L23'>console</a>, chan:&:<a href='075channel.mu.html#L47'>sink</a>:char, <a href='081print.mu.html#L16'>screen</a>:&:<a href='081print.mu.html#L16'>screen</a> [ @@ -141,7 +141,7 @@ if ('onhashchange' in window) { <span id="L80" class="LineNr"> 80 </span> <span class="Conceal">¦</span> assert c, <span class="Constant">[invalid <a href='084console.mu.html#L4'>event</a>, expected text]</span> <span id="L81" class="LineNr"> 81 </span> <span class="Conceal">¦</span> <a href='081print.mu.html#L16'>screen</a> <span class="Special"><-</span> print <a href='081print.mu.html#L16'>screen</a>, c <span id="L82" class="LineNr"> 82 </span> <span class="Conceal">¦</span> chan <span class="Special"><-</span> <a href='075channel.mu.html#L67'>write</a> chan, c -<span id="L83" class="LineNr"> 83 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L83" class="LineNr"> 83 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L84" class="LineNr"> 84 </span> <span class="Delimiter">}</span> <span id="L85" class="LineNr"> 85 </span> chan <span class="Special"><-</span> close chan <span id="L86" class="LineNr"> 86 </span>] @@ -153,7 +153,7 @@ if ('onhashchange' in window) { <span id="L92" class="LineNr"> 92 </span> <span class="Conceal">¦</span> _, found?:bool <span class="Special"><-</span> <a href='084console.mu.html#L35'>read-event</a> <a href='084console.mu.html#L23'>console</a> <span id="L93" class="LineNr"> 93 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> found? <span id="L94" class="LineNr"> 94 </span> <span class="Conceal">¦</span> switch -<span id="L95" class="LineNr"> 95 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L95" class="LineNr"> 95 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L96" class="LineNr"> 96 </span> <span class="Delimiter">}</span> <span id="L97" class="LineNr"> 97 </span>] <span id="L98" class="LineNr"> 98 </span> diff --git a/html/088file.mu.html b/html/088file.mu.html index 686127dc..dab16db6 100644 --- a/html/088file.mu.html +++ b/html/088file.mu.html @@ -87,7 +87,7 @@ if ('onhashchange' in window) { <span id="L26" class="LineNr"> 26 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> <a href='088file.mu.html#L11'>resources</a> <span id="L27" class="LineNr"> 27 </span> <span class="Conceal">¦</span> <span class="Comment"># fake file system</span> <span id="L28" class="LineNr"> 28 </span> <span class="Conceal">¦</span> contents, error? <span class="Special"><-</span> <a href='088file.mu.html#L53'>start-reading-from-fake-resource</a> <a href='088file.mu.html#L11'>resources</a>, filename -<span id="L29" class="LineNr"> 29 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L29" class="LineNr"> 29 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L30" class="LineNr"> 30 </span> <span class="Delimiter">}</span> <span id="L31" class="LineNr"> 31 </span> <span class="Comment"># real file system</span> <span id="L32" class="LineNr"> 32 </span> file:num <span class="Special"><-</span> $open-file-for-reading filename @@ -106,7 +106,7 @@ if ('onhashchange' in window) { <span id="L45" class="LineNr"> 45 </span> <span class="Conceal">¦</span> c:char, done?:bool, <a href='075channel.mu.html#L43'>source</a> <span class="Special"><-</span> read <a href='075channel.mu.html#L43'>source</a> <span id="L46" class="LineNr"> 46 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> done? <span id="L47" class="LineNr"> 47 </span> <span class="Conceal">¦</span> buf <span class="Special"><-</span> append buf, c -<span id="L48" class="LineNr"> 48 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L48" class="LineNr"> 48 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L49" class="LineNr"> 49 </span> <span class="Delimiter">}</span> <span id="L50" class="LineNr"> 50 </span> contents <span class="Special"><-</span> <a href='061text.mu.html#L338'>buffer-to-array</a> buf <span id="L51" class="LineNr"> 51 </span>] @@ -129,9 +129,9 @@ if ('onhashchange' in window) { <span id="L68" class="LineNr"> 68 </span> <span class="Conceal">¦</span> contents:&:<a href='075channel.mu.html#L43'>source</a>:char, <a href='075channel.mu.html#L47'>sink</a>:&:<a href='075channel.mu.html#L47'>sink</a>:char <span class="Special"><-</span> <a href='075channel.mu.html#L51'>new-channel</a><span class="Constant"> 30</span> <span id="L69" class="LineNr"> 69 </span> <span class="Conceal">¦</span> curr-contents:text <span class="Special"><-</span> get tmp, <span class="Constant">contents:offset</span> <span id="L70" class="LineNr"> 70 </span> <span class="Conceal">¦</span> <span class="muControl">start-running</span> <a href='088file.mu.html#L89'>receive-from-text</a> curr-contents, <a href='075channel.mu.html#L47'>sink</a> -<span id="L71" class="LineNr"> 71 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L71" class="LineNr"> 71 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L72" class="LineNr"> 72 </span> <span class="Delimiter">}</span> -<span id="L73" class="LineNr"> 73 </span> <span class="muControl">return</span> <span class="Constant">0/not-found</span>, <span class="Constant">1/error</span> +<span id="L73" class="LineNr"> 73 </span> <span class="muControl"> return</span> <span class="Constant">0/not-found</span>, <span class="Constant">1/error</span> <span id="L74" class="LineNr"> 74 </span>] <span id="L75" class="LineNr"> 75 </span> <span id="L76" class="LineNr"> 76 </span><span class="muRecipe">def</span> <a href='088file.mu.html#L76'>receive-from-file</a> file:num, <a href='075channel.mu.html#L47'>sink</a>:&:<a href='075channel.mu.html#L47'>sink</a>:char<span class="muRecipe"> -> </span><a href='075channel.mu.html#L47'>sink</a>:&:<a href='075channel.mu.html#L47'>sink</a>:char [ @@ -141,7 +141,7 @@ if ('onhashchange' in window) { <span id="L80" class="LineNr"> 80 </span> <span class="Conceal">¦</span> c:char, eof?:bool <span class="Special"><-</span> $read-from-file file <span id="L81" class="LineNr"> 81 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> eof? <span id="L82" class="LineNr"> 82 </span> <span class="Conceal">¦</span> <a href='075channel.mu.html#L47'>sink</a> <span class="Special"><-</span> <a href='075channel.mu.html#L67'>write</a> <a href='075channel.mu.html#L47'>sink</a>, c -<span id="L83" class="LineNr"> 83 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L83" class="LineNr"> 83 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L84" class="LineNr"> 84 </span> <span class="Delimiter">}</span> <span id="L85" class="LineNr"> 85 </span> <a href='075channel.mu.html#L47'>sink</a> <span class="Special"><-</span> close <a href='075channel.mu.html#L47'>sink</a> <span id="L86" class="LineNr"> 86 </span> file <span class="Special"><-</span> $close-file file @@ -158,7 +158,7 @@ if ('onhashchange' in window) { <span id="L97" class="LineNr"> 97 </span> <span class="Conceal">¦</span> c:char <span class="Special"><-</span> index *contents, i <span id="L98" class="LineNr"> 98 </span> <span class="Conceal">¦</span> <a href='075channel.mu.html#L47'>sink</a> <span class="Special"><-</span> <a href='075channel.mu.html#L67'>write</a> <a href='075channel.mu.html#L47'>sink</a>, c <span id="L99" class="LineNr"> 99 </span> <span class="Conceal">¦</span> i <span class="Special"><-</span> add i,<span class="Constant"> 1</span> -<span id="L100" class="LineNr">100 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L100" class="LineNr">100 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L101" class="LineNr">101 </span> <span class="Delimiter">}</span> <span id="L102" class="LineNr">102 </span> <a href='075channel.mu.html#L47'>sink</a> <span class="Special"><-</span> close <a href='075channel.mu.html#L47'>sink</a> <span id="L103" class="LineNr">103 </span>] @@ -172,7 +172,7 @@ if ('onhashchange' in window) { <span id="L111" class="LineNr">111 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> <a href='088file.mu.html#L11'>resources</a> <span id="L112" class="LineNr">112 </span> <span class="Conceal">¦</span> <span class="Comment"># fake file system</span> <span id="L113" class="LineNr">113 </span> <span class="Conceal">¦</span> routine-id <span class="Special"><-</span> <span class="muControl">start-running</span> <a href='088file.mu.html#L162'>transmit-to-fake-resource</a> <a href='088file.mu.html#L11'>resources</a>, filename, <a href='075channel.mu.html#L43'>source</a> -<span id="L114" class="LineNr">114 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L114" class="LineNr">114 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L115" class="LineNr">115 </span> <span class="Delimiter">}</span> <span id="L116" class="LineNr">116 </span> <span class="Comment"># real file system</span> <span id="L117" class="LineNr">117 </span> file:num <span class="Special"><-</span> $open-file-for-writing filename @@ -200,7 +200,7 @@ if ('onhashchange' in window) { <span id="L139" class="LineNr">139 </span> <span class="Conceal">¦</span> c:char <span class="Special"><-</span> index *contents, i <span id="L140" class="LineNr">140 </span> <span class="Conceal">¦</span> sink-file <span class="Special"><-</span> <a href='075channel.mu.html#L67'>write</a> sink-file, c <span id="L141" class="LineNr">141 </span> <span class="Conceal">¦</span> i <span class="Special"><-</span> add i,<span class="Constant"> 1</span> -<span id="L142" class="LineNr">142 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L142" class="LineNr">142 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L143" class="LineNr">143 </span> <span class="Delimiter">}</span> <span id="L144" class="LineNr">144 </span> close sink-file <span id="L145" class="LineNr">145 </span> <span class="Comment"># make sure to wait for the file to be actually written to disk</span> @@ -215,7 +215,7 @@ if ('onhashchange' in window) { <span id="L154" class="LineNr">154 </span> <span class="Conceal">¦</span> c:char, done?:bool, <a href='075channel.mu.html#L43'>source</a> <span class="Special"><-</span> read <a href='075channel.mu.html#L43'>source</a> <span id="L155" class="LineNr">155 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> done? <span id="L156" class="LineNr">156 </span> <span class="Conceal">¦</span> $write-to-file file, c -<span id="L157" class="LineNr">157 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L157" class="LineNr">157 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L158" class="LineNr">158 </span> <span class="Delimiter">}</span> <span id="L159" class="LineNr">159 </span> file <span class="Special"><-</span> $close-file file <span id="L160" class="LineNr">160 </span>] @@ -231,7 +231,7 @@ if ('onhashchange' in window) { <span id="L170" class="LineNr">170 </span> <span class="Conceal">¦</span> c:char, done?:bool, <a href='075channel.mu.html#L43'>source</a> <span class="Special"><-</span> read <a href='075channel.mu.html#L43'>source</a> <span id="L171" class="LineNr">171 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> done? <span id="L172" class="LineNr">172 </span> <span class="Conceal">¦</span> buf <span class="Special"><-</span> append buf, c -<span id="L173" class="LineNr">173 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L173" class="LineNr">173 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L174" class="LineNr">174 </span> <span class="Delimiter">}</span> <span id="L175" class="LineNr">175 </span> contents:text <span class="Special"><-</span> <a href='061text.mu.html#L338'>buffer-to-array</a> buf <span id="L176" class="LineNr">176 </span> new-resource:<a href='088file.mu.html#L16'>resource</a> <span class="Special"><-</span> merge filename, contents @@ -250,10 +250,10 @@ if ('onhashchange' in window) { <span id="L189" class="LineNr">189 </span> <span class="Conceal">¦</span> <span class="Delimiter">{</span> <span id="L190" class="LineNr">190 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> found? <span id="L191" class="LineNr">191 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> put-index *data, i, new-resource -<span id="L192" class="LineNr">192 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">jump</span> <span class="Constant">+unlock-and-exit</span> +<span id="L192" class="LineNr">192 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> jump</span> <span class="Constant">+unlock-and-exit</span> <span id="L193" class="LineNr">193 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L194" class="LineNr">194 </span> <span class="Conceal">¦</span> i <span class="Special"><-</span> add i,<span class="Constant"> 1</span> -<span id="L195" class="LineNr">195 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L195" class="LineNr">195 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L196" class="LineNr">196 </span> <span class="Delimiter">}</span> <span id="L197" class="LineNr">197 </span> <span class="Comment"># if file didn't already exist, make room for it</span> <span id="L198" class="LineNr">198 </span> new-len:num <span class="Special"><-</span> add len,<span class="Constant"> 1</span> diff --git a/html/092socket.mu.html b/html/092socket.mu.html index b26e42b7..7b49de34 100644 --- a/html/092socket.mu.html +++ b/html/092socket.mu.html @@ -88,7 +88,7 @@ if ('onhashchange' in window) { <span id="L26" class="LineNr"> 26 </span><span class="muRecipe">def</span> <a href='092socket.mu.html#L26'>example-handler</a> query:text<span class="muRecipe"> -> </span>response:text [ <span id="L27" class="LineNr"> 27 </span> <span class="Constant">local-scope</span> <span id="L28" class="LineNr"> 28 </span> <span class="Constant">load-inputs</span> -<span id="L29" class="LineNr"> 29 </span> <span class="muControl">return</span> <span class="Constant">[abc]</span> +<span id="L29" class="LineNr"> 29 </span> <span class="muControl"> return</span> <span class="Constant">[abc]</span> <span id="L30" class="LineNr"> 30 </span>] <span id="L31" class="LineNr"> 31 </span> <span id="L32" class="LineNr"> 32 </span><span class="Comment"># To test client operations, use 'assume-resources' with a filename that</span> @@ -140,7 +140,7 @@ if ('onhashchange' in window) { <span id="L78" class="LineNr"> 78 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> <a href='088file.mu.html#L11'>resources</a> <span id="L79" class="LineNr"> 79 </span> <span class="Conceal">¦</span> <span class="Comment"># fake network</span> <span id="L80" class="LineNr"> 80 </span> <span class="Conceal">¦</span> contents <span class="Special"><-</span> <a href='088file.mu.html#L53'>start-reading-from-fake-resource</a> <a href='088file.mu.html#L11'>resources</a>, uri -<span id="L81" class="LineNr"> 81 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L81" class="LineNr"> 81 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L82" class="LineNr"> 82 </span> <span class="Delimiter">}</span> <span id="L83" class="LineNr"> 83 </span> <span class="Comment"># real network</span> <span id="L84" class="LineNr"> 84 </span> host:text, path:text <span class="Special"><-</span> <a href='092socket.mu.html#L148'>split-at</a> uri, <span class="Constant">47/slash</span> @@ -179,7 +179,7 @@ if ('onhashchange' in window) { <span id="L117" class="LineNr">117 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> found? <span id="L118" class="LineNr">118 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> switch <span id="L119" class="LineNr">119 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> -<span id="L120" class="LineNr">120 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L120" class="LineNr">120 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L121" class="LineNr">121 </span> <span class="Delimiter">}</span> <span id="L122" class="LineNr">122 </span> <a href='075channel.mu.html#L47'>sink</a> <span class="Special"><-</span> close <a href='075channel.mu.html#L47'>sink</a> <span id="L123" class="LineNr">123 </span>] @@ -202,7 +202,7 @@ if ('onhashchange' in window) { <span id="L140" class="LineNr">140 </span> <span class="Conceal">¦</span> c:char <span class="Special"><-</span> index *s, i <span id="L141" class="LineNr">141 </span> <span class="Conceal">¦</span> $write-to-socket socket, c <span id="L142" class="LineNr">142 </span> <span class="Conceal">¦</span> i <span class="Special"><-</span> add i,<span class="Constant"> 1</span> -<span id="L143" class="LineNr">143 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L143" class="LineNr">143 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L144" class="LineNr">144 </span> <span class="Delimiter">}</span> <span id="L145" class="LineNr">145 </span>] <span id="L146" class="LineNr">146 </span> @@ -217,7 +217,7 @@ if ('onhashchange' in window) { <span id="L155" class="LineNr">155 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> empty? <span id="L156" class="LineNr">156 </span> <span class="Conceal">¦</span> x:text <span class="Special"><-</span> new <span class="Constant">[]</span> <span id="L157" class="LineNr">157 </span> <span class="Conceal">¦</span> y:text <span class="Special"><-</span> new <span class="Constant">[]</span> -<span id="L158" class="LineNr">158 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L158" class="LineNr">158 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L159" class="LineNr">159 </span> <span class="Delimiter">}</span> <span id="L160" class="LineNr">160 </span> idx:num <span class="Special"><-</span> find-next text, delim,<span class="Constant"> 0</span> <span id="L161" class="LineNr">161 </span> x:text <span class="Special"><-</span> <a href='061text.mu.html#L1287'>copy-range</a> text,<span class="Constant"> 0</span>, idx diff --git a/html/channel.mu.html b/html/channel.mu.html index d3ce4953..4aad1713 100644 --- a/html/channel.mu.html +++ b/html/channel.mu.html @@ -74,7 +74,7 @@ if ('onhashchange' in window) { <span id="L14" class="LineNr">14 </span><span class="Constant">]</span> <span id="L15" class="LineNr">15 </span> <span class="Conceal">¦</span> <a href='075channel.mu.html#L47'>sink</a> <span class="Special"><-</span> <a href='075channel.mu.html#L67'>write</a> <a href='075channel.mu.html#L47'>sink</a>, n <span id="L16" class="LineNr">16 </span> <span class="Conceal">¦</span> n <span class="Special"><-</span> add n,<span class="Constant"> 1</span> -<span id="L17" class="LineNr">17 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L17" class="LineNr">17 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L18" class="LineNr">18 </span> <span class="Delimiter">}</span> <span id="L19" class="LineNr">19 </span> close <a href='075channel.mu.html#L47'>sink</a> <span id="L20" class="LineNr">20 </span>] @@ -90,7 +90,7 @@ if ('onhashchange' in window) { <span id="L30" class="LineNr">30 </span> <span class="Conceal">¦</span> <span class="Comment"># other threads might get between these prints</span> <span id="L31" class="LineNr">31 </span> <span class="Conceal">¦</span> $print <span class="Constant">[consume: ]</span>, n:char, <span class="Constant">[ </span> <span id="L32" class="LineNr">32 </span><span class="Constant">]</span> -<span id="L33" class="LineNr">33 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L33" class="LineNr">33 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L34" class="LineNr">34 </span> <span class="Delimiter">}</span> <span id="L35" class="LineNr">35 </span>] <span id="L36" class="LineNr">36 </span> diff --git a/html/chessboard.mu.html b/html/chessboard.mu.html index 3ad48a2d..34e6d9ee 100644 --- a/html/chessboard.mu.html +++ b/html/chessboard.mu.html @@ -161,7 +161,7 @@ if ('onhashchange' in window) { <span id="L97" class="LineNr"> 97 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L98" class="LineNr"> 98 </span> <span class="Conceal">¦</span> <a href='chessboard.mu.html#L67'>board</a> <span class="Special"><-</span> <a href='chessboard.mu.html#L524'>make-move</a> <a href='chessboard.mu.html#L67'>board</a>, m <span id="L99" class="LineNr"> 99 </span> <span class="Conceal">¦</span> <a href='081print.mu.html#L16'>screen</a> <span class="Special"><-</span> <a href='081print.mu.html#L46'>clear-screen</a> <a href='081print.mu.html#L16'>screen</a> -<span id="L100" class="LineNr">100 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L100" class="LineNr">100 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L101" class="LineNr">101 </span> <span class="Delimiter">}</span> <span id="L102" class="LineNr">102 </span><span class="Constant"> +quit</span> <span id="L103" class="LineNr">103 </span>] @@ -184,7 +184,7 @@ if ('onhashchange' in window) { <span id="L120" class="LineNr">120 </span> <span class="Conceal">¦</span> file:&:@:char <span class="Special"><-</span> <a href='chessboard.mu.html#L127'>new-file</a> <a href='chessboard.mu.html#L180'>initial-position</a>, col <span id="L121" class="LineNr">121 </span> <span class="Conceal">¦</span> *board <span class="Special"><-</span> put-index *board, col, file <span id="L122" class="LineNr">122 </span> <span class="Conceal">¦</span> col <span class="Special"><-</span> add col,<span class="Constant"> 1</span> -<span id="L123" class="LineNr">123 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L123" class="LineNr">123 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L124" class="LineNr">124 </span> <span class="Delimiter">}</span> <span id="L125" class="LineNr">125 </span>] <span id="L126" class="LineNr">126 </span> @@ -201,7 +201,7 @@ if ('onhashchange' in window) { <span id="L137" class="LineNr">137 </span> <span class="Conceal">¦</span> *result <span class="Special"><-</span> put-index *result, row, square <span id="L138" class="LineNr">138 </span> <span class="Conceal">¦</span> row <span class="Special"><-</span> add row,<span class="Constant"> 1</span> <span id="L139" class="LineNr">139 </span> <span class="Conceal">¦</span> index <span class="Special"><-</span> add index,<span class="Constant"> 1</span> -<span id="L140" class="LineNr">140 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L140" class="LineNr">140 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L141" class="LineNr">141 </span> <span class="Delimiter">}</span> <span id="L142" class="LineNr">142 </span>] <span id="L143" class="LineNr">143 </span> @@ -228,11 +228,11 @@ if ('onhashchange' in window) { <span id="L164" class="LineNr">164 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> print <a href='081print.mu.html#L16'>screen</a>, c <span id="L165" class="LineNr">165 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> print <a href='081print.mu.html#L16'>screen</a>, space <span id="L166" class="LineNr">166 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> col <span class="Special"><-</span> add col,<span class="Constant"> 1</span> -<span id="L167" class="LineNr">167 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L167" class="LineNr">167 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L168" class="LineNr">168 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L169" class="LineNr">169 </span> <span class="Conceal">¦</span> row <span class="Special"><-</span> subtract row,<span class="Constant"> 1</span> <span id="L170" class="LineNr">170 </span> <span class="Conceal">¦</span> <a href='081print.mu.html#L752'>cursor-to-next-line</a> <a href='081print.mu.html#L16'>screen</a> -<span id="L171" class="LineNr">171 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L171" class="LineNr">171 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L172" class="LineNr">172 </span> <span class="Delimiter">}</span> <span id="L173" class="LineNr">173 </span> <span class="Comment"># print file letters as legend</span> <span id="L174" class="LineNr">174 </span> print <a href='081print.mu.html#L16'>screen</a>, <span class="Constant">[ +----------------]</span> @@ -342,7 +342,7 @@ if ('onhashchange' in window) { <span id="L278" class="LineNr">278 </span> <span class="Conceal">¦</span> newline?:bool <span class="Special"><-</span> equal c, <span class="Constant">10/newline</span> <span id="L279" class="LineNr">279 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> newline? <span id="L280" class="LineNr">280 </span> <span class="Conceal">¦</span> print <a href='081print.mu.html#L16'>screen</a>, <span class="Constant">[that's not enough]</span> -<span id="L281" class="LineNr">281 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">0/dummy</span>, <span class="Constant">0/quit</span>, <span class="Constant">1/error</span> +<span id="L281" class="LineNr">281 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">0/dummy</span>, <span class="Constant">0/quit</span>, <span class="Constant">1/error</span> <span id="L282" class="LineNr">282 </span> <span class="Delimiter">}</span> <span id="L283" class="LineNr">283 </span> file:num <span class="Special"><-</span> subtract c, <span class="Constant">97/a</span> <span id="L284" class="LineNr">284 </span> <span class="Comment"># 'a' <= file <= 'h'</span> @@ -352,16 +352,16 @@ if ('onhashchange' in window) { <span id="L288" class="LineNr">288 </span> <span class="Conceal">¦</span> print <a href='081print.mu.html#L16'>screen</a>, <span class="Constant">[file too low: ]</span> <span id="L289" class="LineNr">289 </span> <span class="Conceal">¦</span> print <a href='081print.mu.html#L16'>screen</a>, c <span id="L290" class="LineNr">290 </span> <span class="Conceal">¦</span> <a href='081print.mu.html#L752'>cursor-to-next-line</a> <a href='081print.mu.html#L16'>screen</a> -<span id="L291" class="LineNr">291 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">0/dummy</span>, <span class="Constant">0/quit</span>, <span class="Constant">1/error</span> +<span id="L291" class="LineNr">291 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">0/dummy</span>, <span class="Constant">0/quit</span>, <span class="Constant">1/error</span> <span id="L292" class="LineNr">292 </span> <span class="Delimiter">}</span> <span id="L293" class="LineNr">293 </span> <span class="Delimiter">{</span> <span id="L294" class="LineNr">294 </span> <span class="Conceal">¦</span> below-max:bool <span class="Special"><-</span> lesser-than file,<span class="Constant"> 8</span> <span id="L295" class="LineNr">295 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> below-max <span id="L296" class="LineNr">296 </span> <span class="Conceal">¦</span> print <a href='081print.mu.html#L16'>screen</a>, <span class="Constant">[file too high: ]</span> <span id="L297" class="LineNr">297 </span> <span class="Conceal">¦</span> print <a href='081print.mu.html#L16'>screen</a>, c -<span id="L298" class="LineNr">298 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">0/dummy</span>, <span class="Constant">0/quit</span>, <span class="Constant">1/error</span> +<span id="L298" class="LineNr">298 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">0/dummy</span>, <span class="Constant">0/quit</span>, <span class="Constant">1/error</span> <span id="L299" class="LineNr">299 </span> <span class="Delimiter">}</span> -<span id="L300" class="LineNr">300 </span> <span class="muControl">return</span> file, <span class="Constant">0/quit</span>, <span class="Constant">0/error</span> +<span id="L300" class="LineNr">300 </span> <span class="muControl"> return</span> file, <span class="Constant">0/quit</span>, <span class="Constant">0/error</span> <span id="L301" class="LineNr">301 </span>] <span id="L302" class="LineNr">302 </span> <span id="L303" class="LineNr">303 </span><span class="Comment"># valid values for rank: 0-7</span> @@ -380,7 +380,7 @@ if ('onhashchange' in window) { <span id="L316" class="LineNr">316 </span> <span class="Conceal">¦</span> newline?:bool <span class="Special"><-</span> equal c,<span class="Constant"> 10</span> <span class="Comment"># newline</span> <span id="L317" class="LineNr">317 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> newline? <span id="L318" class="LineNr">318 </span> <span class="Conceal">¦</span> print <a href='081print.mu.html#L16'>screen</a>, <span class="Constant">[that's not enough]</span> -<span id="L319" class="LineNr">319 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">0/dummy</span>, <span class="Constant">0/quit</span>, <span class="Constant">1/error</span> +<span id="L319" class="LineNr">319 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">0/dummy</span>, <span class="Constant">0/quit</span>, <span class="Constant">1/error</span> <span id="L320" class="LineNr">320 </span> <span class="Delimiter">}</span> <span id="L321" class="LineNr">321 </span> rank:num <span class="Special"><-</span> subtract c, <span class="Constant">49/'1'</span> <span id="L322" class="LineNr">322 </span> <span class="Comment"># assert'1' <= rank <= '8'</span> @@ -389,16 +389,16 @@ if ('onhashchange' in window) { <span id="L325" class="LineNr">325 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> above-min <span id="L326" class="LineNr">326 </span> <span class="Conceal">¦</span> print <a href='081print.mu.html#L16'>screen</a>, <span class="Constant">[rank too low: ]</span> <span id="L327" class="LineNr">327 </span> <span class="Conceal">¦</span> print <a href='081print.mu.html#L16'>screen</a>, c -<span id="L328" class="LineNr">328 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">0/dummy</span>, <span class="Constant">0/quit</span>, <span class="Constant">1/error</span> +<span id="L328" class="LineNr">328 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">0/dummy</span>, <span class="Constant">0/quit</span>, <span class="Constant">1/error</span> <span id="L329" class="LineNr">329 </span> <span class="Delimiter">}</span> <span id="L330" class="LineNr">330 </span> <span class="Delimiter">{</span> <span id="L331" class="LineNr">331 </span> <span class="Conceal">¦</span> below-max:bool <span class="Special"><-</span> lesser-or-equal rank,<span class="Constant"> 7</span> <span id="L332" class="LineNr">332 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> below-max <span id="L333" class="LineNr">333 </span> <span class="Conceal">¦</span> print <a href='081print.mu.html#L16'>screen</a>, <span class="Constant">[rank too high: ]</span> <span id="L334" class="LineNr">334 </span> <span class="Conceal">¦</span> print <a href='081print.mu.html#L16'>screen</a>, c -<span id="L335" class="LineNr">335 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">0/dummy</span>, <span class="Constant">0/quit</span>, <span class="Constant">1/error</span> +<span id="L335" class="LineNr">335 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">0/dummy</span>, <span class="Constant">0/quit</span>, <span class="Constant">1/error</span> <span id="L336" class="LineNr">336 </span> <span class="Delimiter">}</span> -<span id="L337" class="LineNr">337 </span> <span class="muControl">return</span> rank, <span class="Constant">0/quit</span>, <span class="Constant">0/error</span> +<span id="L337" class="LineNr">337 </span> <span class="muControl"> return</span> rank, <span class="Constant">0/quit</span>, <span class="Constant">0/error</span> <span id="L338" class="LineNr">338 </span>] <span id="L339" class="LineNr">339 </span> <span id="L340" class="LineNr">340 </span><span class="Comment"># read a character from the given channel and check that it's what we expect</span> diff --git a/html/console.mu.html b/html/console.mu.html index 5b6682c1..97304cc9 100644 --- a/html/console.mu.html +++ b/html/console.mu.html @@ -69,7 +69,7 @@ if ('onhashchange' in window) { <span id="L9" class="LineNr"> 9 </span> <span class="Conceal">¦</span> e:<a href='084console.mu.html#L4'>event</a>, found?:bool <span class="Special"><-</span> check-for-interaction <span id="L10" class="LineNr">10 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> found? <span id="L11" class="LineNr">11 </span> <span class="Conceal">¦</span> print-character-to-display<span class="Constant"> 97</span>, <span class="Constant">7/white</span> -<span id="L12" class="LineNr">12 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L12" class="LineNr">12 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L13" class="LineNr">13 </span> <span class="Delimiter">}</span> <span id="L14" class="LineNr">14 </span> close-console <span id="L15" class="LineNr">15 </span> $print e, <span class="Constant">10/newline</span> diff --git a/html/continuation1.mu.html b/html/continuation1.mu.html index 0d652ffd..7eeca335 100644 --- a/html/continuation1.mu.html +++ b/html/continuation1.mu.html @@ -79,7 +79,7 @@ if ('onhashchange' in window) { <span id="L21" class="LineNr">21 </span> <span class="Constant">local-scope</span> <span id="L22" class="LineNr">22 </span> <span class="Constant">load-inputs</span> <span id="L23" class="LineNr">23 </span> <span class="muControl">return-continuation-until-mark</span> <span class="Constant">100/mark</span> -<span id="L24" class="LineNr">24 </span> <span class="muControl">return</span><span class="Constant"> 1</span> +<span id="L24" class="LineNr">24 </span> <span class="muControl"> return</span><span class="Constant"> 1</span> <span id="L25" class="LineNr">25 </span>] </pre> </body> diff --git a/html/continuation2.mu.html b/html/continuation2.mu.html index 7746bca0..997c54bc 100644 --- a/html/continuation2.mu.html +++ b/html/continuation2.mu.html @@ -82,7 +82,7 @@ if ('onhashchange' in window) { <span id="L22" class="LineNr">22 </span> <span class="Conceal">¦</span> x:num, done?:bool <span class="Special"><-</span> call k <span id="L23" class="LineNr">23 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> done? <span id="L24" class="LineNr">24 </span> <span class="Conceal">¦</span> $print x <span class="Constant">10/newline</span> -<span id="L25" class="LineNr">25 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L25" class="LineNr">25 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L26" class="LineNr">26 </span> <span class="Delimiter">}</span> <span id="L27" class="LineNr">27 </span>] <span id="L28" class="LineNr">28 </span> diff --git a/html/continuation4.mu.html b/html/continuation4.mu.html index 7e62e661..ecb81b8a 100644 --- a/html/continuation4.mu.html +++ b/html/continuation4.mu.html @@ -84,7 +84,7 @@ if ('onhashchange' in window) { <span id="L24" class="LineNr">24 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> done? <span id="L25" class="LineNr">25 </span> <span class="Conceal">¦</span> $print x <span class="Constant">10/newline</span> <span id="L26" class="LineNr">26 </span> <span class="Conceal">¦</span> k, x:num, done?:bool <span class="Special"><-</span> call k -<span id="L27" class="LineNr">27 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L27" class="LineNr">27 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L28" class="LineNr">28 </span> <span class="Delimiter">}</span> <span id="L29" class="LineNr">29 </span>] <span id="L30" class="LineNr">30 </span> @@ -97,7 +97,7 @@ if ('onhashchange' in window) { <span id="L37" class="LineNr">37 </span> <span class="Conceal">¦</span> n <span class="Special"><-</span> first l <span id="L38" class="LineNr">38 </span> <span class="Conceal">¦</span> l <span class="Special"><-</span> <a href='064list.mu.html#L24'>rest</a> l <span id="L39" class="LineNr">39 </span> <span class="Conceal">¦</span> <span class="muControl">return-continuation-until-mark</span> <span class="Constant">100/mark</span>, n, done? -<span id="L40" class="LineNr">40 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L40" class="LineNr">40 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L41" class="LineNr">41 </span> <span class="Delimiter">}</span> <span id="L42" class="LineNr">42 </span> <span class="Comment"># A function that returns continuations shouldn't get the opportunity to</span> <span id="L43" class="LineNr">43 </span> <span class="Comment"># return. Calling functions should stop calling its continuation after this</span> diff --git a/html/continuation5.mu.html b/html/continuation5.mu.html index b0b45a3b..27da4fff 100644 --- a/html/continuation5.mu.html +++ b/html/continuation5.mu.html @@ -87,7 +87,7 @@ if ('onhashchange' in window) { <span id="L27" class="LineNr">27 </span> <span class="Conceal">¦</span> $print x <span class="Constant">10/newline</span> <span id="L28" class="LineNr">28 </span> <span class="Conceal">¦</span> k, x:num, done?:bool <span class="Special"><-</span> call k, a <span class="Comment"># resume; x = a + next l value</span> <span id="L29" class="LineNr">29 </span> <span class="Conceal">¦</span> a <span class="Special"><-</span> add a,<span class="Constant"> 1</span> -<span id="L30" class="LineNr">30 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L30" class="LineNr">30 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L31" class="LineNr">31 </span> <span class="Delimiter">}</span> <span id="L32" class="LineNr">32 </span>] <span id="L33" class="LineNr">33 </span> @@ -102,7 +102,7 @@ if ('onhashchange' in window) { <span id="L42" class="LineNr">42 </span> <span class="Conceal">¦</span> l <span class="Special"><-</span> <a href='064list.mu.html#L24'>rest</a> l <span id="L43" class="LineNr">43 </span> <span class="Conceal">¦</span> n <span class="Special"><-</span> add n, a <span id="L44" class="LineNr">44 </span> <span class="Conceal">¦</span> a <span class="Special"><-</span> <span class="muControl">return-continuation-until-mark</span> <span class="Constant">100/mark</span>, n, done? <span class="Comment"># pause/resume</span> -<span id="L45" class="LineNr">45 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L45" class="LineNr">45 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L46" class="LineNr">46 </span> <span class="Delimiter">}</span> <span id="L47" class="LineNr">47 </span> <span class="muControl">return-continuation-until-mark</span> <span class="Constant">100/mark</span>,<span class="Constant"> -1</span>, done? <span id="L48" class="LineNr">48 </span> assert <span class="Constant">0/false</span>, <span class="Constant">[called too many times, ran out of continuations to return]</span> diff --git a/html/edit/001-editor.mu.html b/html/edit/001-editor.mu.html index 73ae7ae3..ae537bc5 100644 --- a/html/edit/001-editor.mu.html +++ b/html/edit/001-editor.mu.html @@ -225,7 +225,7 @@ if ('onhashchange' in window) { <span id="L161" class="LineNr">161 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> move-cursor <a href='../081print.mu.html#L16'>screen</a>, row, column <span id="L162" class="LineNr">162 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> curr <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L25'>next</a> curr <span id="L163" class="LineNr">163 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='../065duplex_list.mu.html#L32'>prev</a> <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L25'>next</a> <a href='../065duplex_list.mu.html#L32'>prev</a> -<span id="L164" class="LineNr">164 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">loop</span> <span class="Constant">+next-character</span> +<span id="L164" class="LineNr">164 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span class="Constant">+next-character</span> <span id="L165" class="LineNr">165 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L166" class="LineNr">166 </span> <span class="Conceal">¦</span> <span class="Delimiter">{</span> <span id="L167" class="LineNr">167 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Comment"># at right? wrap. even if there's only one more letter left; we need</span> @@ -239,13 +239,13 @@ if ('onhashchange' in window) { <span id="L175" class="LineNr">175 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> row <span class="Special"><-</span> add row,<span class="Constant"> 1</span> <span id="L176" class="LineNr">176 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> move-cursor <a href='../081print.mu.html#L16'>screen</a>, row, column <span id="L177" class="LineNr">177 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Comment"># don't increment curr</span> -<span id="L178" class="LineNr">178 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">loop</span> <span class="Constant">+next-character</span> +<span id="L178" class="LineNr">178 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span class="Constant">+next-character</span> <span id="L179" class="LineNr">179 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L180" class="LineNr">180 </span> <span class="Conceal">¦</span> print <a href='../081print.mu.html#L16'>screen</a>, c, color <span id="L181" class="LineNr">181 </span> <span class="Conceal">¦</span> curr <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L25'>next</a> curr <span id="L182" class="LineNr">182 </span> <span class="Conceal">¦</span> <a href='../065duplex_list.mu.html#L32'>prev</a> <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L25'>next</a> <a href='../065duplex_list.mu.html#L32'>prev</a> <span id="L183" class="LineNr">183 </span> <span class="Conceal">¦</span> column <span class="Special"><-</span> add column,<span class="Constant"> 1</span> -<span id="L184" class="LineNr">184 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L184" class="LineNr">184 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L185" class="LineNr">185 </span> <span class="Delimiter">}</span> <span id="L186" class="LineNr">186 </span> <span class="Comment"># save first character off-screen</span> <span id="L187" class="LineNr">187 </span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">bottom-of-screen:offset</span>, curr @@ -265,7 +265,7 @@ if ('onhashchange' in window) { <span id="L201" class="LineNr">201 </span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-row:offset</span>, cursor-row <span id="L202" class="LineNr">202 </span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-column:offset</span>, cursor-column <span id="L203" class="LineNr">203 </span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">before-cursor:offset</span>, before-cursor -<span id="L204" class="LineNr">204 </span> <span class="muControl">return</span> row, column +<span id="L204" class="LineNr">204 </span> <span class="muControl"> return</span> row, column <span id="L205" class="LineNr">205 </span>] <span id="L206" class="LineNr">206 </span> <span id="L207" class="LineNr">207 </span><span class="muRecipe">def</span> <a href='001-editor.mu.html#L207'>clear-screen-from</a> <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a>, row:num, column:num, left:num, right:num<span class="muRecipe"> -> </span><a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a> [ @@ -276,7 +276,7 @@ if ('onhashchange' in window) { <span id="L212" class="LineNr">212 </span> <span class="Delimiter">{</span> <span id="L213" class="LineNr">213 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> <a href='../081print.mu.html#L16'>screen</a> <span id="L214" class="LineNr">214 </span> <span class="Conceal">¦</span> clear-display-from row, column, left, right -<span id="L215" class="LineNr">215 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L215" class="LineNr">215 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L216" class="LineNr">216 </span> <span class="Delimiter">}</span> <span id="L217" class="LineNr">217 </span> <span class="Comment"># if not, go the slower route</span> <span id="L218" class="LineNr">218 </span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> move-cursor <a href='../081print.mu.html#L16'>screen</a>, row, column @@ -292,7 +292,7 @@ if ('onhashchange' in window) { <span id="L228" class="LineNr">228 </span> <span class="Delimiter">{</span> <span id="L229" class="LineNr">229 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> <a href='../081print.mu.html#L16'>screen</a> <span id="L230" class="LineNr">230 </span> <span class="Conceal">¦</span> clear-display-from row, left, left, right -<span id="L231" class="LineNr">231 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L231" class="LineNr">231 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L232" class="LineNr">232 </span> <span class="Delimiter">}</span> <span id="L233" class="LineNr">233 </span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> move-cursor <a href='../081print.mu.html#L16'>screen</a>, row, left <span id="L234" class="LineNr">234 </span> <a href='../081print.mu.html#L782'>screen-height</a>:num <span class="Special"><-</span> <a href='../081print.mu.html#L782'>screen-height</a> <a href='../081print.mu.html#L16'>screen</a> @@ -302,7 +302,7 @@ if ('onhashchange' in window) { <span id="L238" class="LineNr">238 </span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> move-cursor <a href='../081print.mu.html#L16'>screen</a>, row, left <span id="L239" class="LineNr">239 </span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L553'>clear-line-until</a> <a href='../081print.mu.html#L16'>screen</a>, right <span id="L240" class="LineNr">240 </span> <span class="Conceal">¦</span> row <span class="Special"><-</span> add row,<span class="Constant"> 1</span> -<span id="L241" class="LineNr">241 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L241" class="LineNr">241 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L242" class="LineNr">242 </span> <span class="Delimiter">}</span> <span id="L243" class="LineNr">243 </span>] <span id="L244" class="LineNr">244 </span> @@ -468,7 +468,7 @@ if ('onhashchange' in window) { <span id="L404" class="LineNr">404 </span> <span class="Conceal">¦</span> starting-comment?:bool <span class="Special"><-</span> equal c, <span class="Constant">35/#</span> <span id="L405" class="LineNr">405 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> starting-comment? <span id="L406" class="LineNr">406 </span> <span class="Conceal">¦</span> trace<span class="Constant"> 90</span>, <span class="Constant">[app]</span>, <span class="Constant">[switch color back to blue]</span> -<span id="L407" class="LineNr">407 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">12/lightblue</span> +<span id="L407" class="LineNr">407 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">12/lightblue</span> <span id="L408" class="LineNr">408 </span> <span class="Delimiter">}</span> <span id="L409" class="LineNr">409 </span> <span class="Comment"># if color is blue and next character is newline, switch color to white</span> <span id="L410" class="LineNr">410 </span> <span class="Delimiter">{</span> @@ -477,14 +477,14 @@ if ('onhashchange' in window) { <span id="L413" class="LineNr">413 </span> <span class="Conceal">¦</span> ending-comment?:bool <span class="Special"><-</span> equal c, <span class="Constant">10/newline</span> <span id="L414" class="LineNr">414 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> ending-comment? <span id="L415" class="LineNr">415 </span> <span class="Conceal">¦</span> trace<span class="Constant"> 90</span>, <span class="Constant">[app]</span>, <span class="Constant">[switch color back to white]</span> -<span id="L416" class="LineNr">416 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">7/white</span> +<span id="L416" class="LineNr">416 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">7/white</span> <span id="L417" class="LineNr">417 </span> <span class="Delimiter">}</span> <span id="L418" class="LineNr">418 </span> <span class="Comment"># if color is white (no comments) and next character is '<', switch color to red</span> <span id="L419" class="LineNr">419 </span> <span class="Delimiter">{</span> <span id="L420" class="LineNr">420 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> color-is-white? <span id="L421" class="LineNr">421 </span> <span class="Conceal">¦</span> starting-assignment?:bool <span class="Special"><-</span> equal c, <span class="Constant">60/<</span> <span id="L422" class="LineNr">422 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> starting-assignment? -<span id="L423" class="LineNr">423 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">1/red</span> +<span id="L423" class="LineNr">423 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">1/red</span> <span id="L424" class="LineNr">424 </span> <span class="Delimiter">}</span> <span id="L425" class="LineNr">425 </span> <span class="Comment"># if color is red and next character is space, switch color to white</span> <span id="L426" class="LineNr">426 </span> <span class="Delimiter">{</span> @@ -492,10 +492,10 @@ if ('onhashchange' in window) { <span id="L428" class="LineNr">428 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> color-is-red? <span id="L429" class="LineNr">429 </span> <span class="Conceal">¦</span> ending-assignment?:bool <span class="Special"><-</span> equal c, <span class="Constant">32/space</span> <span id="L430" class="LineNr">430 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> ending-assignment? -<span id="L431" class="LineNr">431 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">7/white</span> +<span id="L431" class="LineNr">431 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">7/white</span> <span id="L432" class="LineNr">432 </span> <span class="Delimiter">}</span> <span id="L433" class="LineNr">433 </span> <span class="Comment"># otherwise no change</span> -<span id="L434" class="LineNr">434 </span> <span class="muControl">return</span> color +<span id="L434" class="LineNr">434 </span> <span class="muControl"> return</span> color <span id="L435" class="LineNr">435 </span>] <span id="L436" class="LineNr">436 </span> <span id="L437" class="LineNr">437 </span><span class="muScenario">scenario</span> render-colors-assignment [ diff --git a/html/edit/002-typing.mu.html b/html/edit/002-typing.mu.html index e05555a2..477bee1d 100644 --- a/html/edit/002-typing.mu.html +++ b/html/edit/002-typing.mu.html @@ -94,7 +94,7 @@ if ('onhashchange' in window) { <span id="L31" class="LineNr"> 31 </span> <span class="Conceal">¦</span> <span class="Delimiter">{</span> <span id="L32" class="LineNr"> 32 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> is-touch? <span id="L33" class="LineNr"> 33 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> move-cursor editor, <a href='../081print.mu.html#L16'>screen</a>, t -<span id="L34" class="LineNr"> 34 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">loop</span> <span class="Constant">+next-event</span> +<span id="L34" class="LineNr"> 34 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span class="Constant">+next-event</span> <span id="L35" class="LineNr"> 35 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L36" class="LineNr"> 36 </span> <span class="Conceal">¦</span> <span class="Comment"># keyboard events</span> <span id="L37" class="LineNr"> 37 </span> <span class="Conceal">¦</span> <span class="Delimiter">{</span> @@ -105,7 +105,7 @@ if ('onhashchange' in window) { <span id="L42" class="LineNr"> 42 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> <a href='002-typing.mu.html#L265'>editor-render</a> <a href='../081print.mu.html#L16'>screen</a>, editor <span id="L43" class="LineNr"> 43 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L44" class="LineNr"> 44 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> -<span id="L45" class="LineNr"> 45 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L45" class="LineNr"> 45 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L46" class="LineNr"> 46 </span> <span class="Delimiter">}</span> <span id="L47" class="LineNr"> 47 </span>] <span id="L48" class="LineNr"> 48 </span> @@ -129,7 +129,7 @@ if ('onhashchange' in window) { <span id="L66" class="LineNr"> 66 </span> undo-coalesce-tag:num <span class="Special"><-</span> copy <span class="Constant">0/never</span> <span id="L67" class="LineNr"> 67 </span><span class="Constant"> <end-move-cursor></span> <span id="L68" class="LineNr"> 68 </span> <span class="Comment"># gain focus</span> -<span id="L69" class="LineNr"> 69 </span> <span class="muControl">return</span> <span class="Constant">1/true</span> +<span id="L69" class="LineNr"> 69 </span> <span class="muControl"> return</span> <span class="Constant">1/true</span> <span id="L70" class="LineNr"> 70 </span>] <span id="L71" class="LineNr"> 71 </span> <span id="L72" class="LineNr"> 72 </span><span class="Comment"># Variant of 'render' that only moves the cursor (coordinates and</span> @@ -190,7 +190,7 @@ if ('onhashchange' in window) { <span id="L127" class="LineNr"> 127 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> column <span class="Special"><-</span> copy left <span id="L128" class="LineNr"> 128 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> curr <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L25'>next</a> curr <span id="L129" class="LineNr"> 129 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='../065duplex_list.mu.html#L32'>prev</a> <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L25'>next</a> <a href='../065duplex_list.mu.html#L32'>prev</a> -<span id="L130" class="LineNr"> 130 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">loop</span> <span class="Constant">+next-character</span> +<span id="L130" class="LineNr"> 130 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span class="Constant">+next-character</span> <span id="L131" class="LineNr"> 131 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L132" class="LineNr"> 132 </span> <span class="Conceal">¦</span> <span class="Delimiter">{</span> <span id="L133" class="LineNr"> 133 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Comment"># at right? wrap. even if there's only one more letter left; we need</span> @@ -200,12 +200,12 @@ if ('onhashchange' in window) { <span id="L137" class="LineNr"> 137 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> column <span class="Special"><-</span> copy left <span id="L138" class="LineNr"> 138 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> row <span class="Special"><-</span> add row,<span class="Constant"> 1</span> <span id="L139" class="LineNr"> 139 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Comment"># don't increment curr/prev</span> -<span id="L140" class="LineNr"> 140 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">loop</span> <span class="Constant">+next-character</span> +<span id="L140" class="LineNr"> 140 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span class="Constant">+next-character</span> <span id="L141" class="LineNr"> 141 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L142" class="LineNr"> 142 </span> <span class="Conceal">¦</span> curr <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L25'>next</a> curr <span id="L143" class="LineNr"> 143 </span> <span class="Conceal">¦</span> <a href='../065duplex_list.mu.html#L32'>prev</a> <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L25'>next</a> <a href='../065duplex_list.mu.html#L32'>prev</a> <span id="L144" class="LineNr"> 144 </span> <span class="Conceal">¦</span> column <span class="Special"><-</span> add column,<span class="Constant"> 1</span> -<span id="L145" class="LineNr"> 145 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L145" class="LineNr"> 145 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L146" class="LineNr"> 146 </span> <span class="Delimiter">}</span> <span id="L147" class="LineNr"> 147 </span> <span class="Comment"># is cursor to the right of the last line? move to end</span> <span id="L148" class="LineNr"> 148 </span> <span class="Delimiter">{</span> @@ -253,14 +253,14 @@ if ('onhashchange' in window) { <span id="L190" class="LineNr"> 190 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <begin-insert-character></span> <span id="L191" class="LineNr"> 191 </span> <span class="Conceal">¦</span> go-render? <span class="Special"><-</span> <a href='002-typing.mu.html#L203'>insert-at-cursor</a> editor, c, <a href='../081print.mu.html#L16'>screen</a> <span id="L192" class="LineNr"> 192 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <end-insert-character></span> -<span id="L193" class="LineNr"> 193 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L193" class="LineNr"> 193 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L194" class="LineNr"> 194 </span> <span class="Delimiter">}</span> <span id="L195" class="LineNr"> 195 </span> <span class="Comment"># special key to modify the text or move the cursor</span> <span id="L196" class="LineNr"> 196 </span> k:num, is-keycode?:bool <span class="Special"><-</span> maybe-convert e:<a href='../084console.mu.html#L4'>event</a>, <span class="Constant">keycode:variant</span> <span id="L197" class="LineNr"> 197 </span> assert is-keycode?, <span class="Constant">[event was of unknown type; neither keyboard nor mouse]</span> <span id="L198" class="LineNr"> 198 </span> <span class="Comment"># handlers for each special key will go here</span> <span id="L199" class="LineNr"> 199 </span><span class="Constant"> <a href='002-typing.mu.html#L199'><handle-special-key></a></span> -<span id="L200" class="LineNr"> 200 </span> <span class="muControl">return</span> <span class="Constant">1/go-render</span> +<span id="L200" class="LineNr"> 200 </span> <span class="muControl"> return</span> <span class="Constant">1/go-render</span> <span id="L201" class="LineNr"> 201 </span>] <span id="L202" class="LineNr"> 202 </span> <span id="L203" class="LineNr"> 203 </span><span class="muRecipe">def</span> <a href='002-typing.mu.html#L203'>insert-at-cursor</a> editor:&:editor, c:char, <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a><span class="muRecipe"> -> </span>go-render?:bool, editor:&:editor, <a href='../081print.mu.html#L16'>screen</a>:&:<a href='../081print.mu.html#L16'>screen</a> [ @@ -295,7 +295,7 @@ if ('onhashchange' in window) { <span id="L232" class="LineNr"> 232 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> overflow? <span id="L233" class="LineNr"> 233 </span> <span class="Conceal">¦</span> move-cursor <a href='../081print.mu.html#L16'>screen</a>, save-row, save-column <span id="L234" class="LineNr"> 234 </span> <span class="Conceal">¦</span> print <a href='../081print.mu.html#L16'>screen</a>, c -<span id="L235" class="LineNr"> 235 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">0/don't-render</span> +<span id="L235" class="LineNr"> 235 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">0/don't-render</span> <span id="L236" class="LineNr"> 236 </span> <span class="Delimiter">}</span> <span id="L237" class="LineNr"> 237 </span> <span class="Delimiter">{</span> <span id="L238" class="LineNr"> 238 </span> <span class="Conceal">¦</span> <span class="Comment"># not at right margin? print the character and rest of line</span> @@ -317,11 +317,11 @@ if ('onhashchange' in window) { <span id="L254" class="LineNr"> 254 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> print <a href='../081print.mu.html#L16'>screen</a>, currc <span id="L255" class="LineNr"> 255 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> curr-column <span class="Special"><-</span> add curr-column,<span class="Constant"> 1</span> <span id="L256" class="LineNr"> 256 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> curr <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L25'>next</a> curr -<span id="L257" class="LineNr"> 257 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L257" class="LineNr"> 257 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L258" class="LineNr"> 258 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> -<span id="L259" class="LineNr"> 259 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">0/don't-render</span> +<span id="L259" class="LineNr"> 259 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">0/don't-render</span> <span id="L260" class="LineNr"> 260 </span> <span class="Delimiter">}</span> -<span id="L261" class="LineNr"> 261 </span> <span class="muControl">return</span> <span class="Constant">1/go-render</span> +<span id="L261" class="LineNr"> 261 </span> <span class="muControl"> return</span> <span class="Constant">1/go-render</span> <span id="L262" class="LineNr"> 262 </span>] <span id="L263" class="LineNr"> 263 </span> <span id="L264" class="LineNr"> 264 </span><span class="Comment"># helper for tests</span> @@ -800,7 +800,7 @@ if ('onhashchange' in window) { <span id="L737" class="LineNr"> 737 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> below-screen? <span id="L738" class="LineNr"> 738 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <scroll-down></span> <span id="L739" class="LineNr"> 739 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> -<span id="L740" class="LineNr"> 740 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">1/go-render</span> +<span id="L740" class="LineNr"> 740 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">1/go-render</span> <span id="L741" class="LineNr"> 741 </span> <span class="Delimiter">}</span> <span id="L742" class="LineNr"> 742 </span>] <span id="L743" class="LineNr"> 743 </span> @@ -924,7 +924,7 @@ if ('onhashchange' in window) { <span id="L861" class="LineNr"> 861 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <a href='002-typing.mu.html#L861'><begin-insert-enter></a></span> <span id="L862" class="LineNr"> 862 </span> <span class="Conceal">¦</span> <a href='002-typing.mu.html#L868'>insert-new-line-and-indent</a> editor, <a href='../081print.mu.html#L16'>screen</a> <span id="L863" class="LineNr"> 863 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <a href='002-typing.mu.html#L863'><end-insert-enter></a></span> -<span id="L864" class="LineNr"> 864 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">1/go-render</span> +<span id="L864" class="LineNr"> 864 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">1/go-render</span> <span id="L865" class="LineNr"> 865 </span> <span class="Delimiter">}</span> <span id="L866" class="LineNr"> 866 </span>] <span id="L867" class="LineNr"> 867 </span> @@ -970,7 +970,7 @@ if ('onhashchange' in window) { <span id="L907" class="LineNr"> 907 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> indent-done? <span id="L908" class="LineNr"> 908 </span> <span class="Conceal">¦</span> <a href='002-typing.mu.html#L203'>insert-at-cursor</a> editor, <span class="Constant">32/space</span>, <a href='../081print.mu.html#L16'>screen</a> <span id="L909" class="LineNr"> 909 </span> <span class="Conceal">¦</span> i <span class="Special"><-</span> add i,<span class="Constant"> 1</span> -<span id="L910" class="LineNr"> 910 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L910" class="LineNr"> 910 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L911" class="LineNr"> 911 </span> <span class="Delimiter">}</span> <span id="L912" class="LineNr"> 912 </span>] <span id="L913" class="LineNr"> 913 </span> @@ -989,7 +989,7 @@ if ('onhashchange' in window) { <span id="L926" class="LineNr"> 926 </span> <span class="muControl">return-if</span> cursor-after-newline?, <span class="Constant">0/false</span> <span id="L927" class="LineNr"> 927 </span> <span class="Comment"># if cursor is at left margin and not at start, but previous character is not a newline,</span> <span id="L928" class="LineNr"> 928 </span> <span class="Comment"># then we're at start of a wrapped line</span> -<span id="L929" class="LineNr"> 929 </span> <span class="muControl">return</span> <span class="Constant">1/true</span> +<span id="L929" class="LineNr"> 929 </span> <span class="muControl"> return</span> <span class="Constant">1/true</span> <span id="L930" class="LineNr"> 930 </span>] <span id="L931" class="LineNr"> 931 </span> <span id="L932" class="LineNr"> 932 </span><span class="Comment"># takes a pointer 'curr' into the doubly-linked list and its sentinel, counts</span> @@ -1020,7 +1020,7 @@ if ('onhashchange' in window) { <span id="L957" class="LineNr"> 957 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> is-space? <span id="L958" class="LineNr"> 958 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> result <span class="Special"><-</span> copy<span class="Constant"> 0</span> <span id="L959" class="LineNr"> 959 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> -<span id="L960" class="LineNr"> 960 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L960" class="LineNr"> 960 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L961" class="LineNr"> 961 </span> <span class="Delimiter">}</span> <span id="L962" class="LineNr"> 962 </span>] <span id="L963" class="LineNr"> 963 </span> @@ -1161,7 +1161,7 @@ if ('onhashchange' in window) { <span id="L1098" class="LineNr">1098 </span> <span class="Conceal">¦</span> paste-start?:bool <span class="Special"><-</span> equal k, <span class="Constant">65507/paste-start</span> <span id="L1099" class="LineNr">1099 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> paste-start? <span id="L1100" class="LineNr">1100 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">indent?:offset</span>, <span class="Constant">0/false</span> -<span id="L1101" class="LineNr">1101 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">1/go-render</span> +<span id="L1101" class="LineNr">1101 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">1/go-render</span> <span id="L1102" class="LineNr">1102 </span> <span class="Delimiter">}</span> <span id="L1103" class="LineNr">1103 </span>] <span id="L1104" class="LineNr">1104 </span> @@ -1170,7 +1170,7 @@ if ('onhashchange' in window) { <span id="L1107" class="LineNr">1107 </span> <span class="Conceal">¦</span> paste-end?:bool <span class="Special"><-</span> equal k, <span class="Constant">65506/paste-end</span> <span id="L1108" class="LineNr">1108 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> paste-end? <span id="L1109" class="LineNr">1109 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">indent?:offset</span>, <span class="Constant">1/true</span> -<span id="L1110" class="LineNr">1110 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">1/go-render</span> +<span id="L1110" class="LineNr">1110 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">1/go-render</span> <span id="L1111" class="LineNr">1111 </span> <span class="Delimiter">}</span> <span id="L1112" class="LineNr">1112 </span>] <span id="L1113" class="LineNr">1113 </span> @@ -1204,7 +1204,7 @@ if ('onhashchange' in window) { <span id="L1141" class="LineNr">1141 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> continue? <span id="L1142" class="LineNr">1142 </span> <span class="Conceal">¦</span> print <a href='../081print.mu.html#L16'>screen</a>, style, color, bg-color <span id="L1143" class="LineNr">1143 </span> <span class="Conceal">¦</span> x <span class="Special"><-</span> add x,<span class="Constant"> 1</span> -<span id="L1144" class="LineNr">1144 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L1144" class="LineNr">1144 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L1145" class="LineNr">1145 </span> <span class="Delimiter">}</span> <span id="L1146" class="LineNr">1146 </span>] </pre> diff --git a/html/edit/003-shortcuts.mu.html b/html/edit/003-shortcuts.mu.html index 89d573d7..ce5f7289 100644 --- a/html/edit/003-shortcuts.mu.html +++ b/html/edit/003-shortcuts.mu.html @@ -120,7 +120,7 @@ if ('onhashchange' in window) { <span id="L58" class="LineNr"> 58 </span> <span class="Conceal">¦</span> <a href='002-typing.mu.html#L203'>insert-at-cursor</a> editor, <span class="Constant">32/space</span>, <a href='../081print.mu.html#L16'>screen</a> <span id="L59" class="LineNr"> 59 </span> <span class="Conceal">¦</span> go-render? <span class="Special"><-</span> <a href='002-typing.mu.html#L203'>insert-at-cursor</a> editor, <span class="Constant">32/space</span>, <a href='../081print.mu.html#L16'>screen</a> <span id="L60" class="LineNr"> 60 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <end-insert-character></span> -<span id="L61" class="LineNr"> 61 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L61" class="LineNr"> 61 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L62" class="LineNr"> 62 </span> <span class="Delimiter">}</span> <span id="L63" class="LineNr"> 63 </span>] <span id="L64" class="LineNr"> 64 </span> @@ -161,7 +161,7 @@ if ('onhashchange' in window) { <span id="L99" class="LineNr"> 99 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <a href='003-shortcuts.mu.html#L99'><begin-backspace-character></a></span> <span id="L100" class="LineNr"> 100 </span> <span class="Conceal">¦</span> go-render?:bool, backspaced-cell:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L109'>delete-before-cursor</a> editor, <a href='../081print.mu.html#L16'>screen</a> <span id="L101" class="LineNr"> 101 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <a href='003-shortcuts.mu.html#L101'><end-backspace-character></a></span> -<span id="L102" class="LineNr"> 102 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L102" class="LineNr"> 102 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L103" class="LineNr"> 103 </span> <span class="Delimiter">}</span> <span id="L104" class="LineNr"> 104 </span>] <span id="L105" class="LineNr"> 105 </span> @@ -207,7 +207,7 @@ if ('onhashchange' in window) { <span id="L145" class="LineNr"> 145 </span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> print <a href='../081print.mu.html#L16'>screen</a>, currc <span id="L146" class="LineNr"> 146 </span> <span class="Conceal">¦</span> curr-column <span class="Special"><-</span> add curr-column,<span class="Constant"> 1</span> <span id="L147" class="LineNr"> 147 </span> <span class="Conceal">¦</span> curr <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L25'>next</a> curr -<span id="L148" class="LineNr"> 148 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L148" class="LineNr"> 148 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L149" class="LineNr"> 149 </span> <span class="Delimiter">}</span> <span id="L150" class="LineNr"> 150 </span> <span class="Comment"># we're guaranteed not to be at the right margin</span> <span id="L151" class="LineNr"> 151 </span> space:char <span class="Special"><-</span> copy <span class="Constant">32/space</span> @@ -230,7 +230,7 @@ if ('onhashchange' in window) { <span id="L168" class="LineNr"> 168 </span> <span class="Conceal">¦</span> trace<span class="Constant"> 10</span>, <span class="Constant">[app]</span>, <span class="Constant">[decrementing cursor column]</span> <span id="L169" class="LineNr"> 169 </span> <span class="Conceal">¦</span> cursor-column <span class="Special"><-</span> subtract cursor-column,<span class="Constant"> 1</span> <span id="L170" class="LineNr"> 170 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-column:offset</span>, cursor-column -<span id="L171" class="LineNr"> 171 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L171" class="LineNr"> 171 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L172" class="LineNr"> 172 </span> <span class="Delimiter">}</span> <span id="L173" class="LineNr"> 173 </span> <span class="Comment"># if at left margin, we must move to previous row:</span> <span id="L174" class="LineNr"> 174 </span> top-of-screen?:bool <span class="Special"><-</span> equal cursor-row,<span class="Constant"> 1</span> <span class="Comment"># exclude menu bar</span> @@ -267,7 +267,7 @@ if ('onhashchange' in window) { <span id="L205" class="LineNr"> 205 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> cursor-column <span class="Special"><-</span> add left, end-of-line <span id="L206" class="LineNr"> 206 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-column:offset</span>, cursor-column <span id="L207" class="LineNr"> 207 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> -<span id="L208" class="LineNr"> 208 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L208" class="LineNr"> 208 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L209" class="LineNr"> 209 </span> <span class="Delimiter">}</span> <span id="L210" class="LineNr"> 210 </span> <span class="Comment"># case 2: if previous-character was not newline, we're just at a wrapped line</span> <span id="L211" class="LineNr"> 211 </span> trace<span class="Constant"> 10</span>, <span class="Constant">[app]</span>, <span class="Constant">[wrapping to previous line]</span> @@ -294,7 +294,7 @@ if ('onhashchange' in window) { <span id="L232" class="LineNr"> 232 </span> <span class="Conceal">¦</span> at-newline?:bool <span class="Special"><-</span> equal c, <span class="Constant">10/newline</span> <span id="L233" class="LineNr"> 233 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> at-newline? <span id="L234" class="LineNr"> 234 </span> <span class="Conceal">¦</span> result <span class="Special"><-</span> add result,<span class="Constant"> 1</span> -<span id="L235" class="LineNr"> 235 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L235" class="LineNr"> 235 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L236" class="LineNr"> 236 </span> <span class="Delimiter">}</span> <span id="L237" class="LineNr"> 237 </span>] <span id="L238" class="LineNr"> 238 </span> @@ -428,7 +428,7 @@ if ('onhashchange' in window) { <span id="L366" class="LineNr"> 366 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <a href='003-shortcuts.mu.html#L366'><begin-delete-character></a></span> <span id="L367" class="LineNr"> 367 </span> <span class="Conceal">¦</span> go-render?:bool, deleted-cell:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L373'>delete-at-cursor</a> editor, <a href='../081print.mu.html#L16'>screen</a> <span id="L368" class="LineNr"> 368 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <a href='003-shortcuts.mu.html#L368'><end-delete-character></a></span> -<span id="L369" class="LineNr"> 369 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L369" class="LineNr"> 369 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L370" class="LineNr"> 370 </span> <span class="Delimiter">}</span> <span id="L371" class="LineNr"> 371 </span>] <span id="L372" class="LineNr"> 372 </span> @@ -461,7 +461,7 @@ if ('onhashchange' in window) { <span id="L399" class="LineNr"> 399 </span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> print <a href='../081print.mu.html#L16'>screen</a>, currc <span id="L400" class="LineNr"> 400 </span> <span class="Conceal">¦</span> curr-column <span class="Special"><-</span> add curr-column,<span class="Constant"> 1</span> <span id="L401" class="LineNr"> 401 </span> <span class="Conceal">¦</span> curr <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L25'>next</a> curr -<span id="L402" class="LineNr"> 402 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L402" class="LineNr"> 402 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L403" class="LineNr"> 403 </span> <span class="Delimiter">}</span> <span id="L404" class="LineNr"> 404 </span> <span class="Comment"># we're guaranteed not to be at the right margin</span> <span id="L405" class="LineNr"> 405 </span> space:char <span class="Special"><-</span> copy <span class="Constant">32/space</span> @@ -508,7 +508,7 @@ if ('onhashchange' in window) { <span id="L446" class="LineNr"> 446 </span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> move-cursor <a href='../081print.mu.html#L16'>screen</a>, cursor-row, cursor-column <span id="L447" class="LineNr"> 447 </span> <span class="Conceal">¦</span> undo-coalesce-tag:num <span class="Special"><-</span> copy <span class="Constant">2/right-arrow</span> <span id="L448" class="LineNr"> 448 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <end-move-cursor></span> -<span id="L449" class="LineNr"> 449 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L449" class="LineNr"> 449 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L450" class="LineNr"> 450 </span> <span class="Delimiter">}</span> <span id="L451" class="LineNr"> 451 </span>] <span id="L452" class="LineNr"> 452 </span> @@ -534,7 +534,7 @@ if ('onhashchange' in window) { <span id="L472" class="LineNr"> 472 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <scroll-down></span> <span id="L473" class="LineNr"> 473 </span> <span class="Conceal">¦</span> cursor-row <span class="Special"><-</span> subtract cursor-row,<span class="Constant"> 1</span> <span class="Comment"># bring back into screen range</span> <span id="L474" class="LineNr"> 474 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-row:offset</span>, cursor-row -<span id="L475" class="LineNr"> 475 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">1/go-render</span> +<span id="L475" class="LineNr"> 475 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">1/go-render</span> <span id="L476" class="LineNr"> 476 </span> <span class="Delimiter">}</span> <span id="L477" class="LineNr"> 477 </span> <span class="Comment"># if the line wraps, move cursor to start of next row</span> <span id="L478" class="LineNr"> 478 </span> <span class="Delimiter">{</span> @@ -557,7 +557,7 @@ if ('onhashchange' in window) { <span id="L495" class="LineNr"> 495 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <scroll-down></span> <span id="L496" class="LineNr"> 496 </span> <span class="Conceal">¦</span> cursor-row <span class="Special"><-</span> subtract cursor-row,<span class="Constant"> 1</span> <span class="Comment"># bring back into screen range</span> <span id="L497" class="LineNr"> 497 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-row:offset</span>, cursor-row -<span id="L498" class="LineNr"> 498 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">1/go-render</span> +<span id="L498" class="LineNr"> 498 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">1/go-render</span> <span id="L499" class="LineNr"> 499 </span> <span class="Delimiter">}</span> <span id="L500" class="LineNr"> 500 </span> <span class="Comment"># otherwise move cursor one character right</span> <span id="L501" class="LineNr"> 501 </span> cursor-column <span class="Special"><-</span> add cursor-column,<span class="Constant"> 1</span> @@ -791,7 +791,7 @@ if ('onhashchange' in window) { <span id="L729" class="LineNr"> 729 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">before-cursor:offset</span>, before-cursor <span id="L730" class="LineNr"> 730 </span> <span class="Conceal">¦</span> undo-coalesce-tag:num <span class="Special"><-</span> copy <span class="Constant">1/left-arrow</span> <span id="L731" class="LineNr"> 731 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <end-move-cursor></span> -<span id="L732" class="LineNr"> 732 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L732" class="LineNr"> 732 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L733" class="LineNr"> 733 </span> <span class="Delimiter">}</span> <span id="L734" class="LineNr"> 734 </span>] <span id="L735" class="LineNr"> 735 </span> @@ -1055,7 +1055,7 @@ if ('onhashchange' in window) { <span id="L993" class="LineNr"> 993 </span> <span class="Conceal">¦</span> go-render? <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L1000'>move-to-previous-line</a> editor <span id="L994" class="LineNr"> 994 </span> <span class="Conceal">¦</span> undo-coalesce-tag:num <span class="Special"><-</span> copy <span class="Constant">3/up-arrow</span> <span id="L995" class="LineNr"> 995 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <end-move-cursor></span> -<span id="L996" class="LineNr"> 996 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L996" class="LineNr"> 996 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L997" class="LineNr"> 997 </span> <span class="Delimiter">}</span> <span id="L998" class="LineNr"> 998 </span>] <span id="L999" class="LineNr"> 999 </span> @@ -1110,15 +1110,15 @@ if ('onhashchange' in window) { <span id="L1048" class="LineNr">1048 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">before-cursor:offset</span>, before-cursor <span id="L1049" class="LineNr">1049 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> cursor-column <span class="Special"><-</span> add cursor-column,<span class="Constant"> 1</span> <span id="L1050" class="LineNr">1050 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-column:offset</span>, cursor-column -<span id="L1051" class="LineNr">1051 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L1051" class="LineNr">1051 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L1052" class="LineNr">1052 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> -<span id="L1053" class="LineNr">1053 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L1053" class="LineNr">1053 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L1054" class="LineNr">1054 </span> <span class="Delimiter">}</span> <span id="L1055" class="LineNr">1055 </span> <span class="Delimiter">{</span> <span id="L1056" class="LineNr">1056 </span> <span class="Conceal">¦</span> <span class="Comment"># if cursor already at top, scroll up</span> <span id="L1057" class="LineNr">1057 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> already-at-top? <span id="L1058" class="LineNr">1058 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <scroll-up></span> -<span id="L1059" class="LineNr">1059 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">1/go-render</span> +<span id="L1059" class="LineNr">1059 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">1/go-render</span> <span id="L1060" class="LineNr">1060 </span> <span class="Delimiter">}</span> <span id="L1061" class="LineNr">1061 </span>] <span id="L1062" class="LineNr">1062 </span> @@ -1409,7 +1409,7 @@ if ('onhashchange' in window) { <span id="L1347" class="LineNr">1347 </span> <span class="Conceal">¦</span> go-render? <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L1354'>move-to-next-line</a> editor, <a href='../081print.mu.html#L782'>screen-height</a> <span id="L1348" class="LineNr">1348 </span> <span class="Conceal">¦</span> undo-coalesce-tag:num <span class="Special"><-</span> copy <span class="Constant">4/down-arrow</span> <span id="L1349" class="LineNr">1349 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <end-move-cursor></span> -<span id="L1350" class="LineNr">1350 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L1350" class="LineNr">1350 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L1351" class="LineNr">1351 </span> <span class="Delimiter">}</span> <span id="L1352" class="LineNr">1352 </span>] <span id="L1353" class="LineNr">1353 </span> @@ -1428,11 +1428,11 @@ if ('onhashchange' in window) { <span id="L1366" class="LineNr">1366 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> before-cursor <span id="L1367" class="LineNr">1367 </span> <span class="Conceal">¦</span> <span class="Delimiter">{</span> <span id="L1368" class="LineNr">1368 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> at-bottom-of-screen? -<span id="L1369" class="LineNr">1369 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">0/don't-render</span> +<span id="L1369" class="LineNr">1369 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">0/don't-render</span> <span id="L1370" class="LineNr">1370 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L1371" class="LineNr">1371 </span> <span class="Conceal">¦</span> <span class="Delimiter">{</span> <span id="L1372" class="LineNr">1372 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> at-bottom-of-screen? -<span id="L1373" class="LineNr">1373 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">jump</span> <span class="Constant">+try-to-scroll</span> +<span id="L1373" class="LineNr">1373 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> jump</span> <span class="Constant">+try-to-scroll</span> <span id="L1374" class="LineNr">1374 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L1375" class="LineNr">1375 </span> <span class="Delimiter">}</span> <span id="L1376" class="LineNr">1376 </span> <a href='../065duplex_list.mu.html#L25'>next</a>:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L25'>next</a> before-cursor @@ -1440,11 +1440,11 @@ if ('onhashchange' in window) { <span id="L1378" class="LineNr">1378 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> <a href='../065duplex_list.mu.html#L25'>next</a> <span id="L1379" class="LineNr">1379 </span> <span class="Conceal">¦</span> <span class="Delimiter">{</span> <span id="L1380" class="LineNr">1380 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> at-bottom-of-screen? -<span id="L1381" class="LineNr">1381 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">0/don't-render</span> +<span id="L1381" class="LineNr">1381 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">0/don't-render</span> <span id="L1382" class="LineNr">1382 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L1383" class="LineNr">1383 </span> <span class="Conceal">¦</span> <span class="Delimiter">{</span> <span id="L1384" class="LineNr">1384 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> at-bottom-of-screen? -<span id="L1385" class="LineNr">1385 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">jump</span> <span class="Constant">+try-to-scroll</span> +<span id="L1385" class="LineNr">1385 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> jump</span> <span class="Constant">+try-to-scroll</span> <span id="L1386" class="LineNr">1386 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L1387" class="LineNr">1387 </span> <span class="Delimiter">}</span> <span id="L1388" class="LineNr">1388 </span> already-at-bottom?:bool <span class="Special"><-</span> greater-or-equal cursor-row, last-line @@ -1463,17 +1463,17 @@ if ('onhashchange' in window) { <span id="L1401" class="LineNr">1401 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> c:char <span class="Special"><-</span> get *next, <span class="Constant">value:offset</span> <span id="L1402" class="LineNr">1402 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> at-newline?:bool <span class="Special"><-</span> equal c, <span class="Constant">10/newline</span> <span id="L1403" class="LineNr">1403 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> at-newline? -<span id="L1404" class="LineNr">1404 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L1404" class="LineNr">1404 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L1405" class="LineNr">1405 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L1406" class="LineNr">1406 </span> <span class="Conceal">¦</span> <span class="Delimiter">{</span> <span id="L1407" class="LineNr">1407 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> <a href='../065duplex_list.mu.html#L25'>next</a> <span id="L1408" class="LineNr">1408 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Delimiter">{</span> <span id="L1409" class="LineNr">1409 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> at-bottom-of-screen? -<span id="L1410" class="LineNr">1410 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">0/don't-render</span> +<span id="L1410" class="LineNr">1410 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">0/don't-render</span> <span id="L1411" class="LineNr">1411 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L1412" class="LineNr">1412 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Delimiter">{</span> <span id="L1413" class="LineNr">1413 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> at-bottom-of-screen? -<span id="L1414" class="LineNr">1414 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">jump</span> <span class="Constant">+try-to-scroll</span> +<span id="L1414" class="LineNr">1414 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> jump</span> <span class="Constant">+try-to-scroll</span> <span id="L1415" class="LineNr">1415 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L1416" class="LineNr">1416 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L1417" class="LineNr">1417 </span> <span class="Conceal">¦</span> cursor-row <span class="Special"><-</span> add cursor-row,<span class="Constant"> 1</span> @@ -1488,12 +1488,12 @@ if ('onhashchange' in window) { <span id="L1426" class="LineNr">1426 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> done? <span id="L1427" class="LineNr">1427 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> cursor-column <span class="Special"><-</span> add cursor-column,<span class="Constant"> 1</span> <span id="L1428" class="LineNr">1428 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> before-cursor <span class="Special"><-</span> copy <a href='../065duplex_list.mu.html#L25'>next</a> -<span id="L1429" class="LineNr">1429 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L1429" class="LineNr">1429 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L1430" class="LineNr">1430 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L1431" class="LineNr">1431 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">before-cursor:offset</span>, before-cursor <span id="L1432" class="LineNr">1432 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-column:offset</span>, cursor-column <span id="L1433" class="LineNr">1433 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-row:offset</span>, cursor-row -<span id="L1434" class="LineNr">1434 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">0/don't-render</span> +<span id="L1434" class="LineNr">1434 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">0/don't-render</span> <span id="L1435" class="LineNr">1435 </span> <span class="Delimiter">}</span> <span id="L1436" class="LineNr">1436 </span><span class="Constant"> +try-to-scroll</span> <span id="L1437" class="LineNr">1437 </span><span class="Constant"> <scroll-down></span> @@ -1606,7 +1606,7 @@ if ('onhashchange' in window) { <span id="L1544" class="LineNr">1544 </span> <span class="Conceal">¦</span> <a href='003-shortcuts.mu.html#L1565'>move-to-start-of-screen-line</a> editor <span id="L1545" class="LineNr">1545 </span> <span class="Conceal">¦</span> undo-coalesce-tag:num <span class="Special"><-</span> copy <span class="Constant">0/never</span> <span id="L1546" class="LineNr">1546 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <end-move-cursor></span> -<span id="L1547" class="LineNr">1547 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">0/don't-render</span> +<span id="L1547" class="LineNr">1547 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">0/don't-render</span> <span id="L1548" class="LineNr">1548 </span> <span class="Delimiter">}</span> <span id="L1549" class="LineNr">1549 </span>] <span id="L1550" class="LineNr">1550 </span> @@ -1618,7 +1618,7 @@ if ('onhashchange' in window) { <span id="L1556" class="LineNr">1556 </span> <span class="Conceal">¦</span> <a href='003-shortcuts.mu.html#L1565'>move-to-start-of-screen-line</a> editor <span id="L1557" class="LineNr">1557 </span> <span class="Conceal">¦</span> undo-coalesce-tag:num <span class="Special"><-</span> copy <span class="Constant">0/never</span> <span id="L1558" class="LineNr">1558 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <end-move-cursor></span> -<span id="L1559" class="LineNr">1559 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">0/don't-render</span> +<span id="L1559" class="LineNr">1559 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">0/don't-render</span> <span id="L1560" class="LineNr">1560 </span> <span class="Delimiter">}</span> <span id="L1561" class="LineNr">1561 </span>] <span id="L1562" class="LineNr">1562 </span> @@ -1639,7 +1639,7 @@ if ('onhashchange' in window) { <span id="L1577" class="LineNr">1577 </span> <span class="Conceal">¦</span> assert curr, <span class="Constant">[move-to-start-of-line tried to move before start of text]</span> <span id="L1578" class="LineNr">1578 </span> <span class="Conceal">¦</span> curr <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L32'>prev</a> curr <span id="L1579" class="LineNr">1579 </span> <span class="Conceal">¦</span> col <span class="Special"><-</span> subtract col,<span class="Constant"> 1</span> -<span id="L1580" class="LineNr">1580 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L1580" class="LineNr">1580 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L1581" class="LineNr">1581 </span> <span class="Delimiter">}</span> <span id="L1582" class="LineNr">1582 </span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-column:offset</span>, col <span id="L1583" class="LineNr">1583 </span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">before-cursor:offset</span>, curr @@ -1831,7 +1831,7 @@ if ('onhashchange' in window) { <span id="L1769" class="LineNr">1769 </span> <span class="Conceal">¦</span> <a href='003-shortcuts.mu.html#L1788'>move-to-end-of-line</a> editor <span id="L1770" class="LineNr">1770 </span> <span class="Conceal">¦</span> undo-coalesce-tag:num <span class="Special"><-</span> copy <span class="Constant">0/never</span> <span id="L1771" class="LineNr">1771 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <end-move-cursor></span> -<span id="L1772" class="LineNr">1772 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">0/don't-render</span> +<span id="L1772" class="LineNr">1772 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">0/don't-render</span> <span id="L1773" class="LineNr">1773 </span> <span class="Delimiter">}</span> <span id="L1774" class="LineNr">1774 </span>] <span id="L1775" class="LineNr">1775 </span> @@ -1843,7 +1843,7 @@ if ('onhashchange' in window) { <span id="L1781" class="LineNr">1781 </span> <span class="Conceal">¦</span> <a href='003-shortcuts.mu.html#L1788'>move-to-end-of-line</a> editor <span id="L1782" class="LineNr">1782 </span> <span class="Conceal">¦</span> undo-coalesce-tag:num <span class="Special"><-</span> copy <span class="Constant">0/never</span> <span id="L1783" class="LineNr">1783 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <end-move-cursor></span> -<span id="L1784" class="LineNr">1784 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">0/don't-render</span> +<span id="L1784" class="LineNr">1784 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">0/don't-render</span> <span id="L1785" class="LineNr">1785 </span> <span class="Delimiter">}</span> <span id="L1786" class="LineNr">1786 </span>] <span id="L1787" class="LineNr">1787 </span> @@ -1866,7 +1866,7 @@ if ('onhashchange' in window) { <span id="L1804" class="LineNr">1804 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">cursor-column:offset</span>, cursor-column <span id="L1805" class="LineNr">1805 </span> <span class="Conceal">¦</span> before-cursor <span class="Special"><-</span> copy <a href='../065duplex_list.mu.html#L25'>next</a> <span id="L1806" class="LineNr">1806 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">before-cursor:offset</span>, before-cursor -<span id="L1807" class="LineNr">1807 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L1807" class="LineNr">1807 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L1808" class="LineNr">1808 </span> <span class="Delimiter">}</span> <span id="L1809" class="LineNr">1809 </span>] <span id="L1810" class="LineNr">1810 </span> @@ -2026,7 +2026,7 @@ if ('onhashchange' in window) { <span id="L1964" class="LineNr">1964 </span> <span class="Conceal">¦</span> deleted-cells:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L2006'>delete-to-start-of-line</a> editor <span id="L1965" class="LineNr">1965 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <a href='003-shortcuts.mu.html#L1965'><end-delete-to-start-of-line></a></span> <span id="L1966" class="LineNr">1966 </span> <span class="Conceal">¦</span> go-render?:bool <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L1971'>minimal-render-for-ctrl-u</a> <a href='../081print.mu.html#L16'>screen</a>, editor, deleted-cells -<span id="L1967" class="LineNr">1967 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L1967" class="LineNr">1967 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L1968" class="LineNr">1968 </span> <span class="Delimiter">}</span> <span id="L1969" class="LineNr">1969 </span>] <span id="L1970" class="LineNr">1970 </span> @@ -2050,7 +2050,7 @@ if ('onhashchange' in window) { <span id="L1988" class="LineNr">1988 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> b <span id="L1989" class="LineNr">1989 </span> <span class="Conceal">¦</span> buf <span class="Special"><-</span> append buf, c <span id="L1990" class="LineNr">1990 </span> <span class="Conceal">¦</span> i <span class="Special"><-</span> add i,<span class="Constant"> 1</span> -<span id="L1991" class="LineNr">1991 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L1991" class="LineNr">1991 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L1992" class="LineNr">1992 </span> <span class="Delimiter">}</span> <span id="L1993" class="LineNr">1993 </span> <span class="Comment"># if the line used to be wrapped, give up and render the whole screen</span> <span id="L1994" class="LineNr">1994 </span> num-deleted-cells:num <span class="Special"><-</span> length deleted-cells @@ -2062,7 +2062,7 @@ if ('onhashchange' in window) { <span id="L2000" class="LineNr">2000 </span> curr-line:text <span class="Special"><-</span> <a href='../061text.mu.html#L338'>buffer-to-array</a> buf <span id="L2001" class="LineNr">2001 </span> curr-row:num <span class="Special"><-</span> get *editor, <span class="Constant">cursor-row:offset</span> <span id="L2002" class="LineNr">2002 </span> <a href='003-shortcuts.mu.html#L2062'>render-code</a> <a href='../081print.mu.html#L16'>screen</a>, curr-line, curr-column, right, curr-row -<span id="L2003" class="LineNr">2003 </span> <span class="muControl">return</span> <span class="Constant">0/dont-render</span> +<span id="L2003" class="LineNr">2003 </span> <span class="muControl"> return</span> <span class="Constant">0/dont-render</span> <span id="L2004" class="LineNr">2004 </span>] <span id="L2005" class="LineNr">2005 </span> <span id="L2006" class="LineNr">2006 </span><span class="muRecipe">def</span> <a href='003-shortcuts.mu.html#L2006'>delete-to-start-of-line</a> editor:&:editor<span class="muRecipe"> -> </span>result:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char, editor:&:editor [ @@ -2086,7 +2086,7 @@ if ('onhashchange' in window) { <span id="L2024" class="LineNr">2024 </span> <span class="Conceal">¦</span> update-top-of-screen?:bool <span class="Special"><-</span> or update-top-of-screen?, at-top-of-screen? <span id="L2025" class="LineNr">2025 </span> <span class="Conceal">¦</span> start <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L32'>prev</a> start <span id="L2026" class="LineNr">2026 </span> <span class="Conceal">¦</span> assert start, <span class="Constant">[delete-to-start-of-line tried to move before start of text]</span> -<span id="L2027" class="LineNr">2027 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L2027" class="LineNr">2027 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L2028" class="LineNr">2028 </span> <span class="Delimiter">}</span> <span id="L2029" class="LineNr">2029 </span> <span class="Comment"># snip it out</span> <span id="L2030" class="LineNr">2030 </span> result:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L25'>next</a> start @@ -2150,13 +2150,13 @@ if ('onhashchange' in window) { <span id="L2088" class="LineNr">2088 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> space:char <span class="Special"><-</span> copy <span class="Constant">32/space</span> <span id="L2089" class="LineNr">2089 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> print <a href='../081print.mu.html#L16'>screen</a>, space <span id="L2090" class="LineNr">2090 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> column <span class="Special"><-</span> add column,<span class="Constant"> 1</span> -<span id="L2091" class="LineNr">2091 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L2091" class="LineNr">2091 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L2092" class="LineNr">2092 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L2093" class="LineNr">2093 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> row <span class="Special"><-</span> add row,<span class="Constant"> 1</span> <span id="L2094" class="LineNr">2094 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> column <span class="Special"><-</span> copy left <span id="L2095" class="LineNr">2095 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> move-cursor <a href='../081print.mu.html#L16'>screen</a>, row, column <span id="L2096" class="LineNr">2096 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> i <span class="Special"><-</span> add i,<span class="Constant"> 1</span> -<span id="L2097" class="LineNr">2097 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">loop</span> <span class="Constant">+next-character</span> +<span id="L2097" class="LineNr">2097 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span class="Constant">+next-character</span> <span id="L2098" class="LineNr">2098 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L2099" class="LineNr">2099 </span> <span class="Conceal">¦</span> <span class="Delimiter">{</span> <span id="L2100" class="LineNr">2100 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Comment"># at right? wrap.</span> @@ -2169,12 +2169,12 @@ if ('onhashchange' in window) { <span id="L2107" class="LineNr">2107 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> row <span class="Special"><-</span> add row,<span class="Constant"> 1</span> <span id="L2108" class="LineNr">2108 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> move-cursor <a href='../081print.mu.html#L16'>screen</a>, row, column <span id="L2109" class="LineNr">2109 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Comment"># don't increment i</span> -<span id="L2110" class="LineNr">2110 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">loop</span> <span class="Constant">+next-character</span> +<span id="L2110" class="LineNr">2110 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span class="Constant">+next-character</span> <span id="L2111" class="LineNr">2111 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L2112" class="LineNr">2112 </span> <span class="Conceal">¦</span> i <span class="Special"><-</span> add i,<span class="Constant"> 1</span> <span id="L2113" class="LineNr">2113 </span> <span class="Conceal">¦</span> print <a href='../081print.mu.html#L16'>screen</a>, c, color <span id="L2114" class="LineNr">2114 </span> <span class="Conceal">¦</span> column <span class="Special"><-</span> add column,<span class="Constant"> 1</span> -<span id="L2115" class="LineNr">2115 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L2115" class="LineNr">2115 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L2116" class="LineNr">2116 </span> <span class="Delimiter">}</span> <span id="L2117" class="LineNr">2117 </span> was-at-left?:bool <span class="Special"><-</span> equal column, left <span id="L2118" class="LineNr">2118 </span> <a href='../081print.mu.html#L553'>clear-line-until</a> <a href='../081print.mu.html#L16'>screen</a>, right @@ -2604,7 +2604,7 @@ if ('onhashchange' in window) { <span id="L2542" class="LineNr">2542 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <a href='003-shortcuts.mu.html#L2542'><end-delete-to-end-of-line></a></span> <span id="L2543" class="LineNr">2543 </span> <span class="Conceal">¦</span> <span class="Comment"># checks if we can do a minimal render and if we can it will do a minimal render</span> <span id="L2544" class="LineNr">2544 </span> <span class="Conceal">¦</span> go-render?:bool <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L2549'>minimal-render-for-ctrl-k</a> <a href='../081print.mu.html#L16'>screen</a>, editor, deleted-cells -<span id="L2545" class="LineNr">2545 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L2545" class="LineNr">2545 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L2546" class="LineNr">2546 </span> <span class="Delimiter">}</span> <span id="L2547" class="LineNr">2547 </span>] <span id="L2548" class="LineNr">2548 </span> @@ -2623,7 +2623,7 @@ if ('onhashchange' in window) { <span id="L2561" class="LineNr">2561 </span> wrap?:bool <span class="Special"><-</span> greater-or-equal old-row-len, end <span id="L2562" class="LineNr">2562 </span> <span class="muControl">return-if</span> wrap?, <span class="Constant">1/go-render</span> <span id="L2563" class="LineNr">2563 </span> <a href='../081print.mu.html#L553'>clear-line-until</a> <a href='../081print.mu.html#L16'>screen</a>, right -<span id="L2564" class="LineNr">2564 </span> <span class="muControl">return</span> <span class="Constant">0/dont-render</span> +<span id="L2564" class="LineNr">2564 </span> <span class="muControl"> return</span> <span class="Constant">0/dont-render</span> <span id="L2565" class="LineNr">2565 </span>] <span id="L2566" class="LineNr">2566 </span> <span id="L2567" class="LineNr">2567 </span><span class="muRecipe">def</span> <a href='003-shortcuts.mu.html#L2567'>delete-to-end-of-line</a> editor:&:editor<span class="muRecipe"> -> </span>result:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char, editor:&:editor [ @@ -2639,7 +2639,7 @@ if ('onhashchange' in window) { <span id="L2577" class="LineNr">2577 </span> <span class="Conceal">¦</span> at-end-of-line?:bool <span class="Special"><-</span> equal curr, <span class="Constant">10/newline</span> <span id="L2578" class="LineNr">2578 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> at-end-of-line? <span id="L2579" class="LineNr">2579 </span> <span class="Conceal">¦</span> end <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L25'>next</a> end -<span id="L2580" class="LineNr">2580 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L2580" class="LineNr">2580 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L2581" class="LineNr">2581 </span> <span class="Delimiter">}</span> <span id="L2582" class="LineNr">2582 </span> <span class="Comment"># snip it out</span> <span id="L2583" class="LineNr">2583 </span> result <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L25'>next</a> start @@ -2885,10 +2885,10 @@ if ('onhashchange' in window) { <span id="L2823" class="LineNr">2823 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> at-newline? <span id="L2824" class="LineNr">2824 </span> <span class="Conceal">¦</span> curr <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L25'>next</a> curr <span id="L2825" class="LineNr">2825 </span> <span class="Conceal">¦</span> count <span class="Special"><-</span> add count,<span class="Constant"> 1</span> -<span id="L2826" class="LineNr">2826 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L2826" class="LineNr">2826 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L2827" class="LineNr">2827 </span> <span class="Delimiter">}</span> <span id="L2828" class="LineNr">2828 </span> <span class="muControl">return-unless</span> curr, original -<span id="L2829" class="LineNr">2829 </span> <span class="muControl">return</span> curr +<span id="L2829" class="LineNr">2829 </span> <span class="muControl"> return</span> curr <span id="L2830" class="LineNr">2830 </span>] <span id="L2831" class="LineNr">2831 </span> <span id="L2832" class="LineNr">2832 </span><span class="muScenario">scenario</span> editor-scrolls-down-past-wrapped-line-using-arrow-keys [ @@ -3252,7 +3252,7 @@ if ('onhashchange' in window) { <span id="L3190" class="LineNr">3190 </span> <span class="Conceal">¦</span> <span class="Comment"># empty line; just skip this newline</span> <span id="L3191" class="LineNr">3191 </span> <span class="Conceal">¦</span> <a href='../065duplex_list.mu.html#L32'>prev</a>:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L32'>prev</a> curr <span id="L3192" class="LineNr">3192 </span> <span class="Conceal">¦</span> <span class="muControl">return-unless</span> <a href='../065duplex_list.mu.html#L32'>prev</a>, curr -<span id="L3193" class="LineNr">3193 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <a href='../065duplex_list.mu.html#L32'>prev</a> +<span id="L3193" class="LineNr">3193 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <a href='../065duplex_list.mu.html#L32'>prev</a> <span id="L3194" class="LineNr">3194 </span> <span class="Delimiter">}</span> <span id="L3195" class="LineNr">3195 </span> _, max:num <span class="Special"><-</span> divide-with-remainder len, max-line-length <span id="L3196" class="LineNr">3196 </span> <span class="Comment"># remainder 0 => scan one width-worth</span> @@ -3270,9 +3270,9 @@ if ('onhashchange' in window) { <span id="L3208" class="LineNr">3208 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> <a href='../065duplex_list.mu.html#L32'>prev</a> <span id="L3209" class="LineNr">3209 </span> <span class="Conceal">¦</span> curr <span class="Special"><-</span> copy <a href='../065duplex_list.mu.html#L32'>prev</a> <span id="L3210" class="LineNr">3210 </span> <span class="Conceal">¦</span> count <span class="Special"><-</span> add count,<span class="Constant"> 1</span> -<span id="L3211" class="LineNr">3211 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L3211" class="LineNr">3211 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L3212" class="LineNr">3212 </span> <span class="Delimiter">}</span> -<span id="L3213" class="LineNr">3213 </span> <span class="muControl">return</span> curr +<span id="L3213" class="LineNr">3213 </span> <span class="muControl"> return</span> curr <span id="L3214" class="LineNr">3214 </span>] <span id="L3215" class="LineNr">3215 </span> <span id="L3216" class="LineNr">3216 </span><span class="muScenario">scenario</span> editor-scrolls-up-past-wrapped-line-using-arrow-keys [ @@ -3635,7 +3635,7 @@ if ('onhashchange' in window) { <span id="L3573" class="LineNr">3573 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <end-move-cursor></span> <span id="L3574" class="LineNr">3574 </span> <span class="Conceal">¦</span> top-of-screen:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> <span id="L3575" class="LineNr">3575 </span> <span class="Conceal">¦</span> movement?:bool <span class="Special"><-</span> not-equal top-of-screen, old-top -<span id="L3576" class="LineNr">3576 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> movement?/go-render +<span id="L3576" class="LineNr">3576 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> movement?/go-render <span id="L3577" class="LineNr">3577 </span> <span class="Delimiter">}</span> <span id="L3578" class="LineNr">3578 </span>] <span id="L3579" class="LineNr">3579 </span> @@ -3650,7 +3650,7 @@ if ('onhashchange' in window) { <span id="L3588" class="LineNr">3588 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <end-move-cursor></span> <span id="L3589" class="LineNr">3589 </span> <span class="Conceal">¦</span> top-of-screen:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> <span id="L3590" class="LineNr">3590 </span> <span class="Conceal">¦</span> movement?:bool <span class="Special"><-</span> not-equal top-of-screen, old-top -<span id="L3591" class="LineNr">3591 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> movement?/go-render +<span id="L3591" class="LineNr">3591 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> movement?/go-render <span id="L3592" class="LineNr">3592 </span> <span class="Delimiter">}</span> <span id="L3593" class="LineNr">3593 </span>] <span id="L3594" class="LineNr">3594 </span> @@ -3701,7 +3701,7 @@ if ('onhashchange' in window) { <span id="L3639" class="LineNr">3639 </span> <span class="Conceal">¦</span> before-cursor <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L32'>prev</a> before-cursor <span id="L3640" class="LineNr">3640 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">before-cursor:offset</span>, before-cursor <span id="L3641" class="LineNr">3641 </span> <span class="Conceal">¦</span> assert before-cursor, <span class="Constant">[move-to-start-of-line tried to move before start of text]</span> -<span id="L3642" class="LineNr">3642 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L3642" class="LineNr">3642 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L3643" class="LineNr">3643 </span> <span class="Delimiter">}</span> <span id="L3644" class="LineNr">3644 </span>] <span id="L3645" class="LineNr">3645 </span> @@ -3859,7 +3859,7 @@ if ('onhashchange' in window) { <span id="L3797" class="LineNr">3797 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <end-move-cursor></span> <span id="L3798" class="LineNr">3798 </span> <span class="Conceal">¦</span> top-of-screen:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> <span id="L3799" class="LineNr">3799 </span> <span class="Conceal">¦</span> movement?:bool <span class="Special"><-</span> not-equal top-of-screen, old-top -<span id="L3800" class="LineNr">3800 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> movement?/go-render +<span id="L3800" class="LineNr">3800 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> movement?/go-render <span id="L3801" class="LineNr">3801 </span> <span class="Delimiter">}</span> <span id="L3802" class="LineNr">3802 </span>] <span id="L3803" class="LineNr">3803 </span> @@ -3875,7 +3875,7 @@ if ('onhashchange' in window) { <span id="L3813" class="LineNr">3813 </span> <span class="Conceal">¦</span> top-of-screen:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> get *editor, <span class="Constant">top-of-screen:offset</span> <span id="L3814" class="LineNr">3814 </span> <span class="Conceal">¦</span> movement?:bool <span class="Special"><-</span> not-equal top-of-screen, old-top <span id="L3815" class="LineNr">3815 </span> <span class="Conceal">¦</span> <span class="Comment"># don't bother re-rendering if nothing changed. todo: test this</span> -<span id="L3816" class="LineNr">3816 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> movement?/go-render +<span id="L3816" class="LineNr">3816 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> movement?/go-render <span id="L3817" class="LineNr">3817 </span> <span class="Delimiter">}</span> <span id="L3818" class="LineNr">3818 </span>] <span id="L3819" class="LineNr">3819 </span> @@ -3893,7 +3893,7 @@ if ('onhashchange' in window) { <span id="L3831" class="LineNr">3831 </span> <span class="Conceal">¦</span> top-of-screen <span class="Special"><-</span> copy <a href='../065duplex_list.mu.html#L32'>prev</a> <span id="L3832" class="LineNr">3832 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">top-of-screen:offset</span>, top-of-screen <span id="L3833" class="LineNr">3833 </span> <span class="Conceal">¦</span> count <span class="Special"><-</span> add count,<span class="Constant"> 1</span> -<span id="L3834" class="LineNr">3834 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L3834" class="LineNr">3834 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L3835" class="LineNr">3835 </span> <span class="Delimiter">}</span> <span id="L3836" class="LineNr">3836 </span>] <span id="L3837" class="LineNr">3837 </span> @@ -4204,7 +4204,7 @@ if ('onhashchange' in window) { <span id="L4142" class="LineNr">4142 </span> <span class="Conceal">¦</span> go-render?:bool, editor <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L4149'>line-up</a> editor, <a href='../081print.mu.html#L782'>screen-height</a> <span id="L4143" class="LineNr">4143 </span> <span class="Conceal">¦</span> undo-coalesce-tag:num <span class="Special"><-</span> copy <span class="Constant">5/line-up</span> <span id="L4144" class="LineNr">4144 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <end-move-cursor></span> -<span id="L4145" class="LineNr">4145 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> go-render? +<span id="L4145" class="LineNr">4145 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> go-render? <span id="L4146" class="LineNr">4146 </span> <span class="Delimiter">}</span> <span id="L4147" class="LineNr">4147 </span>] <span id="L4148" class="LineNr">4148 </span> @@ -4221,7 +4221,7 @@ if ('onhashchange' in window) { <span id="L4159" class="LineNr">4159 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> movement? <span id="L4160" class="LineNr">4160 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">top-of-screen:offset</span>, new-top <span id="L4161" class="LineNr">4161 </span> <span class="Delimiter">}</span> -<span id="L4162" class="LineNr">4162 </span> <span class="muControl">return</span> movement? +<span id="L4162" class="LineNr">4162 </span> <span class="muControl"> return</span> movement? <span id="L4163" class="LineNr">4163 </span>] <span id="L4164" class="LineNr">4164 </span> <span id="L4165" class="LineNr">4165 </span><span class="Comment"># ctrl-x - scroll down by one line</span> @@ -4235,7 +4235,7 @@ if ('onhashchange' in window) { <span id="L4173" class="LineNr">4173 </span> <span class="Conceal">¦</span> go-render?:bool, editor <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L4180'>line-down</a> editor, <a href='../081print.mu.html#L782'>screen-height</a> <span id="L4174" class="LineNr">4174 </span> <span class="Conceal">¦</span> undo-coalesce-tag:num <span class="Special"><-</span> copy <span class="Constant">6/line-down</span> <span id="L4175" class="LineNr">4175 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <end-move-cursor></span> -<span id="L4176" class="LineNr">4176 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> go-render? +<span id="L4176" class="LineNr">4176 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> go-render? <span id="L4177" class="LineNr">4177 </span> <span class="Delimiter">}</span> <span id="L4178" class="LineNr">4178 </span>] <span id="L4179" class="LineNr">4179 </span> @@ -4249,7 +4249,7 @@ if ('onhashchange' in window) { <span id="L4187" class="LineNr">4187 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> movement? <span id="L4188" class="LineNr">4188 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">top-of-screen:offset</span>, new-top <span id="L4189" class="LineNr">4189 </span> <span class="Delimiter">}</span> -<span id="L4190" class="LineNr">4190 </span> <span class="muControl">return</span> movement? +<span id="L4190" class="LineNr">4190 </span> <span class="muControl"> return</span> movement? <span id="L4191" class="LineNr">4191 </span>] <span id="L4192" class="LineNr">4192 </span> <span id="L4193" class="LineNr">4193 </span><span class="Comment"># ctrl-t - move current line to top of screen</span> @@ -4269,7 +4269,7 @@ if ('onhashchange' in window) { <span id="L4207" class="LineNr">4207 </span> <span class="Conceal">¦</span> go-render?:bool <span class="Special"><-</span> not-equal new-top, old-top <span id="L4208" class="LineNr">4208 </span> <span class="Conceal">¦</span> undo-coalesce-tag:num <span class="Special"><-</span> copy <span class="Constant">0/never</span> <span id="L4209" class="LineNr">4209 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <end-move-cursor></span> -<span id="L4210" class="LineNr">4210 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> go-render? +<span id="L4210" class="LineNr">4210 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> go-render? <span id="L4211" class="LineNr">4211 </span> <span class="Delimiter">}</span> <span id="L4212" class="LineNr">4212 </span>] <span id="L4213" class="LineNr">4213 </span> @@ -4302,7 +4302,7 @@ if ('onhashchange' in window) { <span id="L4240" class="LineNr">4240 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> go-render? <span class="Special"><-</span> <a href='003-shortcuts.mu.html#L4250'>render-line-from-start</a> <a href='../081print.mu.html#L16'>screen</a>, editor,<span class="Constant"> 0</span> <span id="L4241" class="LineNr">4241 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L4242" class="LineNr">4242 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <end-insert-character></span> -<span id="L4243" class="LineNr">4243 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L4243" class="LineNr">4243 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L4244" class="LineNr">4244 </span> <span class="Delimiter">}</span> <span id="L4245" class="LineNr">4245 </span>] <span id="L4246" class="LineNr">4246 </span> @@ -4333,10 +4333,10 @@ if ('onhashchange' in window) { <span id="L4271" class="LineNr">4271 </span> <span class="Conceal">¦</span> print <a href='../081print.mu.html#L16'>screen</a>, c, color <span id="L4272" class="LineNr">4272 </span> <span class="Conceal">¦</span> curr <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L25'>next</a> curr <span id="L4273" class="LineNr">4273 </span> <span class="Conceal">¦</span> i <span class="Special"><-</span> add i,<span class="Constant"> 1</span> -<span id="L4274" class="LineNr">4274 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L4274" class="LineNr">4274 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L4275" class="LineNr">4275 </span> <span class="Delimiter">}</span> <span id="L4276" class="LineNr">4276 </span> <a href='../081print.mu.html#L553'>clear-line-until</a> <a href='../081print.mu.html#L16'>screen</a>, right -<span id="L4277" class="LineNr">4277 </span> <span class="muControl">return</span> <span class="Constant">0/dont-render</span> +<span id="L4277" class="LineNr">4277 </span> <span class="muControl"> return</span> <span class="Constant">0/dont-render</span> <span id="L4278" class="LineNr">4278 </span>] <span id="L4279" class="LineNr">4279 </span> <span id="L4280" class="LineNr">4280 </span><span class="muRecipe">def</span> <a href='003-shortcuts.mu.html#L4280'>before-start-of-screen-line</a> editor:&:editor<span class="muRecipe"> -> </span>result:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char [ diff --git a/html/edit/004-programming-environment.mu.html b/html/edit/004-programming-environment.mu.html index 04eb525e..2a1dd7f6 100644 --- a/html/edit/004-programming-environment.mu.html +++ b/html/edit/004-programming-environment.mu.html @@ -147,7 +147,7 @@ if ('onhashchange' in window) { <span id="L84" class="LineNr"> 84 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> sandbox-in-focus?:bool <span class="Special"><-</span> move-cursor current-sandbox, <a href='../081print.mu.html#L16'>screen</a>, t <span id="L85" class="LineNr"> 85 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> *env <span class="Special"><-</span> put *env, <span class="Constant">sandbox-in-focus?:offset</span>, sandbox-in-focus? <span id="L86" class="LineNr"> 86 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> <a href='004-programming-environment.mu.html#L472'>update-cursor</a> <a href='../081print.mu.html#L16'>screen</a>, recipes, current-sandbox, sandbox-in-focus?, env -<span id="L87" class="LineNr"> 87 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">loop</span> <span class="Constant">+next-event</span> +<span id="L87" class="LineNr"> 87 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span class="Constant">+next-event</span> <span id="L88" class="LineNr"> 88 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L89" class="LineNr"> 89 </span> <span class="Conceal">¦</span> <span class="Comment"># 'resize' event - redraw editor</span> <span id="L90" class="LineNr"> 90 </span> <span class="Conceal">¦</span> <span class="Comment"># todo: test this after supporting resize in assume-console</span> @@ -156,7 +156,7 @@ if ('onhashchange' in window) { <span id="L93" class="LineNr"> 93 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> is-resize? <span id="L94" class="LineNr"> 94 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> env, <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> <a href='004-programming-environment.mu.html#L131'>resize</a> <a href='../081print.mu.html#L16'>screen</a>, env <span id="L95" class="LineNr"> 95 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> <a href='004-programming-environment.mu.html#L402'>render-all</a> <a href='../081print.mu.html#L16'>screen</a>, env, <a href='004-programming-environment.mu.html#L158'>render-without-moving-cursor</a> -<span id="L96" class="LineNr"> 96 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">loop</span> <span class="Constant">+next-event</span> +<span id="L96" class="LineNr"> 96 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span class="Constant">+next-event</span> <span id="L97" class="LineNr"> 97 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L98" class="LineNr"> 98 </span> <span class="Conceal">¦</span> <span class="Comment"># if it's not global and not a touch event, send to appropriate editor</span> <span id="L99" class="LineNr"> 99 </span> <span class="Conceal">¦</span> <span class="Delimiter">{</span> @@ -187,7 +187,7 @@ if ('onhashchange' in window) { <span id="L124" class="LineNr">124 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L125" class="LineNr">125 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> <a href='004-programming-environment.mu.html#L472'>update-cursor</a> <a href='../081print.mu.html#L16'>screen</a>, recipes, current-sandbox, sandbox-in-focus?, env <span id="L126" class="LineNr">126 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> -<span id="L127" class="LineNr">127 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L127" class="LineNr">127 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L128" class="LineNr">128 </span> <span class="Delimiter">}</span> <span id="L129" class="LineNr">129 </span>] <span id="L130" class="LineNr">130 </span> @@ -269,7 +269,7 @@ if ('onhashchange' in window) { <span id="L206" class="LineNr">206 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> move-cursor <a href='../081print.mu.html#L16'>screen</a>, row, column <span id="L207" class="LineNr">207 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> curr <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L25'>next</a> curr <span id="L208" class="LineNr">208 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='../065duplex_list.mu.html#L32'>prev</a> <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L25'>next</a> <a href='../065duplex_list.mu.html#L32'>prev</a> -<span id="L209" class="LineNr">209 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">loop</span> <span class="Constant">+next-character</span> +<span id="L209" class="LineNr">209 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span class="Constant">+next-character</span> <span id="L210" class="LineNr">210 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L211" class="LineNr">211 </span> <span class="Conceal">¦</span> <span class="Delimiter">{</span> <span id="L212" class="LineNr">212 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Comment"># at right? wrap. even if there's only one more letter left; we need</span> @@ -283,18 +283,18 @@ if ('onhashchange' in window) { <span id="L220" class="LineNr">220 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> row <span class="Special"><-</span> add row,<span class="Constant"> 1</span> <span id="L221" class="LineNr">221 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> move-cursor <a href='../081print.mu.html#L16'>screen</a>, row, column <span id="L222" class="LineNr">222 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Comment"># don't increment curr</span> -<span id="L223" class="LineNr">223 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">loop</span> <span class="Constant">+next-character</span> +<span id="L223" class="LineNr">223 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span class="Constant">+next-character</span> <span id="L224" class="LineNr">224 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L225" class="LineNr">225 </span> <span class="Conceal">¦</span> print <a href='../081print.mu.html#L16'>screen</a>, c, color <span id="L226" class="LineNr">226 </span> <span class="Conceal">¦</span> curr <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L25'>next</a> curr <span id="L227" class="LineNr">227 </span> <span class="Conceal">¦</span> <a href='../065duplex_list.mu.html#L32'>prev</a> <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L25'>next</a> <a href='../065duplex_list.mu.html#L32'>prev</a> <span id="L228" class="LineNr">228 </span> <span class="Conceal">¦</span> column <span class="Special"><-</span> add column,<span class="Constant"> 1</span> -<span id="L229" class="LineNr">229 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L229" class="LineNr">229 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L230" class="LineNr">230 </span> <span class="Delimiter">}</span> <span id="L231" class="LineNr">231 </span> <span class="Comment"># save first character off-screen</span> <span id="L232" class="LineNr">232 </span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">bottom-of-screen:offset</span>, curr <span id="L233" class="LineNr">233 </span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">bottom:offset</span>, row -<span id="L234" class="LineNr">234 </span> <span class="muControl">return</span> row, column +<span id="L234" class="LineNr">234 </span> <span class="muControl"> return</span> row, column <span id="L235" class="LineNr">235 </span>] <span id="L236" class="LineNr">236 </span> <span id="L237" class="LineNr">237 </span><span class="muScenario">scenario</span> point-at-multiple-editors [ @@ -560,7 +560,7 @@ if ('onhashchange' in window) { <span id="L497" class="LineNr">497 </span> <span class="Conceal">¦</span> sandbox-in-focus? <span class="Special"><-</span> not sandbox-in-focus? <span id="L498" class="LineNr">498 </span> <span class="Conceal">¦</span> *env <span class="Special"><-</span> put *env, <span class="Constant">sandbox-in-focus?:offset</span>, sandbox-in-focus? <span id="L499" class="LineNr">499 </span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> <a href='004-programming-environment.mu.html#L472'>update-cursor</a> <a href='../081print.mu.html#L16'>screen</a>, recipes, current-sandbox, sandbox-in-focus?, env -<span id="L500" class="LineNr">500 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> <span class="Constant">+next-event</span> +<span id="L500" class="LineNr">500 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span class="Constant">+next-event</span> <span id="L501" class="LineNr">501 </span> <span class="Delimiter">}</span> <span id="L502" class="LineNr">502 </span>] <span id="L503" class="LineNr">503 </span> @@ -586,7 +586,7 @@ if ('onhashchange' in window) { <span id="L523" class="LineNr">523 </span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> move-cursor <a href='../081print.mu.html#L16'>screen</a>, y, col <span id="L524" class="LineNr">524 </span> <span class="Conceal">¦</span> print <a href='../081print.mu.html#L16'>screen</a>, style, color <span id="L525" class="LineNr">525 </span> <span class="Conceal">¦</span> y <span class="Special"><-</span> add y,<span class="Constant"> 1</span> -<span id="L526" class="LineNr">526 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L526" class="LineNr">526 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L527" class="LineNr">527 </span> <span class="Delimiter">}</span> <span id="L528" class="LineNr">528 </span>] <span id="L529" class="LineNr">529 </span> diff --git a/html/edit/005-sandbox.mu.html b/html/edit/005-sandbox.mu.html index f91232db..d46cf41e 100644 --- a/html/edit/005-sandbox.mu.html +++ b/html/edit/005-sandbox.mu.html @@ -202,7 +202,7 @@ if ('onhashchange' in window) { <span id="L139" class="LineNr"> 139 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> <a href='005-sandbox.mu.html#L217'>update-status</a> <a href='../081print.mu.html#L16'>screen</a>, <span class="Constant">[ ]</span>, <span class="Constant">245/grey</span> <span id="L140" class="LineNr"> 140 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L141" class="LineNr"> 141 </span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> <a href='004-programming-environment.mu.html#L472'>update-cursor</a> <a href='../081print.mu.html#L16'>screen</a>, recipes, current-sandbox, sandbox-in-focus?, env -<span id="L142" class="LineNr"> 142 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> <span class="Constant">+next-event</span> +<span id="L142" class="LineNr"> 142 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span class="Constant">+next-event</span> <span id="L143" class="LineNr"> 143 </span> <span class="Delimiter">}</span> <span id="L144" class="LineNr"> 144 </span>] <span id="L145" class="LineNr"> 145 </span> @@ -245,7 +245,7 @@ if ('onhashchange' in window) { <span id="L182" class="LineNr"> 182 </span> <span class="Conceal">¦</span> curr <span class="Special"><-</span> update-sandbox curr, env, idx <span id="L183" class="LineNr"> 183 </span> <span class="Conceal">¦</span> curr <span class="Special"><-</span> get *curr, <span class="Constant">next-sandbox:offset</span> <span id="L184" class="LineNr"> 184 </span> <span class="Conceal">¦</span> idx <span class="Special"><-</span> add idx,<span class="Constant"> 1</span> -<span id="L185" class="LineNr"> 185 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L185" class="LineNr"> 185 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L186" class="LineNr"> 186 </span> <span class="Delimiter">}</span> <span id="L187" class="LineNr"> 187 </span><span class="Constant"> <a href='005-sandbox.mu.html#L187'><end-run-sandboxes></a></span> <span id="L188" class="LineNr"> 188 </span><span class="Constant"> +return</span> @@ -298,7 +298,7 @@ if ('onhashchange' in window) { <span id="L235" class="LineNr"> 235 </span> <span class="Conceal">¦</span> <a href='../088file.mu.html#L11'>resources</a> <span class="Special"><-</span> <a href='005-sandbox.mu.html#L242'>save-sandbox</a> <a href='../088file.mu.html#L11'>resources</a>, curr, idx <span id="L236" class="LineNr"> 236 </span> <span class="Conceal">¦</span> idx <span class="Special"><-</span> add idx,<span class="Constant"> 1</span> <span id="L237" class="LineNr"> 237 </span> <span class="Conceal">¦</span> curr <span class="Special"><-</span> get *curr, <span class="Constant">next-sandbox:offset</span> -<span id="L238" class="LineNr"> 238 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L238" class="LineNr"> 238 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L239" class="LineNr"> 239 </span> <span class="Delimiter">}</span> <span id="L240" class="LineNr"> 240 </span>] <span id="L241" class="LineNr"> 241 </span> @@ -485,13 +485,13 @@ if ('onhashchange' in window) { <span id="L422" class="LineNr"> 422 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> space:char <span class="Special"><-</span> copy <span class="Constant">32/space</span> <span id="L423" class="LineNr"> 423 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> print <a href='../081print.mu.html#L16'>screen</a>, space <span id="L424" class="LineNr"> 424 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> column <span class="Special"><-</span> add column,<span class="Constant"> 1</span> -<span id="L425" class="LineNr"> 425 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L425" class="LineNr"> 425 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L426" class="LineNr"> 426 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L427" class="LineNr"> 427 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> row <span class="Special"><-</span> add row,<span class="Constant"> 1</span> <span id="L428" class="LineNr"> 428 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> column <span class="Special"><-</span> copy left <span id="L429" class="LineNr"> 429 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> move-cursor <a href='../081print.mu.html#L16'>screen</a>, row, column <span id="L430" class="LineNr"> 430 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> i <span class="Special"><-</span> add i,<span class="Constant"> 1</span> -<span id="L431" class="LineNr"> 431 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">loop</span> <span class="Constant">+next-character</span> +<span id="L431" class="LineNr"> 431 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span class="Constant">+next-character</span> <span id="L432" class="LineNr"> 432 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L433" class="LineNr"> 433 </span> <span class="Conceal">¦</span> <span class="Delimiter">{</span> <span id="L434" class="LineNr"> 434 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Comment"># at right? wrap.</span> @@ -504,12 +504,12 @@ if ('onhashchange' in window) { <span id="L441" class="LineNr"> 441 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> row <span class="Special"><-</span> add row,<span class="Constant"> 1</span> <span id="L442" class="LineNr"> 442 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> move-cursor <a href='../081print.mu.html#L16'>screen</a>, row, column <span id="L443" class="LineNr"> 443 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Comment"># don't increment i</span> -<span id="L444" class="LineNr"> 444 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">loop</span> <span class="Constant">+next-character</span> +<span id="L444" class="LineNr"> 444 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span class="Constant">+next-character</span> <span id="L445" class="LineNr"> 445 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L446" class="LineNr"> 446 </span> <span class="Conceal">¦</span> i <span class="Special"><-</span> add i,<span class="Constant"> 1</span> <span id="L447" class="LineNr"> 447 </span> <span class="Conceal">¦</span> print <a href='../081print.mu.html#L16'>screen</a>, c, color <span id="L448" class="LineNr"> 448 </span> <span class="Conceal">¦</span> column <span class="Special"><-</span> add column,<span class="Constant"> 1</span> -<span id="L449" class="LineNr"> 449 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L449" class="LineNr"> 449 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L450" class="LineNr"> 450 </span> <span class="Delimiter">}</span> <span id="L451" class="LineNr"> 451 </span> was-at-left?:bool <span class="Special"><-</span> equal column, left <span id="L452" class="LineNr"> 452 </span> <a href='../081print.mu.html#L553'>clear-line-until</a> <a href='../081print.mu.html#L16'>screen</a>, right @@ -561,7 +561,7 @@ if ('onhashchange' in window) { <span id="L498" class="LineNr"> 498 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L499" class="LineNr"> 499 </span> <span class="Conceal">¦</span> idx <span class="Special"><-</span> add idx,<span class="Constant"> 1</span> <span id="L500" class="LineNr"> 500 </span> <span class="Conceal">¦</span> <a href='../065duplex_list.mu.html#L32'>prev</a> <span class="Special"><-</span> copy curr -<span id="L501" class="LineNr"> 501 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L501" class="LineNr"> 501 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L502" class="LineNr"> 502 </span> <span class="Delimiter">}</span> <span id="L503" class="LineNr"> 503 </span> <span class="Comment"># update sandbox count</span> <span id="L504" class="LineNr"> 504 </span> *env <span class="Special"><-</span> put *env, <span class="Constant">number-of-sandboxes:offset</span>, idx @@ -616,7 +616,7 @@ if ('onhashchange' in window) { <span id="L553" class="LineNr"> 553 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> print <a href='../081print.mu.html#L16'>screen</a>, c, color <span id="L554" class="LineNr"> 554 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> column <span class="Special"><-</span> add column,<span class="Constant"> 1</span> <span id="L555" class="LineNr"> 555 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> i <span class="Special"><-</span> add i,<span class="Constant"> 1</span> -<span id="L556" class="LineNr"> 556 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L556" class="LineNr"> 556 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L557" class="LineNr"> 557 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L558" class="LineNr"> 558 </span> <span class="Conceal">¦</span> <span class="Comment"># print final '.'</span> <span id="L559" class="LineNr"> 559 </span> <span class="Conceal">¦</span> print <a href='../081print.mu.html#L16'>screen</a>, full-stop, <span class="Constant">245/grey</span> @@ -627,10 +627,10 @@ if ('onhashchange' in window) { <span id="L564" class="LineNr"> 564 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> line-done? <span id="L565" class="LineNr"> 565 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> print <a href='../081print.mu.html#L16'>screen</a>, space <span id="L566" class="LineNr"> 566 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> column <span class="Special"><-</span> add column,<span class="Constant"> 1</span> -<span id="L567" class="LineNr"> 567 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L567" class="LineNr"> 567 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L568" class="LineNr"> 568 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L569" class="LineNr"> 569 </span> <span class="Conceal">¦</span> row <span class="Special"><-</span> add row,<span class="Constant"> 1</span> -<span id="L570" class="LineNr"> 570 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L570" class="LineNr"> 570 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L571" class="LineNr"> 571 </span> <span class="Delimiter">}</span> <span id="L572" class="LineNr"> 572 </span>] <span id="L573" class="LineNr"> 573 </span> @@ -757,7 +757,7 @@ if ('onhashchange' in window) { <span id="L694" class="LineNr"> 694 </span> <span class="Conceal">¦</span> c:char <span class="Special"><-</span> get *curr, <span class="Constant">value:offset</span> <span id="L695" class="LineNr"> 695 </span> <span class="Conceal">¦</span> buf <span class="Special"><-</span> append buf, c <span id="L696" class="LineNr"> 696 </span> <span class="Conceal">¦</span> curr <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L25'>next</a> curr -<span id="L697" class="LineNr"> 697 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L697" class="LineNr"> 697 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L698" class="LineNr"> 698 </span> <span class="Delimiter">}</span> <span id="L699" class="LineNr"> 699 </span> result <span class="Special"><-</span> <a href='../061text.mu.html#L338'>buffer-to-array</a> buf <span id="L700" class="LineNr"> 700 </span>] @@ -969,7 +969,7 @@ if ('onhashchange' in window) { <span id="L906" class="LineNr"> 906 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L907" class="LineNr"> 907 </span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> render-sandbox-side <a href='../081print.mu.html#L16'>screen</a>, env, <a href='001-editor.mu.html#L107'>render</a> <span id="L908" class="LineNr"> 908 </span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> <a href='004-programming-environment.mu.html#L472'>update-cursor</a> <a href='../081print.mu.html#L16'>screen</a>, recipes, current-sandbox, sandbox-in-focus?, env -<span id="L909" class="LineNr"> 909 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> <span class="Constant">+next-event</span> +<span id="L909" class="LineNr"> 909 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span class="Constant">+next-event</span> <span id="L910" class="LineNr"> 910 </span> <span class="Delimiter">}</span> <span id="L911" class="LineNr"> 911 </span>] <span id="L912" class="LineNr"> 912 </span> @@ -982,7 +982,7 @@ if ('onhashchange' in window) { <span id="L919" class="LineNr"> 919 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> scrolling? <span id="L920" class="LineNr"> 920 </span> <span class="Conceal">¦</span> cursor-column:num <span class="Special"><-</span> get *current-sandbox, <span class="Constant">left:offset</span> <span id="L921" class="LineNr"> 921 </span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> move-cursor <a href='../081print.mu.html#L16'>screen</a>, <span class="Constant">2/row</span>, cursor-column <span class="Comment"># highlighted sandbox will always start at row 2</span> -<span id="L922" class="LineNr"> 922 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L922" class="LineNr"> 922 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L923" class="LineNr"> 923 </span> <span class="Delimiter">}</span> <span id="L924" class="LineNr"> 924 </span>] <span id="L925" class="LineNr"> 925 </span> @@ -999,7 +999,7 @@ if ('onhashchange' in window) { <span id="L936" class="LineNr"> 936 </span> <span class="Conceal">¦</span> *env <span class="Special"><-</span> put *env, <span class="Constant">render-from:offset</span>, render-from <span id="L937" class="LineNr"> 937 </span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> render-sandbox-side <a href='../081print.mu.html#L16'>screen</a>, env, <a href='001-editor.mu.html#L107'>render</a> <span id="L938" class="LineNr"> 938 </span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> <a href='004-programming-environment.mu.html#L472'>update-cursor</a> <a href='../081print.mu.html#L16'>screen</a>, recipes, current-sandbox, sandbox-in-focus?, env -<span id="L939" class="LineNr"> 939 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> <span class="Constant">+next-event</span> +<span id="L939" class="LineNr"> 939 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span class="Constant">+next-event</span> <span id="L940" class="LineNr"> 940 </span> <span class="Delimiter">}</span> <span id="L941" class="LineNr"> 941 </span>] <span id="L942" class="LineNr"> 942 </span> @@ -1017,9 +1017,9 @@ if ('onhashchange' in window) { <span id="L954" class="LineNr"> 954 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> found? <span id="L955" class="LineNr"> 955 </span> <span class="Conceal">¦</span> curr <span class="Special"><-</span> copy <a href='../065duplex_list.mu.html#L25'>next</a> <span id="L956" class="LineNr"> 956 </span> <span class="Conceal">¦</span> <a href='../065duplex_list.mu.html#L25'>next</a> <span class="Special"><-</span> get *curr, <span class="Constant">next-sandbox:offset</span> -<span id="L957" class="LineNr"> 957 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L957" class="LineNr"> 957 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L958" class="LineNr"> 958 </span> <span class="Delimiter">}</span> -<span id="L959" class="LineNr"> 959 </span> <span class="muControl">return</span> curr +<span id="L959" class="LineNr"> 959 </span> <span class="muControl"> return</span> curr <span id="L960" class="LineNr"> 960 </span>] <span id="L961" class="LineNr"> 961 </span> <span id="L962" class="LineNr"> 962 </span><span class="muScenario">scenario</span> scrolling-through-multiple-sandboxes [ diff --git a/html/edit/006-sandbox-copy.mu.html b/html/edit/006-sandbox-copy.mu.html index bcc6e301..782450c4 100644 --- a/html/edit/006-sandbox-copy.mu.html +++ b/html/edit/006-sandbox-copy.mu.html @@ -194,7 +194,7 @@ if ('onhashchange' in window) { <span id="L132" class="LineNr">132 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> copy? <span id="L133" class="LineNr">133 </span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> render-sandbox-side <a href='../081print.mu.html#L16'>screen</a>, env, <a href='001-editor.mu.html#L107'>render</a> <span id="L134" class="LineNr">134 </span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> <a href='004-programming-environment.mu.html#L472'>update-cursor</a> <a href='../081print.mu.html#L16'>screen</a>, recipes, current-sandbox, sandbox-in-focus?, env -<span id="L135" class="LineNr">135 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> <span class="Constant">+next-event</span> +<span id="L135" class="LineNr">135 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span class="Constant">+next-event</span> <span id="L136" class="LineNr">136 </span> <span class="Delimiter">}</span> <span id="L137" class="LineNr">137 </span>] <span id="L138" class="LineNr">138 </span> @@ -244,9 +244,9 @@ if ('onhashchange' in window) { <span id="L182" class="LineNr">182 </span> <span class="Conceal">¦</span> found?:bool <span class="Special"><-</span> equal click-row, start <span id="L183" class="LineNr">183 </span> <span class="Conceal">¦</span> <span class="muControl">return-if</span> found?, curr-sandbox <span id="L184" class="LineNr">184 </span> <span class="Conceal">¦</span> curr-sandbox <span class="Special"><-</span> get *curr-sandbox, <span class="Constant">next-sandbox:offset</span> -<span id="L185" class="LineNr">185 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L185" class="LineNr">185 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L186" class="LineNr">186 </span> <span class="Delimiter">}</span> -<span id="L187" class="LineNr">187 </span> <span class="muControl">return</span> <span class="Constant">0/not-found</span> +<span id="L187" class="LineNr">187 </span> <span class="muControl"> return</span> <span class="Constant">0/not-found</span> <span id="L188" class="LineNr">188 </span>] <span id="L189" class="LineNr">189 </span> <span id="L190" class="LineNr">190 </span><span class="muRecipe">def</span> <a href='006-sandbox-copy.mu.html#L190'>click-on-sandbox-area?</a> click-row:num, click-column:num, env:&:environment<span class="muRecipe"> -> </span>result:bool [ @@ -414,7 +414,7 @@ if ('onhashchange' in window) { <span id="L352" class="LineNr">352 </span> <span class="Conceal">¦</span> *env <span class="Special"><-</span> put *env, <span class="Constant">sandbox-in-focus?:offset</span>, <span class="Constant">0/false</span> <span id="L353" class="LineNr">353 </span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> <a href='004-programming-environment.mu.html#L431'>render-recipes</a> <a href='../081print.mu.html#L16'>screen</a>, env, <a href='001-editor.mu.html#L107'>render</a> <span id="L354" class="LineNr">354 </span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> <a href='004-programming-environment.mu.html#L472'>update-cursor</a> <a href='../081print.mu.html#L16'>screen</a>, recipes, current-sandbox, sandbox-in-focus?, env -<span id="L355" class="LineNr">355 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> <span class="Constant">+next-event</span> +<span id="L355" class="LineNr">355 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span class="Constant">+next-event</span> <span id="L356" class="LineNr">356 </span> <span class="Delimiter">}</span> <span id="L357" class="LineNr">357 </span>] <span id="L358" class="LineNr">358 </span> @@ -453,7 +453,7 @@ if ('onhashchange' in window) { <span id="L391" class="LineNr">391 </span> *recipe-editor <span class="Special"><-</span> put *recipe-editor, <span class="Constant">before-cursor:offset</span>, recipe-data <span id="L392" class="LineNr">392 </span> *recipe-editor <span class="Special"><-</span> put *recipe-editor, <span class="Constant">cursor-row:offset</span>,<span class="Constant"> 1</span> <span id="L393" class="LineNr">393 </span> *recipe-editor <span class="Special"><-</span> put *recipe-editor, <span class="Constant">cursor-column:offset</span>,<span class="Constant"> 0</span> -<span id="L394" class="LineNr">394 </span> <span class="muControl">return</span> <span class="Constant">1/true</span> +<span id="L394" class="LineNr">394 </span> <span class="muControl"> return</span> <span class="Constant">1/true</span> <span id="L395" class="LineNr">395 </span>] </pre> </body> diff --git a/html/edit/007-sandbox-delete.mu.html b/html/edit/007-sandbox-delete.mu.html index 524a7fca..223e8baa 100644 --- a/html/edit/007-sandbox-delete.mu.html +++ b/html/edit/007-sandbox-delete.mu.html @@ -137,7 +137,7 @@ if ('onhashchange' in window) { <span id="L75" class="LineNr"> 75 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> delete? <span id="L76" class="LineNr"> 76 </span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> render-sandbox-side <a href='../081print.mu.html#L16'>screen</a>, env, <a href='001-editor.mu.html#L107'>render</a> <span id="L77" class="LineNr"> 77 </span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> <a href='004-programming-environment.mu.html#L472'>update-cursor</a> <a href='../081print.mu.html#L16'>screen</a>, recipes, current-sandbox, sandbox-in-focus?, env -<span id="L78" class="LineNr"> 78 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> <span class="Constant">+next-event</span> +<span id="L78" class="LineNr"> 78 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span class="Constant">+next-event</span> <span id="L79" class="LineNr"> 79 </span> <span class="Delimiter">}</span> <span id="L80" class="LineNr"> 80 </span>] <span id="L81" class="LineNr"> 81 </span> @@ -189,7 +189,7 @@ if ('onhashchange' in window) { <span id="L127" class="LineNr">127 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> found? <span id="L128" class="LineNr">128 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> prev-sandbox <span class="Special"><-</span> copy curr-sandbox <span id="L129" class="LineNr">129 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> curr-sandbox <span class="Special"><-</span> get *curr-sandbox, <span class="Constant">next-sandbox:offset</span> -<span id="L130" class="LineNr">130 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L130" class="LineNr">130 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L131" class="LineNr">131 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L132" class="LineNr">132 </span> <span class="Conceal">¦</span> <span class="Comment"># snip sandbox out of its list</span> <span id="L133" class="LineNr">133 </span> <span class="Conceal">¦</span> next-sandbox:&:sandbox <span class="Special"><-</span> get *curr-sandbox, <span class="Constant">next-sandbox:offset</span> diff --git a/html/edit/008-sandbox-edit.mu.html b/html/edit/008-sandbox-edit.mu.html index 40bc00ef..23a66210 100644 --- a/html/edit/008-sandbox-edit.mu.html +++ b/html/edit/008-sandbox-edit.mu.html @@ -177,7 +177,7 @@ if ('onhashchange' in window) { <span id="L115" class="LineNr">115 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> edit? <span id="L116" class="LineNr">116 </span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> render-sandbox-side <a href='../081print.mu.html#L16'>screen</a>, env, <a href='001-editor.mu.html#L107'>render</a> <span id="L117" class="LineNr">117 </span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> <a href='004-programming-environment.mu.html#L472'>update-cursor</a> <a href='../081print.mu.html#L16'>screen</a>, recipes, current-sandbox, sandbox-in-focus?, env -<span id="L118" class="LineNr">118 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> <span class="Constant">+next-event</span> +<span id="L118" class="LineNr">118 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span class="Constant">+next-event</span> <span id="L119" class="LineNr">119 </span> <span class="Delimiter">}</span> <span id="L120" class="LineNr">120 </span>] <span id="L121" class="LineNr">121 </span> diff --git a/html/edit/009-sandbox-test.mu.html b/html/edit/009-sandbox-test.mu.html index 2934ebd7..e092c8f0 100644 --- a/html/edit/009-sandbox-test.mu.html +++ b/html/edit/009-sandbox-test.mu.html @@ -208,7 +208,7 @@ if ('onhashchange' in window) { <span id="L145" class="LineNr">145 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='002-typing.mu.html#L1116'>draw-horizontal</a> <a href='../081print.mu.html#L16'>screen</a>, row, sandbox-left-margin, sandbox-right-margin <span id="L146" class="LineNr">146 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L147" class="LineNr">147 </span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> <a href='004-programming-environment.mu.html#L472'>update-cursor</a> <a href='../081print.mu.html#L16'>screen</a>, recipes, current-sandbox, sandbox-in-focus?, env -<span id="L148" class="LineNr">148 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> <span class="Constant">+next-event</span> +<span id="L148" class="LineNr">148 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span class="Constant">+next-event</span> <span id="L149" class="LineNr">149 </span> <span class="Delimiter">}</span> <span id="L150" class="LineNr">150 </span>] <span id="L151" class="LineNr">151 </span> @@ -230,14 +230,14 @@ if ('onhashchange' in window) { <span id="L167" class="LineNr">167 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> found? <span id="L168" class="LineNr">168 </span> <span class="Conceal">¦</span> sandbox <span class="Special"><-</span> copy next-sandbox <span id="L169" class="LineNr">169 </span> <span class="Conceal">¦</span> sandbox-index <span class="Special"><-</span> add sandbox-index,<span class="Constant"> 1</span> -<span id="L170" class="LineNr">170 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L170" class="LineNr">170 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L171" class="LineNr">171 </span> <span class="Delimiter">}</span> <span id="L172" class="LineNr">172 </span> <span class="Comment"># return sandbox if click is in its output region</span> <span id="L173" class="LineNr">173 </span> response-starting-row:num <span class="Special"><-</span> get *sandbox, <span class="Constant">response-starting-row-on-screen:offset</span> <span id="L174" class="LineNr">174 </span> <span class="muControl">return-unless</span> response-starting-row, <span class="Constant">0/no-click-in-sandbox-output</span>, <span class="Constant">0/sandbox-index</span> <span id="L175" class="LineNr">175 </span> click-in-response?:bool <span class="Special"><-</span> greater-or-equal click-row, response-starting-row <span id="L176" class="LineNr">176 </span> <span class="muControl">return-unless</span> click-in-response?, <span class="Constant">0/no-click-in-sandbox-output</span>, <span class="Constant">0/sandbox-index</span> -<span id="L177" class="LineNr">177 </span> <span class="muControl">return</span> sandbox, sandbox-index +<span id="L177" class="LineNr">177 </span> <span class="muControl"> return</span> sandbox, sandbox-index <span id="L178" class="LineNr">178 </span>] <span id="L179" class="LineNr">179 </span> <span id="L180" class="LineNr">180 </span><span class="muRecipe">def</span> <a href='009-sandbox-test.mu.html#L180'>toggle-expected-response</a> sandbox:&:sandbox<span class="muRecipe"> -> </span>sandbox:&:sandbox [ @@ -263,7 +263,7 @@ if ('onhashchange' in window) { <span id="L200" class="LineNr">200 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> sandbox-response <span id="L201" class="LineNr">201 </span> <span class="Conceal">¦</span> *sandbox <span class="Special"><-</span> put *sandbox, <span class="Constant">response-starting-row-on-screen:offset</span>, row <span id="L202" class="LineNr">202 </span> <span class="Conceal">¦</span> row <span class="Special"><-</span> <a href='009-sandbox-test.mu.html#L207'>render-sandbox-response</a> <a href='../081print.mu.html#L16'>screen</a>, sandbox, left, right -<span id="L203" class="LineNr">203 </span> <span class="Conceal">¦</span> <span class="muControl">jump</span> <span class="Constant">+render-sandbox-end</span> +<span id="L203" class="LineNr">203 </span> <span class="Conceal">¦</span><span class="muControl"> jump</span> <span class="Constant">+render-sandbox-end</span> <span id="L204" class="LineNr">204 </span> <span class="Delimiter">}</span> <span id="L205" class="LineNr">205 </span>] <span id="L206" class="LineNr">206 </span> @@ -276,7 +276,7 @@ if ('onhashchange' in window) { <span id="L213" class="LineNr">213 </span> <span class="Delimiter">{</span> <span id="L214" class="LineNr">214 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> expected-response <span id="L215" class="LineNr">215 </span> <span class="Conceal">¦</span> row <span class="Special"><-</span> <a href='005-sandbox.mu.html#L398'>render-text</a> <a href='../081print.mu.html#L16'>screen</a>, sandbox-response, left, right, <span class="Constant">245/grey</span>, row -<span id="L216" class="LineNr">216 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L216" class="LineNr">216 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L217" class="LineNr">217 </span> <span class="Delimiter">}</span> <span id="L218" class="LineNr">218 </span> response-is-expected?:bool <span class="Special"><-</span> equal expected-response, sandbox-response <span id="L219" class="LineNr">219 </span> <span class="Delimiter">{</span> diff --git a/html/edit/010-sandbox-trace.mu.html b/html/edit/010-sandbox-trace.mu.html index 10435b66..a37ec663 100644 --- a/html/edit/010-sandbox-trace.mu.html +++ b/html/edit/010-sandbox-trace.mu.html @@ -146,7 +146,7 @@ if ('onhashchange' in window) { <span id="L83" class="LineNr"> 83 </span> <span class="Conceal">¦</span> <span class="Constant">[lesson/recipes.mu]</span> <span class="Special"><-</span> [ <span id="L84" class="LineNr"> 84 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Constant">|recipe</span> foo <span class="Constant">[|</span> <span id="L85" class="LineNr"> 85 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> | stash [abc]</span>| -<span id="L86" class="LineNr"> 86 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Constant">|</span> <span class="muControl">reply</span> 4| +<span id="L86" class="LineNr"> 86 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Constant">|</span> <span class="muControl"> reply</span> 4| <span id="L87" class="LineNr"> 87 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> |]|</span> <span id="L88" class="LineNr"> 88 </span> <span class="Conceal">¦</span> ] <span id="L89" class="LineNr"> 89 </span> ] @@ -268,7 +268,7 @@ if ('onhashchange' in window) { <span id="L205" class="LineNr">205 </span> <span class="Conceal">¦</span> *sandbox <span class="Special"><-</span> put *sandbox, <span class="Constant">display-trace?:offset</span>, x <span id="L206" class="LineNr">206 </span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> render-sandbox-side <a href='../081print.mu.html#L16'>screen</a>, env, <a href='001-editor.mu.html#L107'>render</a> <span id="L207" class="LineNr">207 </span> <span class="Conceal">¦</span> <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> <a href='004-programming-environment.mu.html#L472'>update-cursor</a> <a href='../081print.mu.html#L16'>screen</a>, recipes, current-sandbox, sandbox-in-focus?, env -<span id="L208" class="LineNr">208 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> <span class="Constant">+next-event</span> +<span id="L208" class="LineNr">208 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span class="Constant">+next-event</span> <span id="L209" class="LineNr">209 </span> <span class="Delimiter">}</span> <span id="L210" class="LineNr">210 </span>] <span id="L211" class="LineNr">211 </span> @@ -288,7 +288,7 @@ if ('onhashchange' in window) { <span id="L225" class="LineNr">225 </span> <span class="Conceal">¦</span> found?:bool <span class="Special"><-</span> lesser-than click-row, next-start <span id="L226" class="LineNr">226 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> found? <span id="L227" class="LineNr">227 </span> <span class="Conceal">¦</span> sandbox <span class="Special"><-</span> copy next-sandbox -<span id="L228" class="LineNr">228 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L228" class="LineNr">228 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L229" class="LineNr">229 </span> <span class="Delimiter">}</span> <span id="L230" class="LineNr">230 </span> <span class="Comment"># return sandbox if click is in its code region</span> <span id="L231" class="LineNr">231 </span> code-ending-row:num <span class="Special"><-</span> get *sandbox, <span class="Constant">code-ending-row-on-screen:offset</span> @@ -298,9 +298,9 @@ if ('onhashchange' in window) { <span id="L235" class="LineNr">235 </span> click-on-sandbox-code?:bool <span class="Special"><-</span> and click-above-response?, click-below-menu? <span id="L236" class="LineNr">236 </span> <span class="Delimiter">{</span> <span id="L237" class="LineNr">237 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> click-on-sandbox-code? -<span id="L238" class="LineNr">238 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">0/no-click-in-sandbox-output</span> +<span id="L238" class="LineNr">238 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">0/no-click-in-sandbox-output</span> <span id="L239" class="LineNr">239 </span> <span class="Delimiter">}</span> -<span id="L240" class="LineNr">240 </span> <span class="muControl">return</span> sandbox +<span id="L240" class="LineNr">240 </span> <span class="muControl"> return</span> sandbox <span id="L241" class="LineNr">241 </span>] <span id="L242" class="LineNr">242 </span> <span id="L243" class="LineNr">243 </span><span class="Comment"># when rendering a sandbox, dump its trace before response/warning if display-trace? property is set</span> diff --git a/html/edit/011-errors.mu.html b/html/edit/011-errors.mu.html index 13c73c2b..f694b5b9 100644 --- a/html/edit/011-errors.mu.html +++ b/html/edit/011-errors.mu.html @@ -81,7 +81,7 @@ if ('onhashchange' in window) { <span id="L18" class="LineNr"> 18 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> recipe-errors <span id="L19" class="LineNr"> 19 </span> <span class="Conceal">¦</span> <a href='005-sandbox.mu.html#L217'>update-status</a> <a href='../081print.mu.html#L16'>screen</a>, <span class="Constant">[errors found ]</span>, <span class="Constant">1/red</span> <span id="L20" class="LineNr"> 20 </span> <span class="Conceal">¦</span> errors-found? <span class="Special"><-</span> copy <span class="Constant">1/true</span> -<span id="L21" class="LineNr"> 21 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L21" class="LineNr"> 21 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L22" class="LineNr"> 22 </span> <span class="Delimiter">}</span> <span id="L23" class="LineNr"> 23 </span> errors-found? <span class="Special"><-</span> copy <span class="Constant">0/false</span> <span id="L24" class="LineNr"> 24 </span>] @@ -190,7 +190,7 @@ if ('onhashchange' in window) { <span id="L127" class="LineNr">127 </span> <span class="Conceal">¦</span> *sandbox <span class="Special"><-</span> put *sandbox, <span class="Constant">response-starting-row-on-screen:offset</span>,<span class="Constant"> 0</span> <span class="Comment"># no response</span> <span id="L128" class="LineNr">128 </span> <span class="Conceal">¦</span> row, <a href='../081print.mu.html#L16'>screen</a> <span class="Special"><-</span> <a href='005-sandbox.mu.html#L398'>render-text</a> <a href='../081print.mu.html#L16'>screen</a>, sandbox-errors, left, right, <span class="Constant">1/red</span>, row <span id="L129" class="LineNr">129 </span> <span class="Conceal">¦</span> <span class="Comment"># don't try to print anything more for this sandbox</span> -<span id="L130" class="LineNr">130 </span> <span class="Conceal">¦</span> <span class="muControl">jump</span> <span class="Constant">+render-sandbox-end</span> +<span id="L130" class="LineNr">130 </span> <span class="Conceal">¦</span><span class="muControl"> jump</span> <span class="Constant">+render-sandbox-end</span> <span id="L131" class="LineNr">131 </span> <span class="Delimiter">}</span> <span id="L132" class="LineNr">132 </span>] <span id="L133" class="LineNr">133 </span> @@ -866,7 +866,7 @@ if ('onhashchange' in window) { <span id="L803" class="LineNr">803 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> | b:num <- next-ingredient|</span> <span id="L804" class="LineNr">804 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> | stash [dividing by]</span>, b| <span id="L805" class="LineNr">805 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Constant">|</span> _, c:num <span class="Special"><-</span> divide-with-remainder a, b| -<span id="L806" class="LineNr">806 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Constant">|</span> <span class="muControl">reply</span> b| +<span id="L806" class="LineNr">806 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Constant">|</span> <span class="muControl"> reply</span> b| <span id="L807" class="LineNr">807 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> |]|</span> <span id="L808" class="LineNr">808 </span> <span class="Conceal">¦</span> ] <span id="L809" class="LineNr">809 </span> ] diff --git a/html/edit/012-editor-undo.mu.html b/html/edit/012-editor-undo.mu.html index 0a88703f..9306b1c8 100644 --- a/html/edit/012-editor-undo.mu.html +++ b/html/edit/012-editor-undo.mu.html @@ -139,7 +139,7 @@ if ('onhashchange' in window) { <span id="L76" class="LineNr"> 76 </span> <span class="Conceal">¦</span> redo <span class="Special"><-</span> push op, redo <span id="L77" class="LineNr"> 77 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">redo:offset</span>, redo <span id="L78" class="LineNr"> 78 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <a href='012-editor-undo.mu.html#L78'><handle-undo></a></span> -<span id="L79" class="LineNr"> 79 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">1/go-render</span> +<span id="L79" class="LineNr"> 79 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">1/go-render</span> <span id="L80" class="LineNr"> 80 </span> <span class="Delimiter">}</span> <span id="L81" class="LineNr"> 81 </span>] <span id="L82" class="LineNr"> 82 </span> @@ -157,7 +157,7 @@ if ('onhashchange' in window) { <span id="L94" class="LineNr"> 94 </span> <span class="Conceal">¦</span> undo <span class="Special"><-</span> push op, undo <span id="L95" class="LineNr"> 95 </span> <span class="Conceal">¦</span> *editor <span class="Special"><-</span> put *editor, <span class="Constant">undo:offset</span>, undo <span id="L96" class="LineNr"> 96 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> <a href='012-editor-undo.mu.html#L96'><handle-redo></a></span> -<span id="L97" class="LineNr"> 97 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> <span class="Constant">1/go-render</span> +<span id="L97" class="LineNr"> 97 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span class="Constant">1/go-render</span> <span id="L98" class="LineNr"> 98 </span> <span class="Delimiter">}</span> <span id="L99" class="LineNr"> 99 </span>] <span id="L100" class="LineNr"> 100 </span> @@ -227,7 +227,7 @@ if ('onhashchange' in window) { <span id="L164" class="LineNr"> 164 </span> <span class="Conceal">¦</span> typing <span class="Special"><-</span> put typing, <span class="Constant">after-column:offset</span>, cursor-column <span id="L165" class="LineNr"> 165 </span> <span class="Conceal">¦</span> typing <span class="Special"><-</span> put typing, <span class="Constant">after-top-of-screen:offset</span>, top-after <span id="L166" class="LineNr"> 166 </span> <span class="Conceal">¦</span> *op <span class="Special"><-</span> merge <span class="Constant">0/insert-operation</span>, typing -<span id="L167" class="LineNr"> 167 </span> <span class="Conceal">¦</span> <span class="muControl">break</span> <span class="Constant">+done-adding-insert-operation</span> +<span id="L167" class="LineNr"> 167 </span> <span class="Conceal">¦</span><span class="muControl"> break</span> <span class="Constant">+done-adding-insert-operation</span> <span id="L168" class="LineNr"> 168 </span> <span class="Delimiter">}</span> <span id="L169" class="LineNr"> 169 </span> <span class="Comment"># if not, create a new operation</span> <span id="L170" class="LineNr"> 170 </span> insert-from:&:<a href='../065duplex_list.mu.html#L3'>duplex-list</a>:char <span class="Special"><-</span> <a href='../065duplex_list.mu.html#L25'>next</a> cursor-before @@ -806,7 +806,7 @@ if ('onhashchange' in window) { <span id="L743" class="LineNr"> 743 </span> <span class="Conceal">¦</span> move <span class="Special"><-</span> put move, <span class="Constant">after-column:offset</span>, cursor-column <span id="L744" class="LineNr"> 744 </span> <span class="Conceal">¦</span> move <span class="Special"><-</span> put move, <span class="Constant">after-top-of-screen:offset</span>, top-after <span id="L745" class="LineNr"> 745 </span> <span class="Conceal">¦</span> *op <span class="Special"><-</span> merge <span class="Constant">1/move-operation</span>, move -<span id="L746" class="LineNr"> 746 </span> <span class="Conceal">¦</span> <span class="muControl">break</span> <span class="Constant">+done-adding-move-operation</span> +<span id="L746" class="LineNr"> 746 </span> <span class="Conceal">¦</span><span class="muControl"> break</span> <span class="Constant">+done-adding-move-operation</span> <span id="L747" class="LineNr"> 747 </span> <span class="Delimiter">}</span> <span id="L748" class="LineNr"> 748 </span> op:&:<a href='012-editor-undo.mu.html#L5'>operation</a> <span class="Special"><-</span> new <span class="Constant"><a href='012-editor-undo.mu.html#L5'>operation</a>:type</span> <span id="L749" class="LineNr"> 749 </span> *op <span class="Special"><-</span> merge <span class="Constant">1/move-operation</span>, cursor-row-before, cursor-column-before, top-before, cursor-row/after, cursor-column/after, top-after, undo-coalesce-tag @@ -1707,7 +1707,7 @@ if ('onhashchange' in window) { <span id="L1644" class="LineNr">1644 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> deletion <span class="Special"><-</span> put deletion, <span class="Constant">after-column:offset</span>, cursor-column <span id="L1645" class="LineNr">1645 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> deletion <span class="Special"><-</span> put deletion, <span class="Constant">after-top-of-screen:offset</span>, top-after <span id="L1646" class="LineNr">1646 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> *op <span class="Special"><-</span> merge <span class="Constant">2/delete-operation</span>, deletion -<span id="L1647" class="LineNr">1647 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break</span> <span class="Constant">+done-adding-backspace-operation</span> +<span id="L1647" class="LineNr">1647 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> break</span> <span class="Constant">+done-adding-backspace-operation</span> <span id="L1648" class="LineNr">1648 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L1649" class="LineNr">1649 </span> <span class="Conceal">¦</span> <span class="Comment"># if not, create a new operation</span> <span id="L1650" class="LineNr">1650 </span> <span class="Conceal">¦</span> op:&:<a href='012-editor-undo.mu.html#L5'>operation</a> <span class="Special"><-</span> new <span class="Constant"><a href='012-editor-undo.mu.html#L5'>operation</a>:type</span> @@ -1934,7 +1934,7 @@ if ('onhashchange' in window) { <span id="L1871" class="LineNr">1871 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> deletion <span class="Special"><-</span> put deletion, <span class="Constant">after-column:offset</span>, cursor-column <span id="L1872" class="LineNr">1872 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> deletion <span class="Special"><-</span> put deletion, <span class="Constant">after-top-of-screen:offset</span>, top-after <span id="L1873" class="LineNr">1873 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> *op <span class="Special"><-</span> merge <span class="Constant">2/delete-operation</span>, deletion -<span id="L1874" class="LineNr">1874 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break</span> <span class="Constant">+done-adding-delete-operation</span> +<span id="L1874" class="LineNr">1874 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> break</span> <span class="Constant">+done-adding-delete-operation</span> <span id="L1875" class="LineNr">1875 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L1876" class="LineNr">1876 </span> <span class="Conceal">¦</span> <span class="Comment"># if not, create a new operation</span> <span id="L1877" class="LineNr">1877 </span> <span class="Conceal">¦</span> op:&:<a href='012-editor-undo.mu.html#L5'>operation</a> <span class="Special"><-</span> new <span class="Constant"><a href='012-editor-undo.mu.html#L5'>operation</a>:type</span> diff --git a/html/factorial.mu.html b/html/factorial.mu.html index e5ac5761..078d8474 100644 --- a/html/factorial.mu.html +++ b/html/factorial.mu.html @@ -75,7 +75,7 @@ if ('onhashchange' in window) { <span id="L14" class="LineNr">14 </span> <span class="Conceal">¦</span> <span class="Comment"># if n=0 return 1</span> <span id="L15" class="LineNr">15 </span> <span class="Conceal">¦</span> zero?:bool <span class="Special"><-</span> equal n,<span class="Constant"> 0</span> <span id="L16" class="LineNr">16 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> zero? -<span id="L17" class="LineNr">17 </span> <span class="Conceal">¦</span> <span class="muControl">return</span><span class="Constant"> 1</span> +<span id="L17" class="LineNr">17 </span> <span class="Conceal">¦</span><span class="muControl"> return</span><span class="Constant"> 1</span> <span id="L18" class="LineNr">18 </span> <span class="Delimiter">}</span> <span id="L19" class="LineNr">19 </span> <span class="Comment"># return n * factorial(n-1)</span> <span id="L20" class="LineNr">20 </span> x:num <span class="Special"><-</span> subtract n,<span class="Constant"> 1</span> diff --git a/html/filesystem.mu.html b/html/filesystem.mu.html index 4a64232e..0c9d72b8 100644 --- a/html/filesystem.mu.html +++ b/html/filesystem.mu.html @@ -71,7 +71,7 @@ if ('onhashchange' in window) { <span id="L11" class="LineNr">11 </span> <span class="Conceal">¦</span> c:char, done?:bool, source-file <span class="Special"><-</span> read source-file <span id="L12" class="LineNr">12 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> done? <span id="L13" class="LineNr">13 </span> <span class="Conceal">¦</span> sink-file <span class="Special"><-</span> <a href='075channel.mu.html#L67'>write</a> sink-file, c -<span id="L14" class="LineNr">14 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L14" class="LineNr">14 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L15" class="LineNr">15 </span> <span class="Delimiter">}</span> <span id="L16" class="LineNr">16 </span> close sink-file <span id="L17" class="LineNr">17 </span> <span class="Comment"># make sure to wait for the file to be actually written to disk</span> diff --git a/html/fork.mu.html b/html/fork.mu.html index 976c0db3..75023398 100644 --- a/html/fork.mu.html +++ b/html/fork.mu.html @@ -63,14 +63,14 @@ if ('onhashchange' in window) { <span id="L4" class="LineNr"> 4 </span> <span class="muControl">start-running</span> <a href='fork.mu.html#L11'>thread2</a> <span id="L5" class="LineNr"> 5 </span> <span class="Delimiter">{</span> <span id="L6" class="LineNr"> 6 </span> <span class="Conceal">¦</span> $print<span class="Constant"> 34</span> -<span id="L7" class="LineNr"> 7 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L7" class="LineNr"> 7 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L8" class="LineNr"> 8 </span> <span class="Delimiter">}</span> <span id="L9" class="LineNr"> 9 </span>] <span id="L10" class="LineNr">10 </span> <span id="L11" class="LineNr">11 </span><span class="muRecipe">def</span> <a href='fork.mu.html#L11'>thread2</a> [ <span id="L12" class="LineNr">12 </span> <span class="Delimiter">{</span> <span id="L13" class="LineNr">13 </span> <span class="Conceal">¦</span> $print<span class="Constant"> 35</span> -<span id="L14" class="LineNr">14 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L14" class="LineNr">14 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L15" class="LineNr">15 </span> <span class="Delimiter">}</span> <span id="L16" class="LineNr">16 </span>] </pre> diff --git a/html/http-client.mu.html b/html/http-client.mu.html index c83886f4..615574c2 100644 --- a/html/http-client.mu.html +++ b/html/http-client.mu.html @@ -77,7 +77,7 @@ if ('onhashchange' in window) { <span id="L17" class="LineNr">17 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> a <span id="L18" class="LineNr">18 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> $print n <span class="Constant">10/newline</span> <span id="L19" class="LineNr">19 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> -<span id="L20" class="LineNr">20 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L20" class="LineNr">20 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L21" class="LineNr">21 </span> <span class="Delimiter">}</span> <span id="L22" class="LineNr">22 </span> result:text <span class="Special"><-</span> <a href='061text.mu.html#L338'>buffer-to-array</a> buf <span id="L23" class="LineNr">23 </span> open-console diff --git a/html/lambda-to-mu.mu.html b/html/lambda-to-mu.mu.html index c15a22b1..53f9926d 100644 --- a/html/lambda-to-mu.mu.html +++ b/html/lambda-to-mu.mu.html @@ -268,7 +268,7 @@ if ('onhashchange' in window) { <span id="L204" class="LineNr">204 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> done? <span id="L205" class="LineNr">205 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> c <span class="Special"><-</span> read in <span id="L206" class="LineNr">206 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> buf <span class="Special"><-</span> append buf, c -<span id="L207" class="LineNr">207 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L207" class="LineNr">207 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L208" class="LineNr">208 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L209" class="LineNr">209 </span> <span class="Conceal">¦</span> s:text <span class="Special"><-</span> <a href='061text.mu.html#L338'>buffer-to-array</a> buf <span id="L210" class="LineNr">210 </span> <span class="Conceal">¦</span> out <span class="Special"><-</span> <a href='lambda-to-mu.mu.html#L42'>new-atom</a> s @@ -302,7 +302,7 @@ if ('onhashchange' in window) { <span id="L238" class="LineNr">238 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> close-paren?:bool <span class="Special"><-</span> equal c, <span class="Constant">41/close-paren</span> <span id="L239" class="LineNr">239 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> close-paren? <span id="L240" class="LineNr">240 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> read in <span class="Comment"># skip ')'</span> -<span id="L241" class="LineNr">241 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">break</span> <span class="Constant">+end-pair</span> +<span id="L241" class="LineNr">241 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> break</span> <span class="Constant">+end-pair</span> <span id="L242" class="LineNr">242 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L243" class="LineNr">243 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Comment"># still here? read next element of pair</span> <span id="L244" class="LineNr">244 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='065duplex_list.mu.html#L25'>next</a>:&:<a href='lambda-to-mu.mu.html#L31'>cell</a>, in <span class="Special"><-</span> parse in @@ -329,7 +329,7 @@ if ('onhashchange' in window) { <span id="L265" class="LineNr">265 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> close-paren?:bool <span class="Special"><-</span> equal c, <span class="Constant">41/close-paren</span> <span id="L266" class="LineNr">266 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> assert close-paren?, <span class="Constant">['.' must be followed by exactly one expression before ')']</span> <span id="L267" class="LineNr">267 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> -<span id="L268" class="LineNr">268 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L268" class="LineNr">268 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L269" class="LineNr">269 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L270" class="LineNr">270 </span><span class="Constant"> </span><span class="Conceal">¦</span><span class="Constant"> +end-pair</span> <span id="L271" class="LineNr">271 </span> <span class="Delimiter">}</span> @@ -345,7 +345,7 @@ if ('onhashchange' in window) { <span id="L281" class="LineNr">281 </span> <span class="Conceal">¦</span> <a href='061text.mu.html#L634'>space?</a>:bool <span class="Special"><-</span> <a href='061text.mu.html#L634'>space?</a> c <span id="L282" class="LineNr">282 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> <a href='061text.mu.html#L634'>space?</a> <span id="L283" class="LineNr">283 </span> <span class="Conceal">¦</span> read in <span class="Comment"># skip</span> -<span id="L284" class="LineNr">284 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L284" class="LineNr">284 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L285" class="LineNr">285 </span> <span class="Delimiter">}</span> <span id="L286" class="LineNr">286 </span>] <span id="L287" class="LineNr">287 </span> @@ -364,14 +364,14 @@ if ('onhashchange' in window) { <span id="L300" class="LineNr">300 </span> <span class="Delimiter">{</span> <span id="L301" class="LineNr">301 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> x <span id="L302" class="LineNr">302 </span> <span class="Conceal">¦</span> buf <span class="Special"><-</span> append buf, <span class="Constant">[<>]</span> -<span id="L303" class="LineNr">303 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L303" class="LineNr">303 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L304" class="LineNr">304 </span> <span class="Delimiter">}</span> <span id="L305" class="LineNr">305 </span> <span class="Comment"># base case: atom</span> <span id="L306" class="LineNr">306 </span> <span class="Delimiter">{</span> <span id="L307" class="LineNr">307 </span> <span class="Conceal">¦</span> s:text, atom?:bool <span class="Special"><-</span> maybe-convert *x, <span class="Constant">atom:variant</span> <span id="L308" class="LineNr">308 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> atom? <span id="L309" class="LineNr">309 </span> <span class="Conceal">¦</span> buf <span class="Special"><-</span> append buf, s -<span id="L310" class="LineNr">310 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> +<span id="L310" class="LineNr">310 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> <span id="L311" class="LineNr">311 </span> <span class="Delimiter">}</span> <span id="L312" class="LineNr">312 </span> <span class="Comment"># recursive case: pair</span> <span id="L313" class="LineNr">313 </span> buf <span class="Special"><-</span> append buf, <span class="Constant">[< ]</span> diff --git a/html/nqueens.mu.html b/html/nqueens.mu.html index ac2fe88c..54cdecbc 100644 --- a/html/nqueens.mu.html +++ b/html/nqueens.mu.html @@ -78,7 +78,7 @@ if ('onhashchange' in window) { <span id="L17" class="LineNr"> 17 </span> <span class="Conceal">¦</span> done?:bool <span class="Special"><-</span> greater-or-equal added-so-far, n <span id="L18" class="LineNr"> 18 </span> <span class="Conceal">¦</span> <span class="muControl">break-unless</span> done? <span id="L19" class="LineNr"> 19 </span> <span class="Conceal">¦</span> stash queens -<span id="L20" class="LineNr"> 20 </span> <span class="Conceal">¦</span> <span class="muControl">return</span><span class="Constant"> 1</span> +<span id="L20" class="LineNr"> 20 </span> <span class="Conceal">¦</span><span class="muControl"> return</span><span class="Constant"> 1</span> <span id="L21" class="LineNr"> 21 </span> <span class="Delimiter">}</span> <span id="L22" class="LineNr"> 22 </span> <span class="Comment"># still work to do</span> <span id="L23" class="LineNr"> 23 </span> next-rank:num <span class="Special"><-</span> copy<span class="Constant"> 0</span> @@ -102,7 +102,7 @@ if ('onhashchange' in window) { <span id="L41" class="LineNr"> 41 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> result <span class="Special"><-</span> add result, sub-result <span id="L42" class="LineNr"> 42 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L43" class="LineNr"> 43 </span> <span class="Conceal">¦</span> next-file <span class="Special"><-</span> add next-file,<span class="Constant"> 1</span> -<span id="L44" class="LineNr"> 44 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L44" class="LineNr"> 44 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L45" class="LineNr"> 45 </span> <span class="Delimiter">}</span> <span id="L46" class="LineNr"> 46 </span>] <span id="L47" class="LineNr"> 47 </span> @@ -129,9 +129,9 @@ if ('onhashchange' in window) { <span id="L68" class="LineNr"> 68 </span> <span class="Conceal">¦</span> file-match?:bool <span class="Special"><-</span> equal curr-file, qfile <span id="L69" class="LineNr"> 69 </span> <span class="Conceal">¦</span> <span class="muControl">return-if</span> file-match?, <span class="Constant">1/conflict-found</span> <span id="L70" class="LineNr"> 70 </span> <span class="Conceal">¦</span> queens <span class="Special"><-</span> <a href='064list.mu.html#L24'>rest</a> queens -<span id="L71" class="LineNr"> 71 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L71" class="LineNr"> 71 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L72" class="LineNr"> 72 </span> <span class="Delimiter">}</span> -<span id="L73" class="LineNr"> 73 </span> <span class="muControl">return</span> <span class="Constant">0/no-conflict-found</span> +<span id="L73" class="LineNr"> 73 </span> <span class="muControl"> return</span> <span class="Constant">0/no-conflict-found</span> <span id="L74" class="LineNr"> 74 </span>] <span id="L75" class="LineNr"> 75 </span> <span id="L76" class="LineNr"> 76 </span><span class="muRecipe">def</span> <a href='nqueens.mu.html#L76'>conflicting-diagonal?</a> curr:<a href='nqueens.mu.html#L6'>square</a>, queens:&:<a href='064list.mu.html#L6'>list</a>:<a href='nqueens.mu.html#L6'>square</a><span class="muRecipe"> -> </span>result:bool [ @@ -151,9 +151,9 @@ if ('onhashchange' in window) { <span id="L90" class="LineNr"> 90 </span> <span class="Conceal">¦</span> diagonal-match?:bool <span class="Special"><-</span> equal rank-delta, file-delta <span id="L91" class="LineNr"> 91 </span> <span class="Conceal">¦</span> <span class="muControl">return-if</span> diagonal-match?, <span class="Constant">1/conflict-found</span> <span id="L92" class="LineNr"> 92 </span> <span class="Conceal">¦</span> queens <span class="Special"><-</span> <a href='064list.mu.html#L24'>rest</a> queens -<span id="L93" class="LineNr"> 93 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L93" class="LineNr"> 93 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L94" class="LineNr"> 94 </span> <span class="Delimiter">}</span> -<span id="L95" class="LineNr"> 95 </span> <span class="muControl">return</span> <span class="Constant">0/no-conflict-found</span> +<span id="L95" class="LineNr"> 95 </span> <span class="muControl"> return</span> <span class="Constant">0/no-conflict-found</span> <span id="L96" class="LineNr"> 96 </span>] <span id="L97" class="LineNr"> 97 </span> <span id="L98" class="LineNr"> 98 </span><span class="muRecipe">def</span> <a href='nqueens.mu.html#L98'>main</a> [ diff --git a/html/same-fringe.mu.html b/html/same-fringe.mu.html index 6c4a09ce..b6489a73 100644 --- a/html/same-fringe.mu.html +++ b/html/same-fringe.mu.html @@ -100,7 +100,7 @@ if ('onhashchange' in window) { <span id="L39" class="LineNr">39 </span> <span class="Conceal">¦</span> <span class="muControl">break-if</span> b-done? <span id="L40" class="LineNr">40 </span> <span class="Conceal">¦</span> match?:bool <span class="Special"><-</span> equal x, y <span id="L41" class="LineNr">41 </span> <span class="Conceal">¦</span> <span class="muControl">return-unless</span> match?, <span class="Constant">0/false</span> -<span id="L42" class="LineNr">42 </span> <span class="Conceal">¦</span> <span class="muControl">loop</span> +<span id="L42" class="LineNr">42 </span> <span class="Conceal">¦</span><span class="muControl"> loop</span> <span id="L43" class="LineNr">43 </span> <span class="Delimiter">}</span> <span id="L44" class="LineNr">44 </span> result <span class="Special"><-</span> and a-done?, b-done? <span id="L45" class="LineNr">45 </span>] diff --git a/html/tangle.mu.html b/html/tangle.mu.html index 3f9de231..28338947 100644 --- a/html/tangle.mu.html +++ b/html/tangle.mu.html @@ -84,7 +84,7 @@ if ('onhashchange' in window) { <span id="L24" class="LineNr">24 </span> <span class="Conceal">¦</span> x:num <span class="Special"><-</span> subtract n,<span class="Constant"> 1</span> <span id="L25" class="LineNr">25 </span> <span class="Conceal">¦</span> subresult:num <span class="Special"><-</span> <a href='tangle.mu.html#L9'>factorial</a> x <span id="L26" class="LineNr">26 </span> <span class="Conceal">¦</span> result <span class="Special"><-</span> multiply subresult, n -<span id="L27" class="LineNr">27 </span> <span class="Conceal">¦</span> <span class="muControl">return</span> result +<span id="L27" class="LineNr">27 </span> <span class="Conceal">¦</span><span class="muControl"> return</span> result <span id="L28" class="LineNr">28 </span> <span class="Delimiter">}</span> <span id="L29" class="LineNr">29 </span>] <span id="L30" class="LineNr">30 </span> |