summaryrefslogblamecommitdiffstats
path: root/2020/subtitles/emacsconf-2020--20-omg-macros--corwin-brust-autogen.vtt
blob: 0455366cd952a35bd34429c90cf7694e48c347c1 (plain) (tree)
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
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606





































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































                                        
WEBVTT

00:00:00.480 --> 00:00:02.879
uh well good evening again uh I think I

00:00:02.879 --> 00:00:04.319
have a little time here

00:00:04.319 --> 00:00:07.359
uh to talk about macros uh is there

00:00:07.359 --> 00:00:09.120
still room in our in our schedule for

00:00:09.120 --> 00:00:09.440
that

00:00:09.440 --> 00:00:11.440
or should I just kind of jump to some of

00:00:11.440 --> 00:00:12.559
my thoughts on the day

00:00:12.559 --> 00:00:15.920
you are now unmuted um pretty sure we

00:00:15.920 --> 00:00:17.039
have some time

00:00:17.039 --> 00:00:19.439
all right great yeah go for it well I'll

00:00:19.439 --> 00:00:20.720
just drive into my pre

00:00:20.720 --> 00:00:22.640
prepared thing to hear that yeah

00:00:22.640 --> 00:00:24.720
actually you're right on time so

00:00:24.720 --> 00:00:28.400
oh what an amazing thing I I just uh

00:00:28.400 --> 00:00:31.199
you know I have been trying to do what I

00:00:31.199 --> 00:00:33.040
I've got a big thank you planet to get

00:00:33.040 --> 00:00:36.239
at the end but let me just say I uh

00:00:36.239 --> 00:00:39.200
it's it's been really cool to watch the

00:00:39.200 --> 00:00:42.160
way that people work together

00:00:42.160 --> 00:00:46.000
absolutely it's this whole event today

00:00:46.000 --> 00:00:46.800
has been

00:00:46.800 --> 00:00:50.879
nothing but awesome and uh no less like

00:00:50.879 --> 00:00:53.120
no little part thanks to all of the help

00:00:53.120 --> 00:00:54.719
from all of you guys

00:00:54.719 --> 00:00:59.120
and um everyone oh yeah it's awesome

00:00:59.120 --> 00:01:02.399
um yeah with that all just um shut up

00:01:02.399 --> 00:01:03.520
for now and uh

00:01:03.520 --> 00:01:06.479
take it away corwin you know how to make

00:01:06.479 --> 00:01:09.840
make that the default and good old cemex

00:01:09.840 --> 00:01:12.799
all right so I'm gonna try to continue

00:01:12.799 --> 00:01:14.880
my theme from the previous talk I'm a

00:01:14.880 --> 00:01:16.960
longtime Emacs user but I'm

00:01:16.960 --> 00:01:20.240
a pretty new person

00:01:20.240 --> 00:01:22.880
to trying to really understand what's

00:01:22.880 --> 00:01:24.960
going on within Emacs and make

00:01:24.960 --> 00:01:28.240
my customizations to it uh simple for

00:01:28.240 --> 00:01:30.960
what I tend to just think of will work

00:01:30.960 --> 00:01:33.280
and maybe that's that's that's a nice

00:01:33.280 --> 00:01:36.240
bow to put on that earlier talk

00:01:36.240 --> 00:01:40.479
so uh whoops

00:01:40.479 --> 00:01:43.759
uh let's see here now it's ctrl x

00:01:43.759 --> 00:01:48.159
alt I that's right

00:01:48.159 --> 00:01:52.960
and let's try that again okay good

00:01:52.960 --> 00:01:56.000
so demoing is fun uh but I

00:01:56.000 --> 00:01:58.000
will save most of that for tomorrow

00:01:58.000 --> 00:01:59.759
where my

00:01:59.759 --> 00:02:03.040
dear friend and co-collaborator in

00:02:03.040 --> 00:02:04.799
bringing you the dungeon mode project

00:02:04.799 --> 00:02:07.119
which is uh sort of

00:02:07.119 --> 00:02:08.720
the exciting thing that we we hope

00:02:08.720 --> 00:02:10.800
you'll be interested in

00:02:10.800 --> 00:02:14.480
um I think gets a little more of a

00:02:14.480 --> 00:02:15.680
reveal

00:02:15.680 --> 00:02:19.360
uh tonight I'll just uh close saying

00:02:19.360 --> 00:02:22.640
um a few things about the process of

00:02:22.640 --> 00:02:24.319
making it and continuing my theme of

00:02:24.319 --> 00:02:25.680
community

00:02:25.680 --> 00:02:28.720
uh first of all a specific and upfront

00:02:28.720 --> 00:02:29.760
shout out

00:02:29.760 --> 00:02:33.120
to tv's wasa masa who

00:02:33.120 --> 00:02:36.239
um absolutely shaped and guided this

00:02:36.239 --> 00:02:38.720
this program I I may have taken out a

00:02:38.720 --> 00:02:40.080
slide with your name on it but

00:02:40.080 --> 00:02:43.599
thank you um

00:02:43.599 --> 00:02:46.720
so when we think about Emacs macros and

00:02:46.720 --> 00:02:47.120
the

00:02:47.120 --> 00:02:50.239
power that they give us

00:02:50.239 --> 00:02:53.280
I think about them the the

00:02:53.280 --> 00:02:54.720
you know I think about them as a really

00:02:54.720 --> 00:02:56.400
deep rabbit hole they confuse

00:02:56.400 --> 00:03:00.239
people a lot and so to try to center

00:03:00.239 --> 00:03:02.480
myself on that I remember first that

00:03:02.480 --> 00:03:03.599
they're

00:03:03.599 --> 00:03:05.840
they're going to be talking to us about

00:03:05.840 --> 00:03:09.599
code

00:03:09.599 --> 00:03:12.080
uh excuse me I realize I hadn't set my

00:03:12.080 --> 00:03:13.519
timer

00:03:13.519 --> 00:03:18.000
here we are

00:03:18.000 --> 00:03:21.680
um so a simple macro syntax is going to

00:03:21.680 --> 00:03:22.239
generate

00:03:22.239 --> 00:03:25.920
something that is implicitly confusing

00:03:25.920 --> 00:03:27.760
to somebody that knows the syntax of

00:03:27.760 --> 00:03:28.720
emax lisp

00:03:28.720 --> 00:03:31.200
well we see something like this and a

00:03:31.200 --> 00:03:32.000
veteran I

00:03:32.000 --> 00:03:36.239
says that x isn't quoted what's going on

00:03:36.239 --> 00:03:39.840
but it can be hard to miss

00:03:39.840 --> 00:03:43.040
um a lot of the functions as we'll talk

00:03:43.040 --> 00:03:44.640
about in a moment that are built into

00:03:44.640 --> 00:03:46.640
Emacs

00:03:46.640 --> 00:03:48.959
really are macros so a lot of Emacs

00:03:48.959 --> 00:03:50.480
features work this way

00:03:50.480 --> 00:03:53.040
it might be scary but we have to look at

00:03:53.040 --> 00:03:54.640
it closely if we really want to get

00:03:54.640 --> 00:03:58.400
friendly with Emacs

00:03:58.400 --> 00:04:01.439
um let's just jump right into deaf macro

00:04:01.439 --> 00:04:03.920
which is which is our key entry point

00:04:03.920 --> 00:04:04.720
and the

00:04:04.720 --> 00:04:08.560
notes from this talk include the link um

00:04:08.560 --> 00:04:12.000
to that uh which which definitely

00:04:12.000 --> 00:04:14.640
uh read through a couple of times and

00:04:14.640 --> 00:04:16.000
that may take you through

00:04:16.000 --> 00:04:19.440
into the cldf macro which adds

00:04:19.440 --> 00:04:23.440
the common list lisp extensions

00:04:23.440 --> 00:04:26.840
and uh definitely

00:04:26.840 --> 00:04:30.560
uh challenging uh I've struggled there

00:04:30.560 --> 00:04:31.759
as we'll take a look at in

00:04:31.759 --> 00:04:34.800
in a moment um

00:04:34.800 --> 00:04:36.400
so I haven't played too much with cl

00:04:36.400 --> 00:04:38.320
maclet perhaps success in

00:04:38.320 --> 00:04:42.160
in that uh keyword space and figuring

00:04:42.160 --> 00:04:44.320
out what the right balance is there

00:04:44.320 --> 00:04:46.000
what will give me the confidence to try

00:04:46.000 --> 00:04:47.680
some more lexical

00:04:47.680 --> 00:04:51.680
uh macros

00:04:51.680 --> 00:04:53.919
let me also briefly introduce the comma

00:04:53.919 --> 00:04:55.440
and back quote if you

00:04:55.440 --> 00:04:58.479
have uh allowed your eyes to cross when

00:04:58.479 --> 00:05:00.080
you see these and that's not

00:05:00.080 --> 00:05:03.600
uh a shameful shameful thing it's

00:05:03.600 --> 00:05:06.080
confusing and we should be

00:05:06.080 --> 00:05:08.160
alerting each other when we when we

00:05:08.160 --> 00:05:09.520
stick macros in

00:05:09.520 --> 00:05:11.199
often by putting them in different

00:05:11.199 --> 00:05:12.960
different library spaces for complicated

00:05:12.960 --> 00:05:14.160
projects

00:05:14.160 --> 00:05:17.520
or um otherwise sort of warning people

00:05:17.520 --> 00:05:19.520
that this is not an interactive function

00:05:19.520 --> 00:05:21.919
if you get away with using it like one

00:05:21.919 --> 00:05:22.639
um

00:05:22.639 --> 00:05:26.000
to watch your back

00:05:26.000 --> 00:05:29.440
the uh

00:05:29.440 --> 00:05:32.800
the manual itself talks about macros

00:05:32.800 --> 00:05:35.840
as being a way of evaluating

00:05:35.840 --> 00:05:39.039
you know as as being um

00:05:39.039 --> 00:05:41.520
an evaluator that will take our amex

00:05:41.520 --> 00:05:42.800
lisp expression

00:05:42.800 --> 00:05:44.800
and the set of forms that kind of that

00:05:44.800 --> 00:05:47.590
will feed to it our code

00:05:47.590 --> 00:05:48.960
[Music]

00:05:48.960 --> 00:05:51.120
but it also provides us with this

00:05:51.120 --> 00:05:52.000
concept of an

00:05:52.000 --> 00:05:55.039
environment and and and that's really

00:05:55.039 --> 00:05:56.639
where the power

00:05:56.639 --> 00:05:58.240
comes in through that we can have

00:05:58.240 --> 00:06:00.080
lexical variables and

00:06:00.080 --> 00:06:03.199
um think about uh bring in some of the

00:06:03.199 --> 00:06:06.400
capabilities that

00:06:06.400 --> 00:06:09.759
um can be harder to reach with

00:06:09.759 --> 00:06:13.840
a a a pure declarative statement that

00:06:13.840 --> 00:06:14.800
doesn't allow

00:06:14.800 --> 00:06:18.000
for uh

00:06:18.000 --> 00:06:21.440
top level

00:06:21.440 --> 00:06:28.639
um asynchronous asynchronicity

00:06:28.639 --> 00:06:31.950
uh I'm gonna basically

00:06:31.950 --> 00:06:33.520
[Music]

00:06:33.520 --> 00:06:35.759
ignore the bike compilation phase for

00:06:35.759 --> 00:06:36.880
this talk

00:06:36.880 --> 00:06:38.639
uh in order to have any prayer of

00:06:38.639 --> 00:06:39.919
getting through it in the

00:06:39.919 --> 00:06:43.600
remaining nine or 11 minutes or whatever

00:06:43.600 --> 00:06:48.319
uh but

00:06:48.319 --> 00:06:50.160
suffice it to say it that's a scary

00:06:50.160 --> 00:06:52.240
space and that's that's that's really

00:06:52.240 --> 00:06:54.160
the thing that you want to start

00:06:54.160 --> 00:06:57.199
learning about as you think about taking

00:06:57.199 --> 00:07:02.160
taking macros on uh in earnest

00:07:02.160 --> 00:07:05.919
the um coming back to the comma syntax

00:07:05.919 --> 00:07:07.440
then

00:07:07.440 --> 00:07:09.759
having having given ourselves sort of a

00:07:09.759 --> 00:07:12.479
working definition for the Emacs lisp

00:07:12.479 --> 00:07:14.479
runtime environment then we can say that

00:07:14.479 --> 00:07:15.840
macros are going to

00:07:15.840 --> 00:07:21.120
inject code back into that stream

00:07:21.120 --> 00:07:25.280
whereas back quote is going to

00:07:25.280 --> 00:07:28.479
uh going to give code back

00:07:28.479 --> 00:07:31.919
to the to the stream or interject sorry

00:07:31.919 --> 00:07:34.560
it's going to interject uh back into the

00:07:34.560 --> 00:07:35.360
stream

00:07:35.360 --> 00:07:39.840
uh sort of uh an exclamatory excuse me

00:07:39.840 --> 00:07:43.280
I'd like to uh

00:07:43.280 --> 00:07:46.720
have a value here and we can take that

00:07:46.720 --> 00:07:48.639
value from the environment as it exists

00:07:48.639 --> 00:07:54.160
when our macro is evaluated

00:07:54.160 --> 00:07:56.639
back quote on the other hand takes the

00:07:56.639 --> 00:07:57.280
result

00:07:57.280 --> 00:08:00.560
from that and uh

00:08:00.560 --> 00:08:02.400
and returns it back to the stream for

00:08:02.400 --> 00:08:04.319
evaluation at the processing level that

00:08:04.319 --> 00:08:05.680
invoked us

00:08:05.680 --> 00:08:08.720
so in other words perhaps back up to

00:08:08.720 --> 00:08:10.960
a top level eval expression where our

00:08:10.960 --> 00:08:16.720
macro is invoked

00:08:16.720 --> 00:08:20.080
uh wrong way so um

00:08:20.080 --> 00:08:22.560
with what's I'm going to briefly bring

00:08:22.560 --> 00:08:23.759
you back to the game

00:08:23.759 --> 00:08:27.120
for just a moment

00:08:27.120 --> 00:08:30.240
um I won't

00:08:30.240 --> 00:08:32.479
I won't has I won't linger on this slide

00:08:32.479 --> 00:08:33.599
but but

00:08:33.599 --> 00:08:37.039
briefly uh this is a

00:08:37.039 --> 00:08:40.080
roll paper role-playing pen

00:08:40.080 --> 00:08:43.599
and pencil uh physical dice

00:08:43.599 --> 00:08:46.320
tradition that dates back a long time

00:08:46.320 --> 00:08:48.080
from a technology perspective

00:08:48.080 --> 00:08:51.279
it's it's old in the same way that uh

00:08:51.279 --> 00:08:54.640
other tools uh that I like are

00:08:54.640 --> 00:08:58.560
old

00:08:58.560 --> 00:09:00.560
uh it's simple to understand and I can

00:09:00.560 --> 00:09:02.560
communicate a lot with it with a simple

00:09:02.560 --> 00:09:04.160
amount of you know typing or

00:09:04.160 --> 00:09:09.120
scribbling something on a piece of paper

00:09:09.120 --> 00:09:12.399
it has a complicated problem space um

00:09:12.399 --> 00:09:15.519
of its own again I don't want to

00:09:15.519 --> 00:09:18.560
get too much into the game here but

00:09:18.560 --> 00:09:21.680
uh in this in this talk for the last

00:09:21.680 --> 00:09:23.360
five minutes I'll focus

00:09:23.360 --> 00:09:26.640
on the process that we took to to

00:09:26.640 --> 00:09:29.920
automate uh getting data out of the org

00:09:29.920 --> 00:09:31.120
mode tables which

00:09:31.120 --> 00:09:32.720
eventually as we'll talk about more

00:09:32.720 --> 00:09:36.000
tomorrow are used to draw

00:09:36.000 --> 00:09:39.440
game maps and other things

00:09:39.440 --> 00:09:42.240
um here I talk about kind of why we did

00:09:42.240 --> 00:09:45.279
that I'm going to skip briefly past that

00:09:45.279 --> 00:09:49.360
and say instead that at a high level

00:09:49.360 --> 00:09:51.920
it's it's symbolic informatics we're

00:09:51.920 --> 00:09:53.519
giving a symbolic name

00:09:53.519 --> 00:09:58.080
to a tile set and then

00:09:58.080 --> 00:10:02.000
uh

00:10:02.000 --> 00:10:04.000
and then assigning that tile set some

00:10:04.000 --> 00:10:05.360
some characteristics like physical

00:10:05.360 --> 00:10:06.000
speeds

00:10:06.000 --> 00:10:08.399
screen space a variable that we might

00:10:08.399 --> 00:10:09.279
want to swap in

00:10:09.279 --> 00:10:12.800
and so forth uh and

00:10:12.800 --> 00:10:15.200
you know our project rests heavily on on

00:10:15.200 --> 00:10:16.160
org mode and

00:10:16.160 --> 00:10:21.040
it's it's fundamental capabilities

00:10:21.040 --> 00:10:24.000
so the the code I'm going to show here

00:10:24.000 --> 00:10:24.959
is

00:10:24.959 --> 00:10:28.320
uh is

00:10:28.320 --> 00:10:31.360
is focused around sort of a a sticky

00:10:31.360 --> 00:10:33.040
problem space in in the information

00:10:33.040 --> 00:10:35.600
technology and I'm I'm a professional

00:10:35.600 --> 00:10:39.120
uh uh software engineer turned uh

00:10:39.120 --> 00:10:41.120
technology architect I support

00:10:41.120 --> 00:10:45.120
the websites for a recognizable

00:10:45.120 --> 00:10:47.600
financial services brand that I don't

00:10:47.600 --> 00:10:49.680
identify just so I don't accidentally

00:10:49.680 --> 00:10:50.720
end up

00:10:50.720 --> 00:10:54.399
uh inadvertently misrepresenting my firm

00:10:54.399 --> 00:10:55.600
in some financial

00:10:55.600 --> 00:10:57.760
uh perspective if I let some other

00:10:57.760 --> 00:11:00.480
companies slip at certain let some other

00:11:00.480 --> 00:11:01.760
companies slip

00:11:01.760 --> 00:11:06.560
name slip or my own it's certainly no

00:11:06.560 --> 00:11:08.160
representation of an opinion other than

00:11:08.160 --> 00:11:11.279
my own

00:11:11.279 --> 00:11:13.980
the um

00:11:13.980 --> 00:11:18.800
[Music]

00:11:18.800 --> 00:11:22.720
so etl has to do with moving data around

00:11:22.720 --> 00:11:26.240
we we have the idea of of

00:11:26.240 --> 00:11:29.200
a pipeline where we'll be able to verify

00:11:29.200 --> 00:11:30.560
certain assumptions not

00:11:30.560 --> 00:11:32.480
nominally about data quality but it

00:11:32.480 --> 00:11:33.600
could be about anything

00:11:33.600 --> 00:11:36.000
before the pipeline starts okay we've

00:11:36.000 --> 00:11:37.279
got a state where we think it should

00:11:37.279 --> 00:11:38.560
work if we run it

00:11:38.560 --> 00:11:41.920
we have uh some extraction where we'll

00:11:41.920 --> 00:11:44.160
get our sources and we may have the the

00:11:44.160 --> 00:11:45.040
opportunity to

00:11:45.040 --> 00:11:47.920
uh make some assertions there and in the

00:11:47.920 --> 00:11:48.720
transform

00:11:48.720 --> 00:11:51.360
stage as well as the load things get a

00:11:51.360 --> 00:11:52.720
little dicer

00:11:52.720 --> 00:11:54.079
to the point where we come out of the

00:11:54.079 --> 00:11:55.360
load stage and we should have some

00:11:55.360 --> 00:11:57.040
really solid assertions again that we

00:11:57.040 --> 00:11:58.480
can even go back and compare to the

00:11:58.480 --> 00:11:59.680
extract stage

00:11:59.680 --> 00:12:02.639
and from this we have the rudimentaries

00:12:02.639 --> 00:12:04.959
of a data quality practice

00:12:04.959 --> 00:12:08.399
uh in this case we have a number of org

00:12:08.399 --> 00:12:09.360
mode files that will all

00:12:09.360 --> 00:12:12.639
be distributed across a

00:12:12.639 --> 00:12:16.720
number of players uh computers

00:12:16.720 --> 00:12:18.959
so we might not want to update every

00:12:18.959 --> 00:12:20.320
part of every buffer

00:12:20.320 --> 00:12:22.720
I think it's a complicated problem space

00:12:22.720 --> 00:12:24.560
and so we tried to take

00:12:24.560 --> 00:12:27.839
a long-term view of

00:12:27.839 --> 00:12:31.120
the solution that we needed um so I'll

00:12:31.120 --> 00:12:32.160
go ahead

00:12:32.160 --> 00:12:35.760
and open up the fun function

00:12:35.760 --> 00:12:37.839
that well let's let's actually start

00:12:37.839 --> 00:12:41.680
with the one that's pretty easy to read

00:12:41.680 --> 00:12:45.040
and uh I'm gonna go ahead and just crank

00:12:45.040 --> 00:12:46.800
it up huge

00:12:46.800 --> 00:12:51.680
in case anybody's watching in 480.

00:12:51.680 --> 00:12:56.480
um so this this program is not

00:12:56.480 --> 00:12:58.560
a work of art it's a simple

00:12:58.560 --> 00:13:01.120
implementation of the idea that a list

00:13:01.120 --> 00:13:05.440
an a list of functions that return

00:13:05.440 --> 00:13:08.160
maybe some data maybe some data and an

00:13:08.160 --> 00:13:10.399
entry back into that a list

00:13:10.399 --> 00:13:13.040
um can be done quite extensively with

00:13:13.040 --> 00:13:15.680
very few lines of code

00:13:15.680 --> 00:13:17.760
neither is it an especially tight or

00:13:17.760 --> 00:13:19.600
thrifty implementation

00:13:19.600 --> 00:13:22.000
it's just trying to get the job done

00:13:22.000 --> 00:13:22.800
with a doc

00:13:22.800 --> 00:13:26.160
statement for everything at the heart

00:13:26.160 --> 00:13:30.880
um we see a call to this macro called dm

00:13:30.880 --> 00:13:32.480
coalesce hash and that's what I'd like

00:13:32.480 --> 00:13:35.360
to focus in on you can see I think

00:13:35.360 --> 00:13:37.680
that something on unpleasant is

00:13:37.680 --> 00:13:38.800
happening here

00:13:38.800 --> 00:13:42.480
I've got an eval in um

00:13:42.480 --> 00:13:46.560
what is I will share a a

00:13:46.560 --> 00:13:49.519
fairly central function that that that

00:13:49.519 --> 00:13:49.920
that

00:13:49.920 --> 00:13:52.160
those implementing this etl pattern are

00:13:52.160 --> 00:13:53.920
welcome to

00:13:53.920 --> 00:13:56.639
derive from that is this is a default

00:13:56.639 --> 00:13:57.680
transform

00:13:57.680 --> 00:13:59.680
that you can get when loading certain

00:13:59.680 --> 00:14:00.959
kinds of

00:14:00.959 --> 00:14:04.560
uh orgmo tables that have been uh

00:14:04.560 --> 00:14:06.399
properly adorned and again we'll get

00:14:06.399 --> 00:14:09.120
into that all tomorrow

00:14:09.120 --> 00:14:11.440
so keep an eye on time couple minutes

00:14:11.440 --> 00:14:13.760
left let's look at the macro itself and

00:14:13.760 --> 00:14:15.360
I have a slide on this but let's go

00:14:15.360 --> 00:14:24.639
ahead and risk getting off page

00:14:24.639 --> 00:14:27.199
oh boy here we go so this is my

00:14:27.199 --> 00:14:28.959
utilities bucket

00:14:28.959 --> 00:14:31.920
it has such basic features as give me a

00:14:31.920 --> 00:14:34.000
hash table with some defaults I'll think

00:14:34.000 --> 00:14:36.000
about that later

00:14:36.000 --> 00:14:39.680
and

00:14:39.680 --> 00:14:44.720
and add to list um a special version

00:14:44.720 --> 00:14:47.600
that enables us to be a little cavalier

00:14:47.600 --> 00:14:49.360
in experimenting with a-list versus

00:14:49.360 --> 00:14:50.480
hashes versus p

00:14:50.480 --> 00:14:52.800
lists we've made a right mess for

00:14:52.800 --> 00:14:54.399
ourselves in the proof of concept area

00:14:54.399 --> 00:14:55.279
and it's ripe

00:14:55.279 --> 00:14:58.560
for someone to write a white paper about

00:14:58.560 --> 00:15:00.240
when to prefer these things

00:15:00.240 --> 00:15:04.800
and fix

00:15:04.800 --> 00:15:08.000
the merge a list uh

00:15:08.000 --> 00:15:10.720
same work here let's get let's get down

00:15:10.720 --> 00:15:12.959
to business

00:15:12.959 --> 00:15:16.000
this function has quite a this a macro

00:15:16.000 --> 00:15:18.560
has quite a doc string and I think I

00:15:18.560 --> 00:15:20.720
mentioned earlier that I got myself into

00:15:20.720 --> 00:15:22.240
trouble with the keyword properties you

00:15:22.240 --> 00:15:23.519
can see that we have

00:15:23.519 --> 00:15:27.839
not only quite a number of them but

00:15:27.839 --> 00:15:32.240
a lot of a lot of default values many of

00:15:32.240 --> 00:15:32.880
which

00:15:32.880 --> 00:15:36.000
may be relying on the

00:15:36.000 --> 00:15:37.680
values that are passed in here this is

00:15:37.680 --> 00:15:40.000
complicated and as it turns out

00:15:40.000 --> 00:15:44.000
um I wasn't brave enough in most cases

00:15:44.000 --> 00:15:46.079
to try to write a lambda that could

00:15:46.079 --> 00:15:47.279
understand and

00:15:47.279 --> 00:15:49.680
replace uh its own local variable I just

00:15:49.680 --> 00:15:50.399
didn't

00:15:50.399 --> 00:15:53.519
it didn't save me enough time this was

00:15:53.519 --> 00:15:54.800
really easy

00:15:54.800 --> 00:15:56.800
to read and write and understand as I

00:15:56.800 --> 00:15:58.240
thought through my problem

00:15:58.240 --> 00:16:01.440
but now as I use it I I've lost a little

00:16:01.440 --> 00:16:03.360
ground maybe with this and I'm not even

00:16:03.360 --> 00:16:04.079
sure

00:16:04.079 --> 00:16:07.279
I like what I got from uh the many

00:16:07.279 --> 00:16:08.079
keyword

00:16:08.079 --> 00:16:10.560
properties when it and we can look

00:16:10.560 --> 00:16:11.920
perhaps if we have

00:16:11.920 --> 00:16:17.340
the time at what that looks like in uh

00:16:17.340 --> 00:16:19.920
[Music]

00:16:19.920 --> 00:16:22.720
oh all right I have to separately

00:16:22.720 --> 00:16:24.480
dismiss and restart that

00:16:24.480 --> 00:16:27.519
um so that so that's just about my time

00:16:27.519 --> 00:16:29.600
uh and being respectful of that I want

00:16:29.600 --> 00:16:31.920
to invite presenters to just jump in at

00:16:31.920 --> 00:16:35.519
any of the many large pauses I leave

00:16:35.519 --> 00:16:38.079
uh as I'll just leave up the doc string

00:16:38.079 --> 00:16:40.160
for a moment and maybe split the screen

00:16:40.160 --> 00:16:45.199
and pull open an item

00:16:45.199 --> 00:16:48.720
you are now unmuted uh thank you very

00:16:48.720 --> 00:16:50.720
much for your talk corwin

00:16:50.720 --> 00:16:53.839
um I think you still have like uh

00:16:53.839 --> 00:16:55.279
maybe three or four more minutes if you

00:16:55.279 --> 00:16:57.680
want to quickly wrap up

00:16:57.680 --> 00:17:01.040
okay so three or four more minutes I can

00:17:01.040 --> 00:17:02.160
easily spend

00:17:02.160 --> 00:17:05.439
on thank yous

00:17:05.439 --> 00:17:07.280
I might switch to that if there aren't

00:17:07.280 --> 00:17:08.270
questions on the path

00:17:08.270 --> 00:17:10.160
[Music]

00:17:10.160 --> 00:17:12.559
um would you like me to pull up the pad

00:17:12.559 --> 00:17:14.079
or are you looking at it

00:17:14.079 --> 00:17:17.199
I am I bookmarked it I am

00:17:17.199 --> 00:17:30.840
pulling the tab and I'll bring it in

00:17:30.840 --> 00:17:34.960
okay

00:17:34.960 --> 00:17:38.799
all right this is the wrong ether pad

00:17:38.799 --> 00:17:44.480
thanks for the link

00:17:44.480 --> 00:17:48.000
all right um so I think I'm looking for

00:17:48.000 --> 00:17:54.880
macros

00:17:54.880 --> 00:17:58.400
uh okay key message sure so the

00:17:58.400 --> 00:18:01.679
the key message is that it's um it's a

00:18:01.679 --> 00:18:02.960
jungle out there

00:18:02.960 --> 00:18:06.240
macros along with any other design can

00:18:06.240 --> 00:18:08.559
leave you in a position

00:18:08.559 --> 00:18:11.919
where you have a nice api and I can show

00:18:11.919 --> 00:18:13.600
you other examples you can find them in

00:18:13.600 --> 00:18:14.960
the dungeon mode source

00:18:14.960 --> 00:18:18.480
of many many other places where I use

00:18:18.480 --> 00:18:21.600
this exact same formula quickly

00:18:21.600 --> 00:18:23.840
sketching out how a character sheet

00:18:23.840 --> 00:18:26.960
or another big data set needs to

00:18:26.960 --> 00:18:28.480
needs to figure out what tables are

00:18:28.480 --> 00:18:29.600
going to be interesting from the

00:18:29.600 --> 00:18:30.720
collection of files

00:18:30.720 --> 00:18:34.400
and then load up the tile set and

00:18:34.400 --> 00:18:38.880
the uh layout file from that

00:18:38.880 --> 00:18:41.600
and I mean it works this the project is

00:18:41.600 --> 00:18:43.280
moving forward with this I have the

00:18:43.280 --> 00:18:44.799
flexibility that I need

00:18:44.799 --> 00:18:46.720
but here I am evaling my own code to

00:18:46.720 --> 00:18:48.640
make darn sure even if I get by

00:18:48.640 --> 00:18:52.400
by compiled uh this macro doesn't uh

00:18:52.400 --> 00:18:55.440
does get evaluated in the user's real

00:18:55.440 --> 00:18:58.160
run time clearly a design fail so that

00:18:58.160 --> 00:18:58.880
would be

00:18:58.880 --> 00:19:00.880
the key point of my talk is is to

00:19:00.880 --> 00:19:02.400
present this design

00:19:02.400 --> 00:19:05.600
fail and uh thank

00:19:05.600 --> 00:19:08.320
um thank the community but especially

00:19:08.320 --> 00:19:09.520
wasa masa

00:19:09.520 --> 00:19:12.160
for for some patience and let me add at

00:19:12.160 --> 00:19:13.280
this moment that

00:19:13.280 --> 00:19:15.200
uh he was so frustrated with me they

00:19:15.200 --> 00:19:16.799
were sort of frustrated with me I think

00:19:16.799 --> 00:19:17.360
I

00:19:17.360 --> 00:19:20.400
didn't qualify pronouns um

00:19:20.400 --> 00:19:24.240
with um

00:19:24.240 --> 00:19:26.640
with doing this the the first the this

00:19:26.640 --> 00:19:28.160
was one of our first interactions and

00:19:28.160 --> 00:19:29.919
the feedback was

00:19:29.919 --> 00:19:34.240
why is this a macro full stop

00:19:34.240 --> 00:19:36.640
and uh that's a great message actually

00:19:36.640 --> 00:19:38.320
and I and I hope that

00:19:38.320 --> 00:19:40.160
uh maybe this can encourage further

00:19:40.160 --> 00:19:42.720
talks across the subject about

00:19:42.720 --> 00:19:44.160
you know hey wait a minute macros are

00:19:44.160 --> 00:19:46.720
really fantastic as I hope I made

00:19:46.720 --> 00:19:48.559
clear you can do a tremendous amount

00:19:48.559 --> 00:19:51.039
about uh with them and we rely on them

00:19:51.039 --> 00:19:52.320
for

00:19:52.320 --> 00:19:55.200
almost all the fun goodies um from you

00:19:55.200 --> 00:19:56.480
know defund

00:19:56.480 --> 00:20:02.159
secu

00:20:02.159 --> 00:20:04.960
um I want to get to my my thank yous let

00:20:04.960 --> 00:20:05.440
me just

00:20:05.440 --> 00:20:18.840
peek back at the pad

00:20:18.840 --> 00:20:20.000
oh

00:20:20.000 --> 00:20:22.080
well that was actually a scratch buffer

00:20:22.080 --> 00:20:23.760
so I'll have to sort of read it cold off

00:20:23.760 --> 00:20:24.720
my notes

00:20:24.720 --> 00:20:27.919
um

00:20:27.919 --> 00:20:30.320
but also but I'll switch to I'll also

00:20:30.320 --> 00:20:31.600
I'll say a couple of thank yous if you

00:20:31.600 --> 00:20:34.320
don't mind

00:20:34.320 --> 00:20:36.080
in addition to the big thank you that I

00:20:36.080 --> 00:20:38.400
hope was implied by my shout out to wasa

00:20:38.400 --> 00:20:39.360
masa

00:20:39.360 --> 00:20:42.720
um I also want to thank you amen for

00:20:42.720 --> 00:20:46.640
um your kindness in extending

00:20:46.640 --> 00:20:51.360
to the project as well as to me the

00:20:51.360 --> 00:20:54.320
the chance to present here and and and

00:20:54.320 --> 00:20:55.440
you've you've also

00:20:55.440 --> 00:20:56.799
just done a lot of great stuff for our

00:20:56.799 --> 00:20:59.360
project thank you very much for that and

00:20:59.360 --> 00:21:13.120
sasha

00:21:13.120 --> 00:21:15.919
I'll get there um thank you so much for

00:21:15.919 --> 00:21:17.200
the inspiration that you are to our

00:21:17.200 --> 00:21:18.320
whole community

00:21:18.320 --> 00:21:22.400
I also want to thank the presenters

00:21:22.400 --> 00:21:25.600
um for just being so flexible and

00:21:25.600 --> 00:21:27.600
uh nagging back through the whole thing

00:21:27.600 --> 00:21:29.120
and especially to leo

00:21:29.120 --> 00:21:30.960
who has done so much to drive the show

00:21:30.960 --> 00:21:32.159
today

00:21:32.159 --> 00:21:35.520
um I

00:21:35.520 --> 00:21:37.840
this is a fractious tent at times and

00:21:37.840 --> 00:21:38.960
sometimes

00:21:38.960 --> 00:21:41.360
it is indeed a little bit of a circus

00:21:41.360 --> 00:21:43.039
but I

00:21:43.039 --> 00:21:45.520
am learning so much so fast I'm just

00:21:45.520 --> 00:21:46.880
inspired by how much

00:21:46.880 --> 00:21:50.320
Emacs can teach us thank you

00:21:50.320 --> 00:21:53.120
uh corbin for your kind words and you

00:21:53.120 --> 00:21:54.960
know about me of course but all about

00:21:54.960 --> 00:21:56.000
you know all of us

00:21:56.000 --> 00:21:59.760
and the conference and you know indeed

00:21:59.760 --> 00:22:02.400
thanks to everyone who's helped uh

00:22:02.400 --> 00:22:04.159
including the speakers of course

00:22:04.159 --> 00:22:05.840
without whom you know a maxcom really

00:22:05.840 --> 00:22:08.960
wouldn't have been a EmacsConf

00:22:08.960 --> 00:22:10.640
and you know it's been a pleasure

00:22:10.640 --> 00:22:12.080
knowing you and working with

00:22:12.080 --> 00:22:15.520
you um I guess um from afar for the most

00:22:15.520 --> 00:22:17.360
part on dungeon mode like helping

00:22:17.360 --> 00:22:18.960
helping with like small things here and

00:22:18.960 --> 00:22:20.720
there but um

00:22:20.720 --> 00:22:22.320
yeah it's been my pleasure and it's

00:22:22.320 --> 00:22:23.840
great to have you and

00:22:23.840 --> 00:22:25.840
um everyone else you know part of the

00:22:25.840 --> 00:22:26.880
community and

00:22:26.880 --> 00:22:29.440
for me to be part of the community it's

00:22:29.440 --> 00:22:30.559
been a lot of fun

00:22:30.559 --> 00:22:33.679
thank you

00:22:33.679 --> 00:22:36.080
it's it's it's it's an honor and I don't

00:22:36.080 --> 00:22:38.000
use that word an awful lot because I

00:22:38.000 --> 00:22:38.720
sort of

00:22:38.720 --> 00:22:41.760
sort of smirk at it but um gets us in a

00:22:41.760 --> 00:22:44.320
lot of trouble honor does but

00:22:44.320 --> 00:22:47.360
this will be a sure time to use it thank

00:22:47.360 --> 00:22:48.840
you

00:22:48.840 --> 00:22:51.840
likewise