about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--046global.cc8
-rw-r--r--057immutable.cc1
-rw-r--r--061text.mu1
-rw-r--r--070table.mu4
-rw-r--r--075channel.mu3
-rw-r--r--html/046global.cc.html8
-rw-r--r--html/057immutable.cc.html1
-rw-r--r--html/061text.mu.html1
-rw-r--r--html/070table.mu.html4
-rw-r--r--html/075channel.mu.html3
-rw-r--r--html/lambda-to-mu.mu.html10
-rw-r--r--lambda-to-mu.mu6
12 files changed, 40 insertions, 10 deletions
diff --git a/046global.cc b/046global.cc
index 2dc1e760..9d690806 100644
--- a/046global.cc
+++ b/046global.cc
@@ -4,10 +4,10 @@
 //: have access to each other's globals.
 //:
 //: This feature is still experimental and half-baked. You can't name global
-//: variables, and so like in most tests they don't get checked for types (the
-//: only known hole in the type system, can cause memory corruption). We might
-//: fix these issues if we ever use globals. Or we might just drop the feature
-//: entirely.
+//: variables, and they don't get checked for types (the only known hole in
+//: the type system, can cause memory corruption). We might fix these issues
+//: if we ever use globals. Or we might just drop the feature entirely.
+//: [tag: todo]
 
 :(scenario global_space)
 def main [
diff --git a/057immutable.cc b/057immutable.cc
index 7b4e331c..578b5f8a 100644
--- a/057immutable.cc
+++ b/057immutable.cc
@@ -2,6 +2,7 @@
 //: products. This layer will start enforcing this check.
 //:
 //: One hole for now: variables in surrounding spaces are implicitly mutable.
+//: [tag: todo]
 
 :(scenario can_modify_ingredients_that_are_also_products)
 # mutable container
diff --git a/061text.mu b/061text.mu
index bd7eb89f..d8e40112 100644
--- a/061text.mu
+++ b/061text.mu
@@ -123,6 +123,7 @@ scenario text-equal-common-lengths-but-distinct [
 ]
 
 # A new type to help incrementally construct texts.
+# todo: make this shape-shifting.
 container buffer [
   length:num
   data:text
diff --git a/070table.mu b/070table.mu
index efa78a2c..f82bb9c7 100644
--- a/070table.mu
+++ b/070table.mu
@@ -1,6 +1,8 @@
 # A table is like an array, except that you can index it with arbitrary types
 # and not just non-negative whole numbers.
 
+# incomplete; doesn't handle hash conflicts
+
 scenario table-read-write [
   local-scope
   tab:&:table:num:num <- new-table 30
@@ -59,6 +61,8 @@ def new-table capacity:num -> result:&:table:_key:_value [
   *result <- merge 0/length, capacity, data
 ]
 
+# todo: tag results as /required so that call-sites are forbidden from ignoring them
+# then we could handle conflicts simply by resizing the table
 def put-index table:&:table:_key:_value, key:_key, value:_value -> table:&:table:_key:_value [
   local-scope
   load-ingredients
diff --git a/075channel.mu b/075channel.mu
index 985292a3..c1d2d5f3 100644
--- a/075channel.mu
+++ b/075channel.mu
@@ -155,6 +155,9 @@ def read in:&:source:_elem -> result:_elem, eof?:bool, in:&:source:_elem [
   reset lock
 ]
 
+# todo: create a notion of iterator and iterable so we can read/write whole
+# aggregates (arrays, lists, ..) of _elems at once.
+
 def clear in:&:source:_elem -> in:&:source:_elem [
   local-scope
   load-ingredients
diff --git a/html/046global.cc.html b/html/046global.cc.html
index 234acdc1..cc62df99 100644
--- a/html/046global.cc.html
+++ b/html/046global.cc.html
@@ -39,10 +39,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color
 <span class="Comment">//: have access to each other's globals.</span>
 <span class="Comment">//:</span>
 <span class="Comment">//: This feature is still experimental and half-baked. You can't name global</span>
-<span class="Comment">//: variables, and so like in most tests they don't get checked for types (the</span>
-<span class="Comment">//: only known hole in the type system, can cause memory corruption). We might</span>
-<span class="Comment">//: fix these issues if we ever use globals. Or we might just drop the feature</span>
-<span class="Comment">//: entirely.</span>
+<span class="Comment">//: variables, and they don't get checked for types (the only known hole in</span>
+<span class="Comment">//: the type system, can cause memory corruption). We might fix these issues</span>
+<span class="Comment">//: if we ever use globals. Or we might just drop the feature entirely.</span>
+<span class="Comment">//: [tag: todo]</span>
 
 <span class="Delimiter">:(scenario global_space)</span>
 <span class="muRecipe">def</span> main [
diff --git a/html/057immutable.cc.html b/html/057immutable.cc.html
index c31f5e20..34928ecb 100644
--- a/html/057immutable.cc.html
+++ b/html/057immutable.cc.html
@@ -39,6 +39,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color
 <span class="Comment">//: products. This layer will start enforcing this check.</span>
 <span class="Comment">//:</span>
 <span class="Comment">//: One hole for now: variables in surrounding spaces are implicitly mutable.</span>
+<span class="Comment">//: [tag: todo]</span>
 
 <span class="Delimiter">:(scenario can_modify_ingredients_that_are_also_products)</span>
 <span class="Comment"># mutable container</span>
diff --git a/html/061text.mu.html b/html/061text.mu.html
index 5f9ba882..41234594 100644
--- a/html/061text.mu.html
+++ b/html/061text.mu.html
@@ -157,6 +157,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color
 ]
 
 <span class="Comment"># A new type to help incrementally construct texts.</span>
+<span class="Comment"># todo: make this shape-shifting.</span>
 <span class="muData">container</span> buffer [
   length:num
   data:text
diff --git a/html/070table.mu.html b/html/070table.mu.html
index 9cc6e3e1..6d9b3e0c 100644
--- a/html/070table.mu.html
+++ b/html/070table.mu.html
@@ -35,6 +35,8 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color
 <span class="Comment"># A table is like an array, except that you can index it with arbitrary types</span>
 <span class="Comment"># and not just non-negative whole numbers.</span>
 
+<span class="Comment"># incomplete; doesn't handle hash conflicts</span>
+
 <span class="muScenario">scenario</span> table-read-write [
   <span class="Constant">local-scope</span>
   tab:&amp;:table:num:num <span class="Special">&lt;-</span> new-table<span class="Constant"> 30</span>
@@ -93,6 +95,8 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color
   *result <span class="Special">&lt;-</span> merge <span class="Constant">0/length</span>, capacity, data
 ]
 
+<span class="Comment"># todo: tag results as /required so that call-sites are forbidden from ignoring them</span>
+<span class="Comment"># then we could handle conflicts simply by resizing the table</span>
 <span class="muRecipe">def</span> put-index table:&amp;:table:_key:_value, key:_key, value:_value<span class="muRecipe"> -&gt; </span>table:&amp;:table:_key:_value [
   <span class="Constant">local-scope</span>
   <span class="Constant">load-ingredients</span>
diff --git a/html/075channel.mu.html b/html/075channel.mu.html
index 7b9ade33..ed6eda1d 100644
--- a/html/075channel.mu.html
+++ b/html/075channel.mu.html
@@ -191,6 +191,9 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color
   reset lock
 ]
 
+<span class="Comment"># todo: create a notion of iterator and iterable so we can read/write whole</span>
+<span class="Comment"># aggregates (arrays, lists, ..) of _elems at once.</span>
+
 <span class="muRecipe">def</span> clear in:&amp;:source:_elem<span class="muRecipe"> -&gt; </span>in:&amp;:source:_elem [
   <span class="Constant">local-scope</span>
   <span class="Constant">load-ingredients</span>
diff --git a/html/lambda-to-mu.mu.html b/html/lambda-to-mu.mu.html
index 86b47a69..ccb33e30 100644
--- a/html/lambda-to-mu.mu.html
+++ b/html/lambda-to-mu.mu.html
@@ -15,12 +15,12 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color
 * { font-size: 12pt; font-size: 1em; }
 .muData { color: #ffff00; }
 .muControl { color: #c0a020; }
-.Delimiter { color: #800080; }
 .Special { color: #c00000; }
+.Delimiter { color: #800080; }
+.Comment { color: #9090ff; }
 .Constant { color: #00a0a0; }
 .SalientComment { color: #00ffff; }
 .CommentedCode { color: #6c6c6c; }
-.Comment { color: #9090ff; }
 .muRecipe { color: #ff8700; }
 .muScenario { color: #00af00; }
 -->
@@ -37,6 +37,12 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color
 <span class="SalientComment">## experimental compiler to translate programs written in a generic</span>
 <span class="SalientComment">## expression-oriented language called 'lambda' into Mu</span>
 
+<span class="Comment"># incomplete; code generator not done</span>
+<span class="Comment"># potential enhancements:</span>
+<span class="Comment">#   symbol table</span>
+<span class="Comment">#   poor man's macros</span>
+<span class="Comment">#     substitute one instruction with multiple, parameterized by ingredients and products</span>
+
 <span class="muScenario">scenario</span> convert-lambda [
   run [
     <span class="Constant">local-scope</span>
diff --git a/lambda-to-mu.mu b/lambda-to-mu.mu
index 734fa126..8e99fd07 100644
--- a/lambda-to-mu.mu
+++ b/lambda-to-mu.mu
@@ -1,6 +1,12 @@
 ## experimental compiler to translate programs written in a generic
 ## expression-oriented language called 'lambda' into Mu
 
+# incomplete; code generator not done
+# potential enhancements:
+#   symbol table
+#   poor man's macros
+#     substitute one instruction with multiple, parameterized by ingredients and products
+
 scenario convert-lambda [
   run [
     local-scope
pre>
c0207dbae ^
8968b5114 ^
76dbce275 ^

8968b5114 ^


































342ed97ee ^
8968b5114 ^









342ed97ee ^
8968b5114 ^











11b695875 ^
8968b5114 ^



aa62dcc2a ^
8968b5114 ^

aa62dcc2a ^
8968b5114 ^
































342ed97ee ^
8968b5114 ^




342ed97ee ^
8968b5114 ^







11b695875 ^
8968b5114 ^



aa62dcc2a ^
8968b5114 ^

aa62dcc2a ^
8968b5114 ^










342ed97ee ^
8968b5114 ^



76dbce275 ^



8968b5114 ^










8968b5114 ^
76dbce275 ^





8968b5114 ^
cf87759e2 ^
8968b5114 ^
bab8190b6 ^









76dbce275 ^

8968b5114 ^



76dbce275 ^
8968b5114 ^

76dbce275 ^


8968b5114 ^







76dbce275 ^
8968b5114 ^

76dbce275 ^

8968b5114 ^

76dbce275 ^
8968b5114 ^

76dbce275 ^

8968b5114 ^



76dbce275 ^
8968b5114 ^

76dbce275 ^

8968b5114 ^

76dbce275 ^
8968b5114 ^

76dbce275 ^

8968b5114 ^



76dbce275 ^
8968b5114 ^

76dbce275 ^

8968b5114 ^
76dbce275 ^
8968b5114 ^


















































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
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408