summaryrefslogtreecommitdiffstats
path: root/2021/captions/emacsconf-2021-borg--manual-package-management-in-the-era-of-repositories-why-and-how--codingquark--main.vtt
diff options
context:
space:
mode:
Diffstat (limited to '2021/captions/emacsconf-2021-borg--manual-package-management-in-the-era-of-repositories-why-and-how--codingquark--main.vtt')
-rw-r--r--2021/captions/emacsconf-2021-borg--manual-package-management-in-the-era-of-repositories-why-and-how--codingquark--main.vtt457
1 files changed, 457 insertions, 0 deletions
diff --git a/2021/captions/emacsconf-2021-borg--manual-package-management-in-the-era-of-repositories-why-and-how--codingquark--main.vtt b/2021/captions/emacsconf-2021-borg--manual-package-management-in-the-era-of-repositories-why-and-how--codingquark--main.vtt
new file mode 100644
index 00000000..c3d95a56
--- /dev/null
+++ b/2021/captions/emacsconf-2021-borg--manual-package-management-in-the-era-of-repositories-why-and-how--codingquark--main.vtt
@@ -0,0 +1,457 @@
+WEBVTT
+
+00:00.950 --> 00:03.225
+Hello, my name is Dhavan,
+
+00:03.225 --> 00:05.500
+also known as codingquark!
+
+00:05.500 --> 00:08.041
+I started out learning Emacs
+
+00:08.041 --> 00:12.540
+without knowing I had to plug things in
+
+00:12.540 --> 00:13.629
+to make it work.
+
+00:13.629 --> 00:14.849
+Eventually I had to learn to set up ELPA.
+
+00:14.849 --> 00:16.850
+Since then I’ve used MELPA
+
+00:16.850 --> 00:21.030
+and Debian apt sources.
+
+00:21.030 --> 00:21.054
+Recent discussions about ELPA,
+
+00:21.054 --> 00:21.054
+NonGNU ELPA, MELPA, etc.
+
+00:21.054 --> 00:21.054
+made me reconsider
+
+00:21.054 --> 00:21.054
+what I was doing
+
+00:21.054 --> 00:28.590
+with my Emacs.
+
+00:28.590 --> 00:30.887
+I am not the kind of person
+
+00:30.887 --> 00:34.290
+to mindlessly ram things into my emacs.
+
+00:34.290 --> 00:36.041
+I like to ponder,
+
+00:36.041 --> 00:37.500
+to understand,
+
+00:37.500 --> 00:40.128
+to have a level of control
+
+00:40.128 --> 00:42.069
+and mindfulness
+
+00:42.069 --> 00:43.890
+about my Emacs.
+
+00:43.890 --> 00:45.730
+It is not just a matter
+
+00:45.730 --> 00:47.340
+of trying things out,
+
+00:47.340 --> 00:50.909
+it is about living an examined life
+
+00:50.909 --> 00:53.387
+as the Greeks would say;
+
+00:53.387 --> 00:57.040
+or sutta as Buddhists would say.
+
+00:57.040 --> 00:59.860
+Such an Emacs is an Emacs worth having.
+
+00:59.860 --> 01:01.414
+This pursuit of mine
+
+01:01.414 --> 01:03.710
+brought me to learn about borg.
+
+01:03.710 --> 01:05.595
+And I am going to share with you
+
+01:05.595 --> 01:06.479
+how to use it.
+
+01:06.479 --> 01:09.018
+I believe the approach of using borg
+
+01:09.018 --> 01:10.597
+for package management
+
+01:10.597 --> 01:12.710
+is not for everyone.
+
+01:12.710 --> 01:14.307
+It involves knowing git,
+
+01:14.307 --> 01:16.648
+it involves looking into source code
+
+01:16.648 --> 01:18.229
+and reading makefiles.
+
+01:18.229 --> 01:20.170
+Sure, anyone can learn
+
+01:20.170 --> 01:22.617
+should they be motivated so,
+
+01:22.617 --> 01:25.740
+but people have different priorities.
+
+01:25.740 --> 01:29.056
+This is what is working for me right now.
+
+01:29.056 --> 01:32.826
+Here is what we are going to do.
+
+01:32.826 --> 01:35.696
+We'll set up Debian, install dependencies,
+
+01:35.696 --> 01:39.032
+set up borg, install a package,
+
+01:39.032 --> 01:42.090
+and make sure it installs all the docs.
+
+01:42.090 --> 01:47.240
+Let’s get started!
+
+01:47.240 --> 01:48.342
+Would it not be amazing
+
+01:48.342 --> 01:49.560
+if we could start out with
+
+01:49.560 --> 01:52.399
+just Debian and basic tools?
+
+01:52.399 --> 01:54.848
+For borg, we need git,
+
+01:54.848 --> 01:55.916
+build-essential,
+
+01:55.916 --> 01:57.384
+and something to build docs.
+
+01:57.384 --> 02:00.499
+Nothing more!
+
+02:00.499 --> 02:04.658
+Now that we have the OS setup,
+
+02:04.658 --> 02:06.226
+it is time to clone
+
+02:06.226 --> 02:09.429
+what is called a “seed”.
+
+02:09.429 --> 02:11.431
+A seed will speed our process up
+
+02:11.431 --> 02:13.379
+by providing things like
+
+02:13.379 --> 02:15.500
+magit, epkg, auto-compile, etc.
+
+02:15.500 --> 02:20.430
+We will soon be using epkg and magit.
+
+02:20.430 --> 02:22.642
+The docs cover how to start
+
+02:22.642 --> 02:23.477
+without a seed,
+
+02:23.477 --> 02:25.779
+but for the purposes of a short demo,
+
+02:25.779 --> 02:27.770
+seeds are better.
+
+02:27.770 --> 02:28.682
+I started with a seed
+
+02:28.682 --> 02:30.083
+for my own dot emacs.
+
+02:30.083 --> 02:32.890
+It is fairly slim.
+
+02:32.890 --> 02:33.854
+As you can see,
+
+02:33.854 --> 02:35.088
+borg uses git URLs
+
+02:35.088 --> 02:37.290
+and /not/ HTTPS URLs.
+
+02:37.290 --> 02:38.992
+Make sure you have your ssh keys
+
+02:38.992 --> 02:43.989
+set up on GitHub, GitLab, etc.
+
+02:43.989 --> 02:45.899
+Bootstrapping is like cloning a dot emacs,
+
+02:45.899 --> 02:47.310
+but it only comes with a
+
+02:47.310 --> 02:51.400
+useful dot git submodules file.
+
+02:51.400 --> 02:54.841
+We get a Makefile that has targets
+
+02:54.841 --> 02:57.739
+like help and bootstrap-borg.
+
+02:57.739 --> 02:59.880
+There will be more targets
+
+02:59.880 --> 03:02.115
+after we finish the bootstrapping process.
+
+03:30.110 --> 03:35.582
+Then, we need to clone all the git modules,
+
+03:35.582 --> 03:38.310
+which is also done by a make target.
+
+03:38.310 --> 03:40.754
+This time, it will not just pull
+
+03:40.754 --> 03:42.656
+the git submodules,
+
+03:42.656 --> 03:44.658
+but will also run various things
+
+03:44.658 --> 03:45.826
+like auto-compilation,
+
+03:45.826 --> 03:48.030
+Info doc installation, etc.
+
+03:48.030 --> 04:08.680
+Good thing we installed texinfo earlier!
+
+04:08.282 --> 04:10.884
+Now that we have borg bootstrapped,
+
+04:10.884 --> 04:14.520
+let’s see how to “assimilate” a drone.
+
+04:14.520 --> 04:17.090
+Well, that’s just a borg way of saying
+
+04:17.090 --> 04:19.900
+how to install a new package.
+
+04:19.900 --> 04:22.910
+We get to work from inside Emacs now.
+
+04:22.910 --> 04:26.366
+Borg has excellent info docs,
+
+04:26.366 --> 04:28.450
+should you ever be having questions.
+
+04:28.450 --> 04:32.240
+I earlier talked about using a seed.
+
+04:32.240 --> 04:34.830
+Borg docs go into details of what that means.
+
+04:34.830 --> 04:40.190
+I encourage you to read the docs.
+
+04:40.190 --> 04:51.500
+Let’s try to install lsp-mode.
+
+04:51.500 --> 04:52.459
+Examining lsp-mode
+
+04:52.459 --> 04:54.694
+with epkg’s helper function,
+
+04:54.694 --> 04:57.280
+we can see details of the package,
+
+04:57.280 --> 05:00.200
+dependencies required, and so on.
+
+05:00.200 --> 05:02.470
+epkg uses sqlite database.
+
+05:02.470 --> 05:04.871
+Now you know why I installed sqlite
+
+05:04.871 --> 05:12.350
+in the OS preparation step!
+
+05:20.820 --> 05:22.622
+Well, lsp-mode has
+
+05:22.622 --> 05:24.057
+way too many dependencies
+
+05:24.057 --> 05:25.830
+for this demo.
+
+05:25.830 --> 05:28.795
+Note how one is naturally led
+
+05:28.795 --> 05:32.332
+to take a peek at the innards of the packages
+
+05:32.332 --> 05:34.780
+in this simple workflow.
+
+05:34.780 --> 05:37.270
+As I said, it is about being mindful!
+
+05:37.270 --> 05:39.573
+Okay, instead of lsp-mode,
+
+05:39.573 --> 05:41.308
+let’s take a look at
+
+05:41.308 --> 05:45.400
+Prot’s excellent modus-themes.
+
+05:45.400 --> 05:47.247
+No extra dependencies needed.
+
+05:47.247 --> 05:49.870
+That is perfect!
+
+05:49.870 --> 05:52.018
+The themes have great docs
+
+05:52.018 --> 05:53.620
+and our philosopher friend
+
+05:53.620 --> 05:56.000
+is good at writing.
+
+05:56.000 --> 06:02.930
+Alright, first, we clone the package.
+
+06:02.930 --> 06:04.664
+This allows us to inspect the code,
+
+06:04.664 --> 06:06.330
+should we want to.
+
+06:06.330 --> 06:23.000
+Well, you /should/.
+
+06:23.000 --> 06:25.552
+Upon inspecting the code,
+
+06:25.552 --> 06:30.620
+we ask borg to assimilate the package.
+
+06:30.620 --> 06:33.927
+This will load the code in our Emacs
+
+06:33.927 --> 06:37.270
+and make the package available for use.
+
+06:39.799 --> 06:42.135
+Wait, I was praising all the docs,
+
+06:42.135 --> 06:43.690
+but where are they?
+
+06:43.690 --> 06:44.571
+To install the docs,
+
+06:44.571 --> 06:46.273
+we need to instruct borg
+
+06:46.273 --> 06:48.020
+about where to find them.
+
+06:48.020 --> 06:51.978
+To do this, we edit the gitmodules file
+
+06:51.978 --> 06:53.910
+and add the details.
+
+06:53.910 --> 06:58.310
+There they are!
+
+06:58.310 --> 07:04.170
+We have our docs!
+
+07:04.170 --> 07:09.940
+Alright, we have assimilated a package.
+
+07:09.940 --> 07:11.398
+After sufficient testing,
+
+07:11.398 --> 07:14.234
+we can commit it as a part of our own dot emacs,
+
+07:14.234 --> 07:19.272
+which is a drone of our borg collective.
+
+07:19.272 --> 07:21.741
+Since all the packages are git submodules,
+
+07:21.741 --> 07:23.810
+we get to use magit
+
+07:23.810 --> 07:25.245
+(all hail magit!)
+
+07:25.245 --> 07:27.514
+and borg’s helper functions
+
+07:27.514 --> 07:29.530
+to commit the code.
+
+07:29.530 --> 07:31.818
+Now create your own dot el file
+
+07:31.818 --> 07:38.758
+and hack away!
+
+07:38.758 --> 07:39.793
+So that is it.
+
+00:07:39.793 --> 00:07:41.661
+I hope you enjoyed the talk
+
+07:41.661 --> 07:45.131
+and I will be hanging out in IRC
+
+07:45.131 --> 07:46.666
+if you have any questions.
+
+07:46.666 --> 07:48.330
+Thank you, and bye.