From c9a4426b64b70443152218bfbcbbefb198ff8244 Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Wed, 19 Jan 2022 00:11:31 -0500 Subject: Add clede transcript - thanks Hannah! --- ...he-gnus-newsreader--eric-abrahamsen-autogen.vtt | 905 +++++++------- ...cs-development-environment--fermin-mf--main.vtt | 1244 ++++++++++++++++++++ 2021/info/clede-schedule.md | 3 +- 2021/talks/clede.md | 7 - 4 files changed, 1673 insertions(+), 486 deletions(-) create mode 100644 2021/captions/emacsconf-2021-clede--clede-the-common-lisp-emacs-development-environment--fermin-mf--main.vtt diff --git a/2020/subtitles/emacsconf-2020--32-object-oriented-code-in-the-gnus-newsreader--eric-abrahamsen-autogen.vtt b/2020/subtitles/emacsconf-2020--32-object-oriented-code-in-the-gnus-newsreader--eric-abrahamsen-autogen.vtt index 9f4d0e06..55af2c4c 100644 --- a/2020/subtitles/emacsconf-2020--32-object-oriented-code-in-the-gnus-newsreader--eric-abrahamsen-autogen.vtt +++ b/2020/subtitles/emacsconf-2020--32-object-oriented-code-in-the-gnus-newsreader--eric-abrahamsen-autogen.vtt @@ -1,733 +1,682 @@ WEBVTT 00:00:01.839 --> 00:00:04.160 -hello EmacsConf +Hello, EmacsConf! -00:00:04.160 --> 00:00:05.759 -thanks very much first of all to the +00:00:04.160 --> 00:00:05.279 +Thanks very much, first of all, -00:00:05.759 --> 00:00:07.200 -organizers of the conference +00:00:05.280 --> 00:00:07.200 +to the organizers of the conference -00:00:07.200 --> 00:00:09.440 -and to the audience who I hope is out +00:00:07.200 --> 00:00:08.800 +and to the audience, -00:00:09.440 --> 00:00:10.480 -there somewhere +00:00:08.801 --> 00:00:10.480 +who I hope is out there somewhere, -00:00:10.480 --> 00:00:12.080 -uh for giving me this chance to talk +00:00:10.480 --> 00:00:11.679 +for giving me this chance -00:00:12.080 --> 00:00:14.240 -about Emacs and some of my uh +00:00:11.680 --> 00:00:12.880 +to talk about Emacs -00:00:14.240 --> 00:00:16.560 -my poking around with Emacs lisp my name +00:00:12.881 --> 00:00:16.240 +and some of my poking around with Emacs Lisp. -00:00:16.560 --> 00:00:18.480 -is eric abrahamson I'm not +00:00:16.241 --> 00:00:17.680 +My name is Eric Abrahamsen. -00:00:18.480 --> 00:00:20.960 -a professional programmer but I use +00:00:17.681 --> 00:00:20.480 +I'm not a professional programmer, -00:00:20.960 --> 00:00:21.920 -Emacs all day +00:00:20.481 --> 00:00:23.039 +but I use Emacs all day, every day, -00:00:21.920 --> 00:00:24.800 -every day for writing for translating +00:00:23.040 --> 00:00:24.800 +for writing, for translating, 00:00:24.800 --> 00:00:26.160 -for project management +for project management, -00:00:26.160 --> 00:00:28.160 -and most importantly for email which +00:00:26.160 --> 00:00:27.920 +and most importantly, for email, -00:00:28.160 --> 00:00:29.199 -will be the +00:00:27.921 --> 00:00:30.640 +which will be the subject of my talk today. -00:00:29.199 --> 00:00:32.480 -subject of my talk today so I'm talking +00:00:30.641 --> 00:00:32.880 +So I'm talking about -00:00:32.480 --> 00:00:35.440 -about object-oriented code in Emacs +00:00:32.881 --> 00:00:34.160 +object-oriented code -00:00:35.440 --> 00:00:38.320 -uh most famous possibly oldest +00:00:34.161 --> 00:00:38.320 +in Emacs' most famous, possibly oldest, -00:00:38.320 --> 00:00:40.160 -definitely most notorious news reader +00:00:38.320 --> 00:00:39.520 +definitely most notorious -00:00:40.160 --> 00:00:41.760 -slash Emacs client +00:00:39.521 --> 00:00:42.800 +news reader / email client, -00:00:41.760 --> 00:00:44.320 -email client so in particular object +00:00:42.801 --> 00:00:44.000 +so, in particular, -00:00:44.320 --> 00:00:45.440 -oriented code +00:00:44.001 --> 00:00:46.000 +object-oriented code in Gnus. -00:00:45.440 --> 00:00:50.239 -in news why object-oriented code +00:00:46.001 --> 00:00:50.239 +Why object-oriented code? -00:00:50.239 --> 00:00:51.920 -the way news works is it started off as +00:00:50.239 --> 00:00:51.199 +The way Gnus works is -00:00:51.920 --> 00:00:53.600 -a news reader so for access +00:00:51.200 --> 00:00:52.480 +it started off as a news reader, -00:00:53.600 --> 00:00:57.039 -accessing nntp servers and later on grew +00:00:52.481 --> 00:00:55.920 +so for accessing NNTP servers -00:00:57.039 --> 00:00:59.120 -a whole bunch of new functionality as a +00:00:55.921 --> 00:00:57.600 +and later on grew a whole bunch -00:00:59.120 --> 00:01:01.039 -mail client so it can talk to imap +00:00:57.601 --> 00:00:59.760 +of new functionality as a mail client, -00:01:01.039 --> 00:01:02.079 -servers +00:00:59.761 --> 00:01:02.079 +so it can talk to IMAP servers, -00:01:02.079 --> 00:01:04.799 -mail dealer directories uh folders on +00:01:02.079 --> 00:01:04.320 +Maildir directories, -00:01:04.799 --> 00:01:06.640 -your file system all kinds of stuff +00:01:04.321 --> 00:01:05.360 +folders on your file system, -00:01:06.640 --> 00:01:08.400 -but it presents a unified interface to +00:01:05.361 --> 00:01:06.640 +all kinds of stuff, -00:01:08.400 --> 00:01:09.760 -all those things so it's basically +00:01:06.640 --> 00:01:08.320 +but it presents a unified interface -00:01:09.760 --> 00:01:11.040 -polymorphism +00:01:08.321 --> 00:01:08.960 +to all those things, -00:01:11.040 --> 00:01:14.000 -one of the the basic fundamental +00:01:08.961 --> 00:01:11.040 +so it's basically polymorphism, -00:01:14.000 --> 00:01:16.400 -principles of object oriented code so +00:01:11.040 --> 00:01:14.560 +one of the the basic fundamental principles -00:01:16.400 --> 00:01:18.720 -it's a good fit second reason is it +00:01:14.561 --> 00:01:15.680 +of object oriented code. -00:01:18.720 --> 00:01:19.920 -already is +00:01:15.681 --> 00:01:17.600 +So it's a good fit. -00:01:19.920 --> 00:01:22.880 -object oriented and I'll get into what +00:01:17.601 --> 00:01:21.439 +Second reason is it already is object-oriented, -00:01:22.880 --> 00:01:23.759 -that means +00:01:21.440 --> 00:01:25.280 +and I'll get into what that means in a second. -00:01:23.759 --> 00:01:27.280 -in a second so +00:01:25.281 --> 00:01:28.479 +So the background that you should know -00:01:27.280 --> 00:01:28.640 -the background that you should know is +00:01:28.480 --> 00:01:30.000 +is that most of this code -00:01:28.640 --> 00:01:30.640 -that most of this code was written in - -00:01:30.640 --> 00:01:32.560 -the 90s +00:01:30.001 --> 00:01:32.560 +was written in the 90s. 00:01:32.560 --> 00:01:34.880 -Emacs lisp has only grown sort of - -00:01:34.880 --> 00:01:36.159 -official +Emacs Lisp has only grown sort of -00:01:36.159 --> 00:01:38.640 -object orientation support libraries +00:01:34.881 --> 00:01:38.640 +official object orientation support libraries 00:01:38.640 --> 00:01:41.200 -over the past 10 years or so - -00:01:41.200 --> 00:01:43.840 -from about 2010 to the present so what - -00:01:43.840 --> 00:01:44.799 -does - -00:01:44.799 --> 00:01:48.640 -news do so the basics of +over the past 10 years or so, -00:01:48.640 --> 00:01:50.560 -object orientation in most languages are +00:01:41.200 --> 00:01:42.799 +from about 2010 to the present. -00:01:50.560 --> 00:01:52.240 -you you define +00:01:42.800 --> 00:01:45.920 +So what does Gnus do? -00:01:52.240 --> 00:01:53.759 -a class of some sort and then you +00:01:45.921 --> 00:01:49.520 +So the basics of object orientation -00:01:53.759 --> 00:01:55.840 -instantiate that class and these +00:01:49.521 --> 00:01:50.560 +in most languages are: -00:01:55.840 --> 00:01:58.079 -class instances have two things they +00:01:50.560 --> 00:01:53.439 +you define a class of some sort, -00:01:58.079 --> 00:02:00.320 -have data attributes or +00:01:53.440 --> 00:01:55.040 +and then you instantiate that class. -00:02:00.320 --> 00:02:01.759 -slots or members or whatever you're +00:01:55.041 --> 00:01:57.920 +These class instances have two things: -00:02:01.759 --> 00:02:04.799 -going to call them and they have +00:01:57.921 --> 00:02:00.719 +they have data attributes (or slots, -00:02:04.799 --> 00:02:07.280 -methods which operate on individual +00:02:00.720 --> 00:02:01.680 +or members, or whatever -00:02:07.280 --> 00:02:08.399 -instances +00:02:01.681 --> 00:02:02.640 +you're going to call them), -00:02:08.399 --> 00:02:11.120 -so you could say that you create or +00:02:02.641 --> 00:02:05.600 +and they have methods -00:02:11.120 --> 00:02:12.879 -instantiate an instance of a class in +00:02:05.601 --> 00:02:08.399 +which operate on individual instances. -00:02:12.879 --> 00:02:13.920 -that instance +00:02:08.399 --> 00:02:10.239 +So you could say that -00:02:13.920 --> 00:02:16.239 -owns two things that owns its set of +00:02:10.240 --> 00:02:11.840 +you create or instantiate -00:02:16.239 --> 00:02:17.120 -attributes +00:02:11.841 --> 00:02:12.800 +an instance of a class, -00:02:17.120 --> 00:02:20.239 -and it owns some methods which +00:02:12.801 --> 00:02:14.800 +and that instance owns two things. -00:02:20.239 --> 00:02:23.280 -also work on the on the instance +00:02:14.801 --> 00:02:17.120 +That owns its set of attributes, -00:02:23.280 --> 00:02:26.720 -so both in nurse's existing code and in +00:02:17.120 --> 00:02:19.520 +and it owns some methods, -00:02:26.720 --> 00:02:29.040 -the more standard object oriented Emacs +00:02:19.521 --> 00:02:23.280 +which also work on the instance. -00:02:29.040 --> 00:02:30.080 -lisp libraries +00:02:23.280 --> 00:02:25.680 +Both in Gnus' existing code -00:02:30.080 --> 00:02:32.480 -this relationship is turned on its head +00:02:25.681 --> 00:02:28.560 +and in the more standard object-oriented -00:02:32.480 --> 00:02:34.080 -a little bit +00:02:28.561 --> 00:02:31.680 +Emacs Lisp libraries, this relationship -00:02:34.080 --> 00:02:37.599 -in that data slots and +00:02:31.681 --> 00:02:34.080 +is turned on its head a little bit, -00:02:37.599 --> 00:02:40.239 -uh and instance methods are defined +00:02:34.080 --> 00:02:39.599 +in that data slots and instance methods -00:02:40.239 --> 00:02:41.360 -outside of the +00:02:39.600 --> 00:02:41.760 +are defined outside of the class -00:02:41.360 --> 00:02:42.959 -class or the instances themselves so +00:02:41.761 --> 00:02:42.959 +or the instances themselves. 00:02:42.959 --> 00:02:45.040 -they are top level definitions +They are top-level definitions. 00:02:45.040 --> 00:02:46.879 -so we'll get to what that means in the +We'll get to what that means -00:02:46.879 --> 00:02:48.319 -in the newer libraries um +00:02:46.879 --> 00:02:48.720 +in the newer libraries in a bit, -00:02:48.319 --> 00:02:49.840 -in a bit but uh first I want to talk +00:02:48.721 --> 00:02:49.920 +but first I want to talk about -00:02:49.840 --> 00:02:51.760 -about how news does this and in order to +00:02:49.921 --> 00:02:51.280 +how Gnus does this. -00:02:51.760 --> 00:02:54.319 -do that we are going to go deep into +00:02:51.281 --> 00:02:52.160 +In order to do that, -00:02:54.319 --> 00:02:57.440 -the darkest corner of the new co source +00:02:52.161 --> 00:02:54.319 +we are going to go deep into -00:02:57.440 --> 00:02:59.879 -code tree to a library called +00:02:54.319 --> 00:02:55.760 +the darkest corner -00:02:59.879 --> 00:03:02.879 -nno.l very cryptically +00:02:55.761 --> 00:02:58.080 +of the Gnus source code tree -00:03:02.879 --> 00:03:05.040 -titled uh library and when we open it up +00:02:58.081 --> 00:03:01.440 +to a library called nnoo.el, -00:03:05.040 --> 00:03:06.800 -we find +00:03:01.441 --> 00:03:04.080 +very cryptically-titled library, -00:03:06.800 --> 00:03:09.519 -a library with no code comments and +00:03:04.081 --> 00:03:06.800 +and when we open it up, we find -00:03:09.519 --> 00:03:11.040 -almost no doc strings +00:03:06.800 --> 00:03:09.280 +a library with no code comments + +00:03:09.281 --> 00:03:11.040 +and almost no doc strings. 00:03:11.040 --> 00:03:12.800 -almost as if lars was a little ashamed +Almost as if Lars was a little ashamed-- 00:03:12.800 --> 00:03:14.159 -not ashamed but knew he was doing +not ashamed, but knew he was doing 00:03:14.159 --> 00:03:16.000 something a little bit crazy -00:03:16.000 --> 00:03:19.040 -and didn't want anyone to see so +00:03:16.000 --> 00:03:18.080 +and didn't want anyone to see. -00:03:19.040 --> 00:03:21.040 -this file contains the the object +00:03:18.081 --> 00:03:20.560 +So this file contains -00:03:21.040 --> 00:03:22.400 -oriented mechanism +00:03:20.561 --> 00:03:22.400 +the object-oriented mechanism -00:03:22.400 --> 00:03:24.480 -whereby you can define different kinds +00:03:22.400 --> 00:03:23.920 +whereby you can define -00:03:24.480 --> 00:03:25.760 -of back ends for news +00:03:23.921 --> 00:03:25.760 +different kinds of backends for Gnus, -00:03:25.760 --> 00:03:27.280 -and then those back ends can be +00:03:25.760 --> 00:03:26.799 +and then those backends -00:03:27.280 --> 00:03:29.760 -instantiated as individual +00:03:26.800 --> 00:03:30.879 +can be instantiated as individual servers. -00:03:29.760 --> 00:03:32.480 -servers and as you define these backends +00:03:30.880 --> 00:03:32.480 +As you define these backends, -00:03:32.480 --> 00:03:33.360 -you're supposed to use +00:03:32.480 --> 00:03:34.319 +you're supposed to use two macros, -00:03:33.360 --> 00:03:36.000 -two macros which you can see here one is +00:03:34.320 --> 00:03:35.680 +which you can see here. -00:03:36.000 --> 00:03:36.640 -called def +00:03:35.681 --> 00:03:37.280 +One is called defvoo, -00:03:36.640 --> 00:03:39.599 -vu and one is called defu and if you +00:03:37.281 --> 00:03:39.440 +and one is called deffoo. -00:03:39.599 --> 00:03:41.280 -look at the definitions the definitions +00:03:39.441 --> 00:03:40.400 +If you look at the definitions, -00:03:41.280 --> 00:03:43.280 -look pretty simple here def vu basically +00:03:40.401 --> 00:03:41.920 +the definitions look pretty simple. -00:03:43.280 --> 00:03:45.440 -turns into a def var +00:03:41.921 --> 00:03:45.440 +Here, defvoo basically turns into a defvar 00:03:45.440 --> 00:03:49.040 -and foo turns into a defund +and foo turns into a defun. 00:03:49.040 --> 00:03:52.239 -and along with those basic definitions +Along with those basic definitions, 00:03:52.239 --> 00:03:55.760 -the library also does some registration +the library also does some registration, 00:03:55.760 --> 00:03:58.720 -memoization caching of those variables - -00:03:58.720 --> 00:04:00.080 -it saves them in the structure - -00:04:00.080 --> 00:04:01.840 -for later use so that we know that those - -00:04:01.840 --> 00:04:03.360 -are meant to be - -00:04:03.360 --> 00:04:05.280 -uh attributes and methods that are used +memoization, caching of those variables. -00:04:05.280 --> 00:04:06.640 -with instances +00:03:58.720 --> 00:04:00.879 +It saves them in the structure for later use, -00:04:06.640 --> 00:04:08.000 -with server instances but you can see +00:04:00.880 --> 00:04:03.360 +so that we know that those are meant to be -00:04:08.000 --> 00:04:09.280 -that there's no server instance +00:04:03.360 --> 00:04:04.799 +attributes and methods -00:04:09.280 --> 00:04:10.560 -definition here there's no +00:04:04.800 --> 00:04:06.640 +that are used with instances, -00:04:10.560 --> 00:04:13.200 -like no nothing these are top level +00:04:06.640 --> 00:04:07.519 +with server instances. -00:04:13.200 --> 00:04:14.239 -these are top level +00:04:07.520 --> 00:04:08.159 +But you can see that -00:04:14.239 --> 00:04:18.160 -definitions so really data attributes +00:04:08.160 --> 00:04:10.000 +there's no server instance definition here. -00:04:18.160 --> 00:04:18.639 -for +00:04:10.001 --> 00:04:12.159 +There's no, like, no nothing. -00:04:18.639 --> 00:04:22.000 -new servers and +00:04:12.160 --> 00:04:14.799 +These are top-level definitions, -00:04:22.000 --> 00:04:23.840 -methods or functions that operate on +00:04:14.800 --> 00:04:20.239 +so really, data attributes for new servers -00:04:23.840 --> 00:04:25.440 -those instances are completely +00:04:20.240 --> 00:04:23.040 +and methods or functions -00:04:25.440 --> 00:04:28.400 -separate mechanisms they don't really +00:04:23.041 --> 00:04:24.639 +that operate on those instances -00:04:28.400 --> 00:04:29.600 -have anything to do with each other they +00:04:24.640 --> 00:04:27.840 +are completely separate mechanisms. -00:04:29.600 --> 00:04:31.680 -don't belong to the same data structures +00:04:27.841 --> 00:04:29.040 +They don't really have anything to do -00:04:31.680 --> 00:04:37.120 -so how do they work follow me +00:04:29.041 --> 00:04:29.520 +with each other. -00:04:37.120 --> 00:04:39.520 -aka methods and attributes these are all +00:04:29.521 --> 00:04:31.680 +They don't belong to the same data structures. -00:04:39.520 --> 00:04:41.360 -the things I just said +00:04:31.680 --> 00:04:34.080 +So how do they work? -00:04:41.360 --> 00:04:44.479 -so when you define a +00:04:34.081 --> 00:04:37.120 +Follow me. deffoo and defvoo, -00:04:44.479 --> 00:04:48.560 -a backend type +00:04:37.120 --> 00:04:38.960 +aka methods and attributes, -00:04:48.560 --> 00:04:51.199 -in noose what you get is this a +00:04:38.961 --> 00:04:41.360 +these are all the things I just said. -00:04:51.199 --> 00:04:52.400 -definition a list +00:04:41.360 --> 00:04:50.240 +So when you define a a backend type in Gnus, -00:04:52.400 --> 00:04:54.080 -and it'll say there is such a back end +00:04:50.241 --> 00:04:52.400 +what you get is this: a definition, a list. -00:04:54.080 --> 00:04:55.520 -as nnml +00:04:52.400 --> 00:04:55.520 +It'll say, there is such a backend as nnml, 00:04:55.520 --> 00:04:58.880 -and these are its uh data attributes +and these are its data attributes -00:04:58.880 --> 00:04:59.520 -that any +00:04:58.880 --> 00:05:01.039 +that any given instance can have, -00:04:59.520 --> 00:05:01.840 -given instance can have and then these +00:05:01.040 --> 00:05:04.720 +and then these are the functions or methods -00:05:01.840 --> 00:05:02.960 -are +00:05:04.721 --> 00:05:06.880 +that are defined to operate on -00:05:02.960 --> 00:05:04.960 -the functions or methods that are +00:05:06.880 --> 00:05:08.240 +an instance of this backend, -00:05:04.960 --> 00:05:06.880 -defined to operate on +00:05:08.241 --> 00:05:09.600 +so a server that belongs to -00:05:06.880 --> 00:05:08.960 -an instance of this backend so a server +00:05:09.601 --> 00:05:12.160 +the nnml backend. -00:05:08.960 --> 00:05:11.440 -that belongs to the nnml +00:05:12.161 --> 00:05:13.600 +So at least we have this data here. -00:05:11.440 --> 00:05:13.360 -backend so at least we have this data +00:05:13.601 --> 00:05:16.080 +That's handy. We don't really touch that. -00:05:13.360 --> 00:05:15.120 -here so that's that's handy we don't you +00:05:16.081 --> 00:05:19.600 +That's, like, very, very, very deep Gnus code -00:05:15.120 --> 00:05:16.880 -don't really touch that that's like very +00:05:19.601 --> 00:05:20.560 +that doesn't really come up -00:05:16.880 --> 00:05:18.000 -very very deep +00:05:20.560 --> 00:05:25.199 +even as a bug squasher or whatever. -00:05:18.000 --> 00:05:20.560 -um use code that doesn't really come up +00:05:25.200 --> 00:05:26.160 +We don't touch that very often, -00:05:20.560 --> 00:05:22.560 -even as a +00:05:26.161 --> 00:05:26.800 +but there they are, -00:05:22.560 --> 00:05:25.280 -even as a bug squasher or whatever we +00:05:26.801 --> 00:05:29.199 +and that's how they work. -00:05:25.280 --> 00:05:26.479 -don't touch that very often but there +00:05:29.200 --> 00:05:31.039 +Now the next thing that obviously -00:05:26.479 --> 00:05:27.280 -they are and that's +00:05:31.040 --> 00:05:32.080 +you want to know is, okay, -00:05:27.280 --> 00:05:30.400 -that's how they work now the next thing +00:05:32.080 --> 00:05:33.759 +where are... if I've started up Gnus, -00:05:30.400 --> 00:05:32.080 -that obviously you want to know is okay +00:05:33.760 --> 00:05:35.039 +where are my servers? -00:05:32.080 --> 00:05:34.000 -where are if I've started up news where +00:05:35.039 --> 00:05:36.880 +Where are these server objects, -00:05:34.000 --> 00:05:35.039 -are my servers +00:05:36.881 --> 00:05:40.479 +since this is object-oriented programming? -00:05:35.039 --> 00:05:37.199 -uh where are these server objects since +00:05:40.480 --> 00:05:41.520 +And the weird thing -00:05:37.199 --> 00:05:39.199 -this is object oriented +00:05:41.521 --> 00:05:43.759 +that you will eventually figure out -00:05:39.199 --> 00:05:41.840 -programming and the weird thing that you +00:05:43.760 --> 00:05:45.680 +(in some cases, after years of poking around) -00:05:41.840 --> 00:05:43.199 -will eventually +00:05:45.681 --> 00:05:46.880 +in the Gnus source code -00:05:43.199 --> 00:05:45.199 -figure out in some cases after years of +00:05:46.880 --> 00:05:48.880 +is that servers do not exist -00:05:45.199 --> 00:05:46.880 -poking around in the new source code +00:05:48.881 --> 00:05:51.360 +in an ontological, philosophical sense, -00:05:46.880 --> 00:05:49.199 -is that servers do not exist in an +00:05:51.361 --> 00:05:55.280 +as objects. The primary data structures of Gnus -00:05:49.199 --> 00:05:50.320 -ontological +00:05:55.281 --> 00:05:58.160 +are groups, and in sort of -00:05:50.320 --> 00:05:53.440 -philosophical sense as objects the +00:05:58.161 --> 00:06:00.560 +an object-oriented hierarchical mindset, -00:05:53.440 --> 00:05:55.440 -primary data structures of noose are +00:06:00.561 --> 00:06:03.039 +you'd think, well, groups belong to servers, -00:05:55.440 --> 00:05:57.039 -groups +00:06:03.040 --> 00:06:05.759 +so servers must exist, but they don't. -00:05:57.039 --> 00:05:58.960 -and in sort of an object-oriented +00:06:05.759 --> 00:06:07.840 +Each group... And here you can see -00:05:58.960 --> 00:06:00.720 -hierarchical you know mindset you'd - -00:06:00.720 --> 00:06:01.759 -think well - -00:06:01.759 --> 00:06:03.759 -groups belong to servers so servers must - -00:06:03.759 --> 00:06:05.759 -exist but they don't - -00:06:05.759 --> 00:06:08.000 -each group and here you can see some - -00:06:08.000 --> 00:06:09.360 -examples of groups +00:06:07.841 --> 00:06:09.360 +some examples of groups... 00:06:09.360 --> 00:06:11.199 -these are basically the data structures +These are basically the data structures -00:06:11.199 --> 00:06:13.039 -that represent a group each group also +00:06:11.199 --> 00:06:12.240 +that represent a group. -00:06:13.039 --> 00:06:14.960 -has a little entry here that +00:06:12.241 --> 00:06:14.160 +Each group also has a little entry here -00:06:14.960 --> 00:06:17.039 -that tells you what server it belongs to +00:06:14.161 --> 00:06:17.039 +that tells you what server it belongs to, -00:06:17.039 --> 00:06:18.000 -and each group +00:06:17.039 --> 00:06:20.080 +and each group replicates that data, -00:06:18.000 --> 00:06:20.479 -replicates that data uh saying which +00:06:20.081 --> 00:06:21.600 +saying which server it belongs to. -00:06:20.479 --> 00:06:23.120 -server it belongs to and so when +00:06:21.601 --> 00:06:24.000 +So when Gnus is going through -00:06:23.120 --> 00:06:24.479 -nurse is going through doing its +00:06:24.001 --> 00:06:25.280 +doing its business, -00:06:24.479 --> 00:06:26.160 -business uh trying to figure out what's +00:06:25.281 --> 00:06:27.039 +trying to figure out updating mail -00:06:26.160 --> 00:06:27.680 -like updating mail from the groups or +00:06:27.040 --> 00:06:28.479 +from the groups or whatever, -00:06:27.680 --> 00:06:29.840 -whatever almost every time +00:06:28.480 --> 00:06:30.960 +almost every time, it will cycle through -00:06:29.840 --> 00:06:31.600 -it will cycle through all the list of - -00:06:31.600 --> 00:06:32.960 -groups it'll +00:06:30.961 --> 00:06:32.960 +all the list of groups. 00:06:32.960 --> 00:06:34.960 -it'll look at all the server definitions - -00:06:34.960 --> 00:06:36.720 -and it will categorize the groups by +It'll look at all the server definitions, -00:06:36.720 --> 00:06:38.160 -server +00:06:34.960 --> 00:06:38.160 +and it will categorize the groups by server, -00:06:38.160 --> 00:06:41.120 -which which is just weird because you're +00:06:38.160 --> 00:06:40.000 +which is just weird, -00:06:41.120 --> 00:06:42.160 -sort of looking for okay where does the +00:06:40.001 --> 00:06:41.680 +because you're sort of looking for... -00:06:42.160 --> 00:06:43.840 -server exist it doesn't exist it's put +00:06:41.681 --> 00:06:42.720 +okay, where does the server exist? -00:06:43.840 --> 00:06:44.479 -together +00:06:42.721 --> 00:06:43.440 +It doesn't exist. -00:06:44.479 --> 00:06:48.319 -every time uh out of out of code +00:06:43.441 --> 00:06:46.240 +It's put together every time -00:06:48.319 --> 00:06:50.400 -elsewhere in the news code base +00:06:46.241 --> 00:06:50.400 +out of code elsewhere in the Gnus code base, -00:06:50.400 --> 00:06:51.840 -specifically from these group +00:06:50.400 --> 00:06:53.599 +specifically from these group definitions. -00:06:51.840 --> 00:06:54.080 -these group definitions and so this is +00:06:53.600 --> 00:06:54.479 +So this is very odd, -00:06:54.080 --> 00:06:55.199 -very odd because +00:06:54.480 --> 00:06:56.319 +because in some sense... -00:06:55.199 --> 00:06:58.080 -in in some sense like here this one its +00:06:56.320 --> 00:06:59.360 +Like here, this one, its server is nnml -00:06:58.080 --> 00:06:58.720 -server is +00:06:59.361 --> 00:07:01.680 +and an empty string, -00:06:58.720 --> 00:07:02.240 -nnml and an empty string so there's a +00:07:01.681 --> 00:07:02.880 +so there's a certain sense here -00:07:02.240 --> 00:07:03.919 -certain sense here in which this server +00:07:02.881 --> 00:07:04.720 +in which this server is not really -00:07:03.919 --> 00:07:04.479 -is not +00:07:04.721 --> 00:07:06.160 +an object at all. What it is -00:07:04.479 --> 00:07:06.400 -really an object at all what it is is a +00:07:06.161 --> 00:07:07.120 +is a set of instructions -00:07:06.400 --> 00:07:07.759 -set of instructions for how to find +00:07:07.121 --> 00:07:08.560 +for how to find messages, -00:07:07.759 --> 00:07:08.560 -messages +00:07:08.560 --> 00:07:10.319 +and this set of instructions is: -00:07:08.560 --> 00:07:11.199 -and this set of instructions is go to +00:07:10.320 --> 00:07:12.000 +go to the default place -00:07:11.199 --> 00:07:12.800 -the default place where the user +00:07:12.001 --> 00:07:14.000 +where the user might have their mail -00:07:12.800 --> 00:07:15.440 -might have their mail and expect to find +00:07:14.001 --> 00:07:16.319 +and expect to find messages there -00:07:15.440 --> 00:07:16.000 -messages +00:07:16.320 --> 00:07:18.479 +in an nnml format, which is basically -00:07:16.000 --> 00:07:18.080 -there in an nml format which is +00:07:18.480 --> 00:07:21.759 +just one message per file. -00:07:18.080 --> 00:07:19.840 -basically just one message per +00:07:21.760 --> 00:07:22.720 +Any number of groups could have -00:07:19.840 --> 00:07:22.479 -um per file and any number of groups +00:07:22.721 --> 00:07:24.400 +those same instructions, but they're not... -00:07:22.479 --> 00:07:23.840 -could have those same instructions uh - -00:07:23.840 --> 00:07:25.440 -but they're not it's not really a thing +00:07:24.401 --> 00:07:25.440 +It's not really a thing. 00:07:25.440 --> 00:07:26.720 -it's really just a +It's really just a... 00:07:26.720 --> 00:07:28.639 -it's more of a procedural instruction - -00:07:28.639 --> 00:07:30.240 -and on the other end of the spectrum you +It's more of a procedural instruction. -00:07:30.240 --> 00:07:31.919 -might have an nni map +00:07:28.639 --> 00:07:30.160 +On the other end of the spectrum, -00:07:31.919 --> 00:07:33.599 -server which very much is a thing it has +00:07:30.161 --> 00:07:32.240 +you might have an nnimap server, -00:07:33.599 --> 00:07:35.840 -its own it has its own server its own +00:07:32.241 --> 00:07:33.280 +which very much is a thing. -00:07:35.840 --> 00:07:37.759 -port its own authentication +00:07:33.281 --> 00:07:36.160 +It has its own server, its own port, -00:07:37.759 --> 00:07:40.240 -system so some of the servers are more +00:07:36.161 --> 00:07:38.960 +its own authentication system. -00:07:40.240 --> 00:07:41.360 -like things some of the servers are more +00:07:38.961 --> 00:07:40.639 +So some of the servers are more like things, -00:07:41.360 --> 00:07:42.400 -like instructions +00:07:40.640 --> 00:07:42.400 +some of the servers are more like instructions. 00:07:42.400 --> 00:07:45.520 -as news works right now um these +As Gnus works right now, 00:07:45.520 --> 00:07:47.280 most of the servers are treated like 00:07:47.280 --> 00:07:48.879 -just instruction sets +just instruction sets, 00:07:48.879 --> 00:07:50.879 -and and there's no place where you can +and there's no place where you can -00:07:50.879 --> 00:07:53.120 -go and find them there's no one central +00:07:50.880 --> 00:07:51.840 +go and find them. -00:07:53.120 --> 00:07:55.360 -uh variable that defines them all so how +00:07:51.841 --> 00:07:53.680 +There's no one central variable -00:07:55.360 --> 00:07:56.160 -do the +00:07:53.681 --> 00:07:56.160 +that defines them all. So how do the... -00:07:56.160 --> 00:07:57.520 -um so we'll talk about the methods in a +00:07:56.160 --> 00:07:57.759 +We'll talk about the methods in a second. -00:07:57.520 --> 00:07:59.520 -second how do the data attributes work +00:07:57.760 --> 00:07:59.520 +How do the data attributes work? 00:07:59.520 --> 00:08:02.639 -uh put very crudely um +Put very crudely, 00:08:02.639 --> 00:08:04.479 -your servers when they're put together +your servers, when they're put together, -00:08:04.479 --> 00:08:05.919 -uh they are okay they are +00:08:04.479 --> 00:08:06.879 +they are kept in a variable, -00:08:05.919 --> 00:08:08.080 -kept in a variable and it's called nno +00:08:06.880 --> 00:08:08.080 +and it's called nnoo 00:08:08.080 --> 00:08:08.960 nno diff --git a/2021/captions/emacsconf-2021-clede--clede-the-common-lisp-emacs-development-environment--fermin-mf--main.vtt b/2021/captions/emacsconf-2021-clede--clede-the-common-lisp-emacs-development-environment--fermin-mf--main.vtt new file mode 100644 index 00000000..7f4b8d30 --- /dev/null +++ b/2021/captions/emacsconf-2021-clede--clede-the-common-lisp-emacs-development-environment--fermin-mf--main.vtt @@ -0,0 +1,1244 @@ +00:00:01.040 --> 00:00:04.367 +Welcome, everyone, to this Emacs Conf 2021. + +00:00:04.467 --> 00:00:07.617 +My name is Fermin. I work as + +00:00:07.617 --> 00:00:09.717 +a Common Lisp engineer at RavenPack, + +00:00:09.817 --> 00:00:11.733 +and today I'm going to talk about + +00:00:11.833 --> 00:00:15.783 +CLEDE: the Common Lisp Emacs Development Environment. + +00:00:15.883 --> 00:00:19.400 +So what is CLEDE? + +00:00:19.500 --> 00:00:20.500 +So CLEDE is a project + +00:00:20.500 --> 00:00:22.017 +I've been working on this year + +00:00:22.117 --> 00:00:24.650 +for better... well, yeah... + +00:00:24.750 --> 00:00:27.117 +a better Common Lisp integration + +00:00:27.217 --> 00:00:30.317 +for static tools and + +00:00:30.417 --> 00:00:33.250 +for static and integrated Emacs tools. + +00:00:33.350 --> 00:00:35.367 +And to understand better what + +00:00:35.467 --> 00:00:37.650 +CLEDE is, one first has to understand + +00:00:37.750 --> 00:00:40.133 +the base that I use... + +00:00:40.233 --> 00:00:43.767 +so the foundation that I use for CLEDE. + +00:00:43.867 --> 00:00:46.050 +Um, so it is CEDET-- + +00:00:46.150 --> 00:00:47.417 +and specifically Semantic-- + +00:00:47.517 --> 00:00:49.733 +so we first have to talk about and + +00:00:49.833 --> 00:00:50.417 +understand what it is. + +00:00:50.517 --> 00:00:53.817 +So CEDET is a collection + +00:00:53.917 --> 00:00:55.183 +of Emacs development environment tools. + +00:00:55.283 --> 00:00:57.233 +It was created by Eric Ludlam + +00:00:57.333 --> 00:01:00.767 +(I hope to say that name right) + +00:01:00.867 --> 00:01:02.333 +in the late 90s, and + +00:01:02.433 --> 00:01:04.833 +the idea was to create entire IDE for Emacs. + +00:01:04.933 --> 00:01:10.433 +CEDET is still integrated into Emacs, + +00:01:10.533 --> 00:01:11.717 +and it has a lot of interesting things + +00:01:11.817 --> 00:01:14.033 +that are not used for too many people, + +00:01:14.133 --> 00:01:16.167 +so I'm going to explain some of those. + +00:01:16.267 --> 00:01:18.417 +First, let's go with the good ones that + +00:01:18.517 --> 00:01:21.233 +one that I use for CLEDE and that can + +00:01:21.333 --> 00:01:23.167 +be used for other projects as well. + +00:01:23.267 --> 00:01:28.450 +Some of the features that + +00:01:28.550 --> 00:01:32.450 +CEDET has is parse generators + +00:01:32.550 --> 00:01:35.217 +so we have Wisent and Bovine. + +00:01:35.317 --> 00:01:38.350 +Wisent is basically a Bison clone + +00:01:38.450 --> 00:01:40.200 +that was written in Emacs Lisp + +00:01:40.300 --> 00:01:43.117 +that you can also specify grammars. + +00:01:43.217 --> 00:01:45.617 +It's a really big and rather complex + +00:01:45.717 --> 00:01:47.350 +tool to work with, + +00:01:47.450 --> 00:01:49.183 +and it's secretly used for, as far as + +00:01:49.283 --> 00:01:51.667 +I know, two languages. + +00:01:51.767 --> 00:01:53.317 +They're not also well supported, + +00:01:53.417 --> 00:01:55.317 +but we'll get into that later. + +00:01:55.417 --> 00:01:58.133 +Also Bovine, which is a way more + +00:01:58.233 --> 00:01:59.867 +simple tool, like you can... + +00:01:59.967 --> 00:02:01.733 +you don't need grammar files, + +00:02:01.833 --> 00:02:07.350 +you can write just in plain Emacs Lisp. + +00:02:07.450 --> 00:02:10.917 +And you also have utilities to work with + +00:02:11.017 --> 00:02:16.550 +those generated tag trees, so to say. + +00:02:16.650 --> 00:02:23.533 +These are not AST parsers like real Bison; + +00:02:23.633 --> 00:02:25.617 +they are tag-based so they basically get + +00:02:25.717 --> 00:02:27.533 +tags and extract information from them, + +00:02:27.633 --> 00:02:30.083 +and I can use that information + +00:02:30.183 --> 00:02:31.000 +with Emacs Lisp + +00:02:31.000 --> 00:02:33.567 +to contextually understand better + +00:02:33.667 --> 00:02:36.267 +the language that you're parsing, + +00:02:36.367 --> 00:02:37.083 +but in general, + +00:02:37.183 --> 00:02:40.083 +this decision was made (as far as I know) + +00:02:40.183 --> 00:02:43.217 +because of the Emacs Lisp + +00:02:43.317 --> 00:02:44.217 +limitation of the time. + +00:02:44.317 --> 00:02:50.233 +So Emacs was a rather + +00:02:50.333 --> 00:02:52.167 +slower Lisp-- slow Lisp-- + +00:02:52.267 --> 00:02:55.850 +so they decide to just use + +00:02:55.950 --> 00:02:58.750 +tag-based thing instead of a parse-- + +00:02:58.850 --> 00:03:02.333 +I mean-- an AST-based one. + +00:03:02.433 --> 00:03:05.167 +And Semantic give you some utility with + +00:03:05.267 --> 00:03:06.250 +that as Senator, for example, give you + +00:03:06.350 --> 00:03:07.667 +some semantic navigation. + +00:03:07.767 --> 00:03:09.750 +So CEDET is way more than this, + +00:03:09.850 --> 00:03:12.433 +but this is not a CEDET talk. + +00:03:12.533 --> 00:03:13.983 +So if you want to get more information, + +00:03:14.083 --> 00:03:16.350 +you can go to the official webpage. + +00:03:16.450 --> 00:03:19.933 +I have to say that it is outdated, and + +00:03:20.033 --> 00:03:22.933 +Emacs changed some things over the years + +00:03:23.033 --> 00:03:24.067 +because CEDET was merged into Emacs + +00:03:24.167 --> 00:03:27.767 +in 2011, as far as I know. + +00:03:27.867 --> 00:03:30.417 +You can also go to the official Emacs + +00:03:30.517 --> 00:03:32.883 +documentation (the manual), which will get + +00:03:32.983 --> 00:03:35.317 +more information about every tool, + +00:03:35.417 --> 00:03:38.317 +but it's a really interesting thing, and + +00:03:38.417 --> 00:03:40.883 +I'm really sad that it is forgotten. + +00:03:40.983 --> 00:03:43.233 +So let's go with the bad things: + +00:03:43.333 --> 00:03:46.483 +that CEDET is an abandoned project. + +00:03:46.583 --> 00:03:48.217 +This has some benefits like it's not + +00:03:48.317 --> 00:03:50.550 +going to change that much, + +00:03:50.650 --> 00:03:52.367 +but it's, of course, not ideal. + +00:03:52.467 --> 00:03:56.833 +Most of the tooling that CEDET + +00:03:56.933 --> 00:03:58.100 +have right now are surpassed + +00:03:58.200 --> 00:03:59.633 +by other packages. + +00:03:59.733 --> 00:04:02.650 +And at first, I know Eric was working + +00:04:02.750 --> 00:04:07.467 +with C at the time so he totally has + +00:04:07.567 --> 00:04:10.533 +"real support" so you can use CEDET + +00:04:10.633 --> 00:04:13.033 +for other languages, but + +00:04:13.133 --> 00:04:15.383 +to work really like an IDE, more or less, + +00:04:15.483 --> 00:04:17.017 +it's all the... + +00:04:17.117 --> 00:04:19.517 +C is the only language supported, + +00:04:19.617 --> 00:04:21.667 +and maybe some simple C++, but that's it. + +00:04:21.767 --> 00:04:24.017 +It needs more documentation. + +00:04:24.117 --> 00:04:25.683 +People really don't know how to use it + +00:04:25.783 --> 00:04:28.583 +because, I have to say, rather complex + +00:04:28.683 --> 00:04:30.067 +to get a project working with it, + +00:04:30.167 --> 00:04:33.717 +and then make use of Semantic + +00:04:33.817 --> 00:04:36.667 +because [it] needs some maintenance and + +00:04:36.767 --> 00:04:38.567 +to update the code. + +00:04:38.667 --> 00:04:41.083 +But I will argue that even with these + +00:04:41.183 --> 00:04:44.383 +deficiencies, it's usable, and + +00:04:44.483 --> 00:04:47.517 +I use the foundation of base for + +00:04:47.617 --> 00:04:49.533 +parse infrastructure for other languages. + +00:04:49.633 --> 00:04:52.367 +I will say that with Common Lisp was + +00:04:52.467 --> 00:04:53.983 +rather easy because + +00:04:54.083 --> 00:04:56.033 +CEDET already have Emacs Lisp parser + +00:04:56.133 --> 00:04:57.900 +even though it's not great. + +00:04:58.000 --> 00:05:00.483 +It's easy to adapt and to use. + +00:05:00.583 --> 00:05:04.000 +It's not used in an Emacs + +00:05:04.100 --> 00:05:05.433 +right now because, well, + +00:05:05.533 --> 00:05:08.883 +Emacs know very well itself, + +00:05:08.983 --> 00:05:11.600 +but it's there. + +00:05:11.700 --> 00:05:17.583 +So these, of course, are static parsers + +00:05:17.683 --> 00:05:19.517 +so you don't need to run any + +00:05:19.617 --> 00:05:21.883 +other language-specific tools, which is + +00:05:21.983 --> 00:05:24.400 +an advantage for some things. + +00:05:24.500 --> 00:05:27.133 +And this was basically CEDET is, + +00:05:27.233 --> 00:05:30.283 +and I use the parse infrastructure + +00:05:30.383 --> 00:05:31.333 +and some tools + +00:05:31.433 --> 00:05:34.333 +to create a parser for Common Lisp. + +00:05:34.433 --> 00:05:36.700 +Well, more or less. *laughs* + +00:05:36.800 --> 00:05:37.900 +Let's go to details. + +00:05:38.000 --> 00:05:39.850 +So I will say that it's not a parser + +00:05:39.950 --> 00:05:42.433 +by itself because, as we all know, + +00:05:42.533 --> 00:05:44.500 +to parse a macro-based language + +00:05:44.600 --> 00:05:46.833 +is really hard. + +00:05:46.933 --> 00:05:48.450 +Mostly if you cannot have contextual + +00:05:48.550 --> 00:05:52.800 +information because if you create code + +00:05:52.900 --> 00:05:56.033 +at compile time or runtime is really hard + +00:05:56.133 --> 00:05:59.233 +if you don't have run time, right? + +00:05:59.333 --> 00:06:00.950 +Basically, CLEDE can be described + +00:06:01.050 --> 00:06:02.600 +as a Semantic extension. + +00:06:02.700 --> 00:06:03.867 +So basically it's like, + +00:06:03.967 --> 00:06:07.133 +you can have Semantic + +00:06:07.233 --> 00:06:09.817 +and use it with Common Lisp code + +00:06:09.917 --> 00:06:11.600 +and some Common Lisp Emacs tools. + +00:06:11.700 --> 00:06:17.350 +So Bison (which is not Bison) is + +00:06:17.450 --> 00:06:21.650 +Bovine, and Semantic and Senator + +00:06:21.750 --> 00:06:24.750 +for navigating tags, + +00:06:24.850 --> 00:06:26.367 +and then communication with SLIME, SLY, + +00:06:26.467 --> 00:06:28.733 +and inferior Lisp. + +00:06:28.833 --> 00:06:30.450 +That means... I will show that later, but + +00:06:30.550 --> 00:06:32.800 +basically, you can parse the buffer, + +00:06:32.900 --> 00:06:34.167 +get some tags, + +00:06:34.267 --> 00:06:35.967 +get information about the tags that you want, + +00:06:36.067 --> 00:06:38.017 +and then send some of that information + +00:06:38.117 --> 00:06:43.900 +to the SLIME, SLY, or inferior Lisp REPL buffer, + +00:06:44.000 --> 00:06:45.717 +so you can get both things + +00:06:45.817 --> 00:06:48.483 +at the same time. + +00:06:48.583 --> 00:06:50.217 +And given that it's a Lisp language, + +00:06:50.317 --> 00:06:53.300 +this can be pretty interesting. + +00:06:53.400 --> 00:06:57.600 +Also I wrote some common package integration, + +00:06:57.700 --> 00:06:59.217 +so even though there's not + +00:06:59.317 --> 00:07:00.300 +a Common Lisp standard, + +00:07:00.400 --> 00:07:05.100 +there's some libraries that are used + +00:07:05.200 --> 00:07:07.583 +by basically everyone. + +00:07:07.683 --> 00:07:09.417 +They're not part of the standard, + +00:07:09.517 --> 00:07:11.000 +but yeah. + +00:07:11.100 --> 00:07:13.900 +A lot of people use it: like `asdf`, + +00:07:14.000 --> 00:07:15.550 +which is the package manager, + +00:07:15.650 --> 00:07:18.967 +I will say it's [`asdf` is] the + +00:07:19.067 --> 00:07:21.783 +definition packages, so to say, + +00:07:21.883 --> 00:07:23.667 +better than packages itself + +00:07:23.767 --> 00:07:26.317 +and have more features. + +00:07:26.417 --> 00:07:28.383 +I wrote a nice integration with it + +00:07:28.483 --> 00:07:29.500 +and also `fiveam`, + +00:07:29.600 --> 00:07:34.417 +which is a well-known test package. + +00:07:34.517 --> 00:07:39.300 +I just wrote this as an example + +00:07:39.400 --> 00:07:41.883 +on how we can do with CLEDE. + +00:07:41.983 --> 00:07:43.633 +Let's look at the features, + +00:07:43.733 --> 00:07:46.267 +and then we go to a demo. + +00:07:51.367 --> 00:07:54.000 +You can go to the repository. + +00:07:54.100 --> 00:07:56.550 +Currently, it's not in Melpa + +00:07:56.650 --> 00:07:57.917 +although I wanted + +00:07:58.017 --> 00:08:01.250 +to merge it-- I mean, to add it-- + +00:08:01.450 --> 00:08:04.667 +to Melpa in the future. + +00:08:04.767 --> 00:08:06.367 +I want to clean the code and + +00:08:06.467 --> 00:08:07.417 +add some more features; + +00:08:07.517 --> 00:08:09.650 +I'm working on that and now + +00:08:09.750 --> 00:08:12.567 +like an eagle, so to say... + +00:08:12.667 --> 00:08:15.533 +but yeah, you can go here and then check + +00:08:15.633 --> 00:08:18.833 +all the features and test it. + +00:08:18.933 --> 00:08:20.733 +To install is pretty easy: + +00:08:20.833 --> 00:08:22.500 +just "add to path" thing. + +00:08:22.600 --> 00:08:23.650 +You don't need any external dependencies; + +00:08:23.750 --> 00:08:25.817 +everything's in Emacs. + +00:08:25.917 --> 00:08:28.467 +This was tested with Emacs 27, + +00:08:28.567 --> 00:08:29.883 +but probably going to work + +00:08:29.983 --> 00:08:32.750 +with Emacs 25 onwards so + +00:08:32.850 --> 00:08:34.267 +it shouldn't be any problem. + +00:08:34.367 --> 00:08:38.633 +So let's go with the features. + +00:08:38.733 --> 00:08:42.783 +This is some CEDET integrations, + +00:08:42.883 --> 00:08:44.417 +and first, like I said, it has + +00:08:44.517 --> 00:08:48.000 +support for SLY, SLIME, and inferior Lisp. + +00:08:48.100 --> 00:08:49.517 +If you are Common Lisp developer, you + +00:08:49.617 --> 00:08:52.267 +probably know a SLIME and a SLY, + +00:08:52.367 --> 00:08:53.483 +and inferior Lisp is basically + +00:08:53.583 --> 00:08:57.800 +just stock Emacs REPL. + +00:08:57.900 --> 00:09:00.817 +I support all three equally, so to say, + +00:09:00.917 --> 00:09:05.583 +and we have also `fiveam` integration, + +00:09:05.683 --> 00:09:08.867 +the ability to-- as I'm going to show later, + +00:09:08.967 --> 00:09:10.883 +you have the ability to send a test-- + +00:09:10.983 --> 00:09:16.233 +either packages or an entire suite of tests, + +00:09:16.333 --> 00:09:21.350 +and `asdf`, which currently I'm just + +00:09:21.450 --> 00:09:23.517 +supporting basic project navigation + +00:09:23.617 --> 00:09:25.433 +and some information, + +00:09:25.533 --> 00:09:28.517 +but it's a work-in-progress. + +00:09:28.617 --> 00:09:29.783 +I also have some general activities + +00:09:29.883 --> 00:09:31.917 +that are not directly related to CEDET + +00:09:32.017 --> 00:09:34.050 +but part of the CLEDE package, which + +00:09:34.150 --> 00:09:35.500 +is CLEDE highlight. + +00:09:35.600 --> 00:09:36.817 +It's highly inspired by the + +00:09:36.917 --> 00:09:41.167 +Emacs re-factor `erefactor`. + +00:09:41.267 --> 00:09:43.950 +Basically, you have some nice + +00:09:44.050 --> 00:09:47.883 +highlights for lint variables. + +00:09:47.983 --> 00:09:49.467 +I want to expand that to also + +00:09:49.567 --> 00:09:53.133 +support parameters and function stuff, + +00:09:53.233 --> 00:09:56.300 +but it's not a high priority for me. + +00:09:56.400 --> 00:09:58.117 +But yeah, I sometimes use this; + +00:09:58.217 --> 00:10:01.950 +it's pretty neat when you have a big lint. + +00:10:02.050 --> 00:10:05.333 +Also some refactoring utilities... + +00:10:05.433 --> 00:10:06.700 +some of those can be said + +00:10:06.800 --> 00:10:08.400 +that it's overlapped with some... + +00:10:08.500 --> 00:10:12.467 +because it is a string base, it doesn't + +00:10:12.567 --> 00:10:15.983 +have too much context information, + +00:10:16.083 --> 00:10:17.967 +but yeah, some sort of + +00:10:18.067 --> 00:10:22.167 +`replace-symbol-in-region` and `symbol-tag`. + +00:10:22.267 --> 00:10:23.867 +And then some CLEDE commands. + +00:10:23.967 --> 00:10:25.500 +This is the thing that I use all the time. + +00:10:25.600 --> 00:10:26.067 +It's like you're going to find + +00:10:26.167 --> 00:10:29.067 +some commands to send to a REPL. + +00:10:29.167 --> 00:10:31.367 +I will show some example, but basically, + +00:10:31.467 --> 00:10:32.983 +you have already an example. + +00:10:33.083 --> 00:10:34.333 +You define a list of commands, + +00:10:34.433 --> 00:10:37.867 +you put name, and then you put the + +00:10:37.967 --> 00:10:39.300 +Common Lisp code that you want to send. + +00:10:39.400 --> 00:10:41.550 +Given that, you're writing this + +00:10:41.650 --> 00:10:43.483 +Emacs Lisp in your configuration. + +00:10:43.583 --> 00:10:46.867 +You can have some runtime information + +00:10:46.967 --> 00:10:49.450 +when the code is sent, right? + +00:10:49.550 --> 00:10:53.450 +so insert, get a variable value, or whatever. + +00:10:53.550 --> 00:10:56.133 +OK, `imenu` integration. + +00:10:56.233 --> 00:10:58.967 +Yes, Semantic... + +00:10:59.067 --> 00:11:02.450 +CEDET has a great `imenu` utilities + +00:11:02.550 --> 00:11:05.600 +to have a better `imenu`. + +00:11:05.700 --> 00:11:10.383 +`imenu-list` also works really well. + +00:11:10.483 --> 00:11:12.917 +So you have better... when you go to a file + +00:11:13.017 --> 00:11:15.200 +that you don't fully know what is inside, + +00:11:15.300 --> 00:11:20.533 +it's better to navigate having like a tree. + +00:11:20.633 --> 00:11:22.383 +Yeah, this one's the thing is going + +00:11:22.483 --> 00:11:24.783 +to show that Senator, which is + +00:11:24.883 --> 00:11:26.633 +Semantic navigator, and then some + +00:11:26.733 --> 00:11:30.217 +Semantic-specific tools like `complete-jump`, + +00:11:30.317 --> 00:11:32.750 +which I don't use this one too much + +00:11:32.850 --> 00:11:35.300 +because we have SLY/SLIME, + +00:11:35.400 --> 00:11:39.083 +but they're there, so yeah. + +00:11:39.183 --> 00:11:41.433 +Like I said, Common Lisp library support, + +00:11:41.533 --> 00:11:44.333 +which is duplicated. + +00:11:44.433 --> 00:11:47.017 +OK, so let's go to the demo. + +00:11:47.117 --> 00:11:50.983 +Um. + +00:11:51.083 --> 00:11:53.567 +Let's go to the demo file. + +00:11:53.667 --> 00:11:55.300 +Right. + +00:11:55.400 --> 00:11:58.250 +First, we have to do is enable CLEDE. + +00:11:58.350 --> 00:11:59.433 +This is pretty easy: + +00:11:59.533 --> 00:12:03.400 +we call `clede-start`, right, + +00:12:03.500 --> 00:12:05.100 +and now it's started. + +00:12:05.200 --> 00:12:08.100 +CLEDE is not an asynchronous parser so + +00:12:08.200 --> 00:12:10.900 +Semantic (in this case, Bovine) is not. + +00:12:11.000 --> 00:12:15.917 +If the file is large, it may take some time. + +00:12:16.017 --> 00:12:16.017 +It shouldn't because we have + +00:12:16.117 --> 00:12:19.117 +powerful computers, but if your + +00:12:19.217 --> 00:12:21.917 +computer is not that powerful, + +00:12:22.017 --> 00:12:22.933 +it may take a while. + +00:12:23.033 --> 00:12:26.117 +To see the information that has been + +00:12:26.217 --> 00:12:31.167 +parsed, we're going to call `bovinate`. + +00:12:31.267 --> 00:12:33.767 +Oops... oops... + +00:12:33.867 --> 00:12:36.033 +Oh! I have to-- sorry... + +00:12:36.133 --> 00:12:43.267 +Let's enable Semantic again. + +00:12:43.367 --> 00:12:45.217 +Let's start... `bovinate`... + +00:12:45.317 --> 00:12:48.117 +OK, so... + +00:12:48.217 --> 00:12:49.917 +This is the information that + +00:12:50.017 --> 00:12:52.983 +currently CLEDE is taking from the buffer. + +00:12:53.083 --> 00:12:55.517 +So we can see it's taking this, and + +00:12:55.617 --> 00:12:58.550 +it doesn't know what it is, + +00:12:58.550 --> 00:13:02.167 +so this is the tag name... + +00:13:02.267 --> 00:13:02.850 +this is the type, + +00:13:02.950 --> 00:13:03.733 +and these are some information + +00:13:03.833 --> 00:13:05.750 +and the location. + +00:13:05.850 --> 00:13:08.150 +OK, so we know that this is a variable, + +00:13:08.250 --> 00:13:10.150 +and it has the full value. + +00:13:10.250 --> 00:13:13.233 +You know this is a package, right, + +00:13:13.333 --> 00:13:15.450 +because it's defined as a package. + +00:13:15.550 --> 00:13:18.100 +It doesn't understand what this is. + +00:13:18.300 --> 00:13:18.967 +This node is a function + +00:13:19.067 --> 00:13:19.817 +because of the `fun`, + +00:13:19.917 --> 00:13:23.133 +and some of this is code, + +00:13:23.233 --> 00:13:25.917 +and it also understands some tests + +00:13:26.017 --> 00:13:27.667 +because it has `fiveam` integration. + +00:13:27.767 --> 00:13:31.000 +If it detects that has some test here + +00:13:31.000 --> 00:13:34.517 +it will know that, indeed, it is test. + +00:13:34.517 --> 00:13:40.317 +So let's try some, first, `imenu`. + +00:13:40.417 --> 00:13:42.550 +So we can see here we have... + +00:13:42.650 --> 00:13:44.750 +I understand that this have + +00:13:44.850 --> 00:13:46.600 +some sort of `fiveam` switch + +00:13:46.700 --> 00:13:49.350 +and some tests defined. + +00:13:49.450 --> 00:13:51.000 +It understands this package, and + +00:13:51.100 --> 00:13:52.783 +it'll give you some variables-- `defuns`, + +00:13:52.883 --> 00:13:55.117 +and it also will give you some misc + +00:13:55.217 --> 00:13:59.917 +for things that doesn't know what it is. + +00:14:00.017 --> 00:14:00.983 +And you can also + +00:14:01.083 --> 00:14:04.417 +navigate with this-- like this `imenu`. + +00:14:06.000 --> 00:14:12.000 +So, um, let's go first with some Senator. + +00:14:12.000 --> 00:14:14.867 +So with Senator, we can navigate, + +00:14:14.967 --> 00:14:16.200 +go to the next stack, previous stack, + +00:14:16.300 --> 00:14:20.783 +all this, um, top-level `s-expression` + +00:14:20.883 --> 00:14:22.467 +are basically a tag, even though + +00:14:22.567 --> 00:14:28.467 +it's code... you can navigate, right. + +00:14:28.567 --> 00:14:31.333 +Um, copy/kill this or some other stuff. + +00:14:31.433 --> 00:14:34.017 +Um, some interesting thing that we can + +00:14:34.117 --> 00:14:38.717 +do is let's launch SLY, right. + +00:14:38.817 --> 00:14:44.317 +Um, let's load `fiveam`, + +00:14:44.417 --> 00:14:45.500 +and let's send some tests. + +00:14:45.600 --> 00:14:51.467 +We can say, OK, `clede-fiveam-send-current-test`, + +00:14:51.567 --> 00:14:53.033 +and it will-- OK, have to compile + +00:14:53.133 --> 00:14:54.750 +this file first. + +00:14:54.850 --> 00:14:55.983 +OK, you don't like this... + +00:14:56.083 --> 00:14:58.367 +you compile the tests. + +00:14:58.467 --> 00:15:03.667 +OK... um... well... + +00:15:03.767 --> 00:15:05.017 +I don't have-- yeah, I don't have + +00:15:05.117 --> 00:15:11.833 +the switch here so let's... + +00:15:11.933 --> 00:15:14.733 +OK, yeah because I guess it's getting... + +00:15:14.833 --> 00:15:19.583 +sorry about this... + +00:15:19.683 --> 00:15:22.983 +Let's say we're going to send this test... + +00:15:23.083 --> 00:15:28.667 +It isn't working... + +00:15:28.767 --> 00:15:36.967 +OK, why are you not working... + +00:15:37.067 --> 00:15:38.450 +maybe because we have to go + +00:15:38.550 --> 00:15:47.083 +to the package `fiveam`. + +00:15:47.183 --> 00:15:49.133 +Yes, sorry... um... + +00:15:49.233 --> 00:15:51.550 +Yeah, so we're gonna go here, and + +00:15:51.650 --> 00:15:54.117 +we can say `fiveam-send-tests`, + +00:15:54.217 --> 00:15:55.250 +and there we have it. + +00:15:55.350 --> 00:15:56.200 +It will send the test + +00:15:56.300 --> 00:16:00.217 +that we are currently in, right. + +00:16:00.317 --> 00:16:01.883 +So that's the thing. + +00:16:01.983 --> 00:16:04.000 +Another interesting thing that I said is + +00:16:04.000 --> 00:16:08.450 +`clede-highlight-minor-mode`. + +00:16:08.550 --> 00:16:11.567 +Basically, work in `let`'s context + +00:16:11.667 --> 00:16:13.450 +to know where to highlight + +00:16:13.550 --> 00:16:17.117 +all the variables, + +00:16:17.217 --> 00:16:20.217 +and we can disable. + +00:16:20.317 --> 00:16:21.833 +What else do we have? + +00:16:21.933 --> 00:16:24.100 +So we have framework integration. + +00:16:24.200 --> 00:16:25.900 +You can go `clede-` and + +00:16:26.000 --> 00:16:27.717 +see what more commands are. + +00:16:27.817 --> 00:16:29.767 +`commands-run` are basically a way + +00:16:29.867 --> 00:16:31.617 +to define commands, you have a variable, + +00:16:31.717 --> 00:16:35.317 +which is `clede-commands-list`. + +00:16:35.417 --> 00:16:37.233 +Let's explain that you can get + +00:16:37.333 --> 00:16:39.817 +some system working + +00:16:39.917 --> 00:16:42.617 +or whatever command you want, right. + +00:16:42.717 --> 00:16:46.083 +Also you have `asdf` basic integration. + +00:16:46.183 --> 00:16:48.067 +You can go to a definition file + +00:16:48.167 --> 00:16:51.050 +of some of the systems are already loaded. + +00:16:51.150 --> 00:16:53.667 +For example, let's go to here, + +00:16:53.767 --> 00:16:55.550 +and we go to the definition file-- + +00:16:55.650 --> 00:16:57.917 +there's the file, right? + +00:16:58.017 --> 00:16:59.000 +This is used because I'm sending + +00:16:59.100 --> 00:17:00.800 +commands for the REPL, so this + +00:17:00.900 --> 00:17:04.117 +functionality is not provided + +00:17:04.217 --> 00:17:09.167 +by CEDET or Semantic, + +00:17:09.267 --> 00:17:11.633 +but I can also get some sort + +00:17:11.733 --> 00:17:19.717 +of information for `asd` file, + +00:17:19.817 --> 00:17:21.550 +which is a work-in-progress, + +00:17:21.650 --> 00:17:23.100 +but you can go to some component file + +00:17:23.200 --> 00:17:24.150 +when you have a big `asd` file + +00:17:24.250 --> 00:17:25.200 +with lots of components + +00:17:25.300 --> 00:17:27.783 +and some other interesting thing. + +00:17:27.883 --> 00:17:30.283 +Like I said, that's a work-in-progress, + +00:17:30.383 --> 00:17:34.967 +Yes, so this is most of the functionality. + +00:17:35.067 --> 00:17:37.000 +The most interesting thing, I think, + +00:17:37.100 --> 00:17:40.267 +is the base for the foundation. + +00:17:40.367 --> 00:17:43.000 +So you can expand: let's go to source code, + +00:17:43.100 --> 00:17:48.333 +for example, that `fiveam`. + +00:17:48.433 --> 00:17:49.900 +So as we can see here, this is + +00:17:50.000 --> 00:17:53.433 +the `fiveam` integration, and to add it, + +00:17:53.533 --> 00:17:58.233 +I just define some new functions, + +00:17:58.333 --> 00:18:01.983 +and then you use this... + +00:18:02.083 --> 00:18:04.150 +set up a new form parser that we use + +00:18:04.250 --> 00:18:06.400 +to get some information + +00:18:06.500 --> 00:18:09.150 +about the `s-expression` top-level, + +00:18:09.250 --> 00:18:10.433 +and we define the names, + +00:18:10.533 --> 00:18:11.617 +we define information we want to take + +00:18:11.717 --> 00:18:13.700 +from the symbol and everything else. + +00:18:13.800 --> 00:18:17.133 +Also some [??] types + +00:18:17.233 --> 00:18:19.367 +that would be going to be added + +00:18:19.467 --> 00:18:21.067 +to the `imenu` thing: + +00:18:21.167 --> 00:18:24.033 +for example, `imenu test switch and test`. + +00:18:24.133 --> 00:18:27.317 +And then, these are, for example, + +00:18:27.417 --> 00:18:29.333 +some function to send information + +00:18:29.433 --> 00:18:33.483 +to the SLY, SLIME, or inferior Lisp + +00:18:33.583 --> 00:18:37.050 +depending on the Lisp that you're using. + +00:18:37.150 --> 00:18:39.400 +So I do not have more time. + +00:18:39.500 --> 00:18:40.367 +Sorry about that. + +00:18:40.467 --> 00:18:44.917 +Thank you very much. + +00:18:45.017 --> 00:18:46.383 +My name is Fermin. + +00:18:46.483 --> 00:18:49.733 +You can send me a mail in my mail, + +00:18:49.833 --> 00:18:51.233 +and that's my webpage. + +00:18:51.333 --> 00:18:54.950 +I hope you like it. diff --git a/2021/info/clede-schedule.md b/2021/info/clede-schedule.md index 5f327ba7..2bfe4d4f 100644 --- a/2021/info/clede-schedule.md +++ b/2021/info/clede-schedule.md @@ -10,7 +10,8 @@ If you have questions and the speaker has not indicated public contact informati # Talk [[!template id="vid" vidid="mainVideo" src="https://media.emacsconf.org/2021/emacsconf-2021-clede--clede-the-common-lisp-emacs-development-environment--fermin-mf--main.webm" poster="https://media.emacsconf.org/2021/emacsconf-2021-clede--clede-the-common-lisp-emacs-development-environment--fermin-mf--main.png" -size="39.8M" duration="18:55" other_resources="""[Download --compressed56.webm (24.6MB)](https://media.emacsconf.org/2021/emacsconf-2021-clede--clede-the-common-lisp-emacs-development-environment--fermin-mf--compressed56.webm) +size="39.8M" duration="18:55" captions="""""" other_resources="""[Download --compressed56.webm (24.6MB)](https://media.emacsconf.org/2021/emacsconf-2021-clede--clede-the-common-lisp-emacs-development-environment--fermin-mf--compressed56.webm) +[Download --main.vtt](emacsconf-2021-clede--clede-the-common-lisp-emacs-development-environment--fermin-mf--main.vtt) [View on Toobnix](https://toobnix.org/w/1HuHMank52gcpHqf4M7Sa5) """]] diff --git a/2021/talks/clede.md b/2021/talks/clede.md index 4a4229e0..59bb10f6 100644 --- a/2021/talks/clede.md +++ b/2021/talks/clede.md @@ -10,13 +10,6 @@ Fermin MF [[!inline pages="internal(2021/info/clede-schedule)" raw="yes"]] -[[!template id="help" tags="help_with_main_captions" -summary="main talk does not have captions" -volunteer="Hannah Miller 2021-12-22" -message="""This talk does not have captions yet. Would you like to help [caption this talk](/captioning/)? You may be able to start with these -[autogenerated captions](https://media.emacsconf.org/2021/emacsconf-2021-clede--clede-the-common-lisp-emacs-development-environment--fermin-mf--main.vtt) -and [timing information](https://media.emacsconf.org/2021/emacsconf-2021-clede--clede-the-common-lisp-emacs-development-environment--fermin-mf.en.srv2)."""]] - I've been developing a package that helps with the development of Common Lisp's software, it's uses the internal semantic framework, it has a custom reader -- cgit v1.2.3