summaryrefslogtreecommitdiffstats
path: root/2023/captions/emacsconf-2023-hyperdrive--hyperdriveel-peertopeer-filesystem-in-emacs--joseph-turner--main.vtt
blob: c1376f19d235921cc79bc0d478605571c897608e (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
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
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
WEBVTT captioned by bhavin192, checked by sachac

00:00.000 --> 00:00:02.600
Hello, I'm Joseph Turner.

00:00:02.600 --> 00:00:05.107
This talk is about hyperdrive.el,

00:00:05.107 --> 00:00:09.099
peer-to-peer file system in Emacs.

00:00:09.100 --> 00:00:11.479
Hyperdrive is a JavaScript library

00:00:11.480 --> 00:00:13.359
developed by the Holepunch team

00:00:13.360 --> 00:00:16.499
for sharing files on a peer-to-peer network.

00:00:16.500 --> 00:00:19.839
It's released under the Apache 2.0 license.

NOTE Hyperdrives introduction

00:00:19.840 --> 00:00:21.639
Here's how it works.

00:00:21.640 --> 00:00:24.580
To participate as a peer, you run a node,

00:00:24.581 --> 00:00:27.280
a lightweight local server that allows you

00:00:27.281 --> 00:00:29.959
to connect with other nodes on the network.

00:00:29.960 --> 00:00:33.123
You can create a hyperdrive or multiple hyperdrives,

00:00:33.123 --> 00:00:36.219
and you can author files within them.

00:00:36.220 --> 00:00:38.699
Each hyperdrive is automatically assigned

00:00:38.700 --> 00:00:40.906
a globally unique link

00:00:40.906 --> 00:00:44.579
that starts with `hyper://`.

00:00:44.580 --> 00:00:47.019
When you share that link with someone,

00:00:47.020 --> 00:00:49.159
they have access to your hyperdrive.

00:00:49.160 --> 00:00:52.819
Anyone who has that link can load the hyperdrive

00:00:52.820 --> 00:00:56.000
from the network and view its content.

00:56.000 --> 00:00:59.019
When you load a Hyperdrive file from the network,

00:00:59.020 --> 00:01:02.019
your node caches that data locally

00:01:02.020 --> 00:01:04.133
and automatically begins seeding it

00:01:04.133 --> 00:01:05.219
back to the network,

00:01:05.220 --> 00:01:12.619
making it available for others to download from you.

00:01:12.620 --> 00:01:14.519
Hyperdrives are single writer.

00:01:14.520 --> 00:01:16.879
This means that when you create a new drive,

00:01:16.880 --> 00:01:19.719
you are the only one who can make changes to it.

00:01:19.720 --> 00:01:21.267
Others can view it

00:01:21.267 --> 00:01:23.799
and can seed it back to the network,

00:01:23.800 --> 00:01:27.339
but you're the only one who can modify it.

00:01:27.340 --> 00:01:29.739
Hyperdrives are offline first.

00:01:29.740 --> 00:01:32.999
This means that when you load data from the network,

00:01:33.000 --> 00:01:34.900
it's stored locally on your machine

00:01:34.900 --> 00:01:36.179
for you to view later,

00:01:36.180 --> 00:01:38.799
even when you're disconnected from other peers.

00:01:38.800 --> 00:01:40.799
You can also create new drives

00:01:40.800 --> 00:01:43.600
and modify your drives when you're offline,

00:01:43.600 --> 00:01:44.999
and then share those changes

00:01:45.000 --> 00:01:47.919
once you connect with peers later.

00:01:47.920 --> 00:01:50.299
Hyperdrives are local first.

00:01:50.300 --> 00:01:52.400
This means that when you are connected with

00:01:52.400 --> 00:01:54.739
other peers on a local area network,

00:01:54.740 --> 00:01:56.939
even if none of the peers involved

00:01:56.940 --> 00:01:58.979
are connected to the broader Internet,

00:01:58.980 --> 00:02:02.059
you can still share files.

00:02:02.060 --> 00:02:04.799
Hyperdrives are sparsely replicated.

00:02:04.800 --> 00:02:07.479
This means that you can download individual files

00:02:07.479 --> 00:02:10.020
from a hyperdrive without having to download

00:02:10.020 --> 00:02:11.719
the whole thing.

00:02:11.720 --> 00:02:15.471
This saves on disk space and also allows you

00:02:15.471 --> 00:02:17.233
to quickly load just the files

00:02:17.233 --> 00:02:20.539
that you're interested in.

00:02:20.540 --> 00:02:22.467
Hyperdrives are mutable.

00:02:22.467 --> 00:02:25.499
You can add files, change files,

00:02:25.500 --> 00:02:28.119
remove files from a hyperdrive.

00:02:28.120 --> 00:02:30.667
And when peers load your drive

00:02:30.667 --> 00:02:32.559
using the very same link,

00:02:32.560 --> 00:02:34.025
they will be able to load

00:02:34.025 --> 00:02:37.319
the latest changes that you've published.

00:02:37.320 --> 00:02:39.459
Hyperdrives are versioned.

00:02:39.460 --> 00:02:42.429
This means that when you make changes to a file,

00:02:42.429 --> 00:02:46.000
the previous versions of those files are not lost.

02:46.000 --> 00:02:49.359
Peers can load the old versions of a file

00:02:49.360 --> 00:02:52.439
that was changed or deleted, for example,

00:02:52.440 --> 00:02:55.067
simply by specifying the version number

00:02:55.067 --> 00:02:58.167
of the hyperdrive when the file still existed

00:02:58.167 --> 00:03:04.599
or existed in a previous state.

NOTE About USHIN and the contributors

00:03:04.600 --> 00:03:07.379
I'm presenting this talk on behalf of USHIN.

00:03:07.380 --> 00:03:10.679
USHIN is a tiny nonprofit whose mission is to

00:03:10.680 --> 00:03:14.032
promote personal, community and global health

00:03:14.032 --> 00:03:17.367
through free and open universal shared information

00:03:17.367 --> 00:03:19.699
for everybody.

00:03:19.700 --> 00:03:21.551
USHIN was founded in the early 90s

00:03:21.551 --> 00:03:24.859
by Paula Maas, Steve Nash and others

00:03:24.860 --> 00:03:26.399
with the goal of creating

00:03:26.400 --> 00:03:29.131
a distributed health information network

00:03:29.131 --> 00:03:33.429
that would allow people to find, share, compare

00:03:33.429 --> 00:03:35.667
and deliberate health information

00:03:35.667 --> 00:03:37.779
from a variety of sources.

00:03:37.780 --> 00:03:40.699
Since then, the scope of the project has broadened

00:03:40.700 --> 00:03:43.259
to include all kinds of information.

00:03:43.260 --> 00:03:45.779
And in recent years, we've been focusing on

00:03:45.780 --> 00:03:49.499
building with peer-to-peer software.

00:03:49.500 --> 00:03:50.534
About three years ago,

00:03:50.534 --> 00:03:52.634
we started working with Mauve Signweaver,

00:03:52.634 --> 00:03:54.767
who has since then been our steadfast

00:03:54.767 --> 00:03:58.259
peer-to-peer explorer and guide.

00:03:58.260 --> 00:04:00.079
This year, we started working on

00:04:00.080 --> 00:04:02.799
this hyperdrive.el Emacs package,

00:04:02.800 --> 00:04:05.059
and Adam has been the powerhouse

00:04:05.060 --> 00:04:08.079
behind the Emacs Lisp development.

00:04:08.080 --> 00:04:08.967
About a month ago,

00:04:08.967 --> 00:04:11.099
Jonas Bernoulli started joining with us,

00:04:11.100 --> 00:04:14.419
and he has been offering his expertise

00:04:14.420 --> 00:04:15.639
in the realm of user interface design

00:04:15.640 --> 00:04:18.000
using his Transient library.

04:18.000 --> 00:04:22.139
And Protesilaos Stavrou has been not only valuable

00:04:22.140 --> 00:04:25.000
in terms of user design and feedback,

00:04:25.000 --> 00:04:27.119
but he created a wonderful

00:04:27.120 --> 00:04:32.099
basic introduction to Hyperdrive. Take a look.

NOTE Basic introduction to Hyperdrive

00:04:32.646 --> 00:04:33.585
[Prot]: Hello everyone!

00:04:33.586 --> 00:04:36.365
My name is Protesilaos, also known as Prot.

00:04:36.366 --> 00:04:37.805
In this video, I want to show you

00:04:37.806 --> 00:04:40.746
the basics of hyperdrive.el.

00:04:40.746 --> 00:04:44.012
This is a package for Emacs that lets us connect to

00:04:44.013 --> 00:04:47.832
the Hyperdrive peer-to-peer network.

00:04:47.833 --> 00:04:51.572
We can browse existing drives on the network,

00:04:51.573 --> 00:04:53.879
meaning existing file systems,

00:04:53.880 --> 00:04:59.052
or create and maintain our own hyperdrive,

00:04:59.053 --> 00:05:03.473
to which we can add, remove or edit files.

00:05:03.473 --> 00:05:05.473
We will see this together.

00:05:05.473 --> 00:05:08.732
What I have here in front of me is a basic

00:05:08.733 --> 00:05:12.972
use-package declaration for hyperdrive.el.

00:05:12.973 --> 00:05:16.992
All I am doing is binding `hyperdrive-menu`

00:05:16.993 --> 00:05:19.792
to a key and also activating

00:05:19.793 --> 00:05:23.612
the menu bar entry of hyperdrive.

00:05:23.613 --> 00:05:26.812
Let me show you very quickly, `hyperdrive-menu`.

00:05:26.813 --> 00:05:31.292
And this is the sort of interface that it brings up.

00:05:31.293 --> 00:05:33.473
We will take a closer look at it.

00:05:33.473 --> 00:05:35.992
As for the menu bar,

00:05:35.993 --> 00:05:41.072
we have `hyperdrive-menu` over here,

00:05:41.073 --> 00:05:44.192
and we will take a look at this as well.

00:05:44.193 --> 00:05:45.692
Suffice to say that

00:05:45.693 --> 00:05:48.272
you can get the same functionality

00:05:48.273 --> 00:05:51.992
with the menu bar or with `hyperdrive-menu`,

00:05:51.993 --> 00:05:55.892
as well as by calling the commands directly

00:05:55.893 --> 00:06:00.052
with `M-x` or their respective key bindings.

00:06:00.053 --> 00:06:02.979
I won't cover everything in that regard,

00:06:02.980 --> 00:06:06.132
but please bear this fact in mind.

NOTE Managing files with Hyperdrive.el

00:06:06.133 --> 00:06:09.212
Let's start then with what I have here

00:06:09.213 --> 00:06:13.852
in this other tab, which is a set of files.

00:06:13.853 --> 00:06:18.473
I have prepared in my local file system - a hyperdrive.

00:06:18.473 --> 00:06:20.332
This contains a set of files

00:06:20.333 --> 00:06:22.652
that I ultimately want to share

00:06:22.653 --> 00:06:24.352
on the peer-to-peer network,

00:06:24.353 --> 00:06:28.052
meaning that I want this to eventually be

00:06:28.053 --> 00:06:31.473
reflected in my own hyperdrive.

00:06:31.473 --> 00:06:34.053
What I did to get started is

00:06:34.054 --> 00:06:36.492
I invoked `hyperdrive-menu`.

00:06:36.493 --> 00:06:38.572
The very first thing you need to do

00:06:38.573 --> 00:06:40.992
to get started with Hyperdrive,

00:06:40.993 --> 00:06:43.632
either to browse or to create,

00:06:43.633 --> 00:06:46.013
is to start the gateway,

00:06:46.013 --> 00:06:48.692
meaning to be able to connect to

00:06:48.693 --> 00:06:50.473
the peer-to-peer network.

00:06:50.473 --> 00:06:53.492
You see here in `hyperdrive-menu` that there is

00:06:53.493 --> 00:06:56.292
an indicator next to the "Gateway" heading

00:06:56.293 --> 00:06:59.473
telling me that the gateway is on.

00:06:59.473 --> 00:07:04.672
I started it with `G` and then `s`.

00:07:04.673 --> 00:07:06.572
Once you start it,

00:07:06.573 --> 00:07:10.152
you can type `h` to visit an existing drive,

00:07:10.153 --> 00:07:12.112
`N` to create a drive,

00:07:12.113 --> 00:07:17.473
or `L` to open a link to an existing hyperdrive.

00:07:17.473 --> 00:07:21.153
You may get this link via email, for example.

00:07:21.154 --> 00:07:24.932
In this case, let me be over here

00:07:24.933 --> 00:07:27.972
and let me just kill this buffer.

00:07:27.973 --> 00:07:32.952
What I want in this case is to select a hyperdrive.

00:07:32.953 --> 00:07:35.452
You see here I have my own hyperdrive

00:07:35.453 --> 00:07:37.812
and also the hyperdrive of USHIN,

00:07:37.813 --> 00:07:41.332
the developers of hyperdrive.el.

00:07:41.333 --> 00:07:43.972
What I want to do in this case,

00:07:43.973 --> 00:07:46.852
you see there are various options available.

00:07:46.853 --> 00:07:50.212
I want to type `v` to view a file.

00:07:50.213 --> 00:07:50.972
And in this case,

00:07:50.973 --> 00:07:53.632
I will just type the forward slash,

00:07:53.633 --> 00:07:56.992
which means to view the root directory

00:07:56.993 --> 00:08:00.852
of this hyperdrive. And I am here.

00:08:00.853 --> 00:08:04.219
It is an empty drive apart from

00:08:04.220 --> 00:08:06.512
my credentials over here.

00:08:06.513 --> 00:08:10.112
There is nothing more really to see.

00:08:10.113 --> 00:08:12.092
But what I want to do is

00:08:12.093 --> 00:08:15.352
to start adding files to this drive.

00:08:15.353 --> 00:08:18.332
Let me use the menu bar for this.

00:08:18.333 --> 00:08:21.052
I will hover over to the menu bar,

00:08:21.053 --> 00:08:24.772
and I will find the "Hyperdrive" submenu.

00:08:24.773 --> 00:08:27.912
Then I will go find where the drives are.

00:08:27.913 --> 00:08:30.672
And you see that there are writable drives,

00:08:30.673 --> 00:08:32.812
meaning drives that I manage,

00:08:32.813 --> 00:08:37.352
and read-only drives, meaning drives of other users.

00:08:37.353 --> 00:08:40.332
In this case, USHIN is read-only, of course,

00:08:40.333 --> 00:08:42.972
and Protesilaos is writable.

00:08:42.973 --> 00:08:48.352
So what I want to do is upload a file to Protesilaos.

00:08:48.353 --> 00:08:52.473
And it prompts me in the Minibuffer for a file.

00:08:52.473 --> 00:08:55.292
I will just add the README.

00:08:55.293 --> 00:08:58.173
It is asking me, "Where do you want to add it?"

00:08:58.173 --> 00:09:00.552
And in square brackets, the default is to add it

00:09:00.553 --> 00:09:03.812
to the root directory of the hyperdrive.

00:09:03.813 --> 00:09:07.012
So I will just type `RET` to select the default.

00:09:07.013 --> 00:09:11.392
And there it is. It is already in the drive.

00:09:11.393 --> 00:09:14.072
Let me add the COPYING file as well,

00:09:14.073 --> 00:09:16.673
using the same method.

00:09:16.673 --> 00:09:21.392
I will go find my drive. "Upload File."

00:09:21.393 --> 00:09:23.852
And let's add the COPYING.

00:09:23.853 --> 00:09:29.432
And I also want to add it to the root directory.

00:09:29.433 --> 00:09:30.632
So already I have two files.

00:09:30.633 --> 00:09:31.952
This is looking good.

00:09:31.953 --> 00:09:37.013
Now I am opening the file inside of hyperdrive.

00:09:37.014 --> 00:09:39.032
This is not the same file

00:09:39.033 --> 00:09:42.673
as I have in my local directory.

00:09:42.673 --> 00:09:47.432
What I can do here, for example, is I can...

00:09:47.433 --> 00:09:49.892
Let me open another file here, the COPYING.

00:09:49.893 --> 00:09:52.112
I can create an Org link.

00:09:52.113 --> 00:09:54.332
Notice that these are Org files.

00:09:54.333 --> 00:09:58.852
So I will use the standard `org-store-link` command.

00:09:58.853 --> 00:10:01.172
You can see the key binding I invoked

00:10:01.173 --> 00:10:03.532
and the command it calls

00:10:03.533 --> 00:10:05.892
on the top right corner of my screen.

00:10:05.893 --> 00:10:07.412
So what I did is

00:10:07.413 --> 00:10:11.992
I copied a link to this hyperdrive file.

00:10:11.993 --> 00:10:15.352
And in this other file over here,

00:10:15.353 --> 00:10:22.152
I want to say "Free/libre."

00:10:22.153 --> 00:10:27.072
So I am editing my hyperdrive terms:

00:10:27.073 --> 00:10:35.352
"Check the," and I will paste the link here,

00:10:35.353 --> 00:10:40.072
"for how to use my files."

00:10:40.073 --> 00:10:44.812
If we check what is here,

00:10:44.813 --> 00:10:47.812
you will see that this is a link

00:10:47.813 --> 00:10:50.879
inside of the hyperdrive.

00:10:50.880 --> 00:10:52.712
And it's pointing specifically

00:10:52.713 --> 00:10:54.992
to that heading over there,

00:10:54.993 --> 00:10:58.172
which has this unique identifier,

00:10:58.173 --> 00:11:00.512
as you can see over here.

00:11:00.513 --> 00:11:03.072
So this is wonderful.

00:11:03.073 --> 00:11:09.712
I want to rename it to "Check the COPYING

00:11:09.713 --> 00:11:11.952
for how to use my files."

00:11:11.953 --> 00:11:13.932
I will save this.

00:11:13.933 --> 00:11:16.839
And now what I want to do is,

00:11:16.840 --> 00:11:20.492
I want to invoke `hyperdrive-menu`.

00:11:20.493 --> 00:11:23.152
And you will see now the menu, unlike earlier,

00:11:23.153 --> 00:11:27.212
has more commands, more stuff we can do with it.

00:11:27.213 --> 00:11:31.792
For example, I can type `w` to copy a URL.

00:11:31.793 --> 00:11:34.499
And by typing `w`, you will notice...

00:11:34.500 --> 00:11:37.332
Let me go to the `*scratch*` buffer to paste this in.

00:11:37.333 --> 00:11:40.092
You will notice what the URL is.

00:11:40.093 --> 00:11:44.132
It is my hyperdrive, my unique identifier,

00:11:44.133 --> 00:11:47.512
and then forward slash, meaning the root directory,

00:11:47.513 --> 00:11:49.672
and then README.org.

00:11:49.673 --> 00:11:54.092
That is the file I was editing.

00:11:54.093 --> 00:11:56.572
Let's do `hyperdrive-menu` again.

00:11:56.573 --> 00:11:58.132
Let's remove the `*scratch*` buffer.

00:11:58.133 --> 00:11:59.932
And let's do `hyperdrive-menu`.

00:11:59.933 --> 00:12:02.379
And you will notice that there are options

00:12:02.380 --> 00:12:05.132
to download the file, for example.

00:12:05.133 --> 00:12:07.212
If you are reading somebody else's file,

00:12:07.213 --> 00:12:10.012
you can download it to your own file system.

00:12:10.013 --> 00:12:12.012
Let me do that. "Download."

00:12:12.013 --> 00:12:14.752
And it is asking me, "Where do you want to save this?"

00:12:14.753 --> 00:12:20.673
For now, I will save it in the `/tmp/`, like this.

00:12:20.673 --> 00:12:23.212
Let's call it test.org.

00:12:23.213 --> 00:12:25.052
Okay, `/tmp/test.org`.

00:12:25.053 --> 00:12:29.092
Let me go and visit `test.org`.

00:12:29.093 --> 00:12:30.279
And there it is.

00:12:30.280 --> 00:12:32.652
It downloaded it just like that.

00:12:32.653 --> 00:12:35.372
This is how you can, for example,

00:12:35.373 --> 00:12:38.472
download the pictures and videos

00:12:38.473 --> 00:12:42.332
that I will eventually share on my hyperdrive.

00:12:42.333 --> 00:12:44.712
Let's invoke `hyperdrive-menu` again.

00:12:44.713 --> 00:12:48.052
And let's go up to the parent, you see,

00:12:48.053 --> 00:12:50.512
with the caret (`^`) sign.

00:12:50.513 --> 00:12:53.172
This will take me to the parent directory,

00:12:53.173 --> 00:12:56.572
in this case, the root directory of my hyperdrive.

NOTE Dired like interface

00:12:56.573 --> 00:12:58.352
Let me do it a bit differently.

00:12:58.353 --> 00:13:00.192
The same idea, a bit differently.

00:13:00.193 --> 00:13:02.732
For those of you who are familiar with

00:13:02.733 --> 00:13:05.912
Dired and the `dired-jump` command,

00:13:05.913 --> 00:13:08.752
Dired is the standard file manager of Emacs.

00:13:08.753 --> 00:13:13.172
And `dired-jump` is a command that lets you jump

00:13:13.173 --> 00:13:14.592
from the current file

00:13:14.593 --> 00:13:18.652
to the directory that contains that file.

00:13:18.653 --> 00:13:20.732
So you see, I am here.

00:13:20.733 --> 00:13:22.552
The `dired-jump` command, by default,

00:13:22.553 --> 00:13:25.232
is bound to Ctrl-x, Ctrl-j (`C-x C-j`).

00:13:25.233 --> 00:13:29.432
So if I do `C-x C-j`, in this case,

00:13:29.433 --> 00:13:30.772
it invokes a command.

00:13:30.773 --> 00:13:33.712
You can see the name of it, `hyperdrive-up`,

00:13:33.713 --> 00:13:37.732
which is functionally equivalent to `dired-jump`.

00:13:37.733 --> 00:13:41.332
It does the same thing, meaning that it took me

00:13:41.333 --> 00:13:45.252
to the parent directory of this file.

00:13:45.253 --> 00:13:48.252
I think this is very helpful.

00:13:48.253 --> 00:13:50.692
This listing over here, in general,

00:13:50.693 --> 00:13:55.272
tries to mimic or to reuse

00:13:55.273 --> 00:13:58.552
the knowledge you already have of Dired.

00:13:58.553 --> 00:14:01.072
For example, if you type `o`,

00:14:01.073 --> 00:14:05.312
it will open the file at point in the other window,

00:14:05.313 --> 00:14:07.092
same as in Dired.

00:14:07.093 --> 00:14:08.992
Whereas if you type `RET`,

00:14:08.993 --> 00:14:11.912
it would open it in the current window.

00:14:11.913 --> 00:14:16.252
Again, same as what you will do in Dired.

00:14:16.253 --> 00:14:18.013
Let's see over here.

00:14:18.014 --> 00:14:21.643
You have options to jump with `j`,

00:14:21.643 --> 00:14:26.232
which is using Minibuffer completion to go to a file.

00:14:26.233 --> 00:14:28.432
Right now, I only have two files,

00:14:28.433 --> 00:14:32.099
but the idea is the same.

00:14:32.100 --> 00:14:34.012
It's, again, what you would do in Dired

00:14:34.013 --> 00:14:37.332
if you type `j` with the default key bindings, though,

00:14:37.333 --> 00:14:40.292
not with Evil mode or something else.

00:14:40.293 --> 00:14:42.912
Let's see again what we have over here.

00:14:42.913 --> 00:14:45.933
You can create a bookmark, and this will work,

00:14:45.934 --> 00:14:48.553
but no need to show you everything.

00:14:48.554 --> 00:14:50.693
The idea is that you create a bookmark

00:14:50.694 --> 00:14:53.213
the way you create any Emacs bookmark,

00:14:53.214 --> 00:14:54.932
to a file, to a directory.

00:14:54.933 --> 00:14:55.993
It doesn't matter.

00:14:55.994 --> 00:14:57.733
And then you can jump to it,

00:14:57.734 --> 00:15:01.233
the way bookmarks in Emacs always work.

NOTE History in hyperdrive

00:15:01.234 --> 00:15:02.892
What I want to show you now

00:15:02.893 --> 00:15:06.312
a little bit is the history.

00:15:06.313 --> 00:15:09.012
History in Hyperdrive

00:15:09.013 --> 00:15:11.433
has to do with the drive itself.

00:15:11.434 --> 00:15:13.613
Meaning that individual files

00:15:13.614 --> 00:15:15.313
do not have their own history,

00:15:15.314 --> 00:15:18.673
but the drive as such has a history.

00:15:18.674 --> 00:15:22.013
Whenever you add a file, you remove a file,

00:15:22.014 --> 00:15:25.672
or you edit a file, you are incrementing

00:15:25.673 --> 00:15:29.132
the versioning of the hyperdrive by one.

00:15:29.133 --> 00:15:34.573
So each action corresponds to one unit of history.

00:15:34.574 --> 00:15:37.832
If you add a file, remove a file, and edit a file,

00:15:37.833 --> 00:15:40.992
this means that you are up three versions.

00:15:40.993 --> 00:15:44.712
So whatever your version number is, plus three.

00:15:44.713 --> 00:15:48.912
I am on version 24* over here. [* latest, not version 24]

00:15:48.913 --> 00:15:55.932
Let me go to this file now,

00:15:55.933 --> 00:15:59.792
and let me do `V h`

00:15:59.793 --> 00:16:02.173
to see a history of it.

00:16:02.173 --> 00:16:07.552
You will notice that between versions 23 and 24,

00:16:07.553 --> 00:16:09.972
this file was constant.

00:16:09.973 --> 00:16:12.632
But in version 25, we have a change.

00:16:12.633 --> 00:16:14.352
When you are in this buffer over here,

00:16:14.353 --> 00:16:17.212
you can type the equals sign (`=`),

00:16:17.213 --> 00:16:22.373
which is a key binding that will bring up the diff.

00:16:22.373 --> 00:16:24.472
So the set of changes between

00:16:24.473 --> 00:16:27.032
the previous version and the current version.

00:16:27.033 --> 00:16:32.512
And you see here, between versions 23 and 25,

00:16:32.513 --> 00:16:35.092
I have this addition.

00:16:35.093 --> 00:16:38.372
I think this is wonderful because now

00:16:38.373 --> 00:16:41.172
you can always go and check

00:16:41.173 --> 00:16:42.412
what is the state of this file.

00:16:42.413 --> 00:16:43.852
What is this person up to?

00:16:43.853 --> 00:16:46.312
What have they been changing?

00:16:46.313 --> 00:16:50.792
And with Hyperdrive, you can also visit…

00:16:50.793 --> 00:16:58.513
Let me go to the parent here.

00:16:58.514 --> 00:17:02.412
You can always visit a previous history.

00:17:02.413 --> 00:17:06.012
So, for example, I will go to the previous history,

00:17:06.013 --> 00:17:08.032
and let me see this file again

00:17:08.033 --> 00:17:09.553
in its previous history.

00:17:09.554 --> 00:17:11.093
I am looking at the file,

00:17:11.094 --> 00:17:15.153
but notice that the file now is not editable

00:17:15.154 --> 00:17:17.353
because this is in the past.

00:17:17.354 --> 00:17:19.313
I cannot rewrite history.

00:17:19.314 --> 00:17:23.413
I can only go to the present and then modify it

00:17:23.414 --> 00:17:27.213
and then create a new history, a new version.

00:17:27.214 --> 00:17:31.213
But this helps me see the state of the file

00:17:31.214 --> 00:17:35.973
at that version of the hyperdrive.

00:17:35.973 --> 00:17:39.973
So this is the basic idea of it, folks.

NOTE Use case of sharing large files

00:17:39.973 --> 00:17:42.233
What I want to do then is

00:17:42.234 --> 00:17:46.253
continue with my process here.

00:17:46.254 --> 00:17:51.973
Let me actually do it like this so that you can see.

00:17:51.973 --> 00:17:54.373
Continue with the process of

00:17:54.374 --> 00:17:56.493
publishing all those files

00:17:56.494 --> 00:17:59.753
that I have on my hyperdrive.

00:17:59.754 --> 00:18:02.853
For example, this is a picture of a flower

00:18:02.854 --> 00:18:04.113
that I have taken.

00:18:04.114 --> 00:18:05.733
I think it's very nice.

00:18:05.734 --> 00:18:08.032
And this is a video of an eagle

00:18:08.033 --> 00:18:09.593
that was flying above me.

00:18:09.594 --> 00:18:13.773
And I will share this on the Hyperdrive network.

00:18:13.774 --> 00:18:15.732
From the network, by the way,

00:18:15.733 --> 00:18:18.452
you can also stream video as well.

00:18:18.453 --> 00:18:20.693
It is described in the hyperdrive.el manual,

00:18:20.694 --> 00:18:24.252
but I cannot show you everything right now.

00:18:24.253 --> 00:18:26.512
I think you get the idea.

00:18:26.513 --> 00:18:29.712
The gist is, you have a file system

00:18:29.713 --> 00:18:31.912
that you can share with the world

00:18:31.913 --> 00:18:34.132
using peer-to-peer technology.

00:18:34.133 --> 00:18:38.519
And for me, this is a powerful tool.

00:18:38.520 --> 00:18:41.912
This is a valuable proposition

00:18:41.913 --> 00:18:45.012
because I can share these large files I have,

00:18:45.013 --> 00:18:47.432
these pictures or videos,

00:18:47.433 --> 00:18:49.712
which I cannot post on my website

00:18:49.713 --> 00:18:52.712
due to bandwidth considerations.

00:18:52.713 --> 00:18:55.592
And this way, I can still share with the world

00:18:55.593 --> 00:18:59.073
something that I consider interesting.

00:18:59.073 --> 00:19:00.212
That's all for today, folks.

00:19:00.213 --> 00:19:01.893
Thank you very much for your attention.

00:19:01.894 --> 00:19:05.513
Remember that hyperdrive.el is still in development

00:19:05.514 --> 00:19:07.393
and things may change.

00:19:07.394 --> 00:19:10.312
But the fundamentals are in place

00:19:10.313 --> 00:19:13.073
and will remain constant.

00:19:13.073 --> 00:19:19.460
That's all for today. Take care. Goodbye.

00:19:19.461 --> 00:19:20.793
[Joseph]: Thank you, Prot.

NOTE Drive creation with hyperdrive.el

00:19:20.913 --> 00:19:23.852
Another fundamental feature of hyperdrive.el

00:19:23.980 --> 00:19:26.319
is drive creation.

00:19:26.319 --> 00:19:28.338
The first step, as always,

00:19:28.339 --> 00:19:30.858
is to make sure that the gateway is running.

00:19:30.859 --> 00:19:35.118
So I'll open up `hyperdrive-menu` with `C-c h`.

00:19:35.119 --> 00:19:36.778
By the way, my key presses,

00:19:36.779 --> 00:19:38.698
as well as the commands that they run,

00:19:38.699 --> 00:19:42.438
can be seen at the top right of my screen.

00:19:42.439 --> 00:19:44.618
Down here, I see that the gateway is off.

00:19:44.619 --> 00:19:49.138
So I'll start it with `G s`.

00:19:49.139 --> 00:19:50.559
Now, it takes a few moments

00:19:50.560 --> 00:19:52.219
for the gateway to spin up.

00:19:52.219 --> 00:19:54.298
So to refresh the menu,

00:19:54.299 --> 00:19:58.398
I will close it and open it again.

00:19:58.399 --> 00:20:01.218
And now we see that the gateway is on.

00:20:01.219 --> 00:20:05.919
I'll press `N` to create a new drive.

00:20:05.919 --> 00:20:09.758
Now it's prompting me for a new hyperdrive seed.

00:20:09.759 --> 00:20:12.938
A seed is a string of characters

00:20:12.939 --> 00:20:14.998
that will be used to generate,

00:20:14.999 --> 00:20:18.298
in tandem with my secret master key,

00:20:18.299 --> 00:20:21.338
a new public key that will globally,

00:20:21.339 --> 00:20:24.878
uniquely identify this drive.

00:20:24.879 --> 00:20:31.758
So I'll type in "emacsconf".

00:20:31.759 --> 00:20:32.658
And after a moment,

00:20:32.659 --> 00:20:36.998
we see the newly created, empty drive.

00:20:36.999 --> 00:20:40.098
So I'll open up `hyperdrive-menu` once more.

00:20:40.099 --> 00:20:43.798
And I'll press `h` to open the sub-menu that shows

00:20:43.799 --> 00:20:45.978
more information about this hyperdrive,

00:20:45.979 --> 00:20:50.878
as well as commands related to this drive.

00:20:50.879 --> 00:20:54.918
In blue here, we see the seed that I just entered

00:20:54.919 --> 00:21:00.219
as well as the public key that it generated.

00:21:00.219 --> 00:21:02.198
We also see that the petname

00:21:02.199 --> 00:21:06.539
is also set to emacsconf.

00:21:06.540 --> 00:21:09.038
The petname is different from the seed.

00:21:09.039 --> 00:21:13.078
The petname is my personal, local identifier

00:21:13.079 --> 00:21:14.678
for this drive.

00:21:14.679 --> 00:21:16.819
I can change it whenever I want.

00:21:16.819 --> 00:21:19.738
And while it's not a secret,

00:21:19.739 --> 00:21:23.998
it's not displayed to other users.

00:21:23.999 --> 00:21:26.359
So I will leave it for now.

00:21:26.360 --> 00:21:28.138
"emacsconf" is fine.

00:21:28.139 --> 00:21:30.858
But when I go to share this drive,

00:21:30.859 --> 00:21:34.158
I'll want to display something more memorable

00:21:34.159 --> 00:21:36.878
than this long public key.

00:21:36.879 --> 00:21:39.219
And that's what the nickname is for.

00:21:39.219 --> 00:21:42.518
I'll change that by pressing `n`,

00:21:42.519 --> 00:21:48.219
and I'll type in "Emacs Conference".

00:21:48.219 --> 00:21:51.358
Now, when other peers load this hyperdrive

00:21:51.359 --> 00:21:57.058
by its URL, which I can copy by pressing `w`,

00:21:57.059 --> 00:21:59.498
they will see the nickname

00:21:59.499 --> 00:22:02.018
in addition to the public key.

00:22:02.019 --> 00:22:05.720
So if hyperdrive.el is like a phone book,

00:22:05.720 --> 00:22:09.419
the public keys are akin to phone numbers,

00:22:09.419 --> 00:22:13.938
the nickname is like the name that your contacts

00:22:13.939 --> 00:22:16.298
give you when they introduce themselves,

00:22:16.299 --> 00:22:18.318
and the petname is the name

00:22:18.319 --> 00:22:22.298
that you actually write down in your phone book.

00:22:22.299 --> 00:22:25.298
I'll show you what nicknames and petnames look like

00:22:25.299 --> 00:22:29.619
for drives that are not writable to me.

00:22:29.619 --> 00:22:32.478
I'll press `C-g` to close this submenu,

00:22:32.479 --> 00:22:34.638
and now I'm back at the main menu.

00:22:34.639 --> 00:22:39.998
I'll press `C-u h` to choose a hyperdrive,

00:22:39.999 --> 00:22:44.558
and I'll look at Prot's hyperdrive here.

00:22:44.559 --> 00:22:46.298
And here we see that the nickname

00:22:46.299 --> 00:22:49.838
of Prot's hyperdrive is "Protesilaos".

00:22:49.839 --> 00:22:50.918
Now, it's grayed out,

00:22:50.919 --> 00:22:53.238
which means that I can't change it.

00:22:53.239 --> 00:22:56.418
I can't change it because it's not my hyperdrive.

00:22:56.419 --> 00:22:58.538
But I can change the petname if I want it

00:22:58.539 --> 00:23:00.538
to show up under a different name.

00:23:00.539 --> 00:23:02.438
So I'll press `p`,

00:23:02.439 --> 00:23:06.678
and I'll type in "Prot", and hit Enter.

00:23:06.679 --> 00:23:11.319
Now I'll open his hyperdrive by pressing `f`.

00:23:11.319 --> 00:23:13.898
And I'll pick a path, I'll just hit `RET`

00:23:13.899 --> 00:23:16.758
to open the root directory.

00:23:16.759 --> 00:23:19.458
And now, when Prot's hyperdrive shows up,

00:23:19.459 --> 00:23:20.538
at the top of the screen,

00:23:20.539 --> 00:23:26.198
I see that it's identified with the petname "Prot."

NOTE hyperdrive-mirror

00:23:26.199 --> 00:23:28.719
Now I'll show off `hyperdrive-mirror`.

00:23:28.719 --> 00:23:32.158
`hyperdrive-mirror` is like `hyperdrive-upload-file`,

00:23:32.159 --> 00:23:33.878
except that it allows you to upload

00:23:33.879 --> 00:23:37.918
an entire directory full of files recursively.

00:23:37.919 --> 00:23:40.038
For this example, I will upload

00:23:40.039 --> 00:23:44.819
the contents of the emacsconf-mirror directory.

00:23:44.819 --> 00:23:48.918
First step is to open the menu. I'll press H,

00:23:48.919 --> 00:23:53.378
and then I will choose the emacsconf drive.

00:23:53.379 --> 00:23:57.718
In the bottom here, we see the Mirror group.

00:23:57.719 --> 00:23:59.478
The first option that I can change

00:23:59.479 --> 00:24:01.819
is the source directory.

00:24:01.819 --> 00:24:04.618
The source directory is the directory on my local

00:24:04.619 --> 00:24:08.819
machine from which files will be uploaded.

00:24:08.819 --> 00:24:11.198
By default, the source directory

00:24:11.199 --> 00:24:17.059
is set to the current directory of the main buffer.

00:24:17.060 --> 00:24:19.419
This is good for now, so I'll leave it.

00:24:19.419 --> 00:24:22.198
The target directory is the directory

00:24:22.199 --> 00:24:25.418
in the hyperdrive where the files will end up.

00:24:25.419 --> 00:24:28.838
By default, it's the root directory,

00:24:28.839 --> 00:24:30.358
but for this example,

00:24:30.359 --> 00:24:36.358
I'll put these files in a subdirectory called notes.

00:24:36.359 --> 00:24:40.298
The filter is the rule that allows you

00:24:40.299 --> 00:24:43.378
to programmatically determine which files

00:24:43.379 --> 00:24:46.578
in the local directory will be uploaded

00:24:46.579 --> 00:24:50.338
into the hyperdrive, and which ones won't.

00:24:50.339 --> 00:24:54.718
By default, all files are mirrored, but in this case,

00:24:54.719 --> 00:24:58.498
let's say that I want to upload only the Org files,

00:24:58.499 --> 00:25:01.358
these first three, and I want to exclude

00:25:01.359 --> 00:25:05.419
the markdown file, solar-oven-notes.md.

00:25:05.419 --> 00:25:10.378
So I'll press `m f`, and I will choose

00:25:10.379 --> 00:25:13.419
the regular expression string option.

00:25:13.419 --> 00:25:16.278
If I wanted to, I could choose a named function

00:25:16.279 --> 00:25:22.198
or a lambda, but I won't demo that here.

00:25:22.199 --> 00:25:26.338
I'll type in `org$`, which will match against

00:25:26.339 --> 00:25:31.658
the files that end with "org."

00:25:31.659 --> 00:25:35.898
The filter is here, and I'll leave confirmation on.

00:25:35.899 --> 00:25:39.718
The confirmation step just allows me to review

00:25:39.719 --> 00:25:42.138
the list of files that are going to be uploaded

00:25:42.139 --> 00:25:45.898
into the drive before it happens.

00:25:45.899 --> 00:25:52.878
So I'll press `m m` to mirror them, and I see here

00:25:52.879 --> 00:25:58.438
that these three files are going to be uploaded.

00:25:58.439 --> 00:26:05.558
Looks good. I'll press `C-c C-c` to confirm the mirror.

00:26:05.559 --> 00:26:07.738
Now it says three files have been uploaded,

00:26:07.739 --> 00:26:11.378
and here they are in the drive.

00:26:11.379 --> 00:26:15.818
Good, so now I will modify the

00:26:15.819 --> 00:26:19.938
fermented-overnight-oats file in the hyperdrive.

00:26:19.939 --> 00:26:24.339
So I've loaded it, and I'll add here:

00:26:24.340 --> 00:26:31.818
"or other grains - cook them in advance if you want to,"

00:26:31.819 --> 00:26:33.778
and I'll save it.

00:26:33.779 --> 00:26:37.778
Now this file, fermented-overnight-oats.org,

00:26:37.779 --> 00:26:40.678
has been modified on the hyperdrive

00:26:40.679 --> 00:26:44.538
more recently than on the file system.

00:26:44.539 --> 00:26:48.899
The file system file has not been modified.

00:26:48.900 --> 00:26:53.818
So I'll go back to my local directory,

00:26:53.819 --> 00:26:56.538
and I'll modify a different file.

00:26:56.539 --> 00:27:00.458
In this case, I'll add another hoedown

00:27:00.459 --> 00:27:04.619
to the fiddle-tunes.org file.

00:27:04.619 --> 00:27:09.619
"Tom and Jerry." That's a good hoedown.

00:27:09.619 --> 00:27:14.119
And now I'll mirror again.

00:27:14.119 --> 00:27:16.778
So I'll open the menu, and I'll press `h`,

00:27:16.779 --> 00:27:20.578
and then I'll open up the emacsconf demo drive.

00:27:20.579 --> 00:27:22.958
And now I've also decided that

00:27:22.959 --> 00:27:26.718
I want to include the solar-oven-notes.md file.

00:27:26.719 --> 00:27:28.498
So I'll remove the filter

00:27:28.499 --> 00:27:32.119
so that it's no longer excluded.

00:27:32.119 --> 00:27:34.078
I'll leave the rest of the settings the same,

00:27:34.079 --> 00:27:38.778
and I'll press `m m` again.

00:27:38.779 --> 00:27:40.018
And now we see that the

00:27:40.019 --> 00:27:43.538
`*hyperdrive-mirror*` buffer looks different.

00:27:43.539 --> 00:27:47.378
So, there are two main groups.

00:27:47.379 --> 00:27:49.986
These are the files that are going to be uploaded,

00:27:49.986 --> 00:27:52.898
and these are the files that are ignored.

00:27:52.899 --> 00:27:56.538
They're not going to be uploaded.

00:27:56.539 --> 00:28:00.519
The first subgroup is the files that are new locally.

00:28:00.519 --> 00:28:04.898
So the solar-oven-notes.md file is new on my machine,

00:28:04.899 --> 00:28:07.319
and it doesn't exist in the hyperdrive.

00:28:07.319 --> 00:28:10.038
So the mirror command is going to take that file

00:28:10.039 --> 00:28:13.758
and add it to the hyperdrive.

00:28:13.759 --> 00:28:17.519
This group contains the files that are newer locally.

00:28:17.519 --> 00:28:19.778
So the fiddle-tunes.org file

00:28:19.779 --> 00:28:23.358
has been modified on my local machine,

00:28:23.359 --> 00:28:26.718
but it hasn't been modified on the hyperdrive.

00:28:26.719 --> 00:28:28.858
So `hyperdrive-mirror` is going to take the

00:28:28.859 --> 00:28:33.858
updated version and put it on the hyperdrive.

00:28:33.859 --> 00:28:35.958
Now, the first group that's going to be ignored

00:28:35.959 --> 00:28:39.358
are the files that are older locally.

00:28:39.359 --> 00:28:42.978
So the fermented oats file has been modified

00:28:42.979 --> 00:28:45.298
on the hyperdrive more recently

00:28:45.299 --> 00:28:47.538
than on my local file system.

00:28:47.539 --> 00:28:51.058
So `hyperdrive-mirror` isn't going to overwrite

00:28:51.059 --> 00:28:53.518
the version of the file in my hyperdrive

00:28:53.519 --> 00:28:57.278
with the older local version.

00:28:57.279 --> 00:29:00.778
And finally, the emacsconf-preparation.org file

00:29:00.779 --> 00:29:05.498
hasn't been modified on either the hyperdrive

00:29:05.499 --> 00:29:07.438
or my local file system,

00:29:07.439 --> 00:29:09.718
and the timestamp is identical.

00:29:09.719 --> 00:29:11.278
So `hyperdrive-mirror` is going to

00:29:11.279 --> 00:29:13.818
ignore this file as well.

00:29:13.819 --> 00:29:15.298
So the only two files that are going

00:29:15.299 --> 00:29:19.318
to be uploaded now are the solar-oven-notes.md file

00:29:19.319 --> 00:29:21.638
and the fiddle-tunes.org file.

00:29:21.639 --> 00:29:25.378
I'll confirm that with `C-c C-c`.

00:29:25.379 --> 00:29:26.578
And now in my hyperdrive

00:29:26.579 --> 00:29:28.518
we see that there are four files.

00:29:28.519 --> 00:29:31.678
The solar-oven-notes.md file has been uploaded,

00:29:31.679 --> 00:29:35.519
and if I open the fiddle-tunes.org file,

00:29:35.519 --> 00:29:39.478
we see that it now contains the line "Tom and Jerry,"

00:29:39.479 --> 00:29:41.658
which means that it was updated based on

00:29:41.659 --> 00:29:47.098
the change to the file on my local file system.

00:29:47.099 --> 00:29:50.558
This `hyperdrive-mirror` command is the command

00:29:50.559 --> 00:29:54.138
that we use to periodically update

00:29:54.139 --> 00:29:56.598
the USHIN hyperdrive with

00:29:56.599 --> 00:30:00.318
the contents of the USHIN website.

00:30:00.319 --> 00:30:03.018
There's going to be a link to the USHIN hyperdrive

00:30:03.019 --> 00:30:06.818
as well as the website at the end of the video.

NOTE hyperdrive history

00:30:06.819 --> 00:30:09.078
Now I'll go into a little more detail

00:30:09.079 --> 00:30:11.218
about the Hyperdrive history buffer

00:30:11.219 --> 00:30:15.818
by showing off the README file in Prot's hyperdrive.

00:30:15.819 --> 00:30:19.018
I'll press `C-c h` to open the menu,

00:30:19.019 --> 00:30:22.198
`C-u h` to be prompted for a drive.

00:30:22.199 --> 00:30:24.238
I'll select Prot's drive,

00:30:24.239 --> 00:30:26.738
then I'll press `f` to jump to a file

00:30:26.739 --> 00:30:28.738
inside of Prot's drive,

00:30:28.739 --> 00:30:32.398
and then `RET` to go to the root directory.

00:30:32.399 --> 00:30:35.338
From here, I'll press `j` to jump to

00:30:35.339 --> 00:30:37.298
an item in his directory.

00:30:37.299 --> 00:30:42.378
I'll press `RET` on the README to load it.

00:30:42.379 --> 00:30:44.118
And then finally, I'll open up

00:30:44.119 --> 00:30:49.578
`C-c h` to look at the menu.

00:30:49.579 --> 00:30:50.978
Here, I see that I'm looking at

00:30:50.979 --> 00:30:56.858
the latest version of Prot's README.org file.

00:30:56.859 --> 00:30:58.738
I also see that the previous version

00:30:58.739 --> 00:31:02.418
of README.org is unknown.

00:31:02.419 --> 00:31:05.358
It's unknown because hyperdrives

00:31:05.359 --> 00:31:07.818
are sparsely replicated.

00:31:07.819 --> 00:31:09.998
That means that when my node loaded this

00:31:09.999 --> 00:31:12.358
README.org file, it didn't bother

00:31:12.359 --> 00:31:13.998
to load anything else.

00:31:13.999 --> 00:31:16.058
It didn't load the previous history

00:31:16.059 --> 00:31:18.658
or any other file in his drive.

00:31:18.659 --> 00:31:20.758
But now that I want to check out whether

00:31:20.759 --> 00:31:26.198
there is a previous version, I'll press `V p`.

00:31:26.199 --> 00:31:28.918
And when it loads, I see in the mode line down here

00:31:28.919 --> 00:31:33.318
that I'm now looking at version 25 of this drive.

00:31:33.319 --> 00:31:36.498
That means that I'm looking at the README.org file

00:31:36.499 --> 00:31:39.458
at version 25 of this drive.

00:31:39.459 --> 00:31:42.018
I'll open the menu again, and I see

00:31:42.019 --> 00:31:47.718
that the same version number is displayed here.

00:31:47.719 --> 00:31:50.478
The previous version, before version 25,

00:31:50.479 --> 00:31:53.558
is also unknown because we haven't bothered

00:31:53.559 --> 00:31:56.858
to load anything before version 25.

00:31:56.859 --> 00:32:00.478
I also see that the next version, after version 25,

00:32:00.479 --> 00:32:02.418
is the latest version.

00:32:02.419 --> 00:32:06.718
So I'll open that up by pressing `V n`.

00:32:06.719 --> 00:32:10.998
And now we are back where we started,

00:32:10.999 --> 00:32:12.918
at the latest version.

00:32:12.919 --> 00:32:15.078
But now we see that the previous version,

00:32:15.079 --> 00:32:18.998
the version before the latest version, is version 25.

00:32:18.999 --> 00:32:24.299
Because now that our node has loaded the previous version,

00:32:24.300 --> 00:32:28.619
it can display that information to us.

00:32:28.620 --> 00:32:31.639
From here, I'll open up the history buffer.

00:32:31.640 --> 00:32:35.319
I'll press `V h`.

00:32:35.320 --> 00:32:40.319
And I can see that there are two known existent

00:32:40.320 --> 00:32:46.119
ranges in Prot's README.org history.

00:32:46.119 --> 00:32:50.119
This means that the latest version of README.org

00:32:50.120 --> 00:32:54.419
was modified at version 39.

00:32:54.420 --> 00:32:57.479
And that Prot made four changes

00:32:57.480 --> 00:33:00.319
to other files in his hyperdrive

00:33:00.320 --> 00:33:04.279
besides the README.org file since then.

00:33:04.280 --> 00:33:08.659
Before that, the time that Prot modified

00:33:08.660 --> 00:33:11.839
the README.org file was at version 25.

00:33:11.840 --> 00:33:15.199
And then he made 13 other changes to other files

00:33:15.200 --> 00:33:18.579
inside of this drive.

00:33:18.580 --> 00:33:20.258
Before that, we don't know.

00:33:20.259 --> 00:33:21.858
We haven't loaded the history.

00:33:21.859 --> 00:33:23.178
But since we're curious,

00:33:23.179 --> 00:33:27.919
I'll hit `RET` on the unknown line.

00:33:27.920 --> 00:33:32.139
And now we see that in Prot's hyperdrive,

00:33:32.140 --> 00:33:34.939
the README.org file didn't exist

00:33:34.940 --> 00:33:39.019
for the first 22 revisions of his drive.

00:33:39.020 --> 00:33:43.779
Then Prot created it at version 23.

00:33:43.780 --> 00:33:46.919
Then again, at 25, made a change.

00:33:46.920 --> 00:33:50.559
And then made another change at 39.

00:33:50.560 --> 00:33:54.419
For good measure, I'll show you the diffs.

00:33:54.420 --> 00:33:58.179
The first diff just contains the entire file

00:33:58.180 --> 00:34:05.119
because the file didn't exist before version 23.

00:34:05.119 --> 00:34:08.619
Then, at version 25, Prot added a link

00:34:08.620 --> 00:34:13.119
to the COPYING.org file.

00:34:13.119 --> 00:34:14.219
And then, at 39,

00:34:14.220 --> 00:34:17.339
Prot changed the link to his own hyperdrive

00:34:17.340 --> 00:34:20.879
to be a relative link.

NOTE Streaming video from hyperdrive

00:34:20.880 --> 00:34:24.299
Now, I'll stream a video from the USHIN hyperdrive

00:34:24.300 --> 00:34:27.899
that shows off a prototype interface we created

00:34:27.900 --> 00:34:31.719
for exploring networks of sources of information.

00:34:31.720 --> 00:34:33.939
I'll open up `hyperdrive-menu`.

00:34:33.940 --> 00:34:37.219
Press `C-u h` to be prompted for a drive.

00:34:37.220 --> 00:34:39.739
I'll select the USHIN drive.

00:34:39.740 --> 00:34:41.939
Press `f` to jump to a file in it.

00:34:41.940 --> 00:34:46.559
And then I'll jump to the media directory.

00:34:46.560 --> 00:34:50.179
Once it loads, I'll press `RET` on the video

00:34:50.180 --> 00:34:54.559
that I want to stream.

00:34:54.560 --> 00:34:56.686
[Voice from the video]: This is a demonstration

00:34:56.686 --> 00:34:57.838
of the subjective trust interface

00:34:57.839 --> 00:35:02.499
that the USHIN team built for the u4u.io web app.

00:35:02.500 --> 00:35:04.079
[Joseph]: There it is.

00:35:04.080 --> 00:35:07.119
Streaming a video from Hyperdrive.

NOTE hyperdrive.el under the hood

00:35:08.746 --> 00:35:13.026
Here's how hyperdrive.el works under the hood.

00:35:13.027 --> 00:35:14.726
It uses plz [Please],

00:35:14.727 --> 00:35:18.079
the HTTP library that Adam Porter wrote,

00:35:18.080 --> 00:35:22.719
to send requests via curl to hyper-gateway.

00:35:22.720 --> 00:35:26.579
hyper-gateway is a program that Mauve Signweaver wrote,

00:35:26.580 --> 00:35:30.759
which runs a hyperdrive node under the hood.

00:35:30.760 --> 00:35:34.039
It also runs a local HTTP server,

00:35:34.040 --> 00:35:38.459
which accepts requests to control the node.

00:35:38.460 --> 00:35:43.479
For example, if hyperdrive.el wants to show a file

00:35:43.480 --> 00:35:45.219
from someone's hyperdrive,

00:35:45.220 --> 00:35:49.119
it sends the appropriate link via curl

00:35:49.120 --> 00:35:52.959
as a GET request to hyper-gateway.

00:35:52.960 --> 00:35:57.239
hyper-gateway then fetches the data from the network

00:35:57.240 --> 00:35:59.339
and returns it via curl,

00:35:59.340 --> 00:36:03.939
via plz, back to hyperdrive.el.

00:36:03.940 --> 00:36:07.419
If hyper-gateway already has a locally cached copy,

00:36:07.420 --> 00:36:09.239
it doesn't bother checking the network.

00:36:09.240 --> 00:36:12.559
It just sends it straight away.

00:36:12.560 --> 00:36:15.879
Likewise, if hyperdrive.el wants to add a file

00:36:15.880 --> 00:36:20.199
to a hyperdrive, it sends a PUT request.

00:36:20.200 --> 00:36:24.979
hyper-gateway is not installed as part of hyperdrive.el.

00:36:24.980 --> 00:36:26.659
It needs to be installed

00:36:26.660 --> 00:36:35.739
as a separate, executable program.

00:36:35.740 --> 00:36:39.459
We have plans to switch from using hyper-gateway

00:36:39.460 --> 00:36:42.458
to another program that Mauve Signweaver

00:36:42.459 --> 00:36:47.838
is working on, called hyper-sdk-rpc.

00:36:47.839 --> 00:36:52.019
hyper-sdk-rpc will give us more fine-grained control

00:36:52.020 --> 00:36:54.699
over the underlying Hyperdrive node,

00:36:54.700 --> 00:36:56.819
which will open up some new features.

00:36:56.820 --> 00:37:00.899
For example, we'll be able to rename files atomically,

00:37:00.900 --> 00:37:03.419
diff directories between versions,

00:37:03.420 --> 00:37:11.219
and list the peers that we're currently connected to.

00:37:11.220 --> 00:37:13.359
Here are some of the Emacs libraries

00:37:13.360 --> 00:37:17.539
that hyperdrive.el depends on.

00:37:17.540 --> 00:37:22.399
Hyperdrive.el uses plz to send HTTP requests

00:37:22.400 --> 00:37:25.698
to hyper-gateway. Check it out.

00:37:25.699 --> 00:37:28.559
It's on GNU ELPA.

00:37:28.560 --> 00:37:33.639
ewoc.el is a built-in library that's documented

00:37:33.640 --> 00:37:37.339
in the Emacs Lisp manual under the rather cryptic

00:37:37.340 --> 00:37:41.599
heading "Abstract Display Functions."

00:37:41.600 --> 00:37:44.519
Really, what it does is it allows you

00:37:44.520 --> 00:37:49.999
to map a data model to some display.

00:37:50.000 --> 00:37:53.859
What we do with it in hyperdrive.el is,

00:37:53.860 --> 00:38:02.049
in the directory view, we map directory entry items,

00:38:02.049 --> 00:38:04.239
files and directories, to display items.

00:38:04.240 --> 00:38:08.700
And ewoc.el makes it easy to update the display

00:38:08.701 --> 00:38:14.760
whenever the underlying data changes.

00:38:14.761 --> 00:38:21.279
Hyperdrive.el uses persist.el to store

00:38:21.280 --> 00:38:25.639
Hyperdrive metadata about known hyperdrives

00:38:25.640 --> 00:38:29.480
as well as version history between sessions,

00:38:29.481 --> 00:38:32.120
so that the data is cached

00:38:32.121 --> 00:38:34.960
when you log out and log back in.

00:38:34.961 --> 00:38:38.720
If you're going to be developing a program in Emacs

00:38:38.721 --> 00:38:41.960
for Emacs 29 or later,

00:38:41.961 --> 00:38:44.940
I recommend looking at multisession.el,

00:38:44.941 --> 00:38:50.160
because it's built-in, and it has some features

00:38:50.161 --> 00:38:57.540
that persist.el doesn't have.

NOTE Next steps

00:38:57.541 --> 00:39:00.000
Thank you for listening to this talk.

00:39:00.001 --> 00:39:03.680
I hope you get a chance to try out hyperdrive.el.

00:39:03.681 --> 00:39:08.620
Here is a link to the hyperdrive.el manual

00:39:08.621 --> 00:39:11.560
in the USHIN hyperdrive.

00:39:11.561 --> 00:39:14.980
When you go to paste this link in,

00:39:14.981 --> 00:39:18.920
you'll need to combine it back into one line.

00:39:18.921 --> 00:39:22.500
This link is available in the hyperdrive.el manual,

00:39:22.501 --> 00:39:26.660
which is available from within a browser,

00:39:26.661 --> 00:39:29.820
at this link on the USHIN website.

00:39:29.821 --> 00:39:32.960
We also have a public conference room that you can join.

00:39:32.961 --> 00:39:35.520
It's an XMPP multi-user chat

00:39:35.521 --> 00:39:39.780
that the Sopranica team graciously makes available

00:39:39.781 --> 00:39:41.620
for us to use.

00:39:41.621 --> 00:39:43.900
There's also a Matrix bridge,

00:39:43.901 --> 00:39:48.659
if that's more your cup of tea.

00:39:48.660 --> 00:39:52.820
Thank you to the EmacsConf organizers.

00:39:52.821 --> 00:39:55.160
It's been a pleasure to participate,

00:39:55.161 --> 00:39:57.613
and I look forward to hearing the rest of the talks.

00:39:57.614 --> 00:40:02.859
Have a good day.