about summary refs log tree commit diff stats
path: root/chessboard.mu
Commit message (Collapse)AuthorAgeFilesLines
* 893 - trying to take traces of chessboard appKartik K. Agaram2015-03-121-1/+6
|
* 709Kartik K. Agaram2015-02-071-2/+0
|
* 708Kartik K. Agaram2015-02-051-1/+1
|
* 690 - convention: '$' commands for debugging onlyKartik K. Agaram2015-02-011-20/+17
| | | | | | Swap printing generalized objects using arc's infrastructure to be the $-prefixed debug helper, while the erstwhile $print-key-to-host becomes the primitive print-character to host.
* 624 - no, that's all wrong, scratch 623Kartik K. Agaram2015-01-251-3/+3
|
* 623 - 'nochange' to guard against race conditionsKartik K. Agaram2015-01-251-3/+3
| | | | | | | | | I dunno, this may all be a wild goose chase. I haven't been disciplined in tagging in-out arguments in 'read-move' and its helpers. Maybe I should just drop those 'nochange' oargs in 'read' and 'write'. Maybe I should reserve output args only for return values that callers might actually care about, and use more conventional metadata like 'const' or 'unique' or 'inout' on other args.
* 620 - fix broken examples and tests againKartik K. Agaram2015-01-251-1/+1
| | | | | | | | | I just did this in 611; what's the point of all this if tests can't stay passing? I don't understand why buffered-stdin.mu needs to preempt itself. stdin and buffered-stdin somehow end up sharing a single circular buffer, that's probably causing a race condition.
* 619 - chessboard now working rightKartik K. Agaram2015-01-251-2/+18
| | | | | | 2 bugs found: a) Have to slurp the newlines. b) Have to clear the line-buffer at the start of each line.
* 618Kartik K. Agaram2015-01-251-0/+240
|
* 544 - text modes now called 'retro' & 'cursor'Kartik K. Agaram2015-01-121-93/+0
| | | | | | | | | | | | | Other options considered for 'retro': 'teletype': perhaps most accurate, but arcane 'chat': captures that you have to hit 'enter', but not the rendering 'wrap': captures the auto-wrap when printing text but not that you have to hit 'enter' when typing 'text': useful as a synonym of 'chat' while conveying more information in other meanings, but too generic, nobody will get it Why do the input and output options have to be entangled like this?
* 497 - strengthen the concept of 'space'Kartik K. Agaram2015-01-021-4/+4
| | | | | | | | | | | | | | | | | | | | 'default-scope' is now 'default-space' 'closure-generator' is now 'next-space-generator' The connection to high-level syntax for closures is now tenuous, so we'll call the 'outer scope' the 'next space'. So, let's try to create a few sentences with all these related ideas: Names map to addresses offset from a default-space when it's provided. Spaces can be strung together. The zeroth variable points to the next space, the one that is accessed when a variable has /space:1. To map a name to an address in the next space, you need to know what function generated that space. A corollary is that the space passed in to a function should always be generated by a single function. Spaces can be used to construct lexical scopes and objects.
* 496Kartik K. Agaram2015-01-021-0/+9
|
* 479Kartik K. Agaram2015-01-021-125/+19
|
* 478 - snapshot while debugging chessboardKartik K. Agaram2015-01-011-19/+126
| | | | | | | | | | | | | | | | | | | | | | This took a couple of hours to track down. I had to shrink down to a 2x2 chessboard, isolate a half-move (just a square to clear) that triggered an error, then hard-code the half-move to make it non-interactive, then copy my changes over to the non-cursor version in chessboard.mu, then start debugging trace. And then I found I was using an 'index-address' rather than 'index' to go from a board to a file-address inside 'make-move'. And that was corrupting the array of file pointers. Things I wish I had to help me here: a) a type checker. b) more speed. Are lists slowing down super-linearly? need an arc profiler. c) a side channel for traces even when the program is in cursor mode. I do have that (hence the 'new-trace' before calling main), but for some reason it wasn't convenient. Just had to buckle down, I think. d) the right '#ifdef's to switch between hard-coded move and interactive move, text vs cursor mode, etc. e) just in general better curation of traces to easily see what's going on. But that's just a pipe dream.
* 473 - print chessboardKartik K. Agaram2014-12-311-9/+32
| | | | | | | | Once we started printing we uncovered that we were storing positions by rank rather than by file as we'd planned. Amazing how slow it is. Might be interesting to try to compile it down to straightforward assembler and see how fast it gets.
* 472Kartik K. Agaram2014-12-301-6/+41
|
* 471 - experiment: chessboard appKartik K. Agaram2014-12-301-0/+25
No tests. Let's have some fun. As a first step, a 'list-length' function. Iterative version is 25% faster than recursive (60 vs 45 seconds).
ea9553acdba9e1218e90d1'>^
1ed9af83 ^
4d6b5173 ^




1ed9af83 ^
4d6b5173 ^




1ed9af83 ^
4d6b5173 ^

5cee5562 ^





e709c65e ^
1ed9af83 ^







5f128523 ^

8e7827df ^
5f128523 ^
9a31c34f ^



5f128523 ^
e709c65e ^




9a31c34f ^

1ed9af83 ^
4d6b5173 ^
1ed9af83 ^



9a31c34f ^
1ed9af83 ^

9a31c34f ^
5f128523 ^
9a31c34f ^

5f128523 ^
9a31c34f ^









5f128523 ^
9a31c34f ^
5f128523 ^
9a31c34f ^







5f128523 ^
9a31c34f ^


5f128523 ^
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