about summary refs log tree commit diff stats
path: root/chessboard.mu
Commit message (Collapse)AuthorAgeFilesLines
* 4262 - literal 'null'Kartik Agaram2018-06-171-13/+13
|
* 4261 - start using literals for 'true' and 'false'Kartik Agaram2018-06-171-19/+19
| | | | | | | | | They uncovered one bug: in edit/003-shortcuts.mu <scroll-down> was returning 0 for an address in one place where I thought it was returning 0 for a boolean. Now we've eliminated this bad interaction between tangling and punning literals.
* 4167 - show square colors in chessboard appKartik K. Agaram2017-12-271-1/+11
|
* 4166Kartik K. Agaram2017-12-271-10/+10
|
* 4134 - 'input' = 'ingredient'Kartik K. Agaram2017-12-031-20/+20
|
* 4002Kartik K. Agaram2017-09-231-25/+12
|
* 3935Kartik K. Agaram2017-06-221-3/+3
|
* 3861 - screen untouched when entering console modeKartik K. Agaram2017-05-181-0/+1
|
* 3735 - get rid of 'print-integer'Kartik K. Agaram2017-01-221-1/+1
| | | | | We do support printing non-integer numbers for some time, albeit using the underlying host platform.
* 3561Kartik K. Agaram2016-10-221-3/+3
|
* 3552Kartik K. Agaram2016-10-221-1/+1
| | | | | | | | | | | | | | | | | | Stop requiring jump instructions to explicitly provide a ':label' type for jump targets. This has been a source of repeated confusion for my students: a) They'd add the ':label' to the label definition rather than the jump target (label use) b) They'd spend time thinking about whether the initial '+' prefix was part of the label name. In the process I cleaned up a couple of things: - the space of names is more cleanly partitioned into labels and non-labels (clarifying that '_' and '-' are non-label prefixes) - you can't use label names as regular variables anymore - you can infer the type of a label just from its name
* 3497Kartik K. Agaram2016-10-131-23/+24
|
* 3483Kartik K. Agaram2016-10-081-34/+34
|
* 3390Kartik K. Agaram2016-09-171-8/+8
|
* 3389Kartik K. Agaram2016-09-171-33/+33
|
* 3380Kartik K. Agaram2016-09-171-34/+34
| | | | | One more place we were missing expanding type abbreviations: inside container definitions.
* 3379Kartik K. Agaram2016-09-171-27/+27
| | | | Can't use type abbreviations inside 'memory-should-contain'.
* 3354 - support multiple routines at a source/sinkKartik K. Agaram2016-09-151-13/+13
| | | | | This commit completes the final step: fixing the final failing tests (in chessboard.mu) by teaching `restart` about the block signal.
* 3346Kartik K. Agaram2016-09-131-4/+4
| | | | Process type abbreviations in *shape-shifting* function headers.
* 3337 - first use of type abbreviations: textKartik K. Agaram2016-09-121-3/+5
| | | | | In the process I've uncover a couple of situations we don't support type abbreviations yet. They're next.
* 3261Kartik K. Agaram2016-08-261-15/+15
| | | | Fix CI.
* 3020 - names in chessboard testsKartik K. Agaram2016-05-261-92/+100
| | | | | | | | Extremely ugly change. Also ended up fixing some places where I was mixing up sources and sinks. But I'm not going to bother updating edit/ and sandbox/ apps. Just too many scenarios to clean up.
* 2880Kartik K. Agaram2016-04-271-4/+7
| | | | | | | | | | | Turns out we don't need a primitive to return an empty value of arbitrary type. Just create it on the heap using 'new'. But this uncovered *yet* another bug, sigh. When I specialize generic functions I was running all transforms on the generated functions after specialization completed. But there's one transform that includes code from elsewhere. If such code included type-ingredients -- kaboom. Now fixed and there's a test, so I've got that going for me which is nice.
* 2878Kartik K. Agaram2016-04-271-6/+1
|
* 2873 - fix a bug in converting conditional returnsKartik K. Agaram2016-04-271-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was an interaction between two transforms. The first turned: return-if ... into: jump-unless ..., 1:offset # skip next instruction return ... The second added an unconditional return at the end of the recipe if it didn't already exist (so that functions always end with a return). However, it was getting confused by the return instructions generated above, which look unconditional but sometimes get skipped. To fix this, conditional returns are now transformed into this: { break-unless ... return ... } Since the final instruction is now no longer a reply (but rather the '}' label), the second transform triggers and adds the unconditional return after it. This commit removes the final place marked 'BUG:' in the codebase yesterday (see commit 2870).
* 2870 - fix the final long-standing failing testKartik K. Agaram2016-04-271-2/+4
| | | | | | | | | | | | | | | | | The solution for avoiding deadlock is for routines to close channels before they exit. So that's good. Once I implemented 'close', I also found and fixed 2 unrelated bugs in chessboard.mu: a) one long-missed and long-masked case of forgetting to store character literals in character variables b) one typo in translating get-address to put So that's good. What's not so good: in the process of fixing this I've found three unrelated bugs (marked 'BUG:' in the changes). All three have workarounds, so existing tests pass for now. But they are my top priority next.
* 2864 - replace all address:shared with just addressKartik K. Agaram2016-04-241-51/+51
| | | | | | | Now that we no longer have non-shared addresses, we can just always track refcounts for all addresses. Phew!
* 2860 - rename 'index-address' to 'put-index'Kartik K. Agaram2016-04-231-10/+9
|
* 2845Kartik K. Agaram2016-04-161-17/+8
|
* 2798 - experiment: split channels into two endsKartik K. Agaram2016-03-191-93/+93
| | | | | | | | | | This way when you pass one end to a function or routine, you can implicitly give it the right to either read or write the channel, but not both. The cost: code gets more convoluted, names get more convoluted. You can see this in particular in the test for buffer-lines. Let's see how it goes..
* 2784 - make channels genericKartik K. Agaram2016-03-141-28/+28
| | | | | | I've ignored Mu's concurrency primitives for a while, but they're starting to return to front-and-center as I work on the file system interfaces.
* 2782 - directly use string literals everywhereKartik K. Agaram2016-03-141-31/+16
|
* 2749Kartik K. Agaram2016-03-091-12/+12
|
* 2748Kartik K. Agaram2016-03-091-10/+10
|
* 2746Kartik K. Agaram2016-03-091-3/+2
|
* 2735 - define recipes using 'def'Kartik K. Agaram2016-03-081-35/+35
| | | | | | | | | | | | I'm dropping all mention of 'recipe' terminology from the Readme. That way I hope to avoid further bike-shedding discussions while I very slowly decide on the right terminology with my students. I could be smarter in my error messages and use 'recipe' when code uses it and 'function' otherwise. But what about other words like ingredient? It would all add complexity that I'm not yet sure is worthwhile. But I do want separate experiences for veteran programmers reading about Mu on github and for people learning programming using Mu.
* 2576 - distinguish allocated addresses from othersKartik K. Agaram2016-01-191-59/+60
| | | | | | | | | | | | | | | | This is the one major refinement on the C programming model I'm planning to introduce in mu. Instead of Rust's menagerie of pointer types and static checking, I want to introduce just one new type, and use it to perform ref-counting at runtime. So far all we're doing is updating new's interface. The actual ref-counting implementation is next. One implication: I might sometimes need duplicate implementations for a recipe with allocated vs vanilla addresses of the same type. So far it seems I can get away with just always passing in allocated addresses; the situations when you want to pass an unallocated address to a recipe should be few and far between.
* 2573 - check product type of 'new'Kartik K. Agaram2016-01-191-1/+1
| | | | | | | | | | | I realize that my current doesn't allow nesting a:b:c linear type syntax inside a dilated property. So you can't currently say: (recipe address:number) Need to fix that at some point. Non-trivial since linear syntax is oblivious to dilated syntax. I should probably make the dilated syntax more fundamental and introduce it at an earlier layer.
* 2562Kartik K. Agaram2016-01-171-7/+7
| | | | | | | | | | | | We want to use the type 'recipe' for recipe *variables*, because it seems nicer to say `recipe number -> number` rather than recipe-ordinal, etc. To support this we'll allow recipe names to be mentioned without any type. This might make a couple of places in this commit more brittle. I'm dropping error messages, causing them to not happen in some situations. Maybe I should just bite the bullet and require an explicit :recipe-literal. We'll see.
* 2548 - teach 'print' to print integersKartik K. Agaram2015-12-281-1/+2
| | | | | | | | | | Still can't print non-integer numbers, so this is a bit hacky. The big consequence is that you can't print literal characters anymore because of our rules about how we pick which variant to statically dispatch to. You have to save to a character variable first. Maybe I can add an annotation to literals..
* chessboard.mu now workingKartik K. Agaram2015-12-151-3/+3
|
* 2468 - overload print-character as just 'print'Kartik K. Agaram2015-11-211-7/+7
|
* 2467 - rename 'string' to 'text' everywhereKartik K. Agaram2015-11-211-14/+14
| | | | | | | | Not entirely happy with this. Maybe we'll find a better name. But at least it's an improvement. One part I *am* happy with is renaming string-replace to replace, string-append to append, etc. Overdue, now that we have static dispatch.
* 2460 - headers for remaining recipesKartik K. Agaram2015-11-181-46/+28
|
* 2299 - check types of ingredients in callsKartik K. Agaram2015-10-281-18/+18
| | | | | | | | | | Still very incomplete: a) we perform the check at runtime b) tests for edit and sandbox apps no longer work; we can't fix them until we get type parameters in both containers and recipes (because list and list operations need to become generic).
* 2260 - start tracing by depth rather than labelKartik K. Agaram2015-10-061-1/+1
| | | | Now we can collect all traces, just modulating the depth.
* 2244Kartik K. Agaram2015-10-051-3/+3
|
* 2095Kartik K. Agaram2015-08-281-8/+0
| | | | | | | | | | | | Finally terminate the experiment of keeping debug prints around. I'm also going to give up on maintaining counts. What we really need is two kinds of tracing: a) For tests, just the domain-specific facts, organized by labels. b) For debugging, just transient dumps to stdout. b) only works if stdout is clean by default. Hmm, I think this means 'stash' should be the transient kind of trace.
* 2051Kartik K. Agaram2015-08-211-12/+12
| | | | | Forgot to fix chessboard tests during commit 2022: running sandboxes in separate routines.
* 1884Kartik K. Agaram2015-07-291-27/+0
|
13dd8708ca767c208824c06'>^
201458e3 ^
a802f0ce ^
204dae92 ^









a802f0ce ^
204dae92 ^














a802f0ce ^
204dae92 ^

a802f0ce ^
204dae92 ^






































201458e3 ^
a802f0ce ^
204dae92 ^








a802f0ce ^
204dae92 ^





a802f0ce ^
204dae92 ^


a802f0ce ^
204dae92 ^


201458e3 ^
204dae92 ^
a802f0ce ^
201458e3 ^
204dae92 ^

















a802f0ce ^
204dae92 ^












201458e3 ^
204dae92 ^











201458e3 ^
204dae92 ^

201458e3 ^
204dae92 ^




201458e3 ^
204dae92 ^
a802f0ce ^
204dae92 ^








201458e3 ^
204dae92 ^








201458e3 ^
204dae92 ^





201458e3 ^
204dae92 ^







201458e3 ^
204dae92 ^




201458e3 ^
204dae92 ^




201458e3 ^
204dae92 ^




201458e3 ^
204dae92 ^


672e3e50 ^


a654e4ec ^
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
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512