about summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
* document dbgKartik K. Agaram2021-12-182-0/+4
|
* toot-toot: save prose somewhereKartik K. Agaram2021-12-181-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is still quite klunky. Don't expect toot-toot to be a complete text editor. In particular, it'll happily lose toot data if you try to edit the app while editing a toot. Teliva is paranoid about avoiding data loss, but toot-toot.tlv is not. Mostly I just want toot-toot to interact with the clipboard. The only reason save exists is that copying directly from within the app inserts spurious line breaks. So now I'm saving to file, then `cat`ing file, then copying each toot out. I initially tried to use ctrl-s for the save hotkey, but that conflicts with terminal flow-control, and it's not obvious how ncurses manages IXON. And I don't want to go around ncurses and do something that's very likely to be unportable. Even ctrl-w, I worry that there are terminals out there that will close tab or something stupid like that. Feature wish list: - a hook to execute after exit. Just calling os.exit() doesn't work because the screen still clears any final prints when Teliva exits. Not sure how to handle this. Ncurses doesn't seem to have anything beyond endwin() for cleaning up after itself. - a hook to execute before exit, for things like asking for confirmation/save - a place for 'flash' notification messages, like that the file was saved
* pay more attention to where we display the cursorKartik K. Agaram2021-12-183-1/+4
| | | | | It's still just in app control; I'm resisting the urge to introduce "smarts".
* streamline an app; pull useful stuff into templateKartik K. Agaram2021-12-182-8813/+87
|
* drop ASan from MakefileKartik K. Agaram2021-12-181-2/+2
| | | | | Accidentally added at some point. It's a useful debugging aide, but I don't want to require the additional dependencies on a first run.
* mention programming framework in ReadmeKartik K. Agaram2021-12-181-0/+6
|
* ctrl-u: clear proseKartik K. Agaram2021-12-172-2/+98
|
* bug: handle digits in proseKartik K. Agaram2021-12-171-4/+686
| | | | | Lua has some Javascript-esque gotchas here. Too quick to coerce between types.
* clean up cursor_upKartik K. Agaram2021-12-171-4/+29
|
* two implementations of cursor_upKartik K. Agaram2021-12-171-0/+1830
|
* better copy on test failuresKartik K. Agaram2021-12-171-1/+4
|
* correct count of test failuresKartik K. Agaram2021-12-171-1/+1
|
* keep tests from messing up big pictureKartik K. Agaram2021-12-171-0/+19
|
* one more protection against Lua stack leakKartik K. Agaram2021-12-171-6/+6
|
* experimental support for test errorsKartik K. Agaram2021-12-171-3/+8
|
* start of a test frameworkKartik K. Agaram2021-12-172-0/+6633
| | | | | Follows https://github.com/akkartik/wart, https://github.com/akkartik/mu0, https://github.com/akkartik/mu1 and https://github.com/akkartik/mu.
* yet another stab at reorganizing stack assertionsKartik K. Agaram2021-12-171-9/+14
|
* .Kartik K. Agaram2021-12-171-0/+3
|
* .Kartik K. Agaram2021-12-171-4/+4
|
* more protection against data lossKartik K. Agaram2021-12-172-3/+13
|
* .Kartik K. Agaram2021-12-171-13/+0
|
* protect against data loss in some rare situationsKartik K. Agaram2021-12-161-3/+32
| | | | | | | | | | | Examples: - you try to write file but disk is full - you have two Teliva files being edited at the same time Both are situations where it's impossible to avoid some data loss. However, we should now at least have some valid state of the .tlv file saved to disk where we'd previously end up with a zero-size file or garbage.
* fix another leak in the Lua stackKartik K. Agaram2021-12-161-2/+9
| | | | | This fixes a segfault when scanning through a long history of recent changes (say > 20 changes)
* more consistently show notes in recent changesKartik K. Agaram2021-12-161-1/+5
| | | | | | | | | Teliva emits timestamps in multi-line format end in a newline. As a result, notes get rendered on the next line and are then immediately overwritten by the contents of the definition. This bug was masked by my hacky 'original' timestamps which don't use multi-line format.
* stop leaking on the Lua stack, reduxKartik K. Agaram2021-12-162-11/+26
| | | | | An empty stack is too rigorous a line to hold. Instead we'll just ensure we leave the stack the way we found it.
* Revert "stop leaking on the Lua stack"Kartik K. Agaram2021-12-162-3/+2
| | | | | | | This reverts commit 7c1b9d0b91295323b5ed5ec3e09b46566288bc75. The 'big hammer' isn't good enough. The recent changes view seems to need state on the stack across invocations of the editor.
* expand Teliva's "standard library"Kartik K. Agaram2021-12-161-0/+96
| | | | | | | | Lua is often not very functional. Available primitives often mutate data destructively rather than create new values. Perhaps I shouldn't be trying to go against the grain. We'll see. The above changes are based on using Teliva intensively for 2 weeks of Advent of Code 2021. But that isn't quite the ideal use case for Teliva.
* .Kartik K. Agaram2021-12-161-2/+2
|
* stop leaking on the Lua stackKartik K. Agaram2021-12-162-2/+3
| | | | | ..even if at the expense of leaking on the heap. Because the Lua stack has very limited space (~20 slots). When it overflows, we segfault.
* show all functions in big pictureKartik K. Agaram2021-12-131-2/+6
| | | | We were missing functions in some larger programs.
* tweak Hanoi colors yet againKartik K. Agaram2021-12-133-1/+1
|
* can again edit notes on changesKartik K. Agaram2021-12-111-4/+4
|
* .Kartik K. Agaram2021-12-111-0/+2
|
* delete an old file for comparisonKartik K. Agaram2021-12-111-120/+0
|
* handle non-existent fileKartik K. Agaram2021-12-111-1/+5
|
* bring back commandline argsKartik K. Agaram2021-12-111-1/+18
|
* snapshot: migrate all sample apps to new formatKartik K. Agaram2021-12-118-1215/+1027
|
* snapshot: writing working?Kartik K. Agaram2021-12-113-45/+112
| | | | | | This is a complete mess. I want to abstract reading multiline strings behind a function, but the lookahead requirements for that are quite stringent. What's a reasonable abstraction here?
* snapshot: key/value lines after multiline stringsKartik K. Agaram2021-12-112-29/+44
|
* snapshot: start reading a new formatKartik K. Agaram2021-12-114-27/+119
| | | | | | | | | | | | | | | I really wanted to avoid getting into defining or parsing new file formats. However, using the entire power of Lua is not ideal, as described earlier in Konrad Hinsen's bug. In addition to everything else, it's a vector for arbitrary code execution when someone loads an untrusted image. I could use JSON, but it requires ugly string escaping. Seems cleaner to just use YAML. But YAML is complex and needs its own dependencies. If I'm going to do my own, might as well make the multi-line string format really clear. I can't yet write the new format.
* clearer description of editing experienceKartik K. Agaram2021-12-104-4/+12
|
* commentKartik K. Agaram2021-12-081-0/+2
|
* minor colorscheme tweakKartik K. Agaram2021-12-081-1/+1
|
* display line numbersKartik K. Agaram2021-12-081-12/+29
| | | | | Not my aesthetic choice, but essential at the moment for quickly interpreting Lua errors.
* fix a use-after-freeKartik K. Agaram2021-12-081-2/+2
| | | | Introduced Nov 28. Let's see if my intermittent segfaults stop now.
* couple more primitives after Advent day 8Kartik K. Agaram2021-12-081-0/+22
|
* .Kartik K. Agaram2021-12-072-3/+3
|
* make it easy to print arrays:Kartik K. Agaram2021-12-071-0/+11
| | | | map(l, prn)
* new primitive: array appendKartik K. Agaram2021-12-071-3/+9
|
* new primitive: string splitKartik K. Agaram2021-12-071-0/+13
|
ts.c?id=acd2d2309f164a4902c3cfd7dc5b1ed5d2f7aa71'>acd2d230 ^
d853284f ^


a2726b6a ^
32da6548 ^
665c3441 ^
a978bb12 ^
3aad0523 ^
a978bb12 ^
a2726b6a ^
83385cdb ^


665c3441 ^
a2726b6a ^
11181100 ^



0fb27dc4 ^
3e325a61 ^
a2726b6a ^
aa0c6383 ^
a0a4fd04 ^
c614cc28 ^
4e1ffa6b ^
3e325a61 ^
2c94ee5a ^


a2726b6a ^
2c94ee5a ^




3e325a61 ^
3e325a61 ^
a2726b6a ^
8c8c18c6 ^
a0a4fd04 ^
b6b7dd5a ^
3e325a61 ^
c81931c3 ^
3e325a61 ^
c81931c3 ^

a2726b6a ^
c81931c3 ^
3e325a61 ^
a2726b6a ^
8c8c18c6 ^
a0a4fd04 ^
a4b53550 ^
3e325a61 ^






53f2a4a3 ^


a2726b6a ^
11181100 ^




a2726b6a ^
53f2a4a3 ^
a2726b6a ^
83385cdb ^


41fe8c22 ^
a2726b6a ^
4ec005e4 ^



a9d55dec ^

a2726b6a ^
4e1ffa6b ^
a0a4fd04 ^
4ec005e4 ^
4e1ffa6b ^
a9d55dec ^
a2726b6a ^
4e1ffa6b ^
a0a4fd04 ^
a4b53550 ^
e69f9475 ^
a9d55dec ^







a2726b6a ^
4e1ffa6b ^
9224331d ^
a4b53550 ^
e69f9475 ^
41fe8c22 ^


a9d55dec ^

53f2a4a3 ^


a2726b6a ^
4ec005e4 ^




a2726b6a ^
53f2a4a3 ^
150015fa ^

77e819e8 ^

150015fa ^
a2726b6a ^

41fe8c22 ^
a2726b6a ^
8c8c18c6 ^
a0a4fd04 ^
50271493 ^
a0a4fd04 ^
41fe8c22 ^

8c8c18c6 ^
41fe8c22 ^
8c8c18c6 ^
150015fa ^
80665ea0 ^
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

                  
                                 
  
                                                            
                                                               













                                                                       
                                                                      














                                                                                
                   
 
                   
                 
 
                
                     
                               
                         
                            
                           
                              
                      
 
                  

                    
 
                    

                    
 



                        
                    
                                                                                                                                                                            

                                       
                                                                                               

 
                    
                                           
 






                                                                                                         
 
                                                 

 
    

                      
                                               

                                                        
 
                        
                            

                                                  


    
                                                                                 
 
                               
 
                    

                                                              
                             
                                                  

                                                            
                          

      
                                                           

                        


    
                                                                                                                         
 
                                      
 
                                                                        
 
                                                                            


                             
 
                            



                                          
                            
                 
                                                                                                            
                                                                   
                                                                                                         
                                                                                                       
                 
      


                                     
                                                                                                   




                                                                                                      
                                   
                    
                                                                                                    
                                                                 
                                                                                                       
                                                                                                     
                 
      
            

                                 
                                                                                        
      
                       
                                                                                                             
                                                                 
                                                                                                            
                                                                                                          






                                                                 


    
                                                                                      




                                                         
                                                                                                                             
 
                                                                           


                             
 
                            



                                         

                           
                                                                                                
                                                                 
                                                                                                       
                                                                                    
                 
            
                                                                                            
                                                           
                                                                                                      
                                                                                   
                 







                                                                
                                                                                        
                                                       
                                                                                                  
                                                                               
             


                                                                

           


    
                                                                                        




                                                              
                                                                                              
 

                                                  

                                           
            

                                                                                
 
                                                                               
                                                                        
                                                                                                    
                                                  
                 

                                                                     
 
                         
                          
     
 
_account.c?id=3b2446c46a9bb370cc032d9f5d3caabda55a1ada'>^




76e7a834 ^
c20e38a4 ^
76e7a834 ^

c20e38a4 ^
76e7a834 ^
c20e38a4 ^

76e7a834 ^
c20e38a4 ^
76e7a834 ^






c20e38a4 ^
76e7a834 ^

c20e38a4 ^
76e7a834 ^
c20e38a4 ^

76e7a834 ^
c20e38a4 ^




76e7a834 ^
76e7a834 ^





c20e38a4 ^
76e7a834 ^

c20e38a4 ^
76e7a834 ^
c20e38a4 ^

76e7a834 ^
c20e38a4 ^

76e7a834 ^
76e7a834 ^





c20e38a4 ^
76e7a834 ^



c20e38a4 ^




76e7a834 ^
d56f6dc3 ^

76e7a834 ^






c20e38a4 ^
76e7a834 ^



c20e38a4 ^




76e7a834 ^
d56f6dc3 ^

76e7a834 ^





ba66d6b7 ^





c20e38a4 ^

ba66d6b7 ^
d56f6dc3 ^

ba66d6b7 ^











c20e38a4 ^

ba66d6b7 ^
d56f6dc3 ^

ba66d6b7 ^





f47bd58a ^





c20e38a4 ^

f47bd58a ^
c20e38a4 ^

f47bd58a ^
c20e38a4 ^



f47bd58a ^
f47bd58a ^










c20e38a4 ^

f47bd58a ^
c20e38a4 ^



f47bd58a ^
c20e38a4 ^

f47bd58a ^
f47bd58a ^










c20e38a4 ^




f47bd58a ^
c20e38a4 ^
f47bd58a ^
c20e38a4 ^

f47bd58a ^
f47bd58a ^










c20e38a4 ^

f47bd58a ^
c20e38a4 ^

f47bd58a ^
c20e38a4 ^



f47bd58a ^
f47bd58a ^










c20e38a4 ^

f47bd58a ^
c20e38a4 ^

b4668092 ^
c20e38a4 ^
b4668092 ^
c20e38a4 ^
b4668092 ^





b4668092 ^
ada3c768 ^
7a63cf2e ^
ada3c768 ^
ada3c768 ^


c20e38a4 ^

ada3c768 ^
7a63cf2e ^
ada3c768 ^




7a63cf2e ^
ada3c768 ^
7a63cf2e ^

7a63cf2e ^

ada3c768 ^
c20e38a4 ^

7a63cf2e ^






ada3c768 ^
9d1b05a8 ^
7a63cf2e ^
9d1b05a8 ^
9d1b05a8 ^
7a63cf2e ^
9d1b05a8 ^
c20e38a4 ^

9d1b05a8 ^
7a63cf2e ^
9d1b05a8 ^




7a63cf2e ^



7a63cf2e ^

9d1b05a8 ^
c20e38a4 ^

7a63cf2e ^




9d1b05a8 ^
7a63cf2e ^
9d1b05a8 ^

6d6bc67d ^

6d6bc67d ^


c20e38a4 ^

6d6bc67d ^
c20e38a4 ^

f47bd58a ^
c20e38a4 ^

6d6bc67d ^
c20e38a4 ^

6d6bc67d ^
c20e38a4 ^







6d6bc67d ^





122fe09c ^


122fe09c ^













122fe09c ^











122fe09c ^

122fe09c ^


c20e38a4 ^

122fe09c ^











122fe09c ^


c20e38a4 ^

122fe09c ^







6af10696 ^
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
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017