about summary refs log tree commit diff stats
path: root/022arithmetic.cc
Commit message (Collapse)AuthorAgeFilesLines
* 3877Kartik K. Agaram2017-05-261-33/+33
|
* 3841Kartik K. Agaram2017-04-271-3/+3
| | | | | Use the real original instruction in error messages. Thanks Ella Couch.
* 3753 - new instruction: 'square-root'Kartik K. Agaram2017-03-041-0/+23
| | | | Thanks Lakshman Swaminathan for the request.
* 3624 - new rounding instruction: 'truncate'Kartik K. Agaram2016-11-051-0/+35
|
* 3622 - handle fractional coordinates in printKartik K. Agaram2016-11-051-0/+12
|
* 3618Kartik K. Agaram2016-10-311-7/+7
|
* 3522Kartik K. Agaram2016-10-191-10/+10
|
* 3381Kartik K. Agaram2016-09-171-2/+2
|
* 3380Kartik K. Agaram2016-09-171-60/+60
| | | | | One more place we were missing expanding type abbreviations: inside container definitions.
* 3210 - new primitive: character-to-codeKartik K. Agaram2016-08-171-0/+35
| | | | Thanks Ella Couch; this was long overdue.
* 3181Kartik K. Agaram2016-08-131-0/+32
|
* 3120Kartik K. Agaram2016-07-211-25/+25
| | | | | | | | Always show instruction before any transforms in error messages. This is likely going to make some errors unclear because they *need* to show the original instruction. But if we don't have tests for those situations did they ever really work?
* 2990Kartik K. Agaram2016-05-201-17/+17
| | | | | | | | | | Standardize quotes around reagents in error messages. I'm still sure there's issues. For example, the messages when type-checking 'copy'. I'm not putting quotes around them because in layer 60 I end up creating dilated reagents, and then it's a bit much to have quotes and (two kinds of) brackets. But I'm sure I'm doing that somewhere..
* 2803Kartik K. Agaram2016-03-211-28/+28
| | | | | Show more thorough information about instructions in the trace, but keep the original form in error messages.
* 2773 - switch to 'int'Kartik K. Agaram2016-03-131-24/+24
| | | | This should eradicate the issue of 2771.
* 2735 - define recipes using 'def'Kartik K. Agaram2016-03-081-43/+43
| | | | | | | | | | | | 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.
* 2712Kartik K. Agaram2016-02-261-45/+45
|
* 2685Kartik K. Agaram2016-02-191-28/+28
| | | | | | | | | | | | | | | | Stack of plans for cleaning up replace_type_ingredients() and a couple of other things, from main problem to subproblems: include type names in the type_tree rather than in the separate properties vector make type_tree and string_tree real cons cells, with separate leaf nodes redo the vocabulary for dumping various objects: do we really need to_string and debug_string? can we have a version with *all* information? can we have to_string not call debug_string? This commit nibbles at the edges of the final task, switching from member method syntax to global function like almost everything else. I'm mostly using methods just for STL in this project.
* 2627 - bitwise operatorsKartik K. Agaram2016-02-041-0/+283
|
* 2626Kartik K. Agaram2016-02-031-0/+80
|
* 2578Kartik K. Agaram2016-01-201-0/+4
|
* 2558Kartik K. Agaram2016-01-121-0/+3
|
* 2377 - stop using operator[] in mapKartik K. Agaram2015-11-061-23/+23
| | | | | | | | | | | | | | | | I'm still seeing all sorts of failures in turning on layer 11 of edit/, so I'm backing away and nailing down every culprit I run into. First up: stop accidentally inserting empty objects into maps during lookups. Commands run: $ sed -i 's/\(Recipe_ordinal\|Recipe\|Type_ordinal\|Type\|Memory\)\[\([^]]*\)\] = \(.*\);/put(\1, \2, \3);/' 0[1-9]* $ vi 075scenario_console.cc # manually fix up Memory[Memory[CONSOLE]] $ sed -i 's/\(Memory\)\[\([^]]*\)\]/get_or_insert(\1, \2)/' 0[1-9]* $ sed -i 's/\(Recipe_ordinal\|Type_ordinal\)\[\([^]]*\)\]/get(\1, \2)/' 0[1-9]* $ sed -i 's/\(Recipe\|Type\)\[\([^]]*\)\]/get(\1, \2)/' 0[1-9]* Now mu dies pretty quickly because of all the places I try to lookup a missing value.
* 2301 - test_all_layers fixesKartik K. Agaram2015-10-281-8/+0
|
* 2270Kartik K. Agaram2015-10-121-2/+2
| | | | Thanks Caleb Couch.
* 2258 - separate warnings from errorsKartik K. Agaram2015-10-061-25/+25
| | | | | | | At the lowest level I'm reluctantly starting to see the need for errors that stop the program in its tracks. Only way to avoid memory corruption and security issues. But beyond that core I still want to be as lenient as possible at higher levels of abstraction.
* 2226 - standardize warning formatKartik K. Agaram2015-10-011-19/+19
| | | | | | | | Always show recipe name where error occurred. But don't show internal 'interactive' name for sandboxes, that's just confusing. What started out as warnings are now ossifying into errors that halt all execution. Is this how things went with C and Unix as well?
* 2225Kartik K. Agaram2015-10-011-5/+5
|
* 2222Kartik K. Agaram2015-09-301-5/+5
|
* 2221Kartik K. Agaram2015-09-301-1/+2
|
* 2220Kartik K. Agaram2015-09-301-34/+109
|
* 2214Kartik K. Agaram2015-09-281-0/+248
ss='alt'>
9f95c745 ^
795f5244 ^
1b76245c ^
795f5244 ^
35064671 ^
dc269891 ^
fca0ebbe ^
e74a2940 ^
b24eb476 ^
e74a2940 ^
0487a30e ^
dc269891 ^
fca0ebbe ^
dcfca05e ^
f1a6f323 ^
d241c9c4 ^
827898fc ^
d241c9c4 ^

f1a6f323 ^
d241c9c4 ^
dcfca05e ^
d241c9c4 ^
9cf71627 ^
cfb142b9 ^
acc4792d ^
cfb142b9 ^

b24eb476 ^
cfb142b9 ^

0487a30e ^
2dab0edb ^
0d302187 ^
1066660e ^
9fc64bbc ^
9d670bb5 ^
9fc64bbc ^

e74a2940 ^




3c435756 ^


2199940a ^
b24eb476 ^
8eff7919 ^
ec926027 ^

7c8493b3 ^
795f5244 ^
ec926027 ^

dcfca05e ^
795f5244 ^
dcfca05e ^

69e14325 ^
795f5244 ^
ec926027 ^

95b2a140 ^



e5e9f7db ^



0d3f30c2 ^
785a60fa ^

2429c65c ^
8aa4b664 ^

e5e9f7db ^

b39ceb27 ^
2186422c ^
db50f43a ^
e7f76736 ^
cea49fde ^





2429c65c ^
cea49fde ^

e7f76736 ^
ae5f0b6f ^
b39ceb27 ^
2429c65c ^

e7f76736 ^
e5e9f7db ^

b39ceb27 ^
ae5f0b6f ^
0d3f30c2 ^
b39ceb27 ^
6c1376f8 ^

4f10b93a ^
cea49fde ^





ae5f0b6f ^
e7f76736 ^
e7f76736 ^

267ebb59 ^
e0551d78 ^
b24eb476 ^
e0551d78 ^

c062021a ^
b24eb476 ^
c062021a ^


b24eb476 ^
c062021a ^

e0551d78 ^
e5e9f7db ^

e0551d78 ^

f78f92c5 ^
11312cec ^
24047016 ^
f78f92c5 ^







2429c65c ^
9f78ec2d ^
2429c65c ^
9f78ec2d ^

267ebb59 ^
f5f4b698 ^
1b76245c ^
f5f4b698 ^

b2ec0969 ^
8c9e97ae ^
267ebb59 ^


9f78ec2d ^





2429c65c ^
9f78ec2d ^



55fc43b7 ^
2429c65c ^
9f78ec2d ^






9c362f85 ^
9f78ec2d ^
7284d503 ^

e5e9f7db ^
fca0ebbe ^
fca0ebbe ^
ab6ed192 ^
a4ef18b1 ^
a26cc359 ^

6700f9f2 ^
b24eb476 ^

6700f9f2 ^

b291f85b ^

cae5461b ^


a2739bc6 ^
0c0bc3ae ^
1b76245c ^
0c0bc3ae ^

6b6dfb0c ^
18429d40 ^
6700f9f2 ^

70179d1f ^
acc4792d ^
35064671 ^
70179d1f ^
6700f9f2 ^
b24eb476 ^
6700f9f2 ^


b291f85b ^
cae5461b ^

c1a50c82 ^
b24eb476 ^
c6034af3 ^
93b7d983 ^
c6034af3 ^
3076bab4 ^
b24eb476 ^
c6034af3 ^

f48f6c14 ^
eaa75c87 ^
decaddb4 ^
70179d1f ^
c6034af3 ^
c91caafd ^
6c1376f8 ^
70179d1f ^


78164bab ^
c6034af3 ^



a0fc38c9 ^

b24eb476 ^
78164bab ^





e5e9f7db ^




7ac8feef ^
390f4097 ^





e5e9f7db ^

decaddb4 ^
1ead3562 ^
decaddb4 ^
bc643692 ^
5497090a ^
decaddb4 ^
acc4792d ^

d7494165 ^
fc55fea0 ^

1ead3562 ^
bc643692 ^
fc55fea0 ^
acc4792d ^
18429d40 ^
bc643692 ^
5f98a10c ^
1ead3562 ^
a0fc38c9 ^
18429d40 ^
bc643692 ^
6d2b1168 ^
677fa104 ^



1ead3562 ^
578327f1 ^
677fa104 ^
578327f1 ^
677fa104 ^

1ead3562 ^
578327f1 ^
677fa104 ^
578327f1 ^
677fa104 ^

1ead3562 ^
578327f1 ^
677fa104 ^
578327f1 ^
677fa104 ^

1ead3562 ^
578327f1 ^
677fa104 ^
578327f1 ^
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