about summary refs log tree commit diff stats
path: root/apps/survey
Commit message (Collapse)AuthorAgeFilesLines
* 6783Kartik Agaram2020-09-161-0/+0
| | | | An extra test that should have been in commit 6781.
* 6781 - new app: RPN (postfix) calculatorKartik Agaram2020-09-151-0/+0
| | | | This was surprisingly hard; bugs discovered all over the place.
* 6733 - read utf-8 'grapheme' from byte streamKartik Agaram2020-08-281-0/+0
| | | | | | No support for combining characters. Graphemes are currently just utf-8 encodings of a single Unicode code-point. No support for code-points that require more than 32 bits in utf-8.
* 6719 - error-checking for 'index' instructionsKartik Agaram2020-08-211-0/+0
| | | | | | | | 1000+ LoC spent; just 300+ excluding tests. Still one known gap; we don't check the entirety of an array's element type if it's a compound. So far we just check if say both sides start with 'addr'. Obviously that's not good enough.
* 6622 - new syscalls: time and ntimeKartik Agaram2020-07-081-0/+0
| | | | | As a side-effect I find that my Linode can print ~100k chars/s. At 50 rows and 200 columns per screen, it's 10 frames/s.
* 6604 - new appKartik Agaram2020-07-011-0/+0
| | | | | | https://archive.org/details/akkartik-2min-2020-07-01 In the process I found a bug, added a new syscall, and 'emulated' it.
* 6597Kartik Agaram2020-06-291-0/+0
|
* 6596Kartik Agaram2020-06-291-0/+0
|
* 6595Kartik Agaram2020-06-291-0/+0
|
* 6594 - start standardizing the meaning of 'print'Kartik Agaram2020-06-291-0/+0
|
* 6528Kartik Agaram2020-06-151-0/+0
|
* 6520 - new app: parse-intKartik Agaram2020-06-141-0/+0
| | | | | | Several bugs fixed in the process, and expectation of further bugs is growing. I'd somehow started assuming I don't need to have separate cases for rm32 as a register vs mem. That's not right. We might need more reg-reg Primitives.
* 6508 - support null exit-descriptorKartik Agaram2020-06-101-0/+0
|
* 6507 - use syscall names everywhereKartik Agaram2020-06-101-0/+0
|
* 6409 - primitives for text-mode UIsKartik Agaram2020-05-271-0/+0
|
* 6406 - primitive 'copy-handle'Kartik Agaram2020-05-251-0/+0
|
* 6382 - re-enable mu.subx in CIKartik Agaram2020-05-221-0/+0
| | | | | | | | | | | I thought I'd done this in the previous commit, but I hadn't. And, what's more, there was a bug that seemed pretty tough for a time. Turns out my self-hosted translator doesn't support '.' comment tokens in data segments. Hopefully I'm past the valley of the shadow of death now. "I HAVE NO TOOLS BECAUSE I’VE DESTROYED MY TOOLS WITH MY TOOLS." -- James Mickens (https://www.usenix.org/system/files/1311_05-08_mickens.pdf)
* update binariesKartik Agaram2020-05-221-0/+0
| | | | CI should start passing again now.
* handle nulls in lookupKartik Agaram2020-05-181-0/+0
| | | | | | | | | Cleaner abstraction, but adds 3 instructions to our overhead for handles, including one potentially-hard-to-predict jump :/ I wish I could have put the alloc id in eax for the comparison as well, to save a few bytes of instruction space. But that messes up the non-null case.
* support 'fake' handles allocated staticallyKartik Agaram2020-05-181-0/+0
| | | | | | | | Mystery solved of why the syntax sugar phases don't work even though they don't use any functions whose signatures changed in the migration to handles. The answer: they use the Registers table, and it needs to use handles rather than raw strings.
* support 'fake' handles allocated staticallyKartik Agaram2020-05-181-0/+0
| | | | | | | | | | | | | | | | | | | | | | Mystery solved of why the syntax sugar phases don't work even though they don't use any functions whose signatures changed in the migration to handles. The answer: they use the Registers table, and it currently doesn't use handles. Rather than create a whole new set of functions that operate on addresses, I'm going to create fake handles that are never intended to be reclaimed. Which raises the question of the best way to do that. I'd like to continue using string syntax, so I'm going to use a prefix in the payload that can also be rendered as a string. But all the printable characters start with 0x20, and we don't currently have escape sequences for null or any other non-printable characters. I _could_ use newlines, but that seems overly clever. So instead I'll once again not worry about some hypothetical problem with running out of alloc-ids, and just carve out half of the id space that can't be used for real alloc ids. Ascii doesn't use the most significant bit of bytes, so it seems like a natural separation.
* fix a discrepancy in the generated apps/ex1 binaryKartik Agaram2020-05-181-0/+0
|
* fix a crash when translating apps/ex1Kartik Agaram2020-05-181-0/+0
|
* Rebuild phases of self-hosted SubX translatorKartik Agaram2020-05-181-0/+0
| | | | For this one commit we need to bootstrap ourselves with subx_translate_debug.
* 6208Kartik Agaram2020-04-221-0/+0
|
* 6198Kartik Agaram2020-04-081-0/+0
|
* 6197Kartik Agaram2020-04-081-0/+0
|
* 6196Kartik Agaram2020-04-061-0/+0
|
* 6195Kartik Agaram2020-04-061-0/+0
| | | | This bug was never caught because we've never tested with more than 2 segments.
* 6194Kartik Agaram2020-04-061-0/+0
|
* 6193Kartik Agaram2020-04-061-0/+0
|
* 6192Kartik Agaram2020-04-061-0/+0
|
* 6191Kartik Agaram2020-04-061-0/+0
|
* 6189Kartik Agaram2020-04-061-0/+0
|
* 6187Kartik Agaram2020-04-061-0/+0
|
* 6186Kartik Agaram2020-04-061-0/+0
|
* 6182 - start of support for safe handlesKartik Agaram2020-04-031-0/+0
| | | | | | | | | | | | | | So far it's unclear how to do this in a series of small commits. Still nibbling around the edges. In this commit we standardize some terminology: The length of an array or stream is denominated in the high-level elements. The _size_ is denominated in bytes. The thing we encode into the type is always the size, not the length. There's still an open question of what to do about the Mu `length` operator. I'd like to modify it to provide the length. Currently it provides the size. If I can't fix that I'll rename it.
* 6181Kartik Agaram2020-04-031-0/+0
|
* 6180Kartik Agaram2020-04-031-0/+0
| | | | | It's going to be hard work retrofitting 8-byte handles in place of 4-byte addrs. Here we just clean up some unused args.
* 6153 - switch 'main' to use Mu stringsKartik Agaram2020-03-151-0/+0
| | | | | | | | | | | At the SubX level we have to put up with null-terminated kernel strings for commandline args. But so far we haven't done much with them. Rather than try to support them we'll just convert them transparently to standard length-prefixed strings. In the process I realized that it's not quite right to treat the combination of argc and argv as an array of kernel strings. Argc counts the number of elements, whereas the length of an array is usually denominated in bytes.
* 6094 - new 'compute-offset' instructionKartik Agaram2020-03-071-0/+0
| | | | | | | | | | | | | | | | | | | | | | | If indexing into a type with power-of-2-sized elements we can access them in one instruction: x/reg1: (addr int) <- index A/reg2: (addr array int), idx/reg3: int This translates to a single instruction because x86 instructions support an addressing mode with left-shifts. For non-powers-of-2, however, we need a multiply. To keep things type-safe, it is performed like this: x/reg1: (offset T) <- compute-offset A: (addr array T), idx: int y/reg2: (addr T) <- index A, x An offset is just an int that is guaranteed to be a multiple of size-of(T). Offsets can only be used in index instructions, and the types will eventually be required to line up. In the process, I have to expand Input-size because mu.subx is growing big.
* 6085Kartik Agaram2020-03-061-0/+0
| | | | Support parsing ints from strings rather than slices.
* 6083Kartik Agaram2020-03-061-0/+0
|
* 6070Kartik Agaram2020-02-291-0/+0
|
* 6064Kartik Agaram2020-02-271-0/+0
| | | | Fix CI.
* 6000 - clean up after no-local branchesKartik Agaram2020-02-091-0/+0
|
* 5999Kartik Agaram2020-02-091-0/+0
| | | | | Fix CI. apps/survey was running out of space in the trace segment when translating apps/mu.subx
* 5948 - branching to named blocksKartik Agaram2020-01-291-0/+0
|
* 5933Kartik Agaram2020-01-271-0/+0
| | | | Expand some buffer sizes to continue building mu.subx natively.
* 5898 - strengthen slice-empty? checkKartik Agaram2020-01-191-0/+0
| | | | | | | | | | | Anytime we create a slice, the first check tends to be whether it's empty. If we handle ill-formed slices here where start > end, that provides a measure of safety. In the Mu translator (mu.subx) we often check for a trailing ':' or ',' and decrement slice->end to ignore it. But that could conceivably yield ill-formed slices if the slice started out empty. Now we make sure we never operate on such ill-formed slices.
d'>545a23e9 ^
028a2da3 ^

0a42be57 ^


527e739a ^
0a42be57 ^
a7a28506 ^
0a42be57 ^

279737ba ^
f9b4abe3 ^

954661e5 ^
f9b4abe3 ^




527e739a ^
6d5d41b3 ^
aa26278a ^
279737ba ^
ca26452a ^
aa26278a ^
ca26452a ^








aa26278a ^

279737ba ^
7982b8e4 ^
aa26278a ^
7982b8e4 ^


f621787e ^
aa26278a ^

069bdbc3 ^

e8b2b719 ^
069bdbc3 ^



069bdbc3 ^


7344d3b8 ^




069bdbc3 ^


e8b2b719 ^


7344d3b8 ^









069bdbc3 ^
e8b2b719 ^
069bdbc3 ^






e8b2b719 ^


3d6ebf48 ^


ca26452a ^
3d6ebf48 ^




ca26452a ^
3d6ebf48 ^


c71259c3 ^


ca26452a ^
c71259c3 ^




ca26452a ^
8b1653f7 ^


291c6bc3 ^


e559c33d ^









ca26452a ^
e559c33d ^
291c6bc3 ^

13f73a30 ^















a114fe88 ^


ca26452a ^
a114fe88 ^

921f026c ^


816351d3 ^




921f026c ^




ca26452a ^
921f026c ^


213ccc01 ^


ca26452a ^
213ccc01 ^




ca26452a ^
213ccc01 ^


5a625dd8 ^


ca26452a ^
5a625dd8 ^










ca26452a ^
5a625dd8 ^


1479a5e1 ^





































e089ffb1 ^
8dbe300d ^

e089ffb1 ^






8dbe300d ^











































d668d150 ^



8dbe300d ^
d668d150 ^



8dbe300d ^





















279737ba ^

f621787e ^

e2963798 ^
be7c4f5a ^




c6ae459c ^
be7c4f5a ^

e2963798 ^
be7c4f5a ^
aa26278a ^
c58aca56 ^












7982b8e4 ^









561d96c7 ^
7982b8e4 ^



ce7cb3f4 ^
7982b8e4 ^
79e9ab83 ^


fc049c9e ^
373b3a2d ^
46583839 ^
40dc8e2c ^
497b07c1 ^



8dbe300d ^
7982b8e4 ^

8dbe300d ^
7982b8e4 ^
b25b3f31 ^
7982b8e4 ^
eb0f0dd9 ^
b36fbe41 ^
7d90d218 ^
eb0f0dd9 ^
b36fbe41 ^
f099bf9a ^
441422dd ^
8dbe300d ^
7982b8e4 ^
8c5866ff ^
a4a23fdf ^
c3418a29 ^
8dbe300d ^
7982b8e4 ^
069bdbc3 ^

8dbe300d ^
2b0108e6 ^
8dbe300d ^
ddbb4872 ^



7982b8e4 ^

















561d96c7 ^

7982b8e4 ^







ce7cb3f4 ^

fc049c9e ^

7982b8e4 ^

79e9ab83 ^





7982b8e4 ^





b25b3f31 ^

7982b8e4 ^

eb0f0dd9 ^

b36fbe41 ^

7d90d218 ^

eb0f0dd9 ^

b36fbe41 ^

f099bf9a ^

441422dd ^

7982b8e4 ^

8c5866ff ^

7982b8e4 ^

069bdbc3 ^



2b0108e6 ^

60820007 ^
ddbb4872 ^
4f98bc8c ^
ddbb4872 ^
1a0f12b0 ^
ddbb4872 ^
a4a23fdf ^

c3418a29 ^

373b3a2d ^

46583839 ^

40dc8e2c ^

497b07c1 ^







7982b8e4 ^









561d96c7 ^
4f98bc8c ^
561d96c7 ^
a4a23fdf ^
c3418a29 ^
eb0f0dd9 ^

b25b3f31 ^
8fc42492 ^
ce7cb3f4 ^
fc049c9e ^
373b3a2d ^
46583839 ^
561d96c7 ^
7982b8e4 ^




069bdbc3 ^





866d87af ^
069bdbc3 ^
60820007 ^

1a0f12b0 ^

69f2f4a1 ^

2af418fd ^
69f2f4a1 ^
497b07c1 ^

40dc8e2c ^

069bdbc3 ^


d6e92f62 ^
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
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699