diff options
author | EmacsConf <emacsconf-org@gnu.org> | 2023-12-03 13:50:23 -0500 |
---|---|---|
committer | EmacsConf <emacsconf-org@gnu.org> | 2023-12-03 13:50:23 -0500 |
commit | b7b0de0d1435a304e0dcd0478ac8e46910ef4d54 (patch) | |
tree | 3a17b951e49cf118c3f0e45a4d301829ba78f7cf /2023/captions | |
parent | 3a4ae66d00eb4844cc9cf157c41a4a55cad2ae7d (diff) | |
download | emacsconf-wiki-b7b0de0d1435a304e0dcd0478ac8e46910ef4d54.tar.xz emacsconf-wiki-b7b0de0d1435a304e0dcd0478ac8e46910ef4d54.zip |
Automated commit
Diffstat (limited to '2023/captions')
-rw-r--r-- | 2023/captions/emacsconf-2023-hyperdrive--hyperdriveel-peertopeer-filesystem-in-emacs--joseph-turner--main.vtt | 2274 |
1 files changed, 2274 insertions, 0 deletions
diff --git a/2023/captions/emacsconf-2023-hyperdrive--hyperdriveel-peertopeer-filesystem-in-emacs--joseph-turner--main.vtt b/2023/captions/emacsconf-2023-hyperdrive--hyperdriveel-peertopeer-filesystem-in-emacs--joseph-turner--main.vtt new file mode 100644 index 00000000..c1376f19 --- /dev/null +++ b/2023/captions/emacsconf-2023-hyperdrive--hyperdriveel-peertopeer-filesystem-in-emacs--joseph-turner--main.vtt @@ -0,0 +1,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. |