diff options
Diffstat (limited to 'html')
-rw-r--r-- | html/003trace.cc.html | 9 | ||||
-rw-r--r-- | html/011load.cc.html | 8 | ||||
-rw-r--r-- | html/014literal_string.cc.html | 4 | ||||
-rw-r--r-- | html/020run.cc.html | 4 | ||||
-rw-r--r-- | html/026call.cc.html | 5 | ||||
-rw-r--r-- | html/032array.cc.html | 2 | ||||
-rw-r--r-- | html/050scenario.cc.html | 2 | ||||
-rw-r--r-- | html/059to_text.mu.html | 17 | ||||
-rw-r--r-- | html/061text.mu.html | 99 | ||||
-rw-r--r-- | html/062convert_ingredients_to_text.cc.html (renamed from html/062rewrite_stash.cc.html) | 67 | ||||
-rw-r--r-- | html/101run_sandboxed.cc.html | 33 | ||||
-rw-r--r-- | html/edit/010-sandbox-trace.mu.html | 12 |
12 files changed, 173 insertions, 89 deletions
diff --git a/html/003trace.cc.html b/html/003trace.cc.html index 0e35ce97..7a7cb31f 100644 --- a/html/003trace.cc.html +++ b/html/003trace.cc.html @@ -166,10 +166,11 @@ Hide_errors = <span class="Constant">false</span><span class="Delimiter">;</span <span class="Normal">void</span> trace_stream::newline<span class="Delimiter">()</span> <span class="Delimiter">{</span> <span class="Normal">if</span> <span class="Delimiter">(</span>!curr_stream<span class="Delimiter">)</span> <span class="Identifier">return</span><span class="Delimiter">;</span> string curr_contents = curr_stream<span class="Delimiter">-></span>str<span class="Delimiter">();</span> - <span class="Normal">if</span> <span class="Delimiter">(</span>curr_contents<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Identifier">return</span><span class="Delimiter">;</span> - past_lines<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>trace_line<span class="Delimiter">(</span>curr_depth<span class="Delimiter">,</span> trim<span class="Delimiter">(</span>curr_label<span class="Delimiter">),</span> curr_contents<span class="Delimiter">));</span> <span class="Comment">// preserve indent in contents</span> - <span class="Normal">if</span> <span class="Delimiter">(</span>!Hide_errors && curr_label == <span class="Constant">"error"</span><span class="Delimiter">)</span> - cerr << curr_label << <span class="Constant">": "</span> << curr_contents << <span class="cSpecial">'\n'</span><span class="Delimiter">;</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>!curr_contents<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span> + past_lines<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>trace_line<span class="Delimiter">(</span>curr_depth<span class="Delimiter">,</span> trim<span class="Delimiter">(</span>curr_label<span class="Delimiter">),</span> curr_contents<span class="Delimiter">));</span> <span class="Comment">// preserve indent in contents</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>!Hide_errors && curr_label == <span class="Constant">"error"</span><span class="Delimiter">)</span> + cerr << curr_label << <span class="Constant">": "</span> << curr_contents << <span class="cSpecial">'\n'</span><span class="Delimiter">;</span> + <span class="Delimiter">}</span> <span class="Normal">delete</span> curr_stream<span class="Delimiter">;</span> curr_stream = <span class="Constant">NULL</span><span class="Delimiter">;</span> curr_label<span class="Delimiter">.</span>clear<span class="Delimiter">();</span> diff --git a/html/011load.cc.html b/html/011load.cc.html index 0a232b80..bf642aaf 100644 --- a/html/011load.cc.html +++ b/html/011load.cc.html @@ -263,6 +263,14 @@ Disable_redefine_checks = <span class="Constant">false</span><span class="Delimi exit<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> <span class="Delimiter">}</span> +<span class="Delimiter">:(scenario recipe_instead_of_def)</span> +recipe main [ + <span class="Constant">1</span>:number<span class="Special"> <- </span>copy <span class="Constant">23</span> +] +<span class="traceContains">+parse: instruction: copy</span> +<span class="traceContains">+parse: ingredient: {23: "literal"}</span> +<span class="traceContains">+parse: product: {1: "number"}</span> + <span class="Delimiter">:(scenario parse_comment_outside_recipe)</span> <span class="Comment"># this comment will be dropped by the tangler, so we need a dummy recipe to stop that</span> def f1 [ diff --git a/html/014literal_string.cc.html b/html/014literal_string.cc.html index 52a1b264..bb6eba51 100644 --- a/html/014literal_string.cc.html +++ b/html/014literal_string.cc.html @@ -254,8 +254,8 @@ def main [ <span class="Delimiter">:(scenario multiple_unfinished_recipes)</span> <span class="Special">% Hide_errors = true;</span> -recipe f1 [ -recipe f2 [ +def f1 [ +def f2 [ <span class="traceContains">+error: unbalanced '['</span> </pre> </body> diff --git a/html/020run.cc.html b/html/020run.cc.html index a4ddb087..08909f94 100644 --- a/html/020run.cc.html +++ b/html/020run.cc.html @@ -160,6 +160,10 @@ map<string<span class="Delimiter">,</span> <span class="Normal">int</span>> <span class="Identifier">return</span> get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> Current_routine<span class="Delimiter">-></span>running_recipe<span class="Delimiter">).</span>name<span class="Delimiter">;</span> <span class="Delimiter">}</span> +<span class="Normal">const</span> recipe& current_recipe<span class="Delimiter">()</span> <span class="Delimiter">{</span> + <span class="Identifier">return</span> get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> Current_routine<span class="Delimiter">-></span>running_recipe<span class="Delimiter">);</span> +<span class="Delimiter">}</span> + <span class="Normal">const</span> instruction& current_instruction<span class="Delimiter">()</span> <span class="Delimiter">{</span> <span class="Identifier">return</span> get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> Current_routine<span class="Delimiter">-></span>running_recipe<span class="Delimiter">).</span>steps<span class="Delimiter">.</span>at<span class="Delimiter">(</span>Current_routine<span class="Delimiter">-></span>running_step_index<span class="Delimiter">);</span> <span class="Delimiter">}</span> diff --git a/html/026call.cc.html b/html/026call.cc.html index ca151665..687ffbd3 100644 --- a/html/026call.cc.html +++ b/html/026call.cc.html @@ -119,6 +119,11 @@ call& current_call<span class="Delimiter">()</span> <span class="Delimiter"> assert<span class="Delimiter">(</span>!Current_routine<span class="Delimiter">-></span>calls<span class="Delimiter">.</span>empty<span class="Delimiter">());</span> <span class="Identifier">return</span> get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> current_call<span class="Delimiter">().</span>running_recipe<span class="Delimiter">).</span>name<span class="Delimiter">;</span> <span class="Delimiter">}</span> +<span class="Delimiter">:(replace{} "const recipe& current_recipe()")</span> +<span class="Normal">const</span> recipe& current_recipe<span class="Delimiter">()</span> <span class="Delimiter">{</span> + assert<span class="Delimiter">(</span>!Current_routine<span class="Delimiter">-></span>calls<span class="Delimiter">.</span>empty<span class="Delimiter">());</span> + <span class="Identifier">return</span> get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> current_call<span class="Delimiter">().</span>running_recipe<span class="Delimiter">);</span> +<span class="Delimiter">}</span> <span class="Delimiter">:(replace{} "const instruction& current_instruction()")</span> <span class="Normal">const</span> instruction& current_instruction<span class="Delimiter">()</span> <span class="Delimiter">{</span> assert<span class="Delimiter">(</span>!Current_routine<span class="Delimiter">-></span>calls<span class="Delimiter">.</span>empty<span class="Delimiter">());</span> diff --git a/html/032array.cc.html b/html/032array.cc.html index d78f29ab..1a733068 100644 --- a/html/032array.cc.html +++ b/html/032array.cc.html @@ -209,7 +209,7 @@ def main [ container card [ <span class="Normal">rank</span>:number<span class="Special"> <- </span>next-ingredient ] -recipe foo [ +def foo [ <span class="Constant">1</span>:card<span class="Special"> <- </span>merge <span class="Constant">3</span> <span class="Constant">2</span>:number<span class="Special"> <- </span>get <span class="Constant">1</span>:card rank:offset ] diff --git a/html/050scenario.cc.html b/html/050scenario.cc.html index 7554e95a..9dcedc44 100644 --- a/html/050scenario.cc.html +++ b/html/050scenario.cc.html @@ -447,7 +447,7 @@ put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span trace<span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"checking string length at "</span> << address << end<span class="Delimiter">();</span> <span class="Normal">if</span> <span class="Delimiter">(</span>get_or_insert<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> address<span class="Delimiter">)</span> != SIZE<span class="Delimiter">(</span>literal<span class="Delimiter">))</span> <span class="Delimiter">{</span> <span class="Normal">if</span> <span class="Delimiter">(</span>Current_scenario && !Scenario_testing_scenario<span class="Delimiter">)</span> - raise << <span class="Constant">"</span><span class="cSpecial">\n</span><span class="Constant">F - "</span> << Current_scenario<span class="Delimiter">-></span>name << <span class="Constant">": expected location '"</span> << address << <span class="Constant">"' to contain length "</span> << SIZE<span class="Delimiter">(</span>literal<span class="Delimiter">)</span> << <span class="Constant">" of string ["</span> << literal << <span class="Constant">"] but saw "</span> << no_scientific<span class="Delimiter">(</span>get_or_insert<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> address<span class="Delimiter">))</span> << <span class="Constant">" ("</span> << read_mu_string<span class="Delimiter">(</span>address<span class="Delimiter">)</span> << <span class="Constant">")</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> + raise << <span class="Constant">"</span><span class="cSpecial">\n</span><span class="Constant">F - "</span> << Current_scenario<span class="Delimiter">-></span>name << <span class="Constant">": expected location '"</span> << address << <span class="Constant">"' to contain length "</span> << SIZE<span class="Delimiter">(</span>literal<span class="Delimiter">)</span> << <span class="Constant">" of string ["</span> << literal << <span class="Constant">"] but saw "</span> << no_scientific<span class="Delimiter">(</span>get_or_insert<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> address<span class="Delimiter">))</span> << <span class="Constant">" ("</span> << read_mu_string<span class="Delimiter">(</span>address-<span class="Comment">/*</span><span class="Comment">fake refcount</span><span class="Comment">*/</span><span class="Constant">1</span><span class="Delimiter">)</span> << <span class="Constant">")</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> <span class="Normal">else</span> raise << <span class="Constant">"expected location '"</span> << address << <span class="Constant">"' to contain length "</span> << SIZE<span class="Delimiter">(</span>literal<span class="Delimiter">)</span> << <span class="Constant">" of string ["</span> << literal << <span class="Constant">"] but saw "</span> << no_scientific<span class="Delimiter">(</span>get_or_insert<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> address<span class="Delimiter">))</span> << <span class="cSpecial">'\n'</span> << end<span class="Delimiter">();</span> <span class="Normal">if</span> <span class="Delimiter">(</span>!Scenario_testing_scenario<span class="Delimiter">)</span> Passed = <span class="Constant">false</span><span class="Delimiter">;</span> diff --git a/html/059to_text.mu.html b/html/059to_text.mu.html index deaacdf7..b050f5e9 100644 --- a/html/059to_text.mu.html +++ b/html/059to_text.mu.html @@ -60,6 +60,23 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color x:text<span class="Special"> <- </span>array-to-text-line n <span class="Comment"># just ensure there were no errors</span> ] + +<span class="Comment"># finally, a specialization for single characters</span> +<span class="muRecipe">def</span> to-text c:character<span class="muRecipe"> -> </span>y:text [ + <span class="Constant">local-scope</span> + <span class="Constant">load-ingredients</span> + y<span class="Special"> <- </span>new <span class="Constant">character:type</span>, <span class="Constant">1/capacity</span> + *y<span class="Special"> <- </span>put-index *y, <span class="Constant">0</span>, c +] + +<span class="muScenario">scenario</span> character-to-text [ + <span class="Constant">1</span>:character<span class="Special"> <- </span>copy <span class="Constant">111/o</span> + <span class="Constant">2</span>:text<span class="Special"> <- </span>to-text <span class="Constant">1</span>:character + <span class="Constant">3</span>:array:character<span class="Special"> <- </span>copy *<span class="Constant">2</span>:text + memory-should-contain [ + <span class="Constant">3</span>:array:character<span class="Special"> <- </span><span class="Constant">[o]</span> + ] +] </pre> </body> </html> diff --git a/html/061text.mu.html b/html/061text.mu.html index e1a99fc8..0a0e41bf 100644 --- a/html/061text.mu.html +++ b/html/061text.mu.html @@ -151,15 +151,15 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color <span class="muControl">return</span> result ] -<span class="muRecipe">def</span> grow-buffer in:address:buffer<span class="muRecipe"> -> </span>in:address:buffer [ +<span class="muRecipe">def</span> grow-buffer buf:address:buffer<span class="muRecipe"> -> </span>buf:address:buffer [ <span class="Constant">local-scope</span> <span class="Constant">load-ingredients</span> <span class="Comment"># double buffer size</span> - olddata:text<span class="Special"> <- </span>get *in, <span class="Constant">data:offset</span> + olddata:text<span class="Special"> <- </span>get *buf, <span class="Constant">data:offset</span> oldlen:number<span class="Special"> <- </span>length *olddata newlen:number<span class="Special"> <- </span>multiply oldlen, <span class="Constant">2</span> newdata:text<span class="Special"> <- </span>new <span class="Constant">character:type</span>, newlen - *in<span class="Special"> <- </span>put *in, <span class="Constant">data:offset</span>, newdata + *buf<span class="Special"> <- </span>put *buf, <span class="Constant">data:offset</span>, newdata <span class="Comment"># copy old contents</span> i:number<span class="Special"> <- </span>copy <span class="Constant">0</span> <span class="Delimiter">{</span> @@ -198,10 +198,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color <span class="Delimiter">}</span> ] -<span class="muRecipe">def</span> append in:address:buffer, c:character<span class="muRecipe"> -> </span>in:address:buffer [ +<span class="muRecipe">def</span> append buf:address:buffer, c:character<span class="muRecipe"> -> </span>buf:address:buffer [ <span class="Constant">local-scope</span> <span class="Constant">load-ingredients</span> - len:number<span class="Special"> <- </span>get *in, <span class="Constant">length:offset</span> + len:number<span class="Special"> <- </span>get *buf, <span class="Constant">length:offset</span> <span class="Delimiter">{</span> <span class="Comment"># backspace? just drop last character if it exists and return</span> backspace?:boolean<span class="Special"> <- </span>equal c, <span class="Constant">8/backspace</span> @@ -209,19 +209,34 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color empty?:boolean<span class="Special"> <- </span>lesser-or-equal len, <span class="Constant">0</span> <span class="muControl">return-if</span> empty? len<span class="Special"> <- </span>subtract len, <span class="Constant">1</span> - *in<span class="Special"> <- </span>put *in, <span class="Constant">length:offset</span>, len + *buf<span class="Special"> <- </span>put *buf, <span class="Constant">length:offset</span>, len <span class="muControl">return</span> <span class="Delimiter">}</span> <span class="Delimiter">{</span> <span class="Comment"># grow buffer if necessary</span> - full?:boolean<span class="Special"> <- </span>buffer-full? in + full?:boolean<span class="Special"> <- </span>buffer-full? buf <span class="muControl">break-unless</span> full? - in<span class="Special"> <- </span>grow-buffer in + buf<span class="Special"> <- </span>grow-buffer buf <span class="Delimiter">}</span> - s:text<span class="Special"> <- </span>get *in, <span class="Constant">data:offset</span> + s:text<span class="Special"> <- </span>get *buf, <span class="Constant">data:offset</span> *s<span class="Special"> <- </span>put-index *s, len, c len<span class="Special"> <- </span>add len, <span class="Constant">1</span> - *in<span class="Special"> <- </span>put *in, <span class="Constant">length:offset</span>, len + *buf<span class="Special"> <- </span>put *buf, <span class="Constant">length:offset</span>, len +] + +<span class="muRecipe">def</span> append buf:address:buffer, t:text<span class="muRecipe"> -> </span>buf:address:buffer [ + <span class="Constant">local-scope</span> + <span class="Constant">load-ingredients</span> + len:number<span class="Special"> <- </span>length *t + i:number<span class="Special"> <- </span>copy <span class="Constant">0</span> + <span class="Delimiter">{</span> + done?:boolean<span class="Special"> <- </span>greater-or-equal i, len + <span class="muControl">break-if</span> done? + c:character<span class="Special"> <- </span>index *t, i + buf<span class="Special"> <- </span>append buf, c + i<span class="Special"> <- </span>add i, <span class="Constant">1</span> + <span class="muControl">loop</span> + <span class="Delimiter">}</span> ] <span class="muScenario">scenario</span> buffer-append-works [ @@ -318,44 +333,32 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color <span class="Delimiter">}</span> ] -<span class="muRecipe">def</span> append a:text, b:text<span class="muRecipe"> -> </span>result:text [ +<span class="Comment"># Append any number of texts together.</span> +<span class="Comment"># A later layer also translates calls to this to implicitly call to-text, so</span> +<span class="Comment"># append to string becomes effectively dynamically typed.</span> +<span class="Comment">#</span> +<span class="Comment"># Beware though: this hack restricts how much 'append' can be overridden. Any</span> +<span class="Comment"># new variants that match:</span> +<span class="Comment"># append _:text, ___</span> +<span class="Comment"># will never ever get used.</span> +<span class="muRecipe">def</span> append first:text<span class="muRecipe"> -> </span>result:text [ <span class="Constant">local-scope</span> <span class="Constant">load-ingredients</span> - <span class="Comment"># handle null addresses</span> - <span class="muControl">return-unless</span> a, b - <span class="muControl">return-unless</span> b, a - <span class="Comment"># result = new character[a.length + b.length]</span> - a-len:number<span class="Special"> <- </span>length *a - b-len:number<span class="Special"> <- </span>length *b - result-len:number<span class="Special"> <- </span>add a-len, b-len - result<span class="Special"> <- </span>new <span class="Constant">character:type</span>, result-len - <span class="Comment"># copy a into result</span> - result-idx:number<span class="Special"> <- </span>copy <span class="Constant">0</span> - i:number<span class="Special"> <- </span>copy <span class="Constant">0</span> + buf:address:buffer<span class="Special"> <- </span>new-buffer <span class="Constant">30</span> + <span class="Comment"># append first ingredient</span> <span class="Delimiter">{</span> - <span class="Comment"># while i < a.length</span> - a-done?:boolean<span class="Special"> <- </span>greater-or-equal i, a-len - <span class="muControl">break-if</span> a-done? - <span class="Comment"># result[result-idx] = a[i]</span> - in:character<span class="Special"> <- </span>index *a, i - *result<span class="Special"> <- </span>put-index *result, result-idx, in - i<span class="Special"> <- </span>add i, <span class="Constant">1</span> - result-idx<span class="Special"> <- </span>add result-idx, <span class="Constant">1</span> - <span class="muControl">loop</span> + <span class="muControl">break-unless</span> first + buf<span class="Special"> <- </span>append buf, first <span class="Delimiter">}</span> - <span class="Comment"># copy b into result</span> - i<span class="Special"> <- </span>copy <span class="Constant">0</span> + <span class="Comment"># append remaining ingredients</span> <span class="Delimiter">{</span> - <span class="Comment"># while i < b.length</span> - b-done?:boolean<span class="Special"> <- </span>greater-or-equal i, b-len - <span class="muControl">break-if</span> b-done? - <span class="Comment"># result[result-idx] = a[i]</span> - in:character<span class="Special"> <- </span>index *b, i - *result<span class="Special"> <- </span>put-index *result, result-idx, in - i<span class="Special"> <- </span>add i, <span class="Constant">1</span> - result-idx<span class="Special"> <- </span>add result-idx, <span class="Constant">1</span> + arg:text, arg-found?:boolean<span class="Special"> <- </span><span class="Constant">next-ingredient</span> + <span class="muControl">break-unless</span> arg-found? + <span class="muControl">loop-unless</span> arg + buf<span class="Special"> <- </span>append buf, arg <span class="muControl">loop</span> <span class="Delimiter">}</span> + result<span class="Special"> <- </span>buffer-to-array buf ] <span class="muScenario">scenario</span> text-append-1 [ @@ -397,6 +400,20 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color ] ] +<span class="muScenario">scenario</span> text-append-multiary [ + run [ + <span class="Constant">local-scope</span> + x:text<span class="Special"> <- </span>new <span class="Constant">[hello, ]</span> + y:text<span class="Special"> <- </span>new <span class="Constant">[world]</span> + z:text<span class="Special"> <- </span>new <span class="Constant">[!]</span> + z:text<span class="Special"> <- </span>append x, y, z + <span class="Constant">10</span>:array:character/<span class="Special">raw <- </span>copy *z + ] + memory-should-contain [ + <span class="Constant">10</span>:array:character<span class="Special"> <- </span><span class="Constant">[hello, world!]</span> + ] +] + <span class="muScenario">scenario</span> replace-character-in-text [ run [ <span class="Constant">local-scope</span> diff --git a/html/062rewrite_stash.cc.html b/html/062convert_ingredients_to_text.cc.html index 8ed4fa38..34ef34f0 100644 --- a/html/062rewrite_stash.cc.html +++ b/html/062convert_ingredients_to_text.cc.html @@ -2,7 +2,7 @@ <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> -<title>Mu - 062rewrite_stash.cc</title> +<title>Mu - 062convert_ingredients_to_text.cc</title> <meta name="Generator" content="Vim/7.4"> <meta name="plugin-version" content="vim7.4_v2"> <meta name="syntax" content="cpp"> @@ -18,8 +18,9 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Comment { color: #9090ff; } .Delimiter { color: #800080; } .Special { color: #c00000; } -.Identifier { color: #fcb165; } +.CommentedCode { color: #6c6c6c; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } +.Identifier { color: #fcb165; } --> </style> @@ -31,12 +32,11 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color </head> <body> <pre id='vimCodeElement'> -<span class="Comment">//: when encountering other types, try to convert them to strings using</span> -<span class="Comment">//: 'to-text'</span> +<span class="Comment">//: make some functions more friendly by trying to auto-convert their ingredients to text</span> <span class="Delimiter">:(scenarios transform)</span> <span class="Delimiter">:(scenario rewrite_stashes_to_text)</span> -recipe main [ +def main [ local-scope <span class="Normal">n</span>:number<span class="Special"> <- </span>copy <span class="Constant">34</span> stash n @@ -45,7 +45,7 @@ recipe main [ <span class="traceContains">+transform: stash {stash_2_0: ("address" "array" "character")}</span> <span class="Delimiter">:(scenario rewrite_traces_to_text)</span> -recipe main [ +def main [ local-scope <span class="Normal">n</span>:number<span class="Special"> <- </span>copy <span class="Constant">34</span> trace <span class="Constant">2</span><span class="Delimiter">,</span> [app]<span class="Delimiter">,</span> n @@ -57,7 +57,7 @@ recipe main [ <span class="Comment">//: passing addresses around</span> <span class="Delimiter">:(scenario rewrite_stashes_of_arrays)</span> -recipe main [ +def main [ local-scope <span class="Normal">n</span>:address:array:number<span class="Special"> <- </span><span class="Normal">new</span> number:type<span class="Delimiter">,</span> <span class="Constant">3</span> stash *n @@ -66,7 +66,7 @@ recipe main [ <span class="traceContains">+transform: stash {stash_2_0: ("address" "array" "character")}</span> <span class="Delimiter">:(scenario ignore_stashes_of_static_arrays)</span> -recipe main [ +def main [ local-scope <span class="Normal">n</span>:array:number:<span class="Constant">3</span><span class="Special"> <- </span>create-array stash n @@ -77,7 +77,7 @@ recipe main [ container foo [ <span class="Normal">x</span>:number ] -recipe bar <span class="Delimiter">-></span> x:foo [ +def bar <span class="Delimiter">-></span> x:foo [ local-scope load-ingredients x<span class="Special"> <- </span>merge <span class="Constant">34</span> @@ -88,33 +88,51 @@ recipe bar <span class="Delimiter">-></span> x:foo [ <span class="Comment">//: misplaced; should be in instruction inserting/deleting transforms, but has</span> <span class="Comment">//: prerequisites: deduce_types_from_header and check_or_set_types_by_name</span> <span class="Delimiter">:(after "Transform.push_back(deduce_types_from_header)")</span> -Transform<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>rewrite_stashes_to_text<span class="Delimiter">);</span> +Transform<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>convert_ingredients_to_text<span class="Delimiter">);</span> <span class="Delimiter">:(code)</span> -<span class="Normal">void</span> rewrite_stashes_to_text<span class="Delimiter">(</span>recipe_ordinal r<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span class="Normal">void</span> convert_ingredients_to_text<span class="Delimiter">(</span>recipe_ordinal r<span class="Delimiter">)</span> <span class="Delimiter">{</span> recipe& caller = get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">);</span> - trace<span class="Delimiter">(</span><span class="Constant">9991</span><span class="Delimiter">,</span> <span class="Constant">"transform"</span><span class="Delimiter">)</span> << <span class="Constant">"--- rewrite 'stash' instructions in recipe "</span> << caller<span class="Delimiter">.</span>name << end<span class="Delimiter">();</span> + trace<span class="Delimiter">(</span><span class="Constant">9991</span><span class="Delimiter">,</span> <span class="Constant">"transform"</span><span class="Delimiter">)</span> << <span class="Constant">"--- convert some ingredients to text in recipe "</span> << caller<span class="Delimiter">.</span>name << end<span class="Delimiter">();</span> +<span class="CommentedCode">//? cerr << "--- convert some ingredients to text in recipe " << caller.name << '\n';</span> <span class="Comment">// in recipes without named locations, 'stash' is still not extensible</span> <span class="Normal">if</span> <span class="Delimiter">(</span>contains_numeric_locations<span class="Delimiter">(</span>caller<span class="Delimiter">))</span> <span class="Identifier">return</span><span class="Delimiter">;</span> - rewrite_stashes_to_text<span class="Delimiter">(</span>caller<span class="Delimiter">);</span> + convert_ingredients_to_text<span class="Delimiter">(</span>caller<span class="Delimiter">);</span> <span class="Delimiter">}</span> -<span class="Normal">void</span> rewrite_stashes_to_text<span class="Delimiter">(</span>recipe& caller<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span class="Normal">void</span> convert_ingredients_to_text<span class="Delimiter">(</span>recipe& caller<span class="Delimiter">)</span> <span class="Delimiter">{</span> vector<instruction> new_instructions<span class="Delimiter">;</span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">0</span><span class="Delimiter">;</span> i < SIZE<span class="Delimiter">(</span>caller<span class="Delimiter">.</span>steps<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> instruction& inst = caller<span class="Delimiter">.</span>steps<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">);</span> + <span class="Comment">// all these cases are getting hairy. how can we make this extensible?</span> <span class="Normal">if</span> <span class="Delimiter">(</span>inst<span class="Delimiter">.</span>name == <span class="Constant">"stash"</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> j = <span class="Constant">0</span><span class="Delimiter">;</span> j < SIZE<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">);</span> ++j<span class="Delimiter">)</span> <span class="Delimiter">{</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>is_literal_string<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>j<span class="Delimiter">)))</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> ostringstream ingredient_name<span class="Delimiter">;</span> ingredient_name << <span class="Constant">"stash_"</span> << i << <span class="Constant">'_'</span> << j << <span class="Constant">":address:array:character"</span><span class="Delimiter">;</span> - rewrite_stash_to_text<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>j<span class="Delimiter">),</span> new_instructions<span class="Delimiter">,</span> ingredient_name<span class="Delimiter">.</span>str<span class="Delimiter">());</span> + convert_ingredient_to_text<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>j<span class="Delimiter">),</span> new_instructions<span class="Delimiter">,</span> ingredient_name<span class="Delimiter">.</span>str<span class="Delimiter">());</span> <span class="Delimiter">}</span> <span class="Delimiter">}</span> <span class="Normal">else</span> <span class="Normal">if</span> <span class="Delimiter">(</span>inst<span class="Delimiter">.</span>name == <span class="Constant">"trace"</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> j = <span class="Comment">/*</span><span class="Comment">skip</span><span class="Comment">*/</span><span class="Constant">2</span><span class="Delimiter">;</span> j < SIZE<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">);</span> ++j<span class="Delimiter">)</span> <span class="Delimiter">{</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>is_literal_string<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>j<span class="Delimiter">)))</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> ostringstream ingredient_name<span class="Delimiter">;</span> ingredient_name << <span class="Constant">"trace_"</span> << i << <span class="Constant">'_'</span> << j << <span class="Constant">":address:array:character"</span><span class="Delimiter">;</span> - rewrite_stash_to_text<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>j<span class="Delimiter">),</span> new_instructions<span class="Delimiter">,</span> ingredient_name<span class="Delimiter">.</span>str<span class="Delimiter">());</span> + convert_ingredient_to_text<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>j<span class="Delimiter">),</span> new_instructions<span class="Delimiter">,</span> ingredient_name<span class="Delimiter">.</span>str<span class="Delimiter">());</span> + <span class="Delimiter">}</span> + <span class="Delimiter">}</span> + <span class="Normal">else</span> <span class="Normal">if</span> <span class="Delimiter">(</span>inst<span class="Delimiter">.</span>old_name == <span class="Constant">"append"</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> + <span class="Comment">// override only variants that try to append to a string</span> + <span class="Comment">// Beware: this hack restricts how much 'append' can be overridden. Any</span> + <span class="Comment">// new variants that match:</span> + <span class="Comment">// append _:text, ___</span> + <span class="Comment">// will never ever get used.</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>is_literal_string<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">))</span> || is_mu_string<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)))</span> <span class="Delimiter">{</span> + <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> j = <span class="Constant">0</span><span class="Delimiter">;</span> j < SIZE<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">);</span> ++j<span class="Delimiter">)</span> <span class="Delimiter">{</span> + ostringstream ingredient_name<span class="Delimiter">;</span> + ingredient_name << <span class="Constant">"append_"</span> << i << <span class="Constant">'_'</span> << j << <span class="Constant">":address:array:character"</span><span class="Delimiter">;</span> + convert_ingredient_to_text<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>j<span class="Delimiter">),</span> new_instructions<span class="Delimiter">,</span> ingredient_name<span class="Delimiter">.</span>str<span class="Delimiter">());</span> + <span class="Delimiter">}</span> <span class="Delimiter">}</span> <span class="Delimiter">}</span> trace<span class="Delimiter">(</span><span class="Constant">9993</span><span class="Delimiter">,</span> <span class="Constant">"transform"</span><span class="Delimiter">)</span> << to_string<span class="Delimiter">(</span>inst<span class="Delimiter">)</span> << end<span class="Delimiter">();</span> @@ -125,9 +143,8 @@ Transform<span class="Delimiter">.</span>push_back<span class="Delimiter">(</spa <span class="Comment">// add an instruction to convert reagent 'r' to text in list 'out', then</span> <span class="Comment">// replace r with converted text</span> -<span class="Normal">void</span> rewrite_stash_to_text<span class="Delimiter">(</span>reagent& r<span class="Delimiter">,</span> vector<instruction>& out<span class="Delimiter">,</span> <span class="Normal">const</span> string& tmp_var<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span class="Normal">void</span> convert_ingredient_to_text<span class="Delimiter">(</span>reagent& r<span class="Delimiter">,</span> vector<instruction>& out<span class="Delimiter">,</span> <span class="Normal">const</span> string& tmp_var<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span class="Normal">if</span> <span class="Delimiter">(</span>!r<span class="Delimiter">.</span>type<span class="Delimiter">)</span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span class="Comment">// error; will be handled elsewhere</span> - <span class="Normal">if</span> <span class="Delimiter">(</span>is_literal<span class="Delimiter">(</span>r<span class="Delimiter">))</span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span class="Normal">if</span> <span class="Delimiter">(</span>is_mu_string<span class="Delimiter">(</span>r<span class="Delimiter">))</span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span class="Comment">// don't try to extend static arrays</span> <span class="Normal">if</span> <span class="Delimiter">(</span>is_static_array<span class="Delimiter">(</span>r<span class="Delimiter">))</span> <span class="Identifier">return</span><span class="Delimiter">;</span> @@ -161,17 +178,27 @@ Transform<span class="Delimiter">.</span>push_back<span class="Delimiter">(</spa <span class="Identifier">return</span> !x<span class="Delimiter">.</span>type<span class="Delimiter">-></span>atom && x<span class="Delimiter">.</span>type<span class="Delimiter">-></span>left<span class="Delimiter">-></span>atom && x<span class="Delimiter">.</span>type<span class="Delimiter">-></span>left<span class="Delimiter">-></span>name == <span class="Constant">"array"</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> +<span class="Delimiter">:(scenarios run)</span> +<span class="Delimiter">:(scenario append_other_types_to_text)</span> +def main [ + local-scope + <span class="Normal">n</span>:number<span class="Special"> <- </span>copy <span class="Constant">11</span> + <span class="Normal">c</span>:character<span class="Special"> <- </span>copy <span class="Constant">111</span>/o + <span class="Normal">a</span>:text<span class="Special"> <- </span>append [abc]<span class="Delimiter">,</span> <span class="Constant">10</span><span class="Delimiter">,</span> n<span class="Delimiter">,</span> c + <span class="Normal">expected</span>:text<span class="Special"> <- </span><span class="Normal">new</span> [abc1011o] + <span class="Constant">10</span>:boolean/<span class="Special">raw <- </span>equal a<span class="Delimiter">,</span> expected +] + <span class="Comment">//: Make sure that the new system is strictly better than just the 'stash'</span> <span class="Comment">//: primitive by itself.</span> -<span class="Delimiter">:(scenarios run)</span> <span class="Delimiter">:(scenario rewrite_stash_continues_to_fall_back_to_default_implementation)</span> <span class="Comment"># type without a to-text implementation</span> container foo [ <span class="Normal">x</span>:number <span class="Normal">y</span>:number ] -recipe main [ +def main [ local-scope <span class="Normal">x</span>:foo<span class="Special"> <- </span>merge <span class="Constant">34</span><span class="Delimiter">,</span> <span class="Constant">35</span> stash x diff --git a/html/101run_sandboxed.cc.html b/html/101run_sandboxed.cc.html index d43b68af..bf39a10e 100644 --- a/html/101run_sandboxed.cc.html +++ b/html/101run_sandboxed.cc.html @@ -21,6 +21,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color .Special { color: #c00000; } .Identifier { color: #fcb165; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } +.CommentedCode { color: #6c6c6c; } --> </style> @@ -102,12 +103,21 @@ put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span <span class="Delimiter">}</span> <span class="Delimiter">}</span> +<span class="Comment">//: To show results in the sandbox Mu uses a hack: it saves the products</span> +<span class="Comment">//: returned by each instruction while Track_most_recent_products is true, and</span> +<span class="Comment">//: keeps the most recent such result around so that it can be returned as the</span> +<span class="Comment">//: result of a sandbox.</span> + <span class="Delimiter">:(before "End Globals")</span> <span class="Normal">bool</span> Track_most_recent_products = <span class="Constant">false</span><span class="Delimiter">;</span> -trace_stream* Save_trace_stream = <span class="Constant">NULL</span><span class="Delimiter">;</span> -string Save_trace_file<span class="Delimiter">;</span> +string Most_recent_products<span class="Delimiter">;</span> <span class="Delimiter">:(before "End Setup")</span> Track_most_recent_products = <span class="Constant">false</span><span class="Delimiter">;</span> +Most_recent_products = <span class="Constant">""</span><span class="Delimiter">;</span> + +<span class="Delimiter">:(before "End Globals")</span> +trace_stream* Save_trace_stream = <span class="Constant">NULL</span><span class="Delimiter">;</span> +string Save_trace_file<span class="Delimiter">;</span> <span class="Delimiter">:(code)</span> <span class="Comment">// reads a string, tries to call it as code (treating it as a test), saving</span> <span class="Comment">// all errors.</span> @@ -175,6 +185,9 @@ map<string<span class="Delimiter">,</span> vector<recipe_ordinal> > <span class="Normal">void</span> run_code_end<span class="Delimiter">()</span> <span class="Delimiter">{</span> Hide_errors = <span class="Constant">false</span><span class="Delimiter">;</span> Disable_redefine_checks = <span class="Constant">false</span><span class="Delimiter">;</span> +<span class="CommentedCode">//? ofstream fout("sandbox.log");</span> +<span class="CommentedCode">//? fout << Trace_stream->readable_contents("");</span> +<span class="CommentedCode">//? fout.close();</span> <span class="Normal">delete</span> Trace_stream<span class="Delimiter">;</span> Trace_stream = Save_trace_stream<span class="Delimiter">;</span> Save_trace_stream = <span class="Constant">NULL</span><span class="Delimiter">;</span> @@ -382,10 +395,6 @@ def main [ <span class="Comment"># no errors</span> <span class="traceContains">+mem: storing 0 in location 3</span> -<span class="Delimiter">:(before "End Globals")</span> -string Most_recent_products<span class="Delimiter">;</span> -<span class="Delimiter">:(before "End Setup")</span> -Most_recent_products = <span class="Constant">""</span><span class="Delimiter">;</span> <span class="Delimiter">:(before "End Running One Instruction")</span> <span class="Normal">if</span> <span class="Delimiter">(</span>Track_most_recent_products<span class="Delimiter">)</span> <span class="Delimiter">{</span> track_most_recent_products<span class="Delimiter">(</span>current_instruction<span class="Delimiter">(),</span> products<span class="Delimiter">);</span> @@ -394,14 +403,22 @@ Most_recent_products = <span class="Constant">""</span><span class="De <span class="Normal">void</span> track_most_recent_products<span class="Delimiter">(</span><span class="Normal">const</span> instruction& instruction<span class="Delimiter">,</span> <span class="Normal">const</span> vector<vector<<span class="Normal">double</span>> >& products<span class="Delimiter">)</span> <span class="Delimiter">{</span> ostringstream out<span class="Delimiter">;</span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">0</span><span class="Delimiter">;</span> i < SIZE<span class="Delimiter">(</span>products<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> - <span class="Comment">// string</span> + <span class="Comment">// A sandbox can print a string result, but only if it is actually saved</span> + <span class="Comment">// to a variable in the sandbox, because otherwise the results are</span> + <span class="Comment">// reclaimed before the sandbox sees them. So you get these interactions</span> + <span class="Comment">// in the sandbox:</span> + <span class="Comment">//</span> + <span class="Comment">// new [abc]</span> + <span class="Comment">// => <address></span> + <span class="Comment">//</span> + <span class="Comment">// x:text <- new [abc]</span> + <span class="Comment">// => abc</span> <span class="Normal">if</span> <span class="Delimiter">(</span>i < SIZE<span class="Delimiter">(</span>instruction<span class="Delimiter">.</span>products<span class="Delimiter">))</span> <span class="Delimiter">{</span> <span class="Normal">if</span> <span class="Delimiter">(</span>is_mu_string<span class="Delimiter">(</span>instruction<span class="Delimiter">.</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)))</span> <span class="Delimiter">{</span> <span class="Normal">if</span> <span class="Delimiter">(</span>!scalar<span class="Delimiter">(</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)))</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> <span class="Comment">// error handled elsewhere</span> out << read_mu_string<span class="Delimiter">(</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">))</span> << <span class="cSpecial">'\n'</span><span class="Delimiter">;</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> - <span class="Comment">// End Record Product Special-cases</span> <span class="Delimiter">}</span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> j = <span class="Constant">0</span><span class="Delimiter">;</span> j < SIZE<span class="Delimiter">(</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">));</span> ++j<span class="Delimiter">)</span> out << no_scientific<span class="Delimiter">(</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>at<span class="Delimiter">(</span>j<span class="Delimiter">))</span> << <span class="Constant">' '</span><span class="Delimiter">;</span> diff --git a/html/edit/010-sandbox-trace.mu.html b/html/edit/010-sandbox-trace.mu.html index 3c4956b7..177fdee1 100644 --- a/html/edit/010-sandbox-trace.mu.html +++ b/html/edit/010-sandbox-trace.mu.html @@ -76,9 +76,6 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color <span class="Constant"> . stash [abc] ┊0 edit copy delete .</span> <span class="Constant"> .] ┊foo .</span> <span class="Constant"> .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊abc .</span> - <span class="Constant"> . ┊8 instructions run .</span> - <span class="Constant"> . ┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.</span> - <span class="Constant"> . ┊ .</span> ] screen-should-contain-in-color <span class="Constant">245/grey</span>, [ <span class="Constant"> . .</span> @@ -87,9 +84,6 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color <span class="Constant"> . ┊ .</span> <span class="Constant"> . ┊ .</span> <span class="Constant"> .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊abc .</span> - <span class="Constant"> . ┊8 instructions run .</span> - <span class="Constant"> . ┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.</span> - <span class="Constant"> . ┊ .</span> ] <span class="Comment"># click again on the same region</span> assume-console [ @@ -178,9 +172,6 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color <span class="Constant"> . ┊0 edit copy delete .</span> <span class="Constant"> . ┊stash 123456789 .</span> <span class="Constant"> . ┊123456789 .</span> - <span class="Constant"> . ┊6 instructions run .</span> - <span class="Constant"> . ┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.</span> - <span class="Constant"> . ┊ .</span> ] <span class="Comment"># click on the stash under the edit-button region (or any of the other buttons, really)</span> assume-console [ @@ -197,9 +188,6 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color <span class="Constant"> . ┊0 edit copy delete .</span> <span class="Constant"> . ┊stash 123456789 .</span> <span class="Constant"> . ┊123456789 .</span> - <span class="Constant"> . ┊6 instructions run .</span> - <span class="Constant"> . ┊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━.</span> - <span class="Constant"> . ┊ .</span> ] ] |