summaryrefslogtreecommitdiffstats
path: root/2021/captions/emacsconf-2021-unix--gnus-not-unix-why-emacs-demonstrates-the-unix-philosophy-isnt-always-the-only-answer--daniel-rose--main.vtt
blob: 7925cec4caa04ba20e9069b4f0985160c977e801 (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
WEBVTT

00:00.080 --> 00:01.199
Hello!

00:01.199 --> 00:04.000
My name is Daniel or Daniil Rose.

00:04.000 --> 00:05.680
I use Emacs in my everyday life,

00:05.680 --> 00:08.320
from programming in C or Rust for work,

00:08.320 --> 00:11.120
to writing reports for classes.

00:11.120 --> 00:12.389
I'd like to start by adding

00:12.389 --> 00:14.719
an overarching theme to this talk.

00:14.719 --> 00:15.603
If there's only one thing

00:15.603 --> 00:16.670
that you remember from today,

00:16.670 --> 00:17.886
I'd like you to walk away

00:17.886 --> 00:18.550
with the understanding

00:18.550 --> 00:20.720
that the philosophies or ideologies

00:20.720 --> 00:21.280
are just that.

00:21.280 --> 00:24.400
By trying to box yourself in with a concept

00:24.400 --> 00:25.440
you might be blind to other methods.

00:25.440 --> 00:27.360
We live in an ever-changing world,

00:27.360 --> 00:28.880
and I hope that you can appreciate

00:28.880 --> 00:00:31.598
being flexible and adaptable.

00:31.599 --> 00:33.280
UNIX philosophy? As a quick intro

00:33.280 --> 00:34.720
for those who don't know,

00:34.720 --> 00:35.680
the UNIX philosophy

00:35.680 --> 00:37.920
was written by Doug McIlroy.

00:37.920 --> 00:39.136
It's wordy, so there is 

00:39.136 --> 00:40.000
a great summarization

00:40.000 --> 00:42.719
by Peter H. Salus:

00:42.719 --> 00:43.920
Write programs that do one thing

00:43.920 --> 00:46.879
and do it well.

00:46.879 --> 00:50.000
Write programs to work together,

00:50.000 --> 00:52.750
and write programs to handle text streams,

00:52.750 --> 00:00:57.599
because they are the universal interface.

00:57.600 --> 00:59.233
So enter Emacs.

00:59.233 --> 01:01.020
Emacs doesn't quite adhere

01:01.020 --> 01:01.983
to those principles.

01:01.983 --> 01:03.680
"Do one thing and do it well"

01:03.680 --> 01:04.640
surely doesn't apply,

01:04.640 --> 01:06.261
since Emacs does /a lot/ of things

01:06.261 --> 01:08.640
and does the majority of those things well.

01:08.640 --> 01:10.240
It might apply if you consider Emacs

01:10.240 --> 01:12.560
purely as a Lisp environment, however.

01:12.560 --> 01:14.141
"Write programs to work together?"

01:14.141 --> 01:15.767
Arguably the thing Emacs is best

01:15.767 --> 01:16.320
out of the three,

01:16.320 --> 01:17.370
proven especially 

01:17.370 --> 01:18.619
by all the various packages

01:18.619 --> 01:20.240
that work with external programs,

01:20.240 --> 01:22.560
LSP, and whatever else.

01:22.560 --> 01:23.703
"Handle text streams?"

01:23.703 --> 00:01:25.438
Well, that one depends.

01:25.439 --> 01:27.583
So, Emacs versus the original ideas.

01:27.583 --> 01:29.317
The summarizations are good,

01:29.317 --> 01:31.067
but they aren't truly what was said.

01:31.067 --> 01:32.800
If we look back at the originals,

01:32.800 --> 01:34.517
we'll see that Emacs strongly adheres

01:34.517 --> 01:35.759
to the second rule:

01:35.759 --> 01:37.267
Design and build software,

01:37.267 --> 01:38.433
even operating systems,

01:38.433 --> 01:39.233
to be tried early,

01:39.233 --> 01:40.633
ideally within weeks.

01:40.633 --> 01:41.479
Don't hesitate to throw away

01:41.479 --> 01:42.367
the clumsy parts

01:42.367 --> 01:43.600
and rebuild them.

01:43.600 --> 01:45.003
The concept of LISP, 

01:45.003 --> 01:46.933
self documentation of Emacs,

01:46.933 --> 01:48.159
and the "REPL" style all make it

01:48.159 --> 00:01:50.798
a shining example of this rule.

01:50.799 --> 01:52.880
But why compare to UNIX?

01:52.880 --> 01:55.520
Truly, why compare to the UNIX philosophy?

01:55.520 --> 01:57.360
Although the "rules" set down are good ones

01:57.360 --> 01:58.467
for most programs,

01:58.467 --> 02:00.000
Emacs isn't most programs.

02:00.000 --> 02:01.920
The rules and summarizations

02:01.920 --> 02:03.532
even were written decades ago,

02:03.532 --> 02:05.717
before we had REST APIs, JSON,

02:05.717 --> 02:07.150
or any other modern interface.

02:07.150 --> 02:08.467
If the world adapts,

02:08.467 --> 02:10.640
why too can't we adapt the past?

02:10.640 --> 02:11.966
This concept of breaking the rules

02:11.966 --> 02:13.250
and forging its own path

02:13.250 --> 02:14.467
has allowed Emacs to continue

02:14.467 --> 00:02:17.439
and be reworked for modern eras.

02:17.440 --> 02:20.480
Emacs /does/ work with the UNIX philosophy.

02:20.480 --> 02:22.239
By looking at both of these ideologies,

02:22.239 --> 02:24.319
why must they be mutually exclusive?

02:24.319 --> 02:26.239
Emacs does work with text:

02:26.239 --> 02:28.800
Magit is a wrapper for the git CLI

02:28.800 --> 02:30.733
Dired is a wrapper for ls,

02:30.733 --> 02:32.450
Consult grep for grep, and so on.

02:32.450 --> 02:34.867
Why rewrite poorly tools,

02:34.867 --> 02:37.200
when we can use the existing powerful ones?

02:37.200 --> 02:38.253
Well, that in itself 

02:38.253 --> 02:39.242
is part of the UNIX philosophy.

02:39.242 --> 02:40.567
It seems that most strongly

02:40.567 --> 02:41.453
the UNIX philosophy 

02:41.453 --> 02:42.319
applies to the command line.

02:42.319 --> 02:44.183
If we look at most graphical applications,

02:44.183 --> 02:45.550
these notions fall apart.

02:45.550 --> 02:47.133
But that isn't true for Emacs.

02:47.133 --> 02:49.000
It is a graphical application

02:49.000 --> 02:49.817
(at least for me)

02:49.817 --> 02:51.133
but it does use many other tools.

02:51.133 --> 02:52.283
Some have proposed

02:52.283 --> 02:53.367
that Emacs should be looked at

02:53.367 --> 02:55.350
alongside UNIX, as its own OS.

02:55.350 --> 02:56.567
It has windowing capabilities

02:56.567 --> 02:57.567
handles its own formats,

02:57.567 --> 00:02:59.649
and so on, but I disagree with this concept.

02:59.650 --> 03:02.103
Philosophies don't really matter 

03:02.103 --> 03:03.050
in computing.

03:03.050 --> 03:03.967
It's true, they don't.

03:03.967 --> 03:05.683
As people, we like to group things.

03:05.683 --> 03:06.603
We like to have our set ways 

03:06.603 --> 03:07.267
to describe them,

03:07.267 --> 03:08.300
but that doesn't always work.

03:08.300 --> 03:10.017
By sticking with a common concept

03:10.017 --> 03:11.033
in the Emacs community,

03:11.033 --> 03:13.117
do everything in Emacs,

03:13.117 --> 00:03:15.049
is it truly benefitting me and you?

03:15.050 --> 03:18.017
Android Studio. Here's an example.

03:18.017 --> 03:20.083
I work most often in Emacs.

03:20.083 --> 03:21.067
But I also have courses

03:21.067 --> 03:22.567
in Android and iOS development.

03:22.567 --> 03:24.367
I can absolutely install

03:24.367 --> 03:25.317
~android-mode~ and ~kotlin-mode~,

03:25.317 --> 03:26.517
and use ~adb~ in Emacs,

03:26.517 --> 03:27.800
but at that point,

03:27.800 --> 03:29.050
I am creating more work than it's worth.

03:29.050 --> 03:30.300
When unmaintained,

03:30.300 --> 03:31.333
things tend to fall apart,

03:31.333 --> 03:33.100
and many features of ~android-mode~

03:33.100 --> 03:33.967
no longer work for me.

03:33.967 --> 03:35.817
So I have two main options:

03:35.817 --> 03:37.500
fix the existing mode or write my own,

03:37.500 --> 03:39.683
or use the assumed tools for the job,

03:39.683 --> 03:41.517
like Android Studio and/or IntelliJ.

03:41.517 --> 03:43.017
Looking at Android Studio:

03:43.017 --> 03:45.083
I have plenty of plugins for colour themes,

03:45.083 --> 03:45.733
just like Emacs.

03:45.733 --> 03:47.300
I have Emacs keybindings built in,

03:47.300 --> 03:48.800
and other quality-of-life features.

03:48.800 --> 03:50.833
According to the UNIX philosophy,

03:50.833 --> 03:51.933
in a round-about way,

03:51.933 --> 03:53.367
I should be using one tool

03:53.367 --> 03:54.683
that does its job well.

03:54.683 --> 03:55.500
While not minimal,

03:55.500 --> 03:57.650
Android Studio accomplishes this job.

03:57.650 --> 03:59.733
Does that mean that I shouldn't use Emacs at all?

03:59.733 --> 04:00.300
Of course not!

04:00.300 --> 04:01.700
And while it may seem obvious,

04:01.700 --> 04:03.050
I feel we in this group

04:03.050 --> 04:03.867
often get caught up

04:03.867 --> 04:04.533
finding solutions

04:04.533 --> 04:05.983
in the one particular way

04:05.983 --> 04:06.783
we want it.

04:06.783 --> 04:08.467
This is where being adaptable

04:08.467 --> 04:09.183
comes in again.

04:09.183 --> 04:11.000
I need to learn how to mold my tools

04:11.000 --> 04:11.800
to my workflow,

04:11.800 --> 04:13.133
but also mold my workflow

04:13.133 --> 00:04:14.382
to the tools available.

04:14.383 --> 04:15.683
Window Managers.

04:15.683 --> 04:18.050
Another example of this is window managers.

04:18.050 --> 04:19.367
Although I've probably dabbled

04:19.367 --> 04:21.083
in window managers or desktop environments

04:21.083 --> 04:22.583
as much as the next person,

04:22.583 --> 04:23.817
I have usually stuck with DWM.

04:23.817 --> 04:25.633
But DWM doesn't follow

04:25.633 --> 04:26.833
any of the Emacs concepts:

04:26.833 --> 04:27.967
it has different keybindings--

04:27.967 --> 04:29.250
you can sort of do Emacs ones,

04:29.250 --> 04:31.283
no REPL (it's a C program after all).

04:31.283 --> 04:33.617
But I can still mold it to my workflow.

04:33.617 --> 04:35.833
If I run Emacs as a daemon and a client,

04:35.833 --> 04:36.700
what difference is it?

04:36.700 --> 04:37.850
My WM is essentially a wrapper

04:37.850 --> 04:39.583
for Emacs and my other vital programs.

04:39.583 --> 04:41.533
I don't need to make Emacs my WM,

04:41.533 --> 00:04:42.899
and bring along all the other issues.

04:42.900 --> 04:45.383
Browsers are a similar conversation.

04:45.383 --> 04:46.883
Initially, I understand the value

04:46.883 --> 04:48.750
of having my browser in Emacs, but why?

04:48.750 --> 04:49.883
If a tool exists that works well,

04:49.883 --> 04:51.233
ignoring the UNIX philosophy for a moment,

04:51.233 --> 04:52.817
why should I take the effort to rewrite it?

04:52.817 --> 04:54.617
Now, don't misinterpret what I'm saying.

04:54.617 --> 04:56.083
If you have a better way to do something:

04:56.083 --> 04:57.583
you can make it faster, easier to use,

04:57.583 --> 04:58.717
that I understand.

04:58.717 --> 05:00.800
But if I have, say, Nyxt or Firefox?

05:00.800 --> 05:01.517
Why would I take the effort

05:01.517 --> 05:02.750
to try and rewrite that into Emacs?

05:02.750 --> 05:04.267
Instead, this is a scenario

05:04.267 --> 05:05.217
where using a different tool

05:05.217 --> 05:06.567
alongside Emacs might be better.

05:06.567 --> 05:08.433
There's a talk later on in the conference

05:08.350 --> 00:05:09.299
about that from someone else.

05:09.300 --> 05:12.017
Vim. Even vim, jokingly,

05:12.017 --> 05:13.500
is the enemy of our community,

05:13.500 --> 05:15.383
but it's a good tool.

05:15.383 --> 05:16.667
Sometimes I just don't want to

05:16.667 --> 05:17.983
run Emacs as a daemon with evil-mode

05:17.983 --> 05:19.883
and I just want to quickly do something.

05:19.883 --> 05:21.267
And most people come from

05:21.267 --> 05:22.733
a power user terminal background,

05:22.733 --> 05:24.167
or at least I would assume s,.

05:24.167 --> 05:25.900
and those I have spoken with.

05:25.900 --> 05:27.150
If I need to quickly edit something,

05:27.150 --> 06:40.960
it might benefit me to

05:27.840 --> 05:29.917
just run a quick vim ./file

05:29.917 --> 05:30.333
in the terminal.

05:30.333 --> 05:32.183
I often have terminals open anyway

05:32.183 --> 05:33.417
due to the graphic acceleration

05:33.417 --> 05:36.880
from things like Alacritty.

05:34.639 --> 05:36.167
Speaking of terminals,

05:36.167 --> 05:38.383
this is the main tool I don't use in Emacs.

05:38.383 --> 05:39.850
While vterm might be nice,

05:39.850 --> 05:41.433
I often want to use a TUI tool.

05:41.433 --> 05:43.667
I most often write programs in C or Rust

05:43.667 --> 05:45.200
due to those being my main languages

05:45.200 --> 05:46.050
that I use professionally.

05:46.050 --> 05:48.250
If I can write a faster C or Rust program

05:48.250 --> 05:49.400
in half the time it'll take for me

05:49.400 --> 05:50.483
to write a slower Elisp one,

05:50.483 --> 05:52.283
I might prefer to do just that.

05:52.283 --> 05:53.633
Especially in the case of a TUI program,

05:53.633 --> 05:55.517
Alacritty helps me develop them faster

05:55.517 --> 05:58.800
but also run them.

05:56.639 --> 05:58.850
So if you've been using systemd

05:58.850 --> 06:00.500
or running commands in the terminal for years,

06:00.500 --> 06:03.680
it might take more effort to learn

06:01.680 --> 06:05.039
the way to do it in an Emacs frontend

06:03.680 --> 06:04.933
than in the terminal.

06:04.933 --> 06:07.117
And remember, most shells come with

06:07.117 --> 06:07.567
Emacs key bindings by default

06:07.567 --> 06:09.350
and macOS, for example,

06:09.350 --> 06:11.200
can use Emacs keybindings in most places

06:11.200 --> 00:06:12.232
including browsers.

06:12.233 --> 06:13.567
Do what helps you most,

06:13.567 --> 06:17.360
not what a philosophy or group tells you to do.

06:16.000 --> 06:17.467
I hope this illustrated some ways

06:17.467 --> 06:18.750
that Emacs is a tool in your belt,

06:18.750 --> 06:19.733
but not the belt itself.

06:19.733 --> 06:22.800
Do what works best for you,

06:21.520 --> 06:22.717
as being the most efficient

06:22.717 --> 06:24.233
doesn't always grant the best results.

06:24.233 --> 06:25.983
If you're used to doing something one way,

06:25.983 --> 06:27.183
consider still doing it that way

06:27.183 --> 06:28.117
while learning new skills

06:28.117 --> 06:29.250
and being adaptable. And after all,

06:29.250 --> 06:30.683
this is an Emacs conference

06:30.683 --> 06:32.150
so maybe consider learning a tool

06:32.150 --> 06:33.517
for both Emacs and the terminal,

06:33.517 --> 06:34.367
and then you might be

06:34.367 --> 06:36.720
just a little bit more flexible

06:35.440 --> 06:40.960
in the future.

06:36.720 --> 06:40.960
Thank you for listening to my talk today.