diff options
Diffstat (limited to '')
-rw-r--r-- | 2023/captions/emacsconf-2023-emacsen--the-emacsen-family-the-design-of-an-emacs-and-the-importance-of-lisp--fermin--main.vtt | 1079 |
1 files changed, 1079 insertions, 0 deletions
diff --git a/2023/captions/emacsconf-2023-emacsen--the-emacsen-family-the-design-of-an-emacs-and-the-importance-of-lisp--fermin--main.vtt b/2023/captions/emacsconf-2023-emacsen--the-emacsen-family-the-design-of-an-emacs-and-the-importance-of-lisp--fermin--main.vtt new file mode 100644 index 00000000..b078c281 --- /dev/null +++ b/2023/captions/emacsconf-2023-emacsen--the-emacsen-family-the-design-of-an-emacs-and-the-importance-of-lisp--fermin--main.vtt @@ -0,0 +1,1079 @@ +WEBVTT captioned by sachac, checked by sachac + +NOTE Introduction + +00:00:00.000 --> 00:00:03.199 +Hello, my name is Fermin. + +00:00:03.200 --> 00:00:06.959 +Today, I'm going to talk about the Emacsen family, + +00:00:06.960 --> 00:00:11.159 +the design of an Emacs, and the importance of Lisp. + +00:00:11.160 --> 00:00:13.519 +So we're going to talk about Lisp. + +00:00:13.520 --> 00:00:16.999 +I want to start from the end. + +NOTE Why Lisp matters + +00:00:17.000 --> 00:00:19.039 +The first question I want to ask is + +00:00:19.040 --> 00:00:21.399 +why I think Lisp matters. + +00:00:21.400 --> 00:00:22.879 +When I'm talking about Lisp here, + +00:00:22.880 --> 00:00:27.559 +I'm talking about the idea of Lisp, + +00:00:27.560 --> 00:00:30.119 +so the family of languages that are Lisp. + +00:00:30.120 --> 00:00:34.719 +But given that there's no formal specification of Lisp, + +00:00:34.720 --> 00:00:40.599 +so the opinion might vary. I will expect that Lisp, + +00:00:40.600 --> 00:00:44.439 +most of the Lisp have these kind of features. + +00:00:44.440 --> 00:00:46.239 +The first one is homoiconic: + +00:00:46.240 --> 00:00:49.799 +the code is data, basically. + +00:00:49.800 --> 00:00:52.559 +They also have a REPL: read-eval-print loop. + +00:00:52.560 --> 00:00:57.759 +That is very powerful and can help in development. + +00:00:57.760 --> 00:01:00.359 +Also, I think a good Lisp + +00:01:00.360 --> 00:01:03.319 +should have a powerful macro system. + +00:01:03.320 --> 00:01:05.759 +I'm good with compile-time macros, + +00:01:05.760 --> 00:01:07.599 +but read-time is also interesting. + +00:01:07.600 --> 00:01:10.279 +There's a lot of Lisp that you can choose. + +00:01:10.280 --> 00:01:11.999 +There's the main three ones, of course, + +00:01:12.000 --> 00:01:13.839 +with Scheme, Common Lisp, and Clojure. + +00:01:13.840 --> 00:01:19.674 +Scheme by Guile, Common Lisp by Common Lisp, + +00:01:19.675 --> 00:01:26.639 +and Clojure by Clojure or ClojureScript. + +NOTE Why Emacs Lisp was chosen + +00:01:26.640 --> 00:01:28.079 +So let's talk about Emacs Lisp. + +00:01:28.080 --> 00:01:29.679 +I didn't mention Emacs Lisp. + +00:01:29.680 --> 00:01:32.519 +I'm going to talk about why Emacs Lisp + +00:01:32.520 --> 00:01:35.599 +was chosen for an Emacs editor. + +00:01:35.600 --> 00:01:39.159 +We're going to explore this kind of design of the Emacs. + +00:01:39.160 --> 00:01:42.279 +And Emacs Lisp is the main language of it. Why? + +00:01:42.280 --> 00:01:44.959 +Given that there were a few alternatives at the time, + +00:01:44.960 --> 00:01:48.159 +why Emacs Lisp was chosen? + +00:01:48.160 --> 00:01:51.919 +So RMS, Richard Stallman, needed a Lisp, + +00:01:51.920 --> 00:01:54.279 +and there wasn't one available at the time. + +00:01:54.280 --> 00:01:57.039 +Keep in mind, this was the early 80s. + +00:01:57.040 --> 00:02:03.240 +Stallman was writing at that point the GCC, I think, + +00:02:03.241 --> 00:02:07.974 +and he was writing the core components + +00:02:07.975 --> 00:02:10.440 +of what is going to become GNU. + +00:02:10.441 --> 00:02:15.499 +He needed an editor. He wanted Lisp. He wanted Emacs. + +00:02:15.500 --> 00:02:20.280 +So he wrote Emacs Lisp. So at that time, + +00:02:20.281 --> 00:02:24.599 +the functionality was more important than "perfection." + +00:02:24.600 --> 00:02:26.639 +What I mean [by] "perfection" is: we programmers + +00:02:26.640 --> 00:02:33.359 +sometimes like to make everything good + +00:02:33.360 --> 00:02:36.479 +or very, very good when sometimes, indeed, + +00:02:36.480 --> 00:02:39.119 +it's more important that it works + +00:02:39.120 --> 00:02:42.919 +to do the task that it should. + +00:02:42.920 --> 00:02:44.199 +And it's not a bad language. + +00:02:44.200 --> 00:02:50.239 +It's not that bad. At that time, it was mostly nice. + +00:02:50.240 --> 00:02:54.840 +Today, it's good enough, I think. + +NOTE Other "Emacsen" + +00:02:54.841 --> 00:02:59.460 +He wasn't the first one, the GNU Emacs, + +00:02:59.461 --> 00:03:02.540 +nor the only one, of course. + +00:03:02.541 --> 00:03:06.439 +There were others: Hemlock, Zmacs, and Climacs... + +00:03:06.440 --> 00:03:08.980 +Two of them, I think, were written in Common Lisp, + +00:03:08.981 --> 00:03:14.479 +and Zmacs was written in a Lisp from a Lisp machine, + +00:03:14.480 --> 00:03:16.639 +so it was an implementation of Emacs. + +00:03:16.640 --> 00:03:19.039 +Not GNU Emacs, but the original idea + +00:03:19.040 --> 00:03:22.079 +of Emacs for a Lisp machine. + +00:03:22.080 --> 00:03:23.759 +So Hemlock was written in Common Lisp, + +00:03:23.760 --> 00:03:26.079 +but it's no longer used and no longer developed, + +00:03:26.080 --> 00:03:28.999 +as far as I know. And Climacs, it was developed, + +00:03:29.000 --> 00:03:31.519 +but it was abandoned, I think. + +00:03:31.520 --> 00:03:33.639 +So three of them failed for different reasons. + +00:03:33.640 --> 00:03:37.879 +Zmacs was because of the Lisp machine market crash, + +00:03:37.880 --> 00:03:38.580 +and yeah, it also failed. + +NOTE Why not Common Lisp? + +00:03:38.581 --> 00:03:44.039 +So Emacs got alone. And in the 90s, interesting to explore, + +00:03:44.040 --> 00:03:46.479 +some people suggest that why + +00:03:46.480 --> 00:03:49.679 +now that we have a standard Lisp, right, + +00:03:49.680 --> 00:03:52.559 +because Common Lisp was standardized in '94, + +00:03:52.560 --> 00:03:56.719 +why don't we change Emacs Lisp to Common Lisp? + +00:03:56.720 --> 00:03:58.999 +These are the other reasons I think are important, + +00:03:59.000 --> 00:04:01.159 +because that's why Stallman didn't choose Common Lisp. + +00:04:01.160 --> 00:04:02.039 +But I think the main one + +00:04:02.040 --> 00:04:03.759 +that I didn't write here + +00:04:03.760 --> 00:04:09.039 +is that Stallman wasn't a big fan of Common Lisp, + +00:04:09.040 --> 00:04:12.679 +and he was at the time the main developer + +00:04:12.680 --> 00:04:14.040 +and maintainer, of course, for Emacs. + +00:04:14.041 --> 00:04:16.439 +So he chose not to move to Common Lisp. + +00:04:16.440 --> 00:04:18.479 +But other reasons may be why... + +00:04:18.480 --> 00:04:22.919 +Because he had a late and painful standardization. + +00:04:22.920 --> 00:04:28.039 +Keep in mind, the first book that Guy Steele wrote + +00:04:28.040 --> 00:04:32.239 +was in 1984. The standardization finished in 19-- + +00:04:32.240 --> 00:04:38.279 +sorry, in 1984 was the first book + +00:04:38.280 --> 00:04:44.420 +and the standardization finished in 1994. + +00:04:44.421 --> 00:04:48.119 +So, like, 10 years of difference from one to the other. + +00:04:48.120 --> 00:04:51.879 +10 years of a lot of talk, a lot of money, + +00:04:51.880 --> 00:04:56.399 +and a lot of pain probably. + +00:04:56.400 --> 00:04:59.199 +The Lisp usage declined in the 90s + +00:04:59.200 --> 00:05:00.959 +due to the AI winter. + +00:05:00.960 --> 00:05:03.359 +We all know about the Lisp machine market crash. + +00:05:03.360 --> 00:05:08.839 +And the failure of commercial Lisp machine was + +00:05:08.840 --> 00:05:12.239 +inevitable at that point. + +00:05:12.240 --> 00:05:17.160 +So all the potential Emacs friends died. + +00:05:17.161 --> 00:05:21.279 +And also a lot of Emacs Lisp was already available. + +00:05:21.280 --> 00:05:24.559 +Emacs was already an amateur utility. + +00:05:24.560 --> 00:05:29.959 +Unix won the war of the operating system, as we know, + +00:05:29.960 --> 00:05:33.839 +and Emacs Lisp was available in Unix, + +00:05:33.840 --> 00:05:36.919 +or in GNU/Linux, as we know, + +00:05:36.920 --> 00:05:40.479 +which is the most successful implementation of Unix. + +00:05:40.480 --> 00:05:44.207 +Sorry, BSD. Okay. + +00:05:44.208 --> 00:05:48.399 +So Emacs won by being the "better" alternative. + +00:05:48.400 --> 00:05:49.999 +I'm quoting "better" here because + +00:05:50.000 --> 00:05:53.699 +I think Emacs does have a better design + +00:05:53.700 --> 00:05:56.959 +and, well, it was the one that survived, right? + +00:05:56.960 --> 00:06:00.039 +Which is the more important thing for a software or, + +00:06:00.040 --> 00:06:05.159 +you know... So Emacs won by being free, + +00:06:05.160 --> 00:06:08.399 +also in price, which I think the Lisp machine wasn't. + +00:06:08.400 --> 00:06:11.519 +So that was also very good. It was included. + +00:06:11.520 --> 00:06:14.559 +It had, and it still has, of course, + +00:06:14.560 --> 00:06:15.879 +a nice collection of packages + +00:06:15.880 --> 00:06:20.679 +that improve the standard functionality. + +00:06:20.680 --> 00:06:23.479 +It was easy to extend because of the nature of Lisp. + +00:06:23.480 --> 00:06:26.039 +And it has a very good integration with GNU/Linux, + +00:06:26.040 --> 00:06:29.399 +of course. It was created to write it. + +00:06:29.400 --> 00:06:31.079 +It makes sense that it's very good + +00:06:31.080 --> 00:06:39.119 +for a system administration perspective. + +NOTE Common Lisp is still not dead or is always dead + +00:06:39.120 --> 00:06:43.319 +But I think Common Lisp is not dead yet. + +00:06:43.320 --> 00:06:45.719 +Or some people say that it's always dead, + +00:06:45.720 --> 00:06:48.399 +so you cannot kill the something that is always dead. + +00:06:48.400 --> 00:06:50.719 +So I don't always code in C, + +00:06:50.720 --> 00:06:54.199 +but when I do, it's Lisp. I'm not a big fan of C + +00:06:54.200 --> 00:06:58.599 +for a lot of things, but yeah. + +00:06:58.600 --> 00:07:02.439 +Why I think Common Lisp is still relevant + +00:07:02.440 --> 00:07:05.399 +and can be used for all kind of application, + +00:07:05.400 --> 00:07:09.279 +both commercially and non-commercially. + +00:07:09.280 --> 00:07:11.839 +The first one is the main implementation + +00:07:11.840 --> 00:07:16.799 +of Common Lisp, which is called SBCL, which is awesome. + +00:07:16.800 --> 00:07:19.399 +It's fast. It's a very good extension. + +00:07:19.400 --> 00:07:21.639 +Basically, it's the reference one today. + +00:07:21.640 --> 00:07:25.559 +The namespaces of common Lisp, + +00:07:25.560 --> 00:07:26.879 +I really like the implementation. + +00:07:26.880 --> 00:07:28.719 +Some people don't like it. It's a matter of taste. + +00:07:28.720 --> 00:07:29.639 +But I think it's really good. + +00:07:29.640 --> 00:07:32.919 +I have a timeless standard. So it was standardized + +00:07:32.920 --> 00:07:35.979 +in the 90s, as I said. + +00:07:35.980 --> 00:07:38.880 +And it doesn't really need a new standard. + +00:07:38.881 --> 00:07:44.119 +Some people say it does need, but I don't think so. + +00:07:44.120 --> 00:07:45.999 +Also it does have macro readers, + +00:07:46.000 --> 00:07:49.159 +which I think is a very nice feature of Common Lisp + +00:07:49.160 --> 00:07:51.239 +that other Lisp doesn't seem to have, + +00:07:51.240 --> 00:07:56.719 +or a lot of them don't: in my mind, Emacs Lisp and Clojure. + +00:07:56.720 --> 00:07:58.199 +Also, it's image-based development, + +00:07:58.200 --> 00:08:00.399 +which is also quite unique to Common Lisp. + +00:08:00.400 --> 00:08:04.359 +I don't know all the Lisp that does have this. + +00:08:04.360 --> 00:08:05.359 +Basically, you develop a REPL + +00:08:05.360 --> 00:08:10.159 +and then you dump the entire REPL into an image. + +00:08:10.160 --> 00:08:12.079 +Java would be like a core dump. + +00:08:12.080 --> 00:08:14.159 +And you create an executable. + +00:08:14.160 --> 00:08:17.159 +Which at the time, I guess in the 90s, + +00:08:17.160 --> 00:08:18.199 +was a huge one, right? + +00:08:18.200 --> 00:08:20.679 +Because you have the entire language, and the REPL, + +00:08:20.680 --> 00:08:23.799 +and the code. But today are like 20 MB, + +00:08:23.800 --> 00:08:26.599 +which in today's standard is nothing. + +00:08:26.600 --> 00:08:30.079 +There's pictures in your phone larger than 20 MB. + +NOTE Lem is a nice Emacsen implementation + +00:08:30.080 --> 00:08:39.239 +So there's a new Emacs in town--well, Emacs, not Emacs, + +00:08:39.240 --> 00:08:43.439 +Which is Lem. I think it's a very good Emacs implementation. + +00:08:43.440 --> 00:08:46.679 +What I mean by "Emacs" here is not a clone of GNU Emacs, + +00:08:46.680 --> 00:08:51.559 +but an Emacs-inspired editor with similar characteristics, + +00:08:51.560 --> 00:08:53.519 +and written in a Lisp, + +00:08:53.520 --> 00:08:58.259 +which is why I said that Lisp was very important. + +NOTE Why not just use GNU Emacs? + +00:08:58.260 --> 00:09:01.559 +So first, I'm going to address the elephant in the room, + +00:09:01.560 --> 00:09:05.039 +and the question that maybe most + +00:09:05.040 --> 00:09:06.159 +of you are now thinking. + +00:09:06.160 --> 00:09:12.919 +Why not just use GNU Emacs? It's the project. + +00:09:12.920 --> 00:09:15.759 +It's the main one, right? Why choose another one? + +00:09:15.760 --> 00:09:18.199 +So Lem is relatively new, 2018. + +00:09:18.200 --> 00:09:20.199 +And it can explore different ideas. + +00:09:20.200 --> 00:09:21.679 +It was developed by Sasaki-san. + +00:09:21.680 --> 00:09:26.719 +Basically, it was mostly a one-month project, + +00:09:26.720 --> 00:09:31.940 +but we are getting there. I'm not the maintainer. + +00:09:31.941 --> 00:09:36.959 +I'm a developer of Lem. So given that it's + +00:09:36.960 --> 00:09:39.239 +relatively new, it can explore different ideas. + +00:09:39.240 --> 00:09:43.519 +You're not bound to a community or backwards compatibility. + +00:09:43.520 --> 00:09:45.439 +You can explore different ideas, + +00:09:45.440 --> 00:09:46.199 +and I think that's always nice. + +00:09:46.200 --> 00:09:49.839 +Having multiple options creates competition, + +00:09:49.840 --> 00:09:52.639 +which benefits the community. So Emacs and Vim, + +00:09:52.640 --> 00:09:54.839 +the competition between the two + +00:09:54.840 --> 00:09:59.119 +always create nice packages like evil or, you know... + +00:09:59.120 --> 00:10:03.719 +It's really good to have some kind of a competition, + +00:10:03.720 --> 00:10:06.159 +healthy competition. + +00:10:06.160 --> 00:10:08.199 +And it doesn't share any code base with GNU Emacs. + +00:10:08.200 --> 00:10:12.879 +I want to clarify this because some people think that + +00:10:12.880 --> 00:10:16.119 +Lem is kind of a, you know, Spacemacs or Doom. + +00:10:16.120 --> 00:10:19.959 +No, it doesn't share any code. + +00:10:19.960 --> 00:10:27.759 +It has zero Emacs. So that's it. + +00:10:27.760 --> 00:10:29.199 +Getting this out of the way. + +00:10:29.200 --> 00:10:31.079 +Why I think Lem is interesting. + +NOTE Why Lem + +00:10:31.080 --> 00:10:32.359 +I'm going to show why Lem. + +00:10:32.360 --> 00:10:37.759 +Why? You can try Lem, and maybe you like it. + +00:10:37.760 --> 00:10:41.319 +First thing, these are the features + +00:10:41.320 --> 00:10:42.799 +that I really like from it. + +00:10:42.800 --> 00:10:45.574 +Can be different from person to person, + +00:10:45.575 --> 00:10:48.279 +but I think these are the main ideas + +00:10:48.280 --> 00:10:49.999 +it brings to the table and are really interesting. + +00:10:50.000 --> 00:10:53.119 +I want to say that Lem is not a research project. + +00:10:53.120 --> 00:10:55.719 +It's not like some people did that + +00:10:55.720 --> 00:10:57.239 +and it's still in development. No, no. + +00:10:57.240 --> 00:11:00.039 +This is a usable product that can be used + +00:11:00.040 --> 00:11:02.039 +to [do] day-to-day programming + +00:11:02.040 --> 00:11:04.559 +in a very good experience. + +00:11:04.560 --> 00:11:06.279 +This is not like--I want to clarify this + +00:11:06.280 --> 00:11:08.719 +because some people bring some exploratory projects. + +00:11:08.720 --> 00:11:10.799 +This is not that one. This is finished. + +00:11:10.800 --> 00:11:14.719 +Well, finished in the way that you can use it. + +00:11:14.720 --> 00:11:17.799 +It's not, you know, have everything in place. + +00:11:17.800 --> 00:11:20.639 +So let's continue. + +00:11:20.640 --> 00:11:22.159 +It's written 100% in Common Lisp. + +00:11:22.160 --> 00:11:23.839 +I say this because Emacs is not + +00:11:23.840 --> 00:11:26.279 +100% in Emacs Lisp. + +00:11:26.280 --> 00:11:28.359 +You have to modify the C code, + +00:11:28.360 --> 00:11:31.839 +I think, well, if you... You don't have to, + +00:11:31.840 --> 00:11:33.999 +but if you want to change the internals, you do. + +00:11:34.000 --> 00:11:38.879 +I think that given that Lem does not care + +00:11:38.880 --> 00:11:41.199 +about the implementation of the language itself-- + +00:11:41.200 --> 00:11:44.039 +so for example, Lem doesn't have to deal with + +00:11:44.040 --> 00:11:48.199 +how Common Lisp works, it just used the language, right? + +00:11:48.200 --> 00:11:50.799 +It's on top of the language. + +00:11:50.800 --> 00:11:53.879 +You can say that. Emacs Lisp is Emacs and Emacs Lisp, + +00:11:53.880 --> 00:11:56.079 +so you have to, you have both in the same place, + +00:11:56.080 --> 00:12:00.319 +which is, well, it's a double-edged sword, right? + +00:12:00.320 --> 00:12:03.319 +Then you have the both--similar to Emacs-- + +00:12:03.320 --> 00:12:05.639 +you have ncurses and SDL2 frontends. + +00:12:05.640 --> 00:12:08.719 +One is terminal-based and the other is graphical + +00:12:08.720 --> 00:12:10.399 +using the SDL2 library, + +00:12:10.400 --> 00:12:13.759 +which you can do a lot of crazy things. + +00:12:13.760 --> 00:12:16.159 +Of course, it's meant to program games and stuff, + +00:12:16.160 --> 00:12:19.679 +but Lem uses, and it works fairly well. + +00:12:19.680 --> 00:12:21.879 +You can program games if you want. + +00:12:21.880 --> 00:12:27.559 +Not that you need to or anything, but we have Tetris. + +00:12:27.560 --> 00:12:28.999 +So there's that. + +00:12:29.000 --> 00:12:31.719 +Also, separate front-end interface. + +00:12:31.720 --> 00:12:34.159 +So like I said, you have two, but you can create more. + +00:12:34.160 --> 00:12:36.439 +In the past, had an electron one, + +00:12:36.440 --> 00:12:41.319 +but it got abandoned for obvious reasons, I think. Sorry. + +00:12:41.320 --> 00:12:45.839 +This idea is taken from Neovim that had a lot of frontends. + +00:12:45.840 --> 00:12:48.119 +In fact, we don't have that many, + +00:12:48.120 --> 00:12:49.639 +but not that many people we have two. + +00:12:49.640 --> 00:12:51.674 +That works fairly well. + +00:12:51.675 --> 00:12:56.679 +We have superb development experience thanks to SLIME. + +00:12:56.680 --> 00:13:01.319 +So we have Micro, + +00:13:01.320 --> 00:13:04.039 +which is a SLIME version for Lem, basically. + +00:13:04.040 --> 00:13:08.999 +SLIME is awesome and Micro is also awesome. + +00:13:09.000 --> 00:13:12.319 +We have a very strong development experience + +00:13:12.320 --> 00:13:15.399 +that we don't have for a Lisp, + +00:13:15.400 --> 00:13:17.399 +which I think is very important. + +00:13:17.400 --> 00:13:20.319 +If you want someone to develop packages or to use your tool, + +00:13:20.320 --> 00:13:22.719 +your Emacs at least, + +00:13:22.720 --> 00:13:28.759 +you need to have a very good development experience, + +00:13:28.760 --> 00:13:34.039 +which enhance the extensions for the editor. + +00:13:34.040 --> 00:13:36.719 +So we have also Vim-like integration. + +00:13:36.720 --> 00:13:39.399 +This for me was mostly mandatory + +00:13:39.400 --> 00:13:44.439 +because I'm an evil-mode user, and I think it's really good. + +00:13:44.440 --> 00:13:49.479 +Because evil-mode is very good and the VMode, + +00:13:49.480 --> 00:13:51.719 +which it's called, even though it's more like Vim mode, + +00:13:51.720 --> 00:13:54.159 +it's called VMode. It's written by + +00:13:54.160 --> 00:13:59.159 +Fukamachi-san and it's really good. + +00:13:59.160 --> 00:14:01.959 +So yeah, that's the thing that I think Lem brings to + +00:14:01.960 --> 00:14:03.079 +the table and that's really interesting. + +NOTE Similarities and differences + +00:14:03.080 --> 00:14:10.519 +So I'm going to do a small demo of Lem, a Emacs example. + +00:14:10.520 --> 00:14:11.679 +First, the similarities, + +00:14:11.680 --> 00:14:14.119 +the nomenclature is very similar: modes, buffers, + +00:14:14.120 --> 00:14:17.439 +commands... The commands are very similar in nature. + +00:14:17.440 --> 00:14:20.039 +It was written with GNU Emacs in mind + +00:14:20.040 --> 00:14:24.359 +to mimic a lot of things. + +00:14:24.360 --> 00:14:29.079 +I think GNU Emacs is the best Emacs implementation + +00:14:29.080 --> 00:14:33.719 +in that way. So why not just take what is working, right? + +00:14:33.720 --> 00:14:35.599 +I have similar command, + +00:14:35.600 --> 00:14:39.399 +but flexible to add other default ones. + +00:14:39.400 --> 00:14:42.399 +It's not like Emacs that you have Emacs commands. + +00:14:42.400 --> 00:14:45.159 +Lem has Emacs command by default, + +00:14:45.160 --> 00:14:47.759 +but you can easily change that + +00:14:47.760 --> 00:14:49.919 +with other default ones, right? + +00:14:49.920 --> 00:14:52.159 +It's like, you can think of it like a major mode, right? + +00:14:52.160 --> 00:14:54.439 +Well, more like a global mode, + +00:14:54.440 --> 00:14:57.960 +sorry. That's a global mode of Emacs commands, + +00:14:57.961 --> 00:14:59.360 +or something like that. + +00:14:59.361 --> 00:15:01.519 +In general, the feeling is really close. + +00:15:01.520 --> 00:15:05.919 +So you will tell that it's really close to how both work, + +00:15:05.920 --> 00:15:07.839 +similar commands, and that shows. + +00:15:07.840 --> 00:15:12.359 +Differences, Common Lisp is not Emacs Lisp, + +00:15:12.360 --> 00:15:13.919 +it's similar in the surface. + +00:15:13.920 --> 00:15:16.279 +So it uses `defun`, you know, have parentheses + +00:15:16.280 --> 00:15:18.719 +and yada, yada, but it's not the same language, really, + +00:15:18.720 --> 00:15:20.839 +and sometimes you will find + +00:15:20.840 --> 00:15:22.639 +that the differences are substantial. + +00:15:23.260 --> 00:15:24.859 +The internals are completely different, + +00:15:24.860 --> 00:15:27.479 +of course, nothing, well, completely. + +00:15:27.480 --> 00:15:29.719 +They have a buffer implementation and other things, + +00:15:29.720 --> 00:15:32.359 +but in general, yeah, aside from that, + +00:15:32.360 --> 00:15:34.079 +it's completely different. + +00:15:34.080 --> 00:15:36.199 +And it's true that GNU Emacs + +00:15:36.200 --> 00:15:37.479 +has a better documentation tutorial. + +00:15:37.480 --> 00:15:39.719 +So GNU Emacs for me, I think it's + +00:15:39.720 --> 00:15:41.759 +one of the best-documented software ever. + +00:15:41.760 --> 00:15:49.599 +We're trying to go there, but we're still not there. + +NOTE Demo + +00:15:49.600 --> 00:15:54.079 +Let's do the demo. So to open Lem, you compile it, + +00:15:54.080 --> 00:15:55.759 +and then you have it available, + +00:15:55.760 --> 00:15:57.719 +and you open Lem. As you can see, + +00:15:57.720 --> 00:16:00.839 +we have the temporary buffer. On the top left is the mode-- + +00:16:00.840 --> 00:16:03.279 +not mode, + +00:16:03.280 --> 00:16:07.239 +the beam, insert, normal, visual. This is the V mode, right? + +00:16:07.240 --> 00:16:10.279 +In the top right corner, we have fundamental, + +00:16:10.280 --> 00:16:11.599 +which is the major mode, then paredit, + +00:16:11.600 --> 00:16:15.079 +which is like the minor mode, but you know, + +00:16:15.080 --> 00:16:16.079 +this is like the paredit for Emacs. + +00:16:16.080 --> 00:16:19.199 +In the top left buffer, + +00:16:19.200 --> 00:16:22.479 +you have the current buffer. + +00:16:22.480 --> 00:16:26.479 +So let's open the... Emacs, we all know how to do this. + +00:16:26.480 --> 00:16:29.319 +This is a command, like explore this command, + +00:16:29.320 --> 00:16:31.479 +like `open-init-file`. This opens the init file, + +00:16:31.480 --> 00:16:34.319 +which is in this directory, in `~/.lem/init.lisp`. + +00:16:34.320 --> 00:16:38.239 +As you can see, this is very similar, right? + +00:16:38.240 --> 00:16:40.279 +You define a command, which is not interactive, + +00:16:40.280 --> 00:16:42.959 +and then you get the buffer, right? + +00:16:42.960 --> 00:16:44.919 +This is a... So my personal command... + +00:16:44.920 --> 00:16:48.879 +Let's go to the one that I just opened. Init file, right? + +00:16:48.880 --> 00:16:52.159 +So this is a command that I did, + +00:16:52.160 --> 00:16:53.439 +which is `find-file`. + +00:16:53.440 --> 00:16:56.599 +This is very similar to [??], but just `find-file`. + +00:16:56.600 --> 00:16:58.399 +As you can see, very similar. + +00:16:58.400 --> 00:17:01.759 +This is the way that you program in Lem. + +00:17:01.760 --> 00:17:04.839 +This is the major mode, which is Lisp, + +00:17:04.840 --> 00:17:06.959 +that we're seeing at the top, right? + +00:17:06.960 --> 00:17:10.479 +And we can connect if we `slime-self-connect`. + +00:17:10.480 --> 00:17:14.119 +This is the prompt. This is the REPL. + +00:17:14.120 --> 00:17:17.959 +So if we... Keep in mind that this is Common Lisp, + +00:17:17.960 --> 00:17:20.439 +so this has different things. + +00:17:20.440 --> 00:17:22.719 +So we have to go to the Lem package, + +00:17:22.720 --> 00:17:26.199 +which is very important. This has namespaces, right? + +00:17:26.200 --> 00:17:29.039 +It's not the same. And we can say, okay, + +00:17:29.040 --> 00:17:32.319 +`current-buffer`. We get the buffer. + +00:17:32.320 --> 00:17:35.199 +We can explore everything that is in it, right? + +00:17:35.200 --> 00:17:38.559 +We have all this stuff. This is... If you're familiar + +00:17:38.560 --> 00:17:41.159 +with SLIME or Sly, this is it. + +00:17:41.160 --> 00:17:46.279 +It's just that we can say, buffer, I think it's `buffer-name`. + +00:17:46.280 --> 00:17:49.159 +Yes. And we can take this, + +00:17:49.160 --> 00:17:50.799 +and then we'll give you the name. + +00:17:50.800 --> 00:17:54.359 +So as you can see, the development experience + +00:17:54.360 --> 00:17:57.639 +is really powerful. We can also `lisp-scratch`, + +00:17:57.640 --> 00:18:00.679 +which transform... basically apply + +00:18:00.680 --> 00:18:02.639 +the major mode of Lisp to the temporary buffer. + +00:18:02.640 --> 00:18:06.719 +This is very similar to Emacs. + +00:18:06.720 --> 00:18:11.999 +Let's go back to the theme. I think that's it. + +00:18:12.000 --> 00:18:13.879 +Thank you all very much for listening to me. + +00:18:13.880 --> 00:18:15.239 +I think I point out + +00:18:15.240 --> 00:18:16.999 +the Emacsen family is really interesting. + +00:18:17.000 --> 00:18:19.279 +Lisp is really good, and GNU Emacs is really good, + +00:18:19.280 --> 00:18:21.199 +and I think Lem is also pretty awesome. + +00:18:21.200 --> 00:18:23.119 +So thank you all very much. + +00:18:23.120 --> 00:18:27.560 +I'll be answering the question now. And happy hacking. |