summaryrefslogtreecommitdiffstats
path: root/2021/captions/emacsconf-2021-mold--moldable-emacs-a-step-towards-sustainable-software--andrea--main.vtt
blob: b1979ba032e2aad1415cc1617f8f120226431375 (plain) (blame)
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
WEBVTT

00:00.000 --> 00:01.200
Welcome to my talk,

00:01.200 --> 00:02.680
Moldable Emacs: A Step Towards

00:02.680 --> 00:03.800
Sustainable Software.

00:03.800 --> 00:04.440
Who am I?

00:04.440 --> 00:05.280
I am Andrea.

00:05.280 --> 00:07.120
I work as a Clojure software engineer

00:07.120 --> 00:09.280
somewhere in the middle of the UK.

00:09.280 --> 00:10.880
I inherited my passion for Emacs

00:10.880 --> 00:12.480
from my Ph.D. supervisor,

00:12.480 --> 00:13.880
and from that moment on,

00:13.880 --> 00:14.960
I got in synergy with it.

00:14.960 --> 00:17.480
You can learn more about my interests

00:17.480 --> 00:19.200
and my Emacs adventure

00:19.200 --> 00:22.520
at ag91.github.io.

00:22.520 --> 00:24.360
So let's get in the talk.

00:24.360 --> 00:25.840
Why moldable development?

00:25.840 --> 00:28.400
There is too much information to read it all.

00:28.400 --> 00:30.640
Reading is very difficult.

00:30.640 --> 00:32.320
It's a very slow activity.

00:32.320 --> 00:33.960
You need to go word by word

00:33.960 --> 00:35.520
or paragraph by paragraph,

00:35.520 --> 00:36.400
if you speedread.

00:36.400 --> 00:39.320
But anyway, you take a lot of time

00:39.320 --> 00:40.720
to absorb that information.

00:40.720 --> 00:43.160
And we urgently need

00:43.160 --> 00:44.960
to stand on the shoulders of giants,

00:44.960 --> 00:46.880
so the idea is we should stop

00:46.880 --> 00:48.960
doing always the same errors

00:48.960 --> 00:50.920
and we should be able to

00:50.920 --> 00:53.640
absorb as much of the good ideas

00:53.640 --> 00:56.600
that the bright people around us generate.

00:56.600 --> 00:59.840
For example, if I create

00:59.840 --> 01:04.120
a magnificent program in COBOL,

01:04.120 --> 01:06.000
and nobody knows any more

01:06.000 --> 01:08.000
how to learn or read COBOL,

01:08.000 --> 01:09.120
(and in order to read,

01:09.120 --> 01:10.960
you take a lot of time),

01:10.960 --> 01:13.040
well, that fantastic idea

01:13.040 --> 01:15.360
should be easily translatable

01:15.360 --> 01:19.240
to C, or to Clojure,

01:19.240 --> 01:20.280
or to Common Lisp,

01:20.280 --> 01:22.240
or to a language that will come after.

01:22.240 --> 01:24.080
The idea shouldn't be lost

01:24.080 --> 01:28.400
in a codebase somewhere in an old mainframe.

01:28.400 --> 01:31.080
It should be still accessible.

01:31.080 --> 01:33.920
Let's get in practice. What does it mean?

01:33.920 --> 01:37.840
It means that, for example,

01:37.840 --> 01:40.400
the proponents of moldable development

01:40.400 --> 01:42.440
prepare this slide to give a sense.

01:42.440 --> 01:45.080
So the idea is... Look at this.

01:45.080 --> 01:46.640
What is here? You will see

01:46.640 --> 01:48.680
that all these little things

01:48.680 --> 01:49.680
look like the same.

01:49.680 --> 01:50.680
The first time I looked at it,

01:50.680 --> 01:52.840
this was looking like a class diagram.

01:52.840 --> 01:54.880
This is actually code

01:54.880 --> 01:57.800
describing a little system.

01:57.800 --> 01:59.520
If you look and if you read,

01:59.520 --> 02:01.320
you can see that there is a numerator,

02:01.320 --> 02:03.320
a denominator... So this, you see,

02:03.320 --> 02:05.720
is interactive, because it's code.

02:05.720 --> 02:06.520
It's something that is running,

02:06.520 --> 02:07.280
and it's an object

02:07.280 --> 02:08.560
because this is Smalltalk --

02:08.560 --> 02:11.440
Pharo, a dialect of Smalltalk --

02:11.440 --> 02:13.040
but in the next slide,

02:13.040 --> 02:15.160
since this is a moldable tool,

02:15.160 --> 02:16.760
you can see that you can...

02:16.760 --> 02:18.280
there is a representation

02:18.280 --> 02:20.000
of the same software

02:20.000 --> 02:23.520
in a human way.

02:23.520 --> 02:24.640
So, for example,

02:24.640 --> 02:25.880
here you can see

02:25.880 --> 02:27.280
there is a mathematical formula.

02:27.280 --> 02:29.080
The other object, the second one,

02:29.080 --> 02:30.440
was a file system kind of thing.

02:30.440 --> 02:33.880
The third one was an image.

02:33.880 --> 02:36.600
And the last one was sort of a graph.

02:36.600 --> 02:37.640
So you can see that

02:37.640 --> 02:40.840
there is a better way to learn,

02:40.840 --> 02:44.880
to distinguish, to intuitively get a sense.

02:44.880 --> 02:47.200
And there is not only a single way.

02:47.200 --> 02:49.480
It's custom to what you need.

02:49.480 --> 02:51.280
For example, this is

02:51.280 --> 02:52.680
a very general way

02:52.680 --> 02:54.040
to understand what is this object about

02:54.040 --> 02:55.560
and maybe you want to see

02:55.560 --> 02:56.760
some other little things.

02:56.760 --> 02:58.840
For example, the documentation of the code,

02:58.840 --> 03:00.240
because you are interested

03:00.240 --> 03:01.160
in developing with it.

03:01.160 --> 03:03.960
For example, an image,

03:03.960 --> 03:05.240
you can see there's a path

03:05.240 --> 03:06.840
on the filesystem,

03:06.840 --> 03:10.520
or as a hexadecimal representation.

03:10.520 --> 03:12.520
In a sense, there is not only one view.

03:12.520 --> 03:13.840
You need to have the view

03:13.840 --> 03:15.320
that you need at the moment,

03:15.320 --> 03:16.840
and your tool needs to

03:16.840 --> 03:19.680
make this easy for you.

03:19.680 --> 03:22.280
So, why moldable Emacs?

03:22.280 --> 03:24.680
I wanted to bring that idea

03:24.680 --> 03:26.760
of having multiple view representations

03:26.760 --> 03:29.520
of what you need

03:29.520 --> 03:33.280
to understand better in Emacs.

03:33.280 --> 03:36.280
And so I want to create immediate story telling.

03:36.280 --> 03:37.880
Immediate, because it needs to be very quick,

03:37.880 --> 03:38.840
and story telling is

03:38.840 --> 03:40.760
because you want to allow connection

03:40.760 --> 03:42.520
from something that you needed

03:42.520 --> 03:45.520
to develop it into something new.

03:45.520 --> 03:47.160
So you are really telling a story:

03:47.160 --> 03:49.040
what is this mathematical formula

03:49.040 --> 03:51.120
I created because I need this,

03:51.120 --> 03:54.440
or this numerator and denominator

03:54.440 --> 03:55.520
produce this number.

03:55.520 --> 03:58.760
So this is a story that you are telling

03:58.760 --> 03:59.880
in my mind.

03:59.880 --> 04:04.000
And I want multiple views for buffers.

04:04.000 --> 04:05.800
Buffers is the main concept in Emacs,

04:05.800 --> 04:09.160
and so buffers are what I want to

04:09.160 --> 04:11.000
integrate in a story.

04:11.000 --> 04:12.280
I create a buffer

04:12.280 --> 04:15.080
and I start manipulating it,

04:15.080 --> 04:16.920
creating a view and then another view

04:16.920 --> 04:19.520
in order to tell something to myself,

04:19.520 --> 04:20.720
in order to learn,

04:20.720 --> 04:21.880
but also to tell something to others.

04:21.880 --> 04:23.960
So, for example, let's start

04:23.960 --> 04:25.840
from a use case: learning better.

04:25.840 --> 04:29.640
I had, at work, a list of changes

04:29.640 --> 04:31.440
for a pull request,

04:31.440 --> 04:32.040
so a code change,

04:32.040 --> 04:33.920
and I was very tired.

04:33.920 --> 04:34.760
I couldn't understand

04:34.760 --> 04:37.520
what this much text was about.

04:37.520 --> 04:38.920
So what I generate,

04:38.920 --> 04:41.120
I create a value for myself

04:41.120 --> 04:42.720
to understand it easily.

04:42.720 --> 04:45.320
And for me, understanding it easily,

04:45.320 --> 04:49.240
for example, was a little flow diagram.

04:49.240 --> 04:50.963
It showed me, okay, there is first

04:50.963 --> 04:52.320
this, this, and this,

04:52.320 --> 04:54.960
and so I could follow.

04:54.960 --> 04:58.400
having it next to the change.

04:58.400 --> 05:00.600
Having this image next to the change.

05:00.600 --> 05:02.360
And this is describing

05:02.360 --> 05:05.640
an Italian recipe for pasta with butter,

05:05.640 --> 05:07.840
so if you want to try, you're welcome.

05:07.840 --> 05:11.720
It's very tasty.

05:11.720 --> 05:13.840
Anyway, the other thing that we can do

05:13.840 --> 05:17.280
is query text -- structured text.

05:17.280 --> 05:20.680
So for example, this presentation

05:20.680 --> 05:21.960
is an Org Mode buffer.

05:21.960 --> 05:24.040
So when I call the Playground

05:24.040 --> 05:24.960
(that is one of the molds

05:24.960 --> 05:27.640
that lets me write some Elisp to query

05:27.640 --> 05:29.680
the original buffer,)

05:29.680 --> 05:31.640
if I evaluate this,

05:31.640 --> 05:33.280
you will see that

05:33.280 --> 05:33.880
I have just asked

05:33.880 --> 05:35.200
my Org Mode buffer

05:35.200 --> 05:37.400
to tell me the content length

05:37.400 --> 05:38.280
of the headings

05:38.280 --> 05:40.240
with some interesting content.

05:40.240 --> 05:44.280
So all the headings at third-level.

05:44.280 --> 05:48.080
Do you understand? I've just asked a file

05:48.080 --> 05:50.240
to tell me its contents

05:50.240 --> 05:51.240
without reading it.

05:51.240 --> 05:56.320
Or we can do something similar for code.

05:56.320 --> 05:58.840
We can do... I don't know...

05:58.840 --> 06:00.920
No idea what is written there,

06:00.920 --> 06:02.000
but I want to know

06:02.000 --> 06:03.840
which function is the most complex

06:03.840 --> 06:06.800
or is overcomplicated.

06:06.800 --> 06:09.560
I have defined in red,

06:09.560 --> 06:11.600
(so again, I don't need to read the number

06:11.600 --> 06:13.800
to know either what it is about!)

06:13.800 --> 06:15.280
So, I've written in red,

06:15.280 --> 06:18.120
I've shown in red

06:18.120 --> 06:20.320
the function with more complexity,

06:20.320 --> 06:22.560
and I can jump to it.

06:22.560 --> 06:24.160
So everything is very accessible

06:24.160 --> 06:26.280
to facilitate my operation

06:26.280 --> 06:27.160
and my understanding.

06:27.160 --> 06:29.880
Or I can take notes.

06:29.880 --> 06:36.160
For example, I can annotate something,

06:36.160 --> 06:37.240
and you see the note

06:37.240 --> 06:38.920
is again structured text,

06:38.920 --> 06:40.120
because you will know

06:40.120 --> 06:42.320
that I'm going to query my notes

06:42.320 --> 06:43.480
at some point.

06:43.480 --> 06:46.680
For example, I can show all my notes,

06:46.680 --> 06:51.480
for example, by mode, or I can show

06:51.480 --> 06:53.600
all the notes by mode in Org Mode.

06:53.600 --> 06:56.440
Because it's structured text,

06:56.440 --> 06:57.840
I can manipulate it very easily.

06:57.840 --> 07:00.160
So these are all my notes.

07:00.160 --> 07:05.400
Finally, the superpower

07:05.400 --> 07:08.320
of this moldable Emacs

07:08.320 --> 07:10.400
is the fact that you can compose molds.

07:10.400 --> 07:13.000
So, for example, let's go in

07:13.000 --> 07:17.480
showing all my notes.

07:17.480 --> 07:19.040
Let me show you all my notes.

07:19.040 --> 07:21.520
And then let's say that I want to know

07:21.520 --> 07:26.720
how they are... how many lines

07:26.720 --> 07:27.400
are these notes?

07:27.400 --> 07:30.360
Look, this is the answer.

07:30.360 --> 07:31.800
So of all the notes I take,

07:31.800 --> 07:34.200
I can actually query it and say

07:34.200 --> 07:38.360
"What are the lengths?"

07:38.360 --> 07:40.040
But let me show something more.

07:40.040 --> 07:41.680
Which one is the longest note?

07:41.680 --> 07:44.000
Now there are lots of notes in there

07:44.000 --> 07:45.080
so it's difficult to know

07:45.080 --> 07:47.200
but what if I can, in a click,

07:47.200 --> 07:50.440
generate a view that is very immediate?

07:50.440 --> 07:52.240
Look, there is a note that is very long.

07:52.240 --> 07:54.040
It's about 35 lines.

07:54.040 --> 07:55.160
Do you understand?

07:55.160 --> 07:56.760
I didn't read any note.

07:56.760 --> 07:58.400
This is all coming from

07:58.400 --> 08:02.520
being able to query your text

08:02.520 --> 08:06.240
and having multiple representations.

08:06.240 --> 08:08.360
My presentation is very short.

08:08.360 --> 08:09.720
What is next?

08:09.720 --> 08:14.360
Next is to integrate molds with other software

08:14.360 --> 08:15.360
like code-compass.

08:15.360 --> 08:16.720
I did a presentation last year

08:16.720 --> 08:18.640
and I want to make those nice diagrams

08:18.640 --> 08:21.320
available for small molds

08:21.320 --> 08:22.880
so that you can use them,

08:22.880 --> 08:24.760
for example, for notes

08:24.760 --> 08:26.360
or text that you have.

08:26.360 --> 08:28.200
To integrate better

08:28.200 --> 08:30.360
with Nyxt, the Common Lisp browser,

08:30.360 --> 08:32.200
because there's a lot of opportunity there

08:32.200 --> 08:35.320
to make funny things,

08:35.320 --> 08:38.040
a browser accessible for molding,

08:38.040 --> 08:41.240
and then having some interaction with Smalltalk

08:41.240 --> 08:42.840
through Glamorous Toolkit,

08:42.840 --> 08:44.080
so that we can have the best tools,

08:44.080 --> 08:46.800
Emacs and Glamorous Toolkit and Nyxt

08:46.800 --> 08:49.000
and others, to work together

08:49.000 --> 08:50.520
to make our learning easy.

08:50.520 --> 08:52.480
Then... You've seen the tool;

08:52.480 --> 08:53.840
my molds that I have shown

08:53.840 --> 08:56.200
were basically by buffer.

08:56.200 --> 08:58.600
I want project statistics.

08:58.600 --> 09:00.480
What about... Give me the complexity

09:00.480 --> 09:01.800
of all the functions

09:01.800 --> 09:03.480
in a project,

09:03.480 --> 09:06.120
of all the paragraphs, whatever.

09:06.120 --> 09:08.120
And then there is a nice issue on

09:08.120 --> 09:10.880
my issue-tracker for moldable Emacs

09:10.880 --> 09:13.920
is about: "Emacs: tell me how can I

09:13.920 --> 09:15.080
compose the molds that I have

09:15.080 --> 09:17.480
to make new things?"

09:17.480 --> 09:19.400
It is a sort of a research-y thing

09:19.400 --> 09:20.680
that is pretty cool.

09:20.680 --> 09:22.400
So if you want to learn more,

09:22.400 --> 09:25.520
just check out at ag91.github.io,

09:25.520 --> 09:28.000
check out moldable Emacs on GitHub,

09:28.000 --> 09:30.840
and enjoy the rest of the conference.

09:30.840 --> 09:34.200
Bye.