diff options
Diffstat (limited to '')
5 files changed, 2075 insertions, 0 deletions
diff --git a/2024/captions/emacsconf-2024-literate--literate-programming-for-the-21st-century--howard-abrams--main--chapters.vtt b/2024/captions/emacsconf-2024-literate--literate-programming-for-the-21st-century--howard-abrams--main--chapters.vtt new file mode 100644 index 00000000..640735ad --- /dev/null +++ b/2024/captions/emacsconf-2024-literate--literate-programming-for-the-21st-century--howard-abrams--main--chapters.vtt @@ -0,0 +1,47 @@ +WEBVTT + + +00:00:00.000 --> 00:01:35.252 +Introduction + +00:01:35.253 --> 00:03:06.331 +Do I still literate? + +00:03:06.332 --> 00:04:28.719 +Advantages + +00:04:28.720 --> 00:05:24.132 +Disadvantages + +00:05:24.133 --> 00:06:24.719 +Ease of typing + +00:06:24.720 --> 00:07:22.500 +Keep tangled code sync'd + +00:07:22.501 --> 00:08:19.959 +Code evaluation + +00:08:19.960 --> 00:09:05.238 +Has that block been eval'd? + +00:09:05.239 --> 00:09:26.871 +Evaluating code in a subtree + +00:09:26.872 --> 00:10:26.019 +Evaluating code from a distance + +00:10:26.020 --> 00:11:26.793 +Navigating by headers + +00:11:26.794 --> 00:13:40.479 +Navigating by function names + +00:13:40.480 --> 00:14:23.165 +Why literate programming? + +00:14:23.166 --> 00:14:55.799 +LP prose isn't comments + +00:14:55.800 --> 00:15:51.240 +Summary diff --git a/2024/captions/emacsconf-2024-literate--literate-programming-for-the-21st-century--howard-abrams--main.vtt b/2024/captions/emacsconf-2024-literate--literate-programming-for-the-21st-century--howard-abrams--main.vtt new file mode 100644 index 00000000..986320d0 --- /dev/null +++ b/2024/captions/emacsconf-2024-literate--literate-programming-for-the-21st-century--howard-abrams--main.vtt @@ -0,0 +1,724 @@ +WEBVTT captioned by sachac + +NOTE Introduction + +00:00:00.000 --> 00:00:09.359 +Can you believe it's been a decade since I started + +00:00:09.360 --> 00:00:12.358 +pontificating on literate programming? + +00:00:12.359 --> 00:00:17.542 +I am Howard Abrams. In 2015, I spoke at this EmacsConf + +00:00:17.543 --> 00:00:21.705 +where I described my challenges I called Literate DevOps. + +00:00:21.706 --> 00:00:25.634 +The conference wasn't completely virtual, even though I was. + +00:00:25.635 --> 00:00:29.317 +My city of Portland was suffering a citywide electrical outage + +00:00:29.318 --> 00:00:33.479 +and I was without power, so I gave the talk in a corner of my + +00:00:33.480 --> 00:00:37.439 +friend's living room. People online asking questions and + +00:00:37.440 --> 00:00:41.439 +wondering about literate programming... I also see comments + +00:00:41.440 --> 00:00:44.599 +explaining why literate programming hasn't caught on in + +00:00:44.600 --> 00:00:49.079 +corporate practice. I often don't engage. I mean, is the + +00:00:49.080 --> 00:00:51.599 +online arguments and chatter over ignorance or + +00:00:51.600 --> 00:00:56.719 +preference? Sure, we're wired differently. I mean, my + +00:00:56.720 --> 00:00:59.559 +favorite programming languages put the parentheses + +00:00:59.560 --> 00:01:01.939 +before the function name. + +00:01:01.940 --> 00:01:03.800 +Literate programming has come a long way + +00:01:03.801 --> 00:01:08.519 +since Knuth proposed it in the 19th century. I feel + +00:01:08.520 --> 00:01:12.999 +it's come a long way just in the last 10 years. Obviously, + +00:01:13.000 --> 00:01:16.399 +this interest is due to Org. I don't think I would bother if + +00:01:16.400 --> 00:01:21.359 +all I had was Knuth's original preprocessor. But since I'm + +00:01:21.360 --> 00:01:24.839 +talking to fellow nerds about an open source project + +00:01:24.840 --> 00:01:27.919 +without corporate backing, let me change the title of my + +00:01:27.920 --> 00:01:32.919 +talk and re-pitch Literate Programming in the 24th and a + +00:01:32.920 --> 00:01:35.252 +Half Century! + +NOTE Do I still literate? + +00:01:35.253 --> 00:01:36.653 +People often ask if I still program that way. + +00:01:36.654 --> 00:01:42.759 +I guess they want to know if there's any long-term benefits, + +00:01:42.760 --> 00:01:45.919 +for many of our tools and our workflows, while initially + +00:01:45.920 --> 00:01:51.079 +tantalizing, often don't last. But yes, when I sit down to + +00:01:51.080 --> 00:01:57.759 +write a program, I create a file with an extension of .org. + +00:01:57.760 --> 00:02:03.799 +I guess you can say I program literally. + +00:02:03.800 --> 00:02:07.359 +Let me be transparent. Do I use literate programming during + +00:02:07.360 --> 00:02:12.599 +my day job? Yes, but only for personal tools or for initial + +00:02:12.600 --> 00:02:16.759 +investigation. At the end of the sprint, I tangle the file + +00:02:16.760 --> 00:02:21.079 +and git commit that. My personal projects, on the other + +00:02:21.080 --> 00:02:25.679 +hand, are Org files. Since I can't show you the code from + +00:02:25.680 --> 00:02:27.839 +my day job, I'm afraid my example code will have a lot of + +00:02:27.840 --> 00:02:31.159 +parentheses. + +00:02:31.160 --> 00:02:33.955 +I'm sure you won't mind. + +00:02:33.956 --> 00:02:37.356 +I like having my Emacs configuration in Org. + +00:02:37.357 --> 00:02:40.359 +It's pretty bling. It has over 8,000 + +00:02:40.360 --> 00:02:44.559 +lines of code. I know, I can hear the screams and gasps over + +00:02:44.560 --> 00:02:49.439 +the network. However, the surrounding prose in Org adds + +00:02:49.440 --> 00:02:53.410 +10,000 lines, and those lines are non-wrapped paragraphs. + +00:02:53.411 --> 00:02:58.119 +I mean, is that large? Sure, we've all worked on + +00:02:58.120 --> 00:03:03.639 +larger, so I guess it's not huge. Come on, it's still + +00:03:03.640 --> 00:03:06.331 +significant. + +NOTE Advantages + +00:03:06.332 --> 00:03:09.799 +Advantages? Look who I'm talking to. I'm sure + +00:03:09.800 --> 00:03:14.279 +you know the advantages, but indulge me. I feel that one + +00:03:14.280 --> 00:03:16.799 +advantage of literate programming, especially with large + +00:03:16.800 --> 00:03:20.279 +code bases, is how you can organize and manage the + +00:03:20.280 --> 00:03:24.839 +complexity. Most programming languages tame large bases + +00:03:24.840 --> 00:03:29.119 +by putting code in separate files. While Org can too, with + +00:03:29.120 --> 00:03:32.279 +Org, we can group related functions together under + +00:03:32.280 --> 00:03:35.043 +expandable headlines. + +00:03:35.044 --> 00:03:37.279 +Here's one. You can see that + +00:03:37.280 --> 00:03:40.706 +I've got different sections grouped together. + +00:03:40.707 --> 00:03:43.759 +In my original talk, I mentioned how I would attempt to organize + +00:03:43.760 --> 00:03:47.839 +my thoughts before coding. I appreciate how I can look back + +00:03:47.840 --> 00:03:53.599 +at my notes. In my Emacs configuration, I review the prose to + +00:03:53.600 --> 00:03:57.799 +help memorize key bindings. + +00:03:57.800 --> 00:04:01.039 +My section on getting email working with Emacs using + +00:04:01.040 --> 00:04:04.079 +notmuch means creating small collections of scripts and + +00:04:04.080 --> 00:04:08.199 +configuration files. I can tangle them all from one Org + +00:04:08.200 --> 00:04:16.799 +file. I like that I can explain each part separately. + +00:04:16.800 --> 00:04:20.879 +You just can't beat having links back to Stack Overflow or + +00:04:20.880 --> 00:04:25.519 +that GitHub repo where you stole, I mean, became inspired to + +00:04:25.520 --> 00:04:28.719 +write your code. + +NOTE Disadvantages + +00:04:28.720 --> 00:04:34.279 +Literate programming may push the boundaries of our + +00:04:34.280 --> 00:04:38.119 +workflows and revealing some abrasion, but we aren't + +00:04:38.120 --> 00:04:41.239 +solely working with Org. We have the flexibility of a Lisp + +00:04:41.240 --> 00:04:45.119 +engine to file down those rough parts. You may have your + +00:04:45.120 --> 00:04:48.159 +concerns. Perhaps you could reach out to me, and with + +00:04:48.160 --> 00:04:54.239 +particular issues, maybe we can figure something out. + +00:04:54.240 --> 00:04:57.439 +Here is my list of frictions, and the rest of my talk + +00:04:57.440 --> 00:05:02.159 +demonstrates my answers and my hacks. The goal in literate + +00:05:02.160 --> 00:05:05.039 +programming with Org is that it should not require more + +00:05:05.040 --> 00:05:08.679 +effort than non-literate programming. For instance, I + +00:05:08.680 --> 00:05:12.119 +shouldn't have to type much more than regular programming + +00:05:12.120 --> 00:05:15.719 +to get my code literate. I also shouldn't have to worry about + +00:05:15.720 --> 00:05:20.799 +the state between my Org file and the source code. I want + +00:05:20.800 --> 00:05:24.132 +to be able to jump around my code just as easily. + +NOTE Ease of typing + +00:05:24.133 --> 00:05:28.654 +Let me explain more. I've created some templates using + +00:05:28.655 --> 00:05:34.679 +yasnippet. Since I was used to the old org-tempo feature, + +00:05:34.680 --> 00:05:37.145 +my habit has all the snippets starting with a + +00:05:37.146 --> 00:05:40.759 +< character. I'm not sure if I should demonstrate all of them + +00:05:40.760 --> 00:05:45.999 +as you may be doing something similar. I like to build on top + +00:05:46.000 --> 00:05:49.999 +of characters to remind me that if I just enter a <s, I + +00:05:50.000 --> 00:05:53.519 +need to put in the language. But if I append a mnemonic, I can + +00:05:53.520 --> 00:05:56.839 +get a full language. Why not do that with a full function + +00:05:56.840 --> 00:06:01.199 +definition? In this case, I'm smooshing one yasnippet + +00:06:01.200 --> 00:06:11.679 +inside another one in order to save myself some typing. + +00:06:11.680 --> 00:06:15.159 +My point here is to pay attention to what slows you down or + +00:06:15.160 --> 00:06:24.719 +hinders you from getting the advantages you want. + +NOTE Keep tangled code sync'd + +00:06:24.720 --> 00:06:28.399 +Do you ever forget to tangle your code? You can append this + +00:06:28.400 --> 00:06:31.519 +code to the bottom of your Org file so that it gets tangled + +00:06:31.520 --> 00:06:36.159 +every time you save. I've written a function so I can visit + +00:06:36.160 --> 00:06:40.559 +that tangled file and then return. I've grouped all my + +00:06:40.560 --> 00:06:45.119 +functions together. I've taken a cue from Charles Choi, you + +00:06:45.120 --> 00:06:48.639 +know, kickingvegas, and his Casual feature set. But + +00:06:48.640 --> 00:06:52.374 +instead of Transient, I've just made a hydra using + +00:06:52.375 --> 00:06:57.399 +the major-mode-hydra package. Anyway, this allows me to use and + +00:06:57.400 --> 00:07:00.136 +remember my micro-optimizations. + +00:07:00.137 --> 00:07:03.697 +If you set the :comments property to link, + +00:07:03.698 --> 00:07:06.999 +the tangled output is back-connected. + +00:07:07.000 --> 00:07:11.479 +This allows us to edit the tangled code and have it update the + +00:07:11.480 --> 00:07:16.879 +Org file. Personally, I don't like this. My source of truth + +00:07:16.880 --> 00:07:22.500 +is the Org file, and I tangle as a one-way diode. + +NOTE Code evaluation + +00:07:22.501 --> 00:07:25.603 +Often a block of code will reference a variable + +00:07:25.604 --> 00:07:29.046 +or call a function to find in another block of code. + +00:07:29.047 --> 00:07:31.508 +In my original literate DevOps talk, + +00:07:31.509 --> 00:07:34.519 +I discussed how to use the output from one block into + +00:07:34.520 --> 00:07:37.799 +another block by naming the first block and referencing it + +00:07:37.800 --> 00:07:42.159 +with a :var for the second. However, if all the blocks use the + +00:07:42.160 --> 00:07:46.039 +same language, you can use sessions, which create a + +00:07:46.040 --> 00:07:51.479 +persistent REPL behind the scenes. Let's evaluate the + +00:07:51.480 --> 00:07:53.199 +blocks of Python code in this file. + +00:07:53.200 --> 00:08:00.119 +The evaluation created a Python REPL. It's available in + +00:08:00.120 --> 00:08:04.279 +another buffer. This buffer matches the name of the + +00:08:04.280 --> 00:08:07.959 +session, but with surrounding asterisks. Evaluating a + +00:08:07.960 --> 00:08:11.399 +code block sends it into the REPL, and now I can work with my + +00:08:11.400 --> 00:08:19.959 +code blocks interactively. (That's not quite right.) + +NOTE Has that block been eval'd? + +00:08:19.960 --> 00:08:24.039 +I primarily hack on Emacs Lisp, and textual changes to + +00:08:24.040 --> 00:08:28.199 +variables, functions, or macros--unless you habitually + +00:08:28.200 --> 00:08:31.679 +type C-c C-c--may not represent the state of your + +00:08:31.680 --> 00:08:35.439 +machine. A similar effect happens in any language that + +00:08:35.440 --> 00:08:39.319 +uses sessions. Sure, I can move the point to a block and + +00:08:39.320 --> 00:08:42.799 +evaluate, but I have three functions that allow me to + +00:08:42.800 --> 00:08:44.734 +evaluate all blocks in a buffer or all blocks in a subtree, + +00:08:44.735 --> 00:08:50.199 +or I can, without moving the point, evaluate any block I see. + +00:08:50.200 --> 00:08:54.919 +Now, this function here evaluates all blocks in a buffer. + +00:08:54.920 --> 00:08:58.279 +Someone mentioned calling this function when you first + +00:08:58.280 --> 00:09:02.359 +load a file. I'm not sure that's a good policy. I mean, have + +00:09:02.360 --> 00:09:05.238 +you not written a bug? + +NOTE Evaluating code in a subtree + +00:09:05.239 --> 00:09:08.559 +Since this function right here + +00:09:08.560 --> 00:09:12.039 +evaluates only visible blocks, we can limit what Emacs + +00:09:12.040 --> 00:09:18.799 +evaluates to a single Org mode section. For instance, with + +00:09:18.800 --> 00:09:23.759 +the cursor in one section, I can evaluate just the blocks in + +00:09:23.760 --> 00:09:26.871 +that header section. + +NOTE Evaluating code from a distance + +00:09:26.872 --> 00:09:29.399 +If I can see a block, why clumsily + +00:09:29.400 --> 00:09:33.079 +navigate to it when I can extend the avy project to just jump to + +00:09:33.080 --> 00:09:40.479 +it? For instance, let's pull this file up. I can jump to any of + +00:09:40.480 --> 00:09:41.639 +the four blocks. + +00:09:41.640 --> 00:09:50.319 +I think that's quite slick. Now why navigate to a code block + +00:09:50.320 --> 00:09:55.799 +solely to evaluate it? Yes, this is a terrible example, but + +00:09:55.800 --> 00:09:59.679 +these three blocks set a variable to different values. So + +00:09:59.680 --> 00:10:02.599 +without moving the point, I can evaluate any one of them. + +00:10:02.600 --> 00:10:09.719 +To be honest, the reason why I wrote this is because I often + +00:10:09.720 --> 00:10:13.999 +forget to evaluate a block after editing it. I've moved on, + +00:10:14.000 --> 00:10:17.839 +and I just don't want to jump back. Now, I can just evaluate + +00:10:17.840 --> 00:10:22.359 +from a distance. I apologize for the previous terrible + +00:10:22.360 --> 00:10:26.019 +examples, but I'm quite pleased with this feature. + +NOTE Navigating by headers + +00:10:26.020 --> 00:10:30.119 +As I mentioned earlier, in a large code base, we organize code by + +00:10:30.120 --> 00:10:33.839 +library or module, and each file contains a class composed + +00:10:33.840 --> 00:10:37.119 +of methods, functions, variables, fields, et cetera. + +00:10:37.120 --> 00:10:39.999 +Literate programming in Org files allows me to add a + +00:10:40.000 --> 00:10:43.159 +semantic organization layer where I can group related + +00:10:43.160 --> 00:10:46.919 +concepts under headlines. Now, while this isn't specific + +00:10:46.920 --> 00:10:50.799 +to literate programming, I wrote a little user interface to + +00:10:50.800 --> 00:10:54.296 +allow me to jump to any heading in any Org file + +00:10:54.297 --> 00:10:57.679 +in a particular project. + +00:10:57.680 --> 00:11:02.879 +These are the headings in my Emacs configuration project. + +00:11:02.880 --> 00:11:06.559 +Notice the file name beforehand, before the colon + +00:11:06.560 --> 00:11:09.759 +character. The header name and its parent headers are + +00:11:09.760 --> 00:11:14.799 +after. Let me search for the LSP sections. Maybe I only want + +00:11:14.800 --> 00:11:20.039 +the one for Python. Now I use ripgrep to search the files and + +00:11:20.040 --> 00:11:24.559 +then some Lisp to parse the output. Unless someone has + +00:11:24.560 --> 00:11:26.793 +already done this, I should package this up on MELPA. + +NOTE Navigating by function names + +00:11:26.794 --> 00:11:32.199 +What about jumping directly to the definition of a function, + +00:11:32.200 --> 00:11:36.799 +variable, or what have you? We can use Emacs's built-in xref + +00:11:36.800 --> 00:11:39.879 +library, but these functions don't understand that the + +00:11:39.880 --> 00:11:45.319 +source code is in Org files. When I started using Emacs + +00:11:45.320 --> 00:11:49.479 +30-something years ago, I would pre-index my source into + +00:11:49.480 --> 00:11:53.799 +tag files, but the dumb-jump project uses the newfangled and + +00:11:53.800 --> 00:11:58.319 +faster text search programs like ripgrep to find a symbol in + +00:11:58.320 --> 00:12:02.319 +real time. I followed this pattern and wrote an extension + +00:12:02.320 --> 00:12:08.119 +to the xref API. Now, I want to jump around my code from both + +00:12:08.120 --> 00:12:14.519 +code block or in the surrounding prose. I'm sure it + +00:12:14.520 --> 00:12:18.199 +comes as no surprise that my presentation is just an Org + +00:12:18.200 --> 00:12:23.919 +file. Let's suppose my cursor is on this symbol. I wrote this + +00:12:23.920 --> 00:12:28.079 +function for this demonstration. We can jump to the + +00:12:28.080 --> 00:12:30.759 +definition and I can jump back. + +00:12:30.760 --> 00:12:37.639 +Notice it jumped into an Org file and back out. References, + +00:12:37.640 --> 00:12:42.279 +unlike definitions, is where something is defined and + +00:12:42.280 --> 00:12:46.919 +where it's used. Well, you know how the xref system works. + +00:12:46.920 --> 00:12:52.679 +Here, I can jump to the definition or where it's + +00:12:52.680 --> 00:12:59.519 +used. Of course, and jump back. I think this is cool. This + +00:12:59.520 --> 00:13:04.319 +should be a nifty package on MELPA. But my code is specific to + +00:13:04.320 --> 00:13:08.799 +Lisp, and I'm not completely sure how to make it general. For + +00:13:08.800 --> 00:13:13.399 +instance, what is a symbol? If you know the language, this is + +00:13:13.400 --> 00:13:17.679 +obvious. But what should the language be when your cursor is + +00:13:17.680 --> 00:13:22.639 +in the prose of an Org file? Python only supports sequences + +00:13:22.640 --> 00:13:25.559 +of alphanumeric and underscores, but in Lisp, a symbol can + +00:13:25.560 --> 00:13:30.399 +be almost any character sequence. I've been stewing on how + +00:13:30.400 --> 00:13:34.479 +to do this. I have ideas like prompting during the first + +00:13:34.480 --> 00:13:37.719 +query or scanning the language based on the nearest code + +00:13:37.720 --> 00:13:40.479 +block. I think I'm babbling. + +NOTE Why literate programming? + +00:13:40.480 --> 00:13:47.199 +In true geek fashion, I dived into the details before + +00:13:47.200 --> 00:13:52.079 +answering some better questions. In my original Literate + +00:13:52.080 --> 00:13:55.479 +DevOps talk, I explained the advantages of initially + +00:13:55.480 --> 00:13:58.959 +writing down your thoughts, your plans, goals... the + +00:13:58.960 --> 00:14:02.879 +user requirements. But what do you do with all that luscious + +00:14:02.880 --> 00:14:06.359 +prose afterwards? Well, you do the same thing you do to your + +00:14:06.360 --> 00:14:09.279 +initial code. You refactor that prose. + +00:14:09.280 --> 00:14:14.759 +Just because the tech surrounding your code is now a + +00:14:14.760 --> 00:14:18.799 +first-class citizen doesn't excuse bad code. You want + +00:14:18.800 --> 00:14:23.165 +something more from both your code and your prose. + +NOTE LP prose isn't comments + +00:14:23.166 --> 00:14:25.586 +The prose of your literate program isn't + +00:14:25.587 --> 00:14:28.667 +just regurgitation of the code in the block. + +00:14:28.668 --> 00:14:31.527 +You want something more helpful. + +00:14:31.528 --> 00:14:35.736 +You're really writing a research paper to yourself. + +00:14:35.737 --> 00:14:38.577 +I know what you're thinking. You've seen my Git repos. + +00:14:38.578 --> 00:14:41.858 +I'm guilty and not always the best example. + +00:14:41.859 --> 00:14:44.559 +However, I do get great joy + +00:14:44.560 --> 00:14:48.680 +when I see someone ask about something in Emacs + +00:14:48.681 --> 00:14:51.041 +and my response is little more than a link + +00:14:51.042 --> 00:14:55.799 +to my online repo that I've rendered as a website. + +NOTE Summary + +00:14:55.800 --> 00:15:01.199 +I'm out of time. I hope this has been interesting + +00:15:01.200 --> 00:15:04.359 +philosophically as well as practically, as I think + +00:15:04.360 --> 00:15:08.559 +literate programming is the cat's meow. I'm afraid this + +00:15:08.560 --> 00:15:11.879 +summary slide is about my home-baked solutions that fit my + +00:15:11.880 --> 00:15:15.119 +needs, but hopefully you can recognize your pain points and + +00:15:15.120 --> 00:15:17.839 +address them. If you don't need my Literate + +00:15:17.840 --> 00:15:21.479 +DevOps-specific techniques for connecting code blocks, I + +00:15:21.480 --> 00:15:25.799 +suggest using sessions by default. I highly recommend + +00:15:25.800 --> 00:15:28.399 +looking at your workflow and writing snippets to give you + +00:15:28.400 --> 00:15:33.159 +less typing for Org blocks. I now jump by headlines in my + +00:15:33.160 --> 00:15:37.479 +projects, but extending xref to support Org files made + +00:15:37.480 --> 00:15:40.159 +literate programming as easy as programming the + +00:15:40.160 --> 00:15:44.319 +old-fashioned way. I do need to make it more general to put up + +00:15:44.320 --> 00:15:47.722 +on MELPA, though. Thanks for watching. + +00:15:47.723 --> 00:15:51.240 +Happy hacking, my friends. diff --git a/2024/captions/emacsconf-2024-pgmacs--pgmacs-browsing-and-editing-postgresql-databases-from-emacs--eric-marsden--main--chapters.vtt b/2024/captions/emacsconf-2024-pgmacs--pgmacs-browsing-and-editing-postgresql-databases-from-emacs--eric-marsden--main--chapters.vtt new file mode 100644 index 00000000..9ecf670d --- /dev/null +++ b/2024/captions/emacsconf-2024-pgmacs--pgmacs-browsing-and-editing-postgresql-databases-from-emacs--eric-marsden--main--chapters.vtt @@ -0,0 +1,35 @@ +WEBVTT + + +00:00:01.260 --> 00:01:24.380 +Introduction + +00:01:26.710 --> 00:03:53.280 +Demo + +00:03:53.960 --> 00:05:11.160 +Deletion + +00:05:12.880 --> 00:05:41.190 +Export + +00:05:42.250 --> 00:06:10.790 +HStore + +00:06:11.510 --> 00:06:30.390 +Connecting to a different database + +00:06:31.110 --> 00:07:31.800 +SchemaSpy + +00:07:32.620 --> 00:08:17.790 +Convenience queries + +00:08:18.850 --> 00:09:35.590 +Emacs as an application development platform + +00:09:36.250 --> 00:11:48.580 +Extending pgmacs + +00:11:49.400 --> 00:13:15.420 +Conclusion diff --git a/2024/captions/emacsconf-2024-pgmacs--pgmacs-browsing-and-editing-postgresql-databases-from-emacs--eric-marsden--main.vtt b/2024/captions/emacsconf-2024-pgmacs--pgmacs-browsing-and-editing-postgresql-databases-from-emacs--eric-marsden--main.vtt new file mode 100644 index 00000000..3ce11b67 --- /dev/null +++ b/2024/captions/emacsconf-2024-pgmacs--pgmacs-browsing-and-editing-postgresql-databases-from-emacs--eric-marsden--main.vtt @@ -0,0 +1,1151 @@ +WEBVTT captioned by eric + +NOTE Introduction + +1 +00:00:01.260 --> 00:00:03.980 +Hi, this is a short presentation about PGmacs, + +2 +00:00:04.180 --> 00:00:07.100 +which is a browsing and editing interface for + +3 +00:00:07.100 --> 00:00:08.360 +Postgres databases. + +4 +00:00:08.920 --> 00:00:11.320 +My name is Eric Marsden, and I'm the + +5 +00:00:11.320 --> 00:00:13.540 +developer of this Emacs Lisp library. + +6 +00:00:14.800 --> 00:00:17.420 +PGmacs was inspired by sqlite-mode, which is a + +7 +00:00:17.420 --> 00:00:20.600 +great feature available from Emacs 29 onwards. + +8 +00:00:21.060 --> 00:00:24.560 +It allows you to view and modify SQLite + +9 +00:00:24.560 --> 00:00:26.220 +databases you might have lying around. + +10 +00:00:26.760 --> 00:00:28.140 +It's a really great feature. + +11 +00:00:28.140 --> 00:00:30.840 +It would be even better, however, if it + +12 +00:00:30.840 --> 00:00:32.900 +were able to use a real database. + +13 +00:00:34.540 --> 00:00:36.200 +And I happen to know that was possible + +14 +00:00:36.200 --> 00:00:38.120 +because a few years ago, I wrote an + +15 +00:00:38.120 --> 00:00:42.920 +Emacs Lisp library, pg.el, which implements the wire + +16 +00:00:42.920 --> 00:00:46.280 +protocol used for communication over the network between + +17 +00:00:46.280 --> 00:00:49.600 +a Postgres client and the Postgres backend, the + +18 +00:00:49.600 --> 00:00:50.440 +Postgres server. + +19 +00:00:51.580 --> 00:00:53.560 +I've included here an example of what it + +20 +00:00:53.560 --> 00:00:54.820 +looks like to use this library. + +21 +00:00:54.820 --> 00:00:58.240 +You connect to the database by specifying the + +22 +00:00:58.240 --> 00:01:01.520 +database name, your username, your password, potentially the + +23 +00:01:01.520 --> 00:01:03.099 +hostname that you're connecting to. + +24 +00:01:03.800 --> 00:01:06.680 +Once you're connected, you can then execute SQL + +25 +00:01:06.680 --> 00:01:09.640 +statements, for example, to create a new table, + +26 +00:01:10.180 --> 00:01:13.860 +to insert values into that table, and to + +27 +00:01:13.860 --> 00:01:16.140 +count the number of rows in a table. + +28 +00:01:17.100 --> 00:01:20.300 +And pg.el does automatic type conversion to + +29 +00:01:20.300 --> 00:01:24.180 +and from Emacs Lisp types and Postgres types for + +30 +00:01:24.180 --> 00:01:24.380 +you. + +NOTE Demo + +31 +00:01:26.710 --> 00:01:29.170 +Probably the best is to jump straight into + +32 +00:01:29.170 --> 00:01:30.690 +a demo of PGmacs. + +33 +00:01:31.210 --> 00:01:34.130 +When we connect to a database, we see + +34 +00:01:34.130 --> 00:01:36.330 +up the top of the buffer, some information + +35 +00:01:36.330 --> 00:01:39.070 +about the backend that we're connected to, some + +36 +00:01:39.070 --> 00:01:42.010 +version information and the total database size on + +37 +00:01:42.010 --> 00:01:42.230 +disk. + +38 +00:01:43.090 --> 00:01:45.170 +There are some shortcuts to some commands we + +39 +00:01:45.170 --> 00:01:47.370 +can run on the database, and there's a + +40 +00:01:47.370 --> 00:01:49.490 +list of tables that we have access to, + +41 +00:01:50.230 --> 00:01:52.650 +with again, metainformation about their size on + +42 +00:01:52.650 --> 00:01:53.650 +disk and their owner. + +43 +00:01:53.650 --> 00:01:56.490 +Now, we can enter a table by pressing + +44 +00:01:56.490 --> 00:01:57.090 +return. + +45 +00:01:58.510 --> 00:02:01.230 +Here we again see some metainformation about + +46 +00:02:01.230 --> 00:02:04.210 +the table, such as the list of columns, + +47 +00:02:05.510 --> 00:02:08.490 +the SQL type of each column, any defaults + +48 +00:02:08.490 --> 00:02:11.170 +that might be present and any SQL constraints. + +49 +00:02:11.970 --> 00:02:14.370 +We see any indexes that might be present + +50 +00:02:14.370 --> 00:02:16.790 +on this table, and then we see the + +51 +00:02:16.790 --> 00:02:19.070 +list of rows of data in the table. + +52 +00:02:19.830 --> 00:02:22.870 +If we see any information which is incorrect + +53 +00:02:22.870 --> 00:02:26.710 +or incomplete, we can easily fix it by + +54 +00:02:26.710 --> 00:02:36.300 +pressing enter again, and this updates the information + +55 +00:02:36.300 --> 00:02:37.900 +present in the database. + +56 +00:02:38.200 --> 00:02:39.840 +PGmacs shows us this in the minibuffer + +57 +00:02:39.840 --> 00:02:42.480 +it has updated one row. + +58 +00:02:43.540 --> 00:02:45.440 +We can look at help for the key + +59 +00:02:45.440 --> 00:02:47.440 +bindings that are present in this type of + +60 +00:02:47.440 --> 00:02:47.780 +buffer. + +61 +00:02:48.120 --> 00:02:49.580 +If we scroll down, we can see that + +62 +00:02:49.580 --> 00:02:51.580 +we can upcase the value of a cell + +63 +00:02:51.580 --> 00:02:52.680 +with M-u. + +64 +00:02:52.920 --> 00:02:53.920 +Let's try that out. + +65 +00:02:56.430 --> 00:02:58.950 +Okay, here we have updated the value of + +66 +00:02:58.950 --> 00:03:00.670 +the cell in the database. + +67 +00:03:00.830 --> 00:03:03.330 +We can now lowercase it, and we can + +68 +00:03:03.330 --> 00:03:06.510 +put it back to the initial + +69 +00:03:06.510 --> 00:03:07.930 +title case of the value. + +70 +00:03:09.010 --> 00:03:11.550 +We can also run a shell command on + +71 +00:03:11.550 --> 00:03:14.570 +a cell value, to count the number of + +72 +00:03:14.570 --> 00:03:15.670 +characters, for example. + +73 +00:03:17.570 --> 00:03:20.390 +We can run a shell command with a + +74 +00:03:20.390 --> 00:03:22.990 +prefix argument, which updates the value in the + +75 +00:03:22.990 --> 00:03:25.610 +database with the output from the shell command. + +76 +00:03:27.470 --> 00:03:29.790 +So that has updated the database. + +77 +00:03:30.270 --> 00:03:32.790 +If we do that again, that will reverse + +78 +00:03:32.790 --> 00:03:39.750 +the value. If we come back + +79 +00:03:39.750 --> 00:03:41.590 +to the list of tables, we see + +80 +00:03:41.590 --> 00:03:43.010 +that there is a table which is called + +81 +00:03:43.010 --> 00:03:43.590 +deleteme. + +82 +00:03:43.890 --> 00:03:50.140 +We can try renaming this table with R, + +83 +00:03:50.380 --> 00:03:52.880 +we can look at what is in this + +84 +00:03:52.880 --> 00:03:53.280 +table. + +NOTE Deletion + +85 +00:03:53.960 --> 00:03:56.600 +Okay, there is only one row of information + +86 +00:03:56.600 --> 00:03:59.280 +that doesn't seem very important, so let's delete + +87 +00:03:59.280 --> 00:03:59.680 +that. + +88 +00:04:02.160 --> 00:04:05.600 +Let's now delete the table with DEL. + +89 +00:04:07.980 --> 00:04:11.000 +PGmacs asks for confirmation, and we've deleted the + +90 +00:04:11.000 --> 00:04:11.240 +table. + +91 +00:04:13.390 --> 00:04:15.470 +Now when we have a big table with + +92 +00:04:15.470 --> 00:04:18.250 +a lot of data, PGmacs is going to + +93 +00:04:18.250 --> 00:04:21.150 +show us the results paginated, so we can + +94 +00:04:21.150 --> 00:04:23.350 +go chunk by chunk through the table. + +95 +00:04:24.370 --> 00:04:28.070 +We can implement a where filter on the + +96 +00:04:28.070 --> 00:04:30.570 +rows to only show the rows that match + +97 +00:04:30.570 --> 00:04:32.390 +a certain SQL clause. + +98 +00:04:33.110 --> 00:04:35.450 +So for example, here we have some temperature + +99 +00:04:35.450 --> 00:04:35.950 +measurements. + +100 +00:04:36.490 --> 00:04:38.690 +We want to focus on measurements that are + +101 +00:04:38.690 --> 00:04:41.270 +more than 40 degrees Celsius, for example. + +102 +00:04:45.980 --> 00:04:48.120 +Okay, we have now filtered on a certain + +103 +00:04:48.120 --> 00:04:49.240 +number of rows. + +104 +00:04:49.540 --> 00:04:51.240 +The filter is shown to us just up + +105 +00:04:51.240 --> 00:04:53.540 +here, and we see here that we have + +106 +00:04:53.540 --> 00:04:55.960 +some values that look anomalous. + +107 +00:04:56.500 --> 00:04:59.120 +There's one, 140, and one is 61. + +108 +00:04:59.840 --> 00:05:02.980 +We probably want to delete them, they represent + +109 +00:05:02.980 --> 00:05:03.540 +errors. + +110 +00:05:04.080 --> 00:05:06.080 +We can mark them for deletion with d, + +111 +00:05:06.560 --> 00:05:09.680 +and then really delete them, expunge them, as + +112 +00:05:09.680 --> 00:05:11.160 +in Dired, with x. + +NOTE Export + +113 +00:05:12.880 --> 00:05:16.120 +We can export this table in CSV format, + +114 +00:05:16.480 --> 00:05:17.800 +thanks to this little button up here. + +115 +00:05:19.860 --> 00:05:22.760 +Here we have our table conveniently formatted as + +116 +00:05:22.760 --> 00:05:23.400 +CSV. + +117 +00:05:23.400 --> 00:05:28.480 +We can also export a particular row to + +118 +00:05:28.480 --> 00:05:32.080 +JSON by typing j, let's look at + +119 +00:05:32.080 --> 00:05:36.270 +what that looks like. + +120 +00:05:37.810 --> 00:05:40.230 +Okay, here's the JSON for one of the + +121 +00:05:40.230 --> 00:05:41.190 +rows in the table. + +NOTE HStore + +122 +00:05:42.250 --> 00:05:44.270 +Now let's look at a table that contains + +123 +00:05:44.270 --> 00:05:46.350 +a column of type HStore. + +124 +00:05:46.430 --> 00:05:48.850 +This is a Postgres-specific key-value map. + +125 +00:05:49.110 --> 00:05:51.170 +Then the attributes column is of type + +126 +00:05:51.170 --> 00:05:54.750 +JSON, which can be stored natively in Postgres. + +127 +00:05:54.750 --> 00:05:56.910 +It's possible to edit these values using a + +128 +00:05:56.910 --> 00:06:00.490 +widget-based interface by typing w, and here + +129 +00:06:00.490 --> 00:06:03.630 +we have a convenient interface for modifying these + +130 +00:06:03.630 --> 00:06:04.450 +types of values. + +131 +00:06:05.410 --> 00:06:08.390 +Likewise, for the JSON type parameter, we can + +132 +00:06:08.390 --> 00:06:10.790 +update using a widget-based interface. + +NOTE Connecting to a different database + +133 +00:06:11.510 --> 00:06:14.270 +Let's connect to a different database. + +134 +00:06:14.490 --> 00:06:18.910 +We do that with a M-x pgmacs, and + +135 +00:06:18.910 --> 00:06:26.670 +then enter our username and password. + +136 +00:06:27.310 --> 00:06:29.390 +Here we have the list of tables present + +137 +00:06:29.390 --> 00:06:30.390 +in this database. + +NOTE SchemaSpy + +138 +00:06:31.110 --> 00:06:33.690 +PGmacs has some support for running the SchemaSpy + +139 +00:06:33.690 --> 00:06:37.950 +utility, which generates a graphical representation of the + +140 +00:06:37.950 --> 00:06:41.710 +relationships between tables in this database, which can + +141 +00:06:41.710 --> 00:06:44.470 +be useful when you're discovering the database. + +142 +00:06:45.170 --> 00:06:47.870 +Here is the SVG that's output by this + +143 +00:06:47.870 --> 00:06:48.470 +utility. + +144 +00:06:50.860 --> 00:06:53.840 +This is a test database containing information about + +145 +00:06:53.840 --> 00:06:55.460 +a digital media store. + +146 +00:06:55.880 --> 00:06:58.160 +It has a table with information about the + +147 +00:06:58.160 --> 00:06:59.300 +tracks that are available. + +148 +00:07:00.960 --> 00:07:03.480 +If we look at this table, we + +149 +00:07:03.480 --> 00:07:04.780 +see that we have the name of the + +150 +00:07:04.780 --> 00:07:08.980 +track, a reference to the album, album ID. + +151 +00:07:09.240 --> 00:07:11.240 +This is a reference to a foreign key, + +152 +00:07:11.660 --> 00:07:13.520 +a key in the table which is called + +153 +00:07:13.520 --> 00:07:13.940 +album. + +154 +00:07:14.820 --> 00:07:16.840 +Now we can follow this foreign key reference + +155 +00:07:16.840 --> 00:07:20.580 +simply by pressing Enter, and here we find + +156 +00:07:20.580 --> 00:07:23.100 +it's the album called For Those About To + +157 +00:07:23.100 --> 00:07:23.340 +Rock. + +158 +00:07:24.260 --> 00:07:26.420 +And in the same way, here we have + +159 +00:07:26.420 --> 00:07:28.780 +a foreign key reference to the relevant artist + +160 +00:07:28.780 --> 00:07:29.680 +which we can follow. + +161 +00:07:30.080 --> 00:07:31.800 +That's, of course, AC/DC. + +NOTE Convenience queries + +162 +00:07:32.620 --> 00:07:35.720 +And finally, PGmacs has some convenience queries that + +163 +00:07:35.720 --> 00:07:38.280 +allows us to list the procedures which are + +164 +00:07:38.280 --> 00:07:39.820 +defined in this database. + +165 +00:07:40.260 --> 00:07:42.820 +Here we have the built-in procedures, mostly + +166 +00:07:42.820 --> 00:07:45.300 +used by the PostGIS extension. + +167 +00:07:48.430 --> 00:07:52.110 +We can also display some more information about + +168 +00:07:52.110 --> 00:07:52.690 +our backend. + +169 +00:07:53.090 --> 00:07:56.450 +Here we have the list of extensions which + +170 +00:07:56.450 --> 00:07:56.990 +are available. + +171 +00:07:57.470 --> 00:08:00.250 +We can load one of these extensions if + +172 +00:08:00.250 --> 00:08:01.570 +we have the rights to do that. + +173 +00:08:02.350 --> 00:08:05.290 +Here we've loaded the relevant extension. + +174 +00:08:06.210 --> 00:08:08.850 +We can show some information about the Postgres + +175 +00:08:08.850 --> 00:08:16.650 +settings also, and update them if we have + +176 +00:08:16.650 --> 00:08:17.790 +the rights to do that. + +NOTE Emacs as an application development platform + +177 +00:08:18.850 --> 00:08:21.650 +Now I'm preaching to the converted, but Emacs + +178 +00:08:21.650 --> 00:08:24.870 +is a really great application development platform. + +179 +00:08:25.510 --> 00:08:29.130 +PGmacs is currently around 3000 lines of code. + +180 +00:08:29.630 --> 00:08:32.510 +A first point of comparison, PGCLI, which is + +181 +00:08:32.510 --> 00:08:36.409 +a text user interface for accessing Postgres implemented + +182 +00:08:36.409 --> 00:08:39.289 +in Python, is 17,000 lines of code. + +183 +00:08:40.390 --> 00:08:43.190 +PGAdmin4, which is a well-known Python GUI + +184 +00:08:43.190 --> 00:08:47.010 +for administrating Postgres databases, is almost half a + +185 +00:08:47.010 --> 00:08:48.050 +million lines of code. + +186 +00:08:48.410 --> 00:08:51.450 +And DBeaver, implemented in Java, is almost a + +187 +00:08:51.450 --> 00:08:52.490 +million lines of code. + +188 +00:08:53.130 --> 00:08:56.030 +Developing things on Emacs, you get for + +189 +00:08:56.030 --> 00:08:58.270 +free portability between different platforms. + +190 +00:08:58.470 --> 00:09:00.130 +As I'm showing you, it works great on + +191 +00:09:00.130 --> 00:09:02.730 +Linux, which is where I developed this library. + +192 +00:09:03.070 --> 00:09:06.530 +It also works perfectly in the terminal, except + +193 +00:09:06.530 --> 00:09:08.530 +for some of the functionality I showed, which + +194 +00:09:08.530 --> 00:09:10.190 +requires SVG support. + +195 +00:09:10.970 --> 00:09:12.630 +It also works well, if you're into that + +196 +00:09:12.630 --> 00:09:15.230 +kind of thing, on MacOS and on Windows. + +197 +00:09:15.830 --> 00:09:19.130 +And it even works perfectly on Haiku, which + +198 +00:09:19.130 --> 00:09:20.770 +is a free BeOS clone. + +199 +00:09:21.300 --> 00:09:23.870 +Emacs is actually really pretty on this operating + +200 +00:09:23.870 --> 00:09:26.590 +system, so congratulations to the people who did + +201 +00:09:26.590 --> 00:09:27.330 +the port there. + +202 +00:09:27.530 --> 00:09:29.350 +Now, of course, the main advantage of building + +203 +00:09:29.350 --> 00:09:32.430 +on the Emacs development platform, is that the + +204 +00:09:32.430 --> 00:09:35.590 +application is easy for the user to extend. + +NOTE Extending pgmacs + +205 +00:09:36.250 --> 00:09:38.690 +To illustrate that, previously we were looking at + +206 +00:09:38.690 --> 00:09:40.650 +a table of temperature measurements. + +207 +00:09:42.070 --> 00:09:44.510 +Imagine we want to highlight rows in this + +208 +00:09:44.510 --> 00:09:48.430 +table, which look anomalous, where the value looks + +209 +00:09:48.430 --> 00:09:49.450 +a bit extreme. + +210 +00:09:50.090 --> 00:09:52.150 +That's quite easy to do with a bit + +211 +00:09:52.150 --> 00:09:53.130 +of Emacs Lisp. + +212 +00:09:54.610 --> 00:09:58.410 +We define a function, which, if the cell + +213 +00:09:58.410 --> 00:10:01.570 +value is bigger than 40, is going to + +214 +00:10:01.570 --> 00:10:03.850 +display it in a face which has a + +215 +00:10:03.850 --> 00:10:04.950 +dark red foreground. + +216 +00:10:05.950 --> 00:10:08.890 +We can now register this display function for + +217 +00:10:08.890 --> 00:10:11.590 +the measurement column in the temperatures table. + +218 +00:10:12.190 --> 00:10:16.490 +And if we reopen the table now, we + +219 +00:10:16.490 --> 00:10:19.950 +see that the anomalous measurements are indeed highlighted + +220 +00:10:19.950 --> 00:10:20.810 +in red. + +221 +00:10:24.100 --> 00:10:27.320 +Another example, imagine we have a table which + +222 +00:10:27.320 --> 00:10:28.880 +contains image data. + +223 +00:10:29.200 --> 00:10:31.740 +There's a column which is of BYTEA type, + +224 +00:10:31.740 --> 00:10:35.020 +which contains images in binary form. + +225 +00:10:35.340 --> 00:10:38.920 +We can display these inline as follows. + +226 +00:10:40.340 --> 00:10:44.900 +We create an inline image display function, using + +227 +00:10:44.900 --> 00:10:47.080 +Emacs' image support. + +228 +00:10:47.080 --> 00:10:49.540 +And then we'd register this function to display + +229 +00:10:49.540 --> 00:10:52.460 +the image column in the inline image table. + +230 +00:10:52.780 --> 00:10:55.540 +If we now reopen the inline image table, + +231 +00:10:56.060 --> 00:10:59.140 +we see the images are displayed inline. + +232 +00:10:59.660 --> 00:11:03.160 +And as a final example of customisation, here's + +233 +00:11:03.160 --> 00:11:05.440 +how to bind a key to a specific + +234 +00:11:05.440 --> 00:11:07.860 +function, in the row-list buffer. + +235 +00:11:08.800 --> 00:11:12.080 +Let's define a function that does a DuckDuckGo + +236 +00:11:12.080 --> 00:11:15.500 +lookup for a particular value in + +237 +00:11:15.500 --> 00:11:16.700 +the Emacs web browser. + +238 +00:11:18.080 --> 00:11:22.140 +We can define a function which does a + +239 +00:11:22.140 --> 00:11:24.400 +funcall on the cell value for this + +240 +00:11:24.400 --> 00:11:26.200 +DuckDuckGo lookup function. + +241 +00:11:27.100 --> 00:11:30.060 +And finally we can define a key, the + +242 +00:11:30.060 --> 00:11:33.360 +capital D key, in the row-list map, + +243 +00:11:33.540 --> 00:11:35.480 +which calls this function that does a + +244 +00:11:35.480 --> 00:11:36.900 +DuckDuckGo lookup. + +245 +00:11:37.240 --> 00:11:39.600 +And now if I'm browsing information in a + +246 +00:11:39.600 --> 00:11:41.580 +table that I want to do a web + +247 +00:11:41.580 --> 00:11:45.380 +search on, I can use my D shortcut + +248 +00:11:45.380 --> 00:11:48.580 +and see some web results concerning the cell. + +NOTE Conclusion + +249 +00:11:49.400 --> 00:11:53.880 +So to conclude, the source and installation instructions + +250 +00:11:53.880 --> 00:11:56.520 +for PGmacs are available on GitHub. + +251 +00:11:56.680 --> 00:11:58.780 +It requires Emacs 29. + +252 +00:11:59.260 --> 00:12:01.620 +There is a prebuilt container image which you + +253 +00:12:01.620 --> 00:12:02.820 +can use for testing. + +254 +00:12:02.980 --> 00:12:04.100 +It's a Docker image. + +255 +00:12:04.580 --> 00:12:06.160 +The Docker image only works in terminal mode. + +256 +00:12:06.160 --> 00:12:08.380 +And of course that's a recommended way of + +257 +00:12:08.380 --> 00:12:11.020 +testing Emacs Lisp code that you load + +258 +00:12:11.020 --> 00:12:13.100 +into your Emacs before having read it. + +259 +00:12:13.360 --> 00:12:15.720 +It works with any recent version of Postgres + +260 +00:12:15.720 --> 00:12:18.580 +over the past 10 years, including the latest + +261 +00:12:18.580 --> 00:12:19.900 +release, Postgres 17. + +262 +00:12:20.440 --> 00:12:22.700 +It does work with a certain number of + +263 +00:12:22.700 --> 00:12:26.440 +databases that are compatible with Postgres, such as + +264 +00:12:26.440 --> 00:12:30.360 +ParadeDB, TimescaleDB and IvorySQL. + +265 +00:12:30.940 --> 00:12:33.560 +However, it doesn't work with all databases that + +266 +00:12:33.560 --> 00:12:35.340 +claim to be Postgres compatible. + +267 +00:12:35.340 --> 00:12:37.840 +It doesn't work, for example, with CrateDB or + +268 +00:12:37.840 --> 00:12:39.960 +with CockroachDB or some others that you see + +269 +00:12:39.960 --> 00:12:40.640 +listed here. + +270 +00:12:40.760 --> 00:12:42.660 +The reason for that is that these databases + +271 +00:12:42.660 --> 00:12:46.440 +don't implement the system tables that PGmacs queries + +272 +00:12:46.440 --> 00:12:49.600 +to obtain information about the columns present in + +273 +00:12:49.600 --> 00:12:52.220 +a table, the size on disk, the ownership + +274 +00:12:52.220 --> 00:12:53.560 +of tables, etc. + +275 +00:12:54.600 --> 00:12:58.180 +PGmacs supports TLS encrypted connections to the database, + +276 +00:12:58.380 --> 00:13:01.400 +as well as local Unix socket connections. + +277 +00:13:02.040 --> 00:13:04.600 +And in terms of stability, I would classify + +278 +00:13:04.600 --> 00:13:06.160 +it as beta status. + +279 +00:13:06.680 --> 00:13:09.200 +I do use it myself in production on + +280 +00:13:09.200 --> 00:13:11.160 +some not very important data. + +281 +00:13:11.560 --> 00:13:13.060 +Really, it works quite well. + +282 +00:13:14.300 --> 00:13:15.420 +Thanks for your attention. diff --git a/2024/captions/emacsconf-2024-sun-close--sunday-closing-remarks--main.vtt b/2024/captions/emacsconf-2024-sun-close--sunday-closing-remarks--main.vtt new file mode 100644 index 00000000..f43e8590 --- /dev/null +++ b/2024/captions/emacsconf-2024-sun-close--sunday-closing-remarks--main.vtt @@ -0,0 +1,118 @@ +WEBVTT + +00:00.007 --> 00:03.045 +Hi again everyone, this is Leo, and I'm very sorry that I + +00:03.046 --> 00:06.284 +couldn't stick around to the very end of EmacsConf 2024. + +00:06.285 --> 00:09.843 +This is a recording, and hopefully this is playing as my + +00:09.844 --> 00:13.962 +co-organizers are closing EmacsConf 2024. There's just + +00:13.963 --> 00:17.761 +one last thing that I wanted to invite people to do, because + +00:17.762 --> 00:20.880 +for me, it was an honor to host the general track of EmacsConf + +00:20.881 --> 00:24.119 +this year again. It's my fifth time. But if you are + +00:24.120 --> 00:28.638 +interested in hosting, like me, or maybe transcribing + +00:28.639 --> 00:32.397 +pre-recordings, you know, captioning them, we do have + +00:32.398 --> 00:35.036 +plenty of roles open for people who want to contribute to + +00:35.037 --> 00:37.715 +EmacsConf. We do have a page on the website which is + +00:37.716 --> 00:40.794 +https://emacsconf.org/volunteer . + +00:40.795 --> 00:43.153 +You will find all the information about the roles that + +00:43.154 --> 00:45.460 +you can take. Just listing them very quickly. + +00:45.461 --> 00:47.152 +We've got captioners, as I mentioned. + +00:47.153 --> 00:49.230 +We've got hosts. We have + +00:49.231 --> 00:52.229 +Internet Relay Chat monitors, so IRC people to + +00:52.230 --> 00:00:53.800 +make sure that everyone is being nice + +00:00:53.801 --> 00:00:55.668 +in the chat and perhaps pasting + +00:55.669 --> 00:58.747 +questions from IRC to the pad. Speaking of the pad, we have + +00:58.748 --> 01:02.386 +pad scribes to make sure that all the questions and answers + +01:02.387 --> 01:05.105 +are documented in the pad. That makes our job much easier for + +01:05.106 --> 01:07.664 +the publishing process. When it comes to the publishing + +01:07.665 --> 01:09.663 +process, we've got everything that has to do with the + +01:09.664 --> 01:13.622 +pre-recordings, so people to process the audio of + +01:13.623 --> 01:18.101 +pre-recordings, re-encoding. We do have a lot of scripts + +01:18.102 --> 01:20.660 +that Sacha and myself have been writing to make our job much + +01:20.661 --> 01:24.459 +easier, but we are always in need of a pair of eyes to improve + +01:24.460 --> 01:28.138 +the process. Lastly, if you happen to have experience in + +01:28.139 --> 01:31.817 +infrastructure and video, we do need sysadmins to maintain + +01:31.818 --> 01:34.216 +the platform that we use for streaming, because again, + +01:34.217 --> 01:37.455 +everything we do is depending on remote machines, both for + +01:37.456 --> 01:42.334 +the streaming, the re-encoding, the transcription. If + +01:42.335 --> 01:45.013 +you have any interest in helping us with this, please send us + +01:45.014 --> 01:48.772 +an email. And all the information is on the website. All that + +01:48.773 --> 01:52.171 +remains for me is to say thank you so much for coming to + +01:52.172 --> 01:54.650 +EmacsConf, thanks to all the speakers for the wonderful + +01:54.651 --> 00:01:57.792 +talks, and I will most likely see you next year. + +00:01:57.793 --> 00:01:59.209 +Have fun, everyone! |