about summary refs log tree commit diff stats
path: root/js/map-maker/imgs/extracted-1688-map/MapPartsWhite/hills_white/27.png
blob: c210232de155000ed0585e0bbd98eecc0ae70b76 (plain)
ofshex dumpascii
0000 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 00 5f 00 00 00 20 08 06 00 00 00 74 38 a4 .PNG........IHDR..._.........t8.
0020 e1 00 00 06 52 49 44 41 54 78 da ed 9a 0f 48 55 67 18 c6 fb 33 99 56 e8 8a bc d2 a4 44 c3 a2 49 ....RIDATx....HUg...3.V.....D..I
0040 61 c3 48 54 92 89 61 4c 8c 49 11 13 a3 28 14 51 94 44 0a c6 50 92 8d 58 28 a1 24 92 28 4a 28 89 a.HT..aL.I...(.Q.D..P..X(.$.(J(.
0060 e3 ca a5 cb 95 24 51 92 85 63 17 43 c9 d8 68 e8 58 23 51 f1 0e 1b e5 da 6a 2b f7 be f4 3b ec 4c .....$Q..c.C..h.X#Q.....j+...;.L
0080 e6 75 fe a9 5d f5 1c 78 38 c7 7b ce f9 ce 3d cf f7 be cf fb bc df 75 d5 2a 6b b3 36 6b f3 d1 6d .u..]..x8.{...=.......u.*k.6k..m
00a0 6a 6a ea 43 41 8e 20 4d b0 49 b0 57 b0 43 b0 66 11 9f 71 58 b0 cf 62 fb 9f a4 84 0a 7a 04 8f 04 jj.CA..M.I.W.C.f..qX..b.....z...
00c0 83 82 4a 41 9b c0 25 b8 20 88 14 04 2e f0 19 19 82 5e 9e 73 da 62 fd 15 29 fb 21 fc 30 04 95 0b ..JA..%..........^.s.b..).!.0...
00e0 3a 05 1b 04 c7 04 7f 0a 7e 17 fc 2a e8 16 1c 9c c7 33 d2 05 f7 04 36 41 99 e0 fa 4a 27 7d 8f 20 :.......~..*.....3....6A...J'}..
0100 48 90 2f 18 15 84 0b c2 90 9d f3 5c b3 5d 70 57 f0 92 ac b8 47 f4 3a 04 47 05 ab e7 10 f5 c3 1c H./........\.]pW....G.:.G.......
0120 17 0b 9c d3 ce af 5f 29 a4 fb 0b 52 05 37 04 29 4a b4 60 44 b0 15 79 49 d2 6c e0 da 1d c8 4f bb ......_)...R.7.)J.`D..yI.l....O.
0140 a0 55 70 9b 0c f8 43 d0 c7 bd 89 82 04 bd df cb 33 4f ea 04 73 fc 85 4e 9e e9 9c 66 d8 ee 95 40 .Up...C.........3O..s..N...f...@
0160 fc 36 34 fc 27 c1 73 26 41 23 7f 5c 10 2f c8 12 e4 4d 8b d8 3e 08 d2 63 27 99 30 84 14 19 9b 66 .64.'.s&A#.\./...M..>..c'.0....f
0180 c6 80 6a b9 20 53 70 42 90 2b f8 44 10 23 28 15 4c 08 a2 05 2d 82 0e c6 8f e0 3b 1c 58 ce a4 ab ..j..SpB.+.D.#(.L...-.....;.X...
01a0 44 b8 f5 a5 21 67 b7 a0 44 65 03 1d 2e c5 dd d4 09 aa 4d f7 e9 84 5c e4 58 af 79 4a 0d b8 23 e8 D...!g..De........M...\.X.yJ..#.
01c0 27 63 7e 66 f2 c6 d8 eb 67 1e c1 2f 82 c7 82 87 48 96 de f7 40 f0 8c cc 19 a0 d6 34 cf a7 8e f8 'c~f....g../....H...@......4....
01e0 22 c9 7e 38 97 18 22 ea b8 e0 33 c1 65 d2 fd 63 c1 db 5c 1b 60 96 22 f6 71 86 e4 98 ce 85 b0 cf ".~8.."...3.e..c..\.`.".q.......
0200 84 b0 61 0a 72 1f c4 ea a4 36 08 be 84 4c 37 32 d5 c1 f9 1e ae 57 34 0a 9a 38 ff 03 d9 33 86 b4 ..a.r....6...L72.....W4..8...3..
0220 95 92 39 91 4b 85 ec f5 90 7d 00 72 0a 70 2b 2a 0f df f0 c2 fa 62 d9 8b f0 ac cd 90 73 85 f1 bf ..9.K....}.r.p+*.....b......s...
0240 23 ca f5 19 85 82 73 90 5a 81 ec 64 50 98 0b d0 fc 3c 26 77 2f ce ea 0a c4 6b 26 3c 21 3b 9e 53 #.....s.Z..dP....<&w/....k&<!;.S
0260 57 b4 d6 04 f9 2a e9 6b 04 45 14 bf df 48 71 75 22 f5 bc ac 46 fd ae 05 8c 5d 3b 93 03 91 cf 93 W....*.k.E...Hqu"...F....];.....
0280 f1 ff 7d c8 cf 20 a4 bb 21 52 6b 42 15 ae e6 06 93 92 47 ad 51 64 0b 4e 09 2e 21 4f 3d 9c 3f c7 ..}.....!RkB......G.Qd.N..!O=.?.
02a0 3b bc 40 a2 14 5f 51 93 d4 18 04 7b f9 be 21 38 b5 77 05 5b 08 94 4d 33 dd 33 1f 52 de 27 35 5b ;.@.._Q....{..!8.w.[..M3.3.R.'5[
02c0 28 8c 71 58 c1 48 0a 97 6d 31 ba 51 6d a6 18 df ef 5f ce 05 0b be 65 d2 c7 20 dc 81 9c b8 a8 03 (.qX.H..m1.Qm...._....e.........
02e0 55 78 f9 3a fa 02 dd 5f e3 5a fd fb 22 85 f8 26 b2 33 c9 7d bd 48 95 8e 67 67 42 af 21 69 03 4c Ux.:..._.Z.."..&.3.}.H..ggB.!i.L
0300 92 7e 76 1d 0e ec 3c b3 93 71 6f 33 59 2e c6 e9 d2 e3 85 10 b1 16 ff 7d 04 e2 ab f9 f2 09 af 31 .~v...<..qo3Y..........}.......1
0320 ab d4 72 66 78 91 1e 37 51 f9 98 97 bd 8a de eb cb df 27 ba 4b a9 33 9a 41 67 a9 37 ed 5c 77 06 ..rfx..7Q.........'.K.3.Ag.7.\w.
0340 89 2c 87 d8 46 3e ef 67 ac 0a 6c ad 66 f1 e7 a0 07 99 bb 4f 76 0c 91 79 5d 8c 6b 67 ac 6a 26 bf .,..F>.g..l.f......Ov..y].kg.j&.
0360 8a cc 2a 99 2f 09 1f d0 e6 bb 29 72 9a 96 6f bd 01 49 d3 4c 2a f0 72 3e 99 a6 6c 84 7a d2 c6 77 ..*./.....)r..o..I.L*.r>..l.z..w
0380 1c c7 c5 34 53 e4 0b d1 fa 28 41 2c 72 98 c5 fd d1 64 72 20 8e 2b 18 92 8d cc 7e 46 cd 2a a6 ef ...4S....(A,r....dr..+....~F.*..
03a0 48 66 ac 7c d6 9f 3e 25 20 f7 50 1f 36 cc 35 ba d6 f1 e0 40 ac 5f 22 51 63 38 83 bb 44 4f a4 0f Hf.|..>%..P.6.5....@._"Qc8..DO..
03c0 d5 9a 18 1c cc 30 91 7a 93 14 b7 13 a9 97 09 98 7a ce 3d a4 26 0c 72 ec c1 9a 0e 13 c1 03 64 c7 .....0.z........z.=.&.r.......d.
03e0 09 88 3f c8 72 47 2e f2 a3 12 53 43 96 94 91 41 65 44 be 07 e9 1b 25 d2 13 67 ed b8 29 0a 5b 49 ..?.rG....SC...AeD....%..g..).[I
0400 61 1b 6e 25 02 fd 8e 65 75 31 19 07 b3 d9 c7 0a 7d 16 0d d5 30 32 e3 a4 a8 da 91 8b 42 34 be 95 a.n%...eu1......}...02......B4..
0420 49 51 72 7f 44 32 ba 99 90 4e ee ab c4 76 3a 90 8e 3e f4 da 90 b1 07 64 57 3f 7f 57 61 32 d2 c9 IQr.D2...N...v:..>.....dW?.Wa2..
0440 80 d3 58 67 75 55 3b e7 54 ef 54 42 04 1b 97 ca ba 06 dd 71 a3 89 fc 5b 48 8c 03 32 af 52 8f 5a ..XguU;.T.TB.......q...[H..2.R.Z
0460 21 d1 41 c1 6c 23 82 6b 89 ee 4b 44 6f 36 cb 13 1d d4 8f 09 c8 56 5d ff 1a 29 eb e1 fe 72 6a 45 !.A.l#.k..KDo6.......V]..)...rjE
0480 92 cf 5a d0 d7 4c fe 79 7c f8 0b a2 b9 83 c8 35 26 a0 0b eb 69 64 43 3b 45 b0 16 f2 fb 89 fe 47 ..Z..L.y|......5&...idC;E......G
04a0 8c f1 94 fd 4b 34 be 8e 42 bc df 90 5a 6d 08 51 86 70 2c a4 df 4a 5d 05 ad 43 af 9d b8 9c 5b 90 ....K4..B...Zm.Q.p,..J]..C....[.
04c0 ec 84 5c 17 7f 3b d0 7e 8d d4 8f 90 89 14 ea 45 18 88 42 5a 8b 28 c4 99 2c 77 e4 d0 95 9f f2 35 ..\..;.~.......E..BZ.(..,w.....5
04e0 c9 fd 3f 89 0f 80 e4 71 93 a6 bb d0 e2 0a ba d5 66 c8 6f 42 7e 8a 91 8b 4a 9c 4c 1e 24 a7 e0 e4 ..?....q........f.oB~...J.L.$...
0500 d2 a9 6f 21 26 59 0b 65 bf d3 62 fd 6f f2 13 88 f4 51 34 b8 01 47 53 4d b4 5e 20 e2 dd b8 93 32 ..o!&Y.e..b.o....Q4..GSM.^.....2
0520 26 61 84 09 1b c7 9d 78 28 a4 fd c8 d6 71 8b dc a9 a9 77 bc 9c 8b c2 2a b6 41 ac d3 64 27 db d1 &a.....x(....q....w....*.A..d'..
0540 71 0f ba 3d 41 e1 3d 89 cc 44 e0 e1 03 b0 d5 7e 1c eb 8f 38 36 8b f8 57 0b 5d 4e e4 e3 2c b2 e0 q..=A.=..D.....~...86..W.]N..,..
0560 6f 3a 1f 8d 1b 51 4f fd 3d 7e bd 8b 48 6f 61 42 ea 71 31 39 34 3f b1 8b b6 ae b2 cc c9 3f 86 e3 o:...QO.=~..HoaB.q194?.......?..
0580 78 02 b9 76 3c 74 1c fe f9 10 72 33 89 53 f1 20 27 bd c8 4f 2e 13 b8 8e f1 56 bf 89 4e 7c 29 10 x..v<t....r3.S..'..O.....V..N|).
05a0 1b fc 1f ae 49 62 59 a0 81 b6 bd 04 bd 1e a5 cb 6e c4 7b b7 61 1b 9b 98 a8 71 a2 3f 73 a9 90 b1 ....IbY.........n.{.a....q.?s...
05c0 9d 97 73 91 e6 5b 4c 6e a2 06 8b e5 3f ad 1b 2e 27 1a d3 66 23 17 c9 08 c3 31 a4 d2 ac 74 f3 cc ..s..[Ln....?...'..f#....1...t..
05e0 50 d3 6f 00 36 d3 3d 45 f8 ed 49 8a ea 19 3c f5 3e f4 3e 8a ef 76 88 a5 90 b5 4b b2 d1 81 e4 23 P.o.6.=E..I...<.>.>..v....K....#
0600 b8 01 b5 62 db 4c a9 5a c0 7f 0e 04 4e bb be 08 12 5b 69 ab c3 a7 91 5d 60 74 c9 2c 5b d8 58 ba ...b.L.Z....N....[i....]`t.,[.X.
0620 88 a4 8b ac e4 59 31 ac 7d c7 13 e1 59 74 9c 8d 14 ce 4a 96 7a 8d c5 ab 78 e3 d7 2e 6f 3f 8e af .....Y1.}...Yt....J.z...x...o?..
0640 04 f9 48 33 f9 eb 42 d3 e7 89 ac b1 24 ce 72 bf 46 fb 46 d3 e2 58 0d 4b 04 43 78 f4 f7 4c 3f 4c ..H3..B.....$.r.F.F..X.K.Cx..L?L
0660 a4 b2 ce 92 bf d0 7f 94 b2 b6 99 27 24 c8 62 c1 da ac 6d b9 6e 7f 01 ab 5b 49 77 21 12 ef c0 00 ...........'$.b...m.n...[Iw!....
0680 00 00 00 49 45 4e 44 ae 42 60 82 ...IEND.B`.
ew primitive: $system' href='/akkartik/mu/commit/029tools.cc?h=hlt&id=3a538211d79c658f63b42211a5e45f05a770b2e4'>3a538211 ^
3c67fedb ^
9edabeaa ^
6bcdfa87 ^


9edabeaa ^


795f5244 ^
166e3c0d ^



9edabeaa ^


6c96a437 ^
5f0280a9 ^
e41e8e09 ^
9edabeaa ^
6bcdfa87 ^
9edabeaa ^


4a943d4e ^










9edabeaa ^
4a943d4e ^









9edabeaa ^
4a943d4e ^










9edabeaa ^

e41e8e09 ^
9edabeaa ^
5f0280a9 ^
e41e8e09 ^
9edabeaa ^
6c96a437 ^
5f0280a9 ^


9edabeaa ^


3a538211 ^
5f98a10c ^
3a538211 ^
795f5244 ^
166e3c0d ^
5f98a10c ^
166e3c0d ^

3a538211 ^
5f98a10c ^

3a538211 ^



5f98a10c ^
3a538211 ^
795f5244 ^
166e3c0d ^
5f98a10c ^
166e3c0d ^

3a538211 ^
5f98a10c ^

3a538211 ^



e00d4854 ^
3a538211 ^
795f5244 ^
166e3c0d ^
e00d4854 ^
166e3c0d ^

3a538211 ^
e00d4854 ^
3a538211 ^
e00d4854 ^
3a538211 ^






795f5244 ^
166e3c0d ^



3a538211 ^













795f5244 ^
166e3c0d ^



3a538211 ^

77cdc6d0 ^
3a538211 ^


3a538211 ^




795f5244 ^
166e3c0d ^



3a538211 ^

6c96a437 ^
3a538211 ^
c442a5ad ^
cf3ac87f ^
3a538211 ^
cf3ac87f ^





3a538211 ^
17401c38 ^
3a538211 ^
6c96a437 ^
c442a5ad ^
3a538211 ^
4082acd2 ^
3a538211 ^


c55e49b6 ^
3a538211 ^





795f5244 ^
166e3c0d ^



3a538211 ^








795f5244 ^
5fdd8e96 ^
3a538211 ^
5f98a10c ^
9dcbec39 ^
3a538211 ^

78c50205 ^
9dcbec39 ^
ac8acc7b ^
5fdd8e96 ^



aa088845 ^
cfb142b9 ^
3a538211 ^



3a538211 ^


795f5244 ^
166e3c0d ^



3a538211 ^




601ff75b ^



















6c96a437 ^
e41e8e09 ^
601ff75b ^
07a64183 ^
601ff75b ^

0ce24b26 ^
9a81d746 ^
0ce24b26 ^















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
                                                                            
 









                                                   



                                             
                                    
                                       
             
                                   
                                                                                                                                                 
          
   
                                              
                                                                                                                                                                           

          
                                                 
                                                                                                                                                                                    

          



                                                
                                      

                                                              
                                                                       
                          
                                                                               

                                            


        
                                      
 


                                                                       


                                             
                                    



                                       


                                                
                                                                       
                      
                                                                               
   
                                                


        










                                  
 









                                  
 










                               

       
                                                              
                    
                  
                                       
                    
                                                


                                     


                   
                                             
            
                                        
                                                
                                       
                   

        
                                                

                     



                                             
            
                                        
                                                
                                       
                   

        
                                                

                      



                                             
            
                                        
                                                
                                       
                   

        
                                                
                   
                     
                                                          






                                             
                                                



                                       













                                                       
                                                  



                                       

                                                
                                                     


        




                                             
                                      



                                       

                                                
                                                 
                                                              
                                                                                                             
                                                                              
                                                             





                                                                           
     
                               
          
                                                           
                                                                                          
                               
                                                       


       
               





                                             
                                    



                                       








                                                
                                        
                                       
               
                                    
                                                                                                                                       

          
                                                 
                                                                                                                                            
   



                                                
                                                                            
                     



                                   


                                             
                                                  



                                       




                                                



















                                                                              
                                                                       
                                                                               
   
                           

        
 
                                      















                                                               
//: Allow Mu programs to log facts just like we've been doing in C++ so far.

void test_trace() {
  run(
      "def main [\n"
      "  trace 1, [foo], [this is a trace in Mu]\n"
      "]\n"
  );
  CHECK_TRACE_CONTENTS(
      "foo: this is a trace in Mu\n"
  );
}

:(before "End Primitive Recipe Declarations")
TRACE,
:(before "End Primitive Recipe Numbers")
put(Recipe_ordinal, "trace", TRACE);
:(before "End Primitive Recipe Checks")
case TRACE: {
  if (SIZE(inst.ingredients) < 3) {
    raise << maybe(get(Recipe, r).name) << "'trace' takes three or more ingredients rather than '" << to_original_string(inst) << "'\n" << end();
    break;
  }
  if (!is_mu_number(inst.ingredients.at(0))) {
    raise << maybe(get(Recipe, r).name) << "first ingredient of 'trace' should be a number (depth), but got '" << inst.ingredients.at(0).original_string << "'\n" << end();
    break;
  }
  if (!is_literal_text(inst.ingredients.at(1))) {
    raise << maybe(get(Recipe, r).name) << "second ingredient of 'trace' should be a literal string (label), but got '" << inst.ingredients.at(1).original_string << "'\n" << end();
    break;
  }
  break;
}
:(before "End Primitive Recipe Implementations")
case TRACE: {
  int depth = ingredients.at(0).at(0);
  string label = current_instruction().ingredients.at(1).name;
  ostringstream out;
  for (int i = 2;  i < SIZE(current_instruction().ingredients);  ++i) {
    if (i > 2) out << ' ';
    out << inspect(current_instruction().ingredients.at(i), ingredients.at(i));
  }
  trace(depth, label) << out.str() << end();
  break;
}

//: simpler limited version of 'trace'

:(before "End Types")  //: include in all cleaved compilation units
const int App_depth = 1;  // where all Mu code will trace to by default

:(before "End Primitive Recipe Declarations")
STASH,
:(before "End Primitive Recipe Numbers")
put(Recipe_ordinal, "stash", STASH);
:(before "End Primitive Recipe Checks")
case STASH: {
  break;
}
:(before "End Primitive Recipe Implementations")
case STASH: {
  ostringstream out;
  for (int i = 0;  i < SIZE(current_instruction().ingredients);  ++i) {
    if (i) out << ' ';
    out << inspect(current_instruction().ingredients.at(i), ingredients.at(i));
  }
  trace(App_depth, "app") << out.str() << end();
  break;
}

:(code)
void test_stash_literal_string() {
  run(
      "def main [\n"
      "  stash [foo]\n"
      "]\n"
  );
  CHECK_TRACE_CONTENTS(
      "app: foo\n"
  );
}

void test_stash_literal_number() {
  run(
      "def main [\n"
      "  stash [foo:], 4\n"
      "]\n"
  );
  CHECK_TRACE_CONTENTS(
      "app: foo: 4\n"
  );
}

void test_stash_number() {
  run(
      "def main [\n"
      "  1:num <- copy 34\n"
      "  stash [foo:], 1:num\n"
      "]\n"
  );
  CHECK_TRACE_CONTENTS(
      "app: foo: 34\n"
  );
}

:(code)
string inspect(const reagent& r, const vector<double>& data) {
  if (is_literal(r))
    return r.name;
  // End inspect Special-cases(r, data)
  ostringstream out;
  for (long long i = 0;  i < SIZE(data);  ++i) {
    if (i) out << ' ';
    out << no_scientific(data.at(i));
  }
  return out.str();
}

:(before "End Primitive Recipe Declarations")
HIDE_ERRORS,
:(before "End Primitive Recipe Numbers")
put(Recipe_ordinal, "hide-errors", HIDE_ERRORS);
:(before "End Primitive Recipe Checks")
case HIDE_ERRORS: {
  break;
}
:(before "End Primitive Recipe Implementations")
case HIDE_ERRORS: {
  Hide_errors = true;
  break;
}

:(before "End Primitive Recipe Declarations")
SHOW_ERRORS,
:(before "End Primitive Recipe Numbers")
put(Recipe_ordinal, "show-errors", SHOW_ERRORS);
:(before "End Primitive Recipe Checks")
case SHOW_ERRORS: {
  break;
}
:(before "End Primitive Recipe Implementations")
case SHOW_ERRORS: {
  Hide_errors = false;
  break;
}

:(before "End Primitive Recipe Declarations")
TRACE_UNTIL,
:(before "End Primitive Recipe Numbers")
put(Recipe_ordinal, "trace-until", TRACE_UNTIL);
:(before "End Primitive Recipe Checks")
case TRACE_UNTIL: {
  break;
}
:(before "End Primitive Recipe Implementations")
case TRACE_UNTIL: {
  if (Trace_stream) {
    Trace_stream->collect_depth = ingredients.at(0).at(0);
  }
  break;
}

:(before "End Primitive Recipe Declarations")
_DUMP_TRACE,
:(before "End Primitive Recipe Numbers")
put(Recipe_ordinal, "$dump-trace", _DUMP_TRACE);
:(before "End Primitive Recipe Checks")
case _DUMP_TRACE: {
  break;
}
:(before "End Primitive Recipe Implementations")
case _DUMP_TRACE: {
  if (ingredients.empty()) {
    DUMP("");
  }
  else {
    DUMP(current_instruction().ingredients.at(0).name);
  }
  break;
}

:(before "End Primitive Recipe Declarations")
_CLEAR_TRACE,
:(before "End Primitive Recipe Numbers")
put(Recipe_ordinal, "$clear-trace", _CLEAR_TRACE);
:(before "End Primitive Recipe Checks")
case _CLEAR_TRACE: {
  break;
}
:(before "End Primitive Recipe Implementations")
case _CLEAR_TRACE: {
  if (Trace_stream) Trace_stream->past_lines.clear();
  break;
}

//:: 'cheating' by using the host system

:(before "End Primitive Recipe Declarations")
_PRINT,
:(before "End Primitive Recipe Numbers")
put(Recipe_ordinal, "$print", _PRINT);
:(before "End Primitive Recipe Checks")
case _PRINT: {
  break;
}
:(before "End Primitive Recipe Implementations")
case _PRINT: {
  for (int i = 0;  i < SIZE(ingredients);  ++i) {
    if (is_literal(current_instruction().ingredients.at(i))) {
      trace(Callstack_depth+1, "run") << "$print: " << current_instruction().ingredients.at(i).name << end();
      if (!has_property(current_instruction().ingredients.at(i), "newline")) {
        cout << current_instruction().ingredients.at(i).name;
      }
      // hack: '$print 10' prints '10', but '$print 10/newline' prints '\n'
      // End $print 10/newline Special-cases
      else {
        cout << '\n';
      }
    }
    // End $print Special-cases
    else {
      for (int j = 0;  j < SIZE(ingredients.at(i));  ++j) {
        trace(Callstack_depth+1, "run") << "$print: " << ingredients.at(i).at(j) << end();
        if (j > 0) cout << " ";
        cout << no_scientific(ingredients.at(i).at(j));
      }
    }
  }
  cout.flush();
  break;
}

:(before "End Primitive Recipe Declarations")
_EXIT,
:(before "End Primitive Recipe Numbers")
put(Recipe_ordinal, "$exit", _EXIT);
:(before "End Primitive Recipe Checks")
case _EXIT: {
  break;
}
:(before "End Primitive Recipe Implementations")
case _EXIT: {
  exit(0);
  break;
}

:(before "End Primitive Recipe Declarations")
_SYSTEM,
:(before "End Primitive Recipe Numbers")
put(Recipe_ordinal, "$system", _SYSTEM);
:(before "End Primitive Recipe Checks")
case _SYSTEM: {
  if (SIZE(inst.ingredients) != 1) {
    raise << maybe(get(Recipe, r).name) << "'$system' requires exactly one ingredient, but got '" << to_string(inst) << "'\n" << end();
    break;
  }
  if (!is_literal_text(inst.ingredients.at(0))) {
    raise << maybe(get(Recipe, r).name) << "ingredient to '$system' must be a literal text, but got '" << to_string(inst) << "'\n" << end();
  }
  break;
}
:(before "End Primitive Recipe Implementations")
case _SYSTEM: {
  int status = system(current_instruction().ingredients.at(0).name.c_str());
  products.resize(1);
  products.at(0).push_back(status);
  break;
}

:(before "End Primitive Recipe Declarations")
_DUMP_MEMORY,
:(before "End Primitive Recipe Numbers")
put(Recipe_ordinal, "$dump-memory", _DUMP_MEMORY);
:(before "End Primitive Recipe Checks")
case _DUMP_MEMORY: {
  break;
}
:(before "End Primitive Recipe Implementations")
case _DUMP_MEMORY: {
  dump_memory();
  break;
}

//: In times of real extremis we need to create a whole new modality for debug
//: logs, independent of other changes to the screen or Trace_stream.

:(before "End Globals")
ofstream LOG;
:(before "End One-time Setup")
//? LOG.open("log");

:(before "End Primitive Recipe Declarations")
_LOG,
:(before "End Primitive Recipe Numbers")
put(Recipe_ordinal, "$log", _LOG);
:(before "End Primitive Recipe Checks")
case _LOG: {
  break;
}
:(before "End Primitive Recipe Implementations")
case _LOG: {
  ostringstream out;
  for (int i = 0;  i < SIZE(current_instruction().ingredients);  ++i) {
    out << inspect(current_instruction().ingredients.at(i), ingredients.at(i));
  }
  LOG << out.str() << '\n';
  break;
}

//: set a variable from within Mu code
//: useful for selectively tracing or printing after some point
:(before "End Globals")
bool Foo = false;
:(before "End Primitive Recipe Declarations")
_FOO,
:(before "End Primitive Recipe Numbers")
put(Recipe_ordinal, "$foo", _FOO);
:(before "End Primitive Recipe Checks")
case _FOO: {
  break;
}
:(before "End Primitive Recipe Implementations")
case _FOO: {
  Foo = true;
  break;
}