diff options
author | Sacha Chua <sacha@sachachua.com> | 2021-11-27 13:10:50 -0500 |
---|---|---|
committer | Sacha Chua <sacha@sachachua.com> | 2021-11-27 13:10:50 -0500 |
commit | 4e4222a4c6062c05d9b29113d113019c79f66178 (patch) | |
tree | 3ca2f21c6516f73cd49ddd4fce5488672b77bcc5 /2021/captions | |
parent | b3589dff10ce02557672068118e34d8c954f2c30 (diff) | |
download | emacsconf-wiki-4e4222a4c6062c05d9b29113d113019c79f66178.tar.xz emacsconf-wiki-4e4222a4c6062c05d9b29113d113019c79f66178.zip |
Update
Diffstat (limited to '2021/captions')
-rw-r--r-- | 2021/captions/janitor.md | 596 |
1 files changed, 596 insertions, 0 deletions
diff --git a/2021/captions/janitor.md b/2021/captions/janitor.md new file mode 100644 index 00000000..3e7bdc3c --- /dev/null +++ b/2021/captions/janitor.md @@ -0,0 +1,596 @@ +<a name="transcript"></a> +# Transcript + +[[!template text="Hello, my name is Stefan Monnier," start="00:00:01.520" video="mainVideo" id=subtitle]] +[[!template text="and I'm going to talk to you about--" start="00:00:04.400" video="mainVideo" id=subtitle]] +[[!template text="well, I'm going to present a bit" start="00:00:06.799" video="mainVideo" id=subtitle]] +[[!template text="of the life of a janitor." start="00:00:08.240" video="mainVideo" id=subtitle]] +[[!template new="1" text="So by and large, there's just" start="00:00:11.840" video="mainVideo" id=subtitle]] +[[!template text="nothing to see here," start="00:00:14.050" video="mainVideo" id=subtitle]] +[[!template text="and that's probably" start="00:00:16.299" video="mainVideo" id=subtitle]] +[[!template text="not super interesting," start="00:00:17.199" video="mainVideo" id=subtitle]] +[[!template text="but some of you might actually like to" start="00:00:18.240" video="mainVideo" id=subtitle]] +[[!template text="see how I work, so I figured why not." start="00:00:19.920" video="mainVideo" id=subtitle]] +[[!template new="1" text="Usually what I do just doesn't make any" start="00:00:25.359" video="mainVideo" id=subtitle]] +[[!template text="any significant difference," start="00:00:27.279" video="mainVideo" id=subtitle]] +[[!template text="and so I basically take existing code" start="00:00:29.920" video="mainVideo" id=subtitle]] +[[!template text="that's working, and I try to change it" start="00:00:32.160" video="mainVideo" id=subtitle]] +[[!template text="hopefully without breaking it too much" start="00:00:35.040" video="mainVideo" id=subtitle]] +[[!template text="and make it slightly more..." start="00:00:37.680" video="mainVideo" id=subtitle]] +[[!template text="you know, following some of the more" start="00:00:40.079" video="mainVideo" id=subtitle]] +[[!template text="modern style, let's say," start="00:00:42.719" video="mainVideo" id=subtitle]] +[[!template text="and sometimes along the way," start="00:00:44.640" video="mainVideo" id=subtitle]] +[[!template text="it actually fixes some bugs." start="00:00:46.719" video="mainVideo" id=subtitle]] +[[!template new="1" text="More concretely, the kind of things" start="00:00:50.399" video="mainVideo" id=subtitle]] +[[!template text="that I do is basically activate" start="00:00:51.983" video="mainVideo" id=subtitle]] +[[!template text="lexical scoping--" start="00:00:54.079" video="mainVideo" id=subtitle]] +[[!template text="that's really my main goal usually--" start="00:00:54.480" video="mainVideo" id=subtitle]] +[[!template text="but also do things like convert" start="00:00:56.239" video="mainVideo" id=subtitle]] +[[!template text="from `cl` to `cl-lib`," start="00:00:58.960" video="mainVideo" id=subtitle]] +[[!template text="sometimes I have to" start="00:01:00.719" video="mainVideo" id=subtitle]] +[[!template text="fix some compilation dependencies," start="00:01:01.440" video="mainVideo" id=subtitle]] +[[!template text="I might convert from `defadvice` to `advice-add`," start="00:01:03.760" video="mainVideo" id=subtitle]] +[[!template text="and many of the things--" start="00:01:07.280" video="mainVideo" id=subtitle]] +[[!template text="in terms of number of changes," start="00:01:11.439" video="mainVideo" id=subtitle]] +[[!template text="most of them are actually" start="00:01:13.119" video="mainVideo" id=subtitle]] +[[!template text="changing `quote fun` to `hash quote fun`" start="00:01:14.000" video="mainVideo" id=subtitle]] +[[!template text="because I prefer it," start="00:01:16.560" video="mainVideo" id=subtitle]] +[[!template text="but also it often helps me" start="00:01:17.360" video="mainVideo" id=subtitle]] +[[!template text="have a better understanding" start="00:01:19.920" video="mainVideo" id=subtitle]] +[[!template text="of which function is called where," start="00:01:21.439" video="mainVideo" id=subtitle]] +[[!template text="and so the warnings I get from it" start="00:01:23.920" video="mainVideo" id=subtitle]] +[[!template text="sometimes help me. You look concretely..." start="00:01:26.799" video="mainVideo" id=subtitle]] +[[!template text="it's not nothing really clear;" start="00:01:28.799" video="mainVideo" id=subtitle]] +[[!template text="it's more in terms of helping me" start="00:01:30.880" video="mainVideo" id=subtitle]] +[[!template text="have a mental image" start="00:01:33.360" video="mainVideo" id=subtitle]] +[[!template text="of how the package works." start="00:01:35.759" video="mainVideo" id=subtitle]] +[[!template new="1" text="So let's take a look." start="00:01:39.439" video="mainVideo" id=subtitle]] +[[!template text="I'm going to start with" start="00:01:42.880" video="mainVideo" id=subtitle]] +[[!template text="the package `heap`," start="00:01:45.840" video="mainVideo" id=subtitle]] +[[!template text="which I saw had a few weird things in it," start="00:01:46.799" video="mainVideo" id=subtitle]] +[[!template text="so I'm going to compile it." start="00:01:50.560" video="mainVideo" id=subtitle]] +[[!template text="That's basically the way the way I work," start="00:01:53.680" video="mainVideo" id=subtitle]] +[[!template text="right. I take a package." start="00:01:55.600" video="mainVideo" id=subtitle]] +[[!template text="I just pass it to the byte compiler." start="00:01:57.840" video="mainVideo" id=subtitle]] +[[!template text="I do that by just having" start="00:02:00.479" video="mainVideo" id=subtitle]] +[[!template text="a clone of the whole" start="00:02:02.159" video="mainVideo" id=subtitle]] +[[!template text="GNU ELPA repository," start="00:02:04.560" video="mainVideo" id=subtitle]] +[[!template text="and so that's why I built them." start="00:02:06.799" video="mainVideo" id=subtitle]] +[[!template text="I use the build rules" start="00:02:10.000" video="mainVideo" id=subtitle]] +[[!template text="from the GNU ELPA repository." start="00:02:11.520" video="mainVideo" id=subtitle]] +[[!template new="1" text="These build rules enforce--" start="00:02:15.120" video="mainVideo" id=subtitle]] +[[!template text="make sure that the files" start="00:02:16.720" video="mainVideo" id=subtitle]] +[[!template text="are compiled in a clean environment" start="00:02:17.680" video="mainVideo" id=subtitle]] +[[!template text="so you get fairly good warnings." start="00:02:19.680" video="mainVideo" id=subtitle]] +[[!template text="If you look at the warnings you see here," start="00:02:21.920" video="mainVideo" id=subtitle]] +[[!template text="there's a lot of things" start="00:02:23.680" video="mainVideo" id=subtitle]] +[[!template text="which are completely irrelevant," start="00:02:24.720" video="mainVideo" id=subtitle]] +[[!template text="which are due to details" start="00:02:26.480" video="mainVideo" id=subtitle]] +[[!template text="of the way I have my Emacs set up" start="00:02:28.400" video="mainVideo" id=subtitle]] +[[!template text="and some of the local changes" start="00:02:30.319" video="mainVideo" id=subtitle]] +[[!template text="I had in it so, you know," start="00:02:31.599" video="mainVideo" id=subtitle]] +[[!template text="there's no point" start="00:02:34.319" video="mainVideo" id=subtitle]] +[[!template text="paying too much attention to it," start="00:02:35.280" video="mainVideo" id=subtitle]] +[[!template text="but here we have a first warning." start="00:02:37.920" video="mainVideo" id=subtitle]] +[[!template text="We see that this is using `cl`," start="00:02:40.400" video="mainVideo" id=subtitle]] +[[!template text="so we want to change this to `cl-lib`," start="00:02:42.959" video="mainVideo" id=subtitle]] +[[!template text="but that also means" start="00:02:45.040" video="mainVideo" id=subtitle]] +[[!template text="that we may have a new dependency" start="00:02:46.879" video="mainVideo" id=subtitle]] +[[!template text="on the `cl-lib` package," start="00:02:48.400" video="mainVideo" id=subtitle]] +[[!template text="so we have to go check" start="00:02:49.920" video="mainVideo" id=subtitle]] +[[!template text="the start of the file" start="00:02:51.120" video="mainVideo" id=subtitle]] +[[!template text="to see if it already declares" start="00:02:52.000" video="mainVideo" id=subtitle]] +[[!template text="some dependency, and we see it doesn't," start="00:02:54.080" video="mainVideo" id=subtitle]] +[[!template text="not even on a on a recent-enough Emacs," start="00:02:56.800" video="mainVideo" id=subtitle]] +[[!template text="so we have to add--" start="00:03:00.640" video="mainVideo" id=subtitle]] +[[!template text="sorry, that's not going very well..." start="00:03:02.325" video="mainVideo" id=subtitle]] +[[!template text="oh..." start="00:03:05.360" video="mainVideo" id=subtitle]] +[[!template text="okay, we're going to get there somewhere..." start="00:03:06.480" video="mainVideo" id=subtitle]] +[[!template text="somehow..." start="00:03:08.560" video="mainVideo" id=subtitle]] +[[!template text="oh, that still wasn't it, wow, okay--" start="00:03:13.200" video="mainVideo" id=subtitle]] +[[!template text="and along the way..." start="00:03:20.480" video="mainVideo" id=subtitle]] +[[!template new="1" text="Of course, since we converted to `cl-lib`," start="00:03:22.159" video="mainVideo" id=subtitle]] +[[!template text="we have to update the uses" start="00:03:24.159" video="mainVideo" id=subtitle]] +[[!template text="so `defstruct` shouldn't be used anymore." start="00:03:26.159" video="mainVideo" id=subtitle]] +[[!template text="We may want to reindent this" start="00:03:29.840" video="mainVideo" id=subtitle]] +[[!template text="to get something a bit cleaner." start="00:03:31.599" video="mainVideo" id=subtitle]] +[[!template text="We have here a missing quote..." start="00:03:37.040" video="mainVideo" id=subtitle]] +[[!template text="hash, sorry." start="00:03:40.589" video="mainVideo" id=subtitle]] +[[!template text="We have `decf`, so `decf` is here," start="00:03:41.920" video="mainVideo" id=subtitle]] +[[!template text="and that needs to be replaced" start="00:03:46.480" video="mainVideo" id=subtitle]] +[[!template text="with `cl-decf`." start="00:03:48.000" video="mainVideo" id=subtitle]] +[[!template text="Sometimes it's worth doing" start="00:03:49.920" video="mainVideo" id=subtitle]] +[[!template text="a search-and-replace." start="00:03:51.120" video="mainVideo" id=subtitle]] +[[!template text="Here I see there's only two," start="00:03:53.360" video="mainVideo" id=subtitle]] +[[!template text="so it's not worth the trouble;" start="00:03:54.799" video="mainVideo" id=subtitle]] +[[!template text="I just do it by hand, and that's it." start="00:03:57.760" video="mainVideo" id=subtitle]] +[[!template text="Well, that was easy." start="00:04:00.711" video="mainVideo" id=subtitle]] +[[!template text="So let's recompile, see what it says." start="00:04:02.000" video="mainVideo" id=subtitle]] +[[!template text="Ah, this is clean. Perfect!" start="00:04:10.159" video="mainVideo" id=subtitle]] +[[!template new="1" text="Let's.. we can go see..." start="00:04:12.959" video="mainVideo" id=subtitle]] +[[!template text="There is another one I had." start="00:04:15.000" video="mainVideo" id=subtitle]] +[[!template text="Was it `counsel`, I think. Yes." start="00:04:17.280" video="mainVideo" id=subtitle]] +[[!template text="So also I saw some funny things" start="00:04:20.239" video="mainVideo" id=subtitle]] +[[!template text="going on here." start="00:04:24.160" video="mainVideo" id=subtitle]] +[[!template text="So I'm going to do" start="00:04:24.320" video="mainVideo" id=subtitle]] +[[!template text="the same procedure as before:" start="00:04:26.479" video="mainVideo" id=subtitle]] +[[!template text="I just compile the file" start="00:04:31.040" video="mainVideo" id=subtitle]] +[[!template text="and look at the warnings." start="00:04:32.800" video="mainVideo" id=subtitle]] +[[!template text="Oh, we have many more here." start="00:04:38.000" video="mainVideo" id=subtitle]] +[[!template text="So let's see..." start="00:04:40.479" video="mainVideo" id=subtitle]] +[[!template text="Okay, so we have missing quotes--" start="00:04:43.120" video="mainVideo" id=subtitle]] +[[!template text="oh, hashes. They're not really missing;" start="00:04:46.504" video="mainVideo" id=subtitle]] +[[!template text="it's just a personal preference." start="00:04:49.240" video="mainVideo" id=subtitle]] +[[!template new="1" text="Oh, here... here's an important one:" start="00:04:54.639" video="mainVideo" id=subtitle]] +[[!template text="so as you know," start="00:04:57.440" video="mainVideo" id=subtitle]] +[[!template text="if you look at the top of the file," start="00:04:59.280" video="mainVideo" id=subtitle]] +[[!template text="you see that here" start="00:05:00.639" video="mainVideo" id=subtitle]] +[[!template text="it says it's using lexical binding," start="00:05:02.240" video="mainVideo" id=subtitle]] +[[!template text="yet it's not fully using lexical binding," start="00:05:04.960" video="mainVideo" id=subtitle]] +[[!template text="because as we just saw," start="00:05:07.120" video="mainVideo" id=subtitle]] +[[!template text="there's a call to the `eval` function" start="00:05:08.960" video="mainVideo" id=subtitle]] +[[!template text="with only one argument," start="00:05:11.039" video="mainVideo" id=subtitle]] +[[!template text="which means the second argument is nil," start="00:05:11.680" video="mainVideo" id=subtitle]] +[[!template text="which means that the expression read" start="00:05:13.280" video="mainVideo" id=subtitle]] +[[!template text="by `read` here is going to be evaluated" start="00:05:16.880" video="mainVideo" id=subtitle]] +[[!template text="using the old dialects," start="00:05:19.520" video="mainVideo" id=subtitle]] +[[!template text="which is only dynamic scoping." start="00:05:22.160" video="mainVideo" id=subtitle]] +[[!template text="So here I like to just change this" start="00:05:24.240" video="mainVideo" id=subtitle]] +[[!template text="to use lexical scoping," start="00:05:25.680" video="mainVideo" id=subtitle]] +[[!template text="which in most cases" start="00:05:26.800" video="mainVideo" id=subtitle]] +[[!template text="just doesn't make any difference." start="00:05:28.080" video="mainVideo" id=subtitle]] +[[!template text="It just makes me feel better." start="00:05:29.680" video="mainVideo" id=subtitle]] +[[!template new="1" text="So there's lots of those hashes" start="00:05:35.919" video="mainVideo" id=subtitle]] +[[!template text="all over the place." start="00:05:40.160" video="mainVideo" id=subtitle]] +[[!template text="It's not strictly necessary, as you know," start="00:05:43.680" video="mainVideo" id=subtitle]] +[[!template text="but I'm just going to add them anyway." start="00:05:45.680" video="mainVideo" id=subtitle]] +[[!template new="1" text="Here we see" start="00:05:52.479" video="mainVideo" id=subtitle]] +[[!template text="it's not going to warn me here" start="00:05:53.199" video="mainVideo" id=subtitle]] +[[!template text="because it doesn't know" start="00:05:54.800" video="mainVideo" id=subtitle]] +[[!template text="that `ivy-make-magic-action`" start="00:05:55.759" video="mainVideo" id=subtitle]] +[[!template text="takes a function," start="00:05:57.600" video="mainVideo" id=subtitle]] +[[!template text="but it's a pretty good guess that it does." start="00:05:58.400" video="mainVideo" id=subtitle]] +[[!template text="And here's some more." start="00:06:12.319" video="mainVideo" id=subtitle]] +[[!template text="What else do we have?" start="00:06:14.479" video="mainVideo" id=subtitle]] +[[!template text="Is that all we have here?" start="00:06:16.080" video="mainVideo" id=subtitle]] +[[!template text="Well, looks like it. Oh, I see a few..." start="00:06:19.120" video="mainVideo" id=subtitle]] +[[!template text="a few more here..." start="00:06:21.440" video="mainVideo" id=subtitle]] +[[!template text="and one more." start="00:06:27.680" video="mainVideo" id=subtitle]] +[[!template new="1" text="And oh, this is more interesting." start="00:06:30.639" video="mainVideo" id=subtitle]] +[[!template text="So here we have a use of `defadvice`," start="00:06:33.039" video="mainVideo" id=subtitle]] +[[!template text="so if we go back" start="00:06:35.280" video="mainVideo" id=subtitle]] +[[!template text="to the beginning of the file," start="00:06:37.440" video="mainVideo" id=subtitle]] +[[!template text="we see that it actually depends" start="00:06:40.720" video="mainVideo" id=subtitle]] +[[!template text="on Emacs 24.5, so it actually has" start="00:06:42.880" video="mainVideo" id=subtitle]] +[[!template text="the new advice system available" start="00:06:47.360" video="mainVideo" id=subtitle]] +[[!template text="without having to add any dependency," start="00:06:49.280" video="mainVideo" id=subtitle]] +[[!template text="so there's really no good reason" start="00:06:51.520" video="mainVideo" id=subtitle]] +[[!template text="to keep this." start="00:06:53.599" video="mainVideo" id=subtitle]] +[[!template text="So we just convert this" start="00:06:54.880" video="mainVideo" id=subtitle]] +[[!template text="to an `advice-add`," start="00:06:56.160" video="mainVideo" id=subtitle]] +[[!template text="so it just says, you know," start="00:06:58.560" video="mainVideo" id=subtitle]] +[[!template text="this is the function that's advised." start="00:06:59.840" video="mainVideo" id=subtitle]] +[[!template text="This was a `before` advice." start="00:07:02.319" video="mainVideo" id=subtitle]] +[[!template text="The `before` advice, sometimes," start="00:07:04.560" video="mainVideo" id=subtitle]] +[[!template text="when we convert it to `advice-add`," start="00:07:05.500" video="mainVideo" id=subtitle]] +[[!template text="need to be converted to `around` advice." start="00:07:08.479" video="mainVideo" id=subtitle]] +[[!template text="This is when the function" start="00:07:11.199" video="mainVideo" id=subtitle]] +[[!template text="looks or modifies the argument." start="00:07:13.280" video="mainVideo" id=subtitle]] +[[!template text="In this case, if I look at it," start="00:07:15.840" video="mainVideo" id=subtitle]] +[[!template text="I see it doesn't seem to be using" start="00:07:18.639" video="mainVideo" id=subtitle]] +[[!template text="the arguments at all." start="00:07:20.319" video="mainVideo" id=subtitle]] +[[!template text="So I'm just going to keep it" start="00:07:21.280" video="mainVideo" id=subtitle]] +[[!template text="as a `before` advice." start="00:07:25.280" video="mainVideo" id=subtitle]] +[[!template text="And we have to give it a name." start="00:07:27.520" video="mainVideo" id=subtitle]] +[[!template text="Well, we don't really have to," start="00:07:28.672" video="mainVideo" id=subtitle]] +[[!template text="but it's convenient to give it a name" start="00:07:30.880" video="mainVideo" id=subtitle]] +[[!template text="to the new function." start="00:07:32.800" video="mainVideo" id=subtitle]] +[[!template text="So here, they actually had" start="00:07:34.800" video="mainVideo" id=subtitle]] +[[!template text="given a name to the advice," start="00:07:36.880" video="mainVideo" id=subtitle]] +[[!template text="so we're going to keep it," start="00:07:38.080" video="mainVideo" id=subtitle]] +[[!template text="and indeed it's the only function." start="00:07:39.599" video="mainVideo" id=subtitle]] +[[!template text="This name is not used as a function," start="00:07:41.440" video="mainVideo" id=subtitle]] +[[!template text="so we can use it" start="00:07:43.360" video="mainVideo" id=subtitle]] +[[!template text="as the name of the function." start="00:07:44.160" video="mainVideo" id=subtitle]] +[[!template text="I'm going to add a dash here" start="00:07:46.960" video="mainVideo" id=subtitle]] +[[!template text="because I think this function" start="00:07:49.039" video="mainVideo" id=subtitle]] +[[!template text="is really fundamentally" start="00:07:51.120" video="mainVideo" id=subtitle]] +[[!template text="an internal function." start="00:07:53.039" video="mainVideo" id=subtitle]] +[[!template text="So here I just said I add the advice," start="00:07:54.639" video="mainVideo" id=subtitle]] +[[!template text="but I still need to actually" start="00:07:56.720" video="mainVideo" id=subtitle]] +[[!template text="define the function." start="00:07:58.000" video="mainVideo" id=subtitle]] +[[!template text="So that's what I do here," start="00:08:02.879" video="mainVideo" id=subtitle]] +[[!template text="and we need here to list the arguments" start="00:08:04.160" video="mainVideo" id=subtitle]] +[[!template text="that are going to be taken." start="00:08:06.500" video="mainVideo" id=subtitle]] +[[!template text="I don't know what these are," start="00:08:08.240" video="mainVideo" id=subtitle]] +[[!template text="but I know we're not using them," start="00:08:09.199" video="mainVideo" id=subtitle]] +[[!template text="so we'll just accept anything," start="00:08:10.960" video="mainVideo" id=subtitle]] +[[!template text="and that will do the trick." start="00:08:13.759" video="mainVideo" id=subtitle]] +[[!template text="It's a future-proof as well," start="00:08:16.560" video="mainVideo" id=subtitle]] +[[!template text="so that should work." start="00:08:19.199" video="mainVideo" id=subtitle]] +[[!template new="1" text="Oh, here we have another, so it's" start="00:08:22.240" video="mainVideo" id=subtitle]] +[[!template text="basically the same story, I think." start="00:08:24.160" video="mainVideo" id=subtitle]] +[[!template text="It's a `before` advice as well." start="00:08:29.919" video="mainVideo" id=subtitle]] +[[!template text="It doesn't seem to be using" start="00:08:31.599" video="mainVideo" id=subtitle]] +[[!template text="the argument at all," start="00:08:32.959" video="mainVideo" id=subtitle]] +[[!template text="and let's see if this name is not taken." start="00:08:35.599" video="mainVideo" id=subtitle]] +[[!template text="Yeah, good, so we can just do the same:" start="00:08:38.596" video="mainVideo" id=subtitle]] +[[!template text="turn this into an `advice-add`..." start="00:08:43.360" video="mainVideo" id=subtitle]] +[[!template text="`before`..." start="00:08:46.880" video="mainVideo" id=subtitle]] +[[!template text="I just add a dash here." start="00:08:53.040" video="mainVideo" id=subtitle]] +[[!template text="And same thing--" start="00:09:02.480" video="mainVideo" id=subtitle]] +[[!template text="a function that just takes..." start="00:09:05.440" video="mainVideo" id=subtitle]] +[[!template text="because I don't know which arguments" start="00:09:06.959" video="mainVideo" id=subtitle]] +[[!template text="these are so..." start="00:09:08.240" video="mainVideo" id=subtitle]] +[[!template text="I think that should do the trick." start="00:09:10.480" video="mainVideo" id=subtitle]] +[[!template text="Actually, we see that this function" start="00:09:14.640" video="mainVideo" id=subtitle]] +[[!template text="is very similar to the other one." start="00:09:16.080" video="mainVideo" id=subtitle]] +[[!template text="Let's look at the two side-by-side..." start="00:09:18.560" video="mainVideo" id=subtitle]] +[[!template text="...it really is--" start="00:09:31.519" video="mainVideo" id=subtitle]] +[[!template text="oh, it's not exactly identical..." start="00:09:33.055" video="mainVideo" id=subtitle]] +[[!template text="it's, you know, we could try" start="00:09:36.097" video="mainVideo" id=subtitle]] +[[!template text="to merge them into a single function," start="00:09:39.120" video="mainVideo" id=subtitle]] +[[!template text="but it's probably not worth the trouble" start="00:09:41.680" video="mainVideo" id=subtitle]] +[[!template text="so we can keep it this way." start="00:09:43.279" video="mainVideo" id=subtitle]] +[[!template new="1" text="Okay, next warning: an `eval` again," start="00:09:45.920" video="mainVideo" id=subtitle]] +[[!template text="so I could just add `t` here," start="00:09:48.720" video="mainVideo" id=subtitle]] +[[!template text="but if you look at it a bit more," start="00:09:50.640" video="mainVideo" id=subtitle]] +[[!template text="you see that the code" start="00:09:55.120" video="mainVideo" id=subtitle]] +[[!template text="we're going to evaluate" start="00:09:56.000" video="mainVideo" id=subtitle]] +[[!template text="using either lexical scoping" start="00:09:57.760" video="mainVideo" id=subtitle]] +[[!template text="or dynamic scoping" start="00:09:59.279" video="mainVideo" id=subtitle]] +[[!template text="is actually just evaluating a symbol," start="00:10:00.560" video="mainVideo" id=subtitle]] +[[!template text="since we just call an `intern` here." start="00:10:03.440" video="mainVideo" id=subtitle]] +[[!template text="So instead of replacing this" start="00:10:06.240" video="mainVideo" id=subtitle]] +[[!template text="by adding an argument," start="00:10:07.839" video="mainVideo" id=subtitle]] +[[!template text="I'm just going to call `symbol-value`" start="00:10:09.279" video="mainVideo" id=subtitle]] +[[!template text="because that's exactly" start="00:10:11.680" video="mainVideo" id=subtitle]] +[[!template text="what we need to do here, right." start="00:10:12.640" video="mainVideo" id=subtitle]] +[[!template text="I call this "strength reduction,"" start="00:10:14.480" video="mainVideo" id=subtitle]] +[[!template text="and I'm using" start="00:10:16.320" video="mainVideo" id=subtitle]] +[[!template text="a more primitive function instead," start="00:10:17.200" video="mainVideo" id=subtitle]] +[[!template text="which does just what we need," start="00:10:19.680" video="mainVideo" id=subtitle]] +[[!template text="and this one knows that it has to be" start="00:10:23.200" video="mainVideo" id=subtitle]] +[[!template text="accessed by dynamic scoping, of course." start="00:10:25.680" video="mainVideo" id=subtitle]] +[[!template new="1" text="Here I have a `kmacro-ring`," start="00:10:30.640" video="mainVideo" id=subtitle]] +[[!template text="so here I have a function that uses--" start="00:10:32.959" video="mainVideo" id=subtitle]] +[[!template text="`kmacro-ring` comes from" start="00:10:35.600" video="mainVideo" id=subtitle]] +[[!template text="the `kmacro` package, obviously," start="00:10:37.360" video="mainVideo" id=subtitle]] +[[!template text="and we probably don't want to" start="00:10:39.760" video="mainVideo" id=subtitle]] +[[!template text="`require` `kmacro` package" start="00:10:41.600" video="mainVideo" id=subtitle]] +[[!template text="all over the place in `counsel` itself," start="00:10:42.959" video="mainVideo" id=subtitle]] +[[!template text="because `counsel` can be used" start="00:10:48.560" video="mainVideo" id=subtitle]] +[[!template text="without `kmacro`." start="00:10:50.240" video="mainVideo" id=subtitle]] +[[!template text="So I think we're just going to add" start="00:10:53.279" video="mainVideo" id=subtitle]] +[[!template text="a `defvar` to silence the warning." start="00:10:55.200" video="mainVideo" id=subtitle]] +[[!template text="And we have several more. So we have" start="00:11:05.519" video="mainVideo" id=subtitle]] +[[!template text="`initial-counter-value`. (Sorry.)" start="00:11:10.720" video="mainVideo" id=subtitle]] +[[!template text="We have `kmacro-counter`." start="00:11:20.480" video="mainVideo" id=subtitle]] +[[!template text="Do we have more?" start="00:11:23.360" video="mainVideo" id=subtitle]] +[[!template text="Oh, yes, we do." start="00:11:25.760" video="mainVideo" id=subtitle]] +[[!template text="We have `kmacro-counter-value-start`" start="00:11:28.560" video="mainVideo" id=subtitle]] +[[!template text="and `kmacro-counter-format-start`." start="00:11:35.040" video="mainVideo" id=subtitle]] +[[!template text="Okay." start="00:11:40.839" video="mainVideo" id=subtitle]] +[[!template text="I hope this is it." start="00:11:45.040" video="mainVideo" id=subtitle]] +[[!template text="`kmacro-ring`, `counter`, `ring`..." start="00:11:50.160" video="mainVideo" id=subtitle]] +[[!template text="blah blah blah." start="00:11:52.880" video="mainVideo" id=subtitle]] +[[!template text="Here we have another one, `quote`." start="00:11:54.959" video="mainVideo" id=subtitle]] +[[!template text="Here we have another hash missing." start="00:12:00.240" video="mainVideo" id=subtitle]] +[[!template text="It's not missing..." start="00:12:03.279" video="mainVideo" id=subtitle]] +[[!template text="but same thing here." start="00:12:06.079" video="mainVideo" id=subtitle]] +[[!template text="Okay, this is a function from `kmacro`." start="00:12:12.079" video="mainVideo" id=subtitle]] +[[!template text="We could declare it" start="00:12:16.560" video="mainVideo" id=subtitle]] +[[!template text="just to silence the warning" start="00:12:18.079" video="mainVideo" id=subtitle]] +[[!template text="although we don't actually..." start="00:12:20.880" video="mainVideo" id=subtitle]] +[[!template text="normally, when we declare such things--" start="00:12:22.320" video="mainVideo" id=subtitle]] +[[!template text="same thing with variables--" start="00:12:24.480" video="mainVideo" id=subtitle]] +[[!template text="we should try to make sure that indeed" start="00:12:25.279" video="mainVideo" id=subtitle]] +[[!template text="by the time the code is executed," start="00:12:27.300" video="mainVideo" id=subtitle]] +[[!template text="the function will be available," start="00:12:28.760" video="mainVideo" id=subtitle]] +[[!template text="and then very often is" start="00:12:30.800" video="mainVideo" id=subtitle]] +[[!template text="because there's a `require`" start="00:12:32.800" video="mainVideo" id=subtitle]] +[[!template text="sometimes inside a function," start="00:12:34.320" video="mainVideo" id=subtitle]] +[[!template text="and so we should put" start="00:12:35.680" video="mainVideo" id=subtitle]] +[[!template text="the `declare` function" start="00:12:36.399" video="mainVideo" id=subtitle]] +[[!template text="right after the `require`," start="00:12:37.680" video="mainVideo" id=subtitle]] +[[!template text="but I don't think it's the case here." start="00:12:39.920" video="mainVideo" id=subtitle]] +[[!template text="So I'm just going to to add this." start="00:12:41.839" video="mainVideo" id=subtitle]] +[[!template text="I know this comes from `kmacro`," start="00:12:46.399" video="mainVideo" id=subtitle]] +[[!template text="and I could actually check the arguments." start="00:12:49.040" video="mainVideo" id=subtitle]] +[[!template text="It's just taking an optional argument" start="00:12:56.320" video="mainVideo" id=subtitle]] +[[!template text="so I'm going to put it there," start="00:12:58.480" video="mainVideo" id=subtitle]] +[[!template text="so we have it complete." start="00:13:00.880" video="mainVideo" id=subtitle]] +[[!template new="1" text="Okay, we can just recompile," start="00:13:06.720" video="mainVideo" id=subtitle]] +[[!template text="see what is left" start="00:13:10.800" video="mainVideo" id=subtitle]] +[[!template text="from those warnings we've fixed," start="00:13:14.800" video="mainVideo" id=subtitle]] +[[!template text="and we may have new warnings, in any case," start="00:13:17.760" video="mainVideo" id=subtitle]] +[[!template text="because especially when we add the hashes," start="00:13:21.360" video="mainVideo" id=subtitle]] +[[!template text="it tends to give us more warnings." start="00:13:25.440" video="mainVideo" id=subtitle]] +[[!template text="So we have two more functions" start="00:13:29.519" video="mainVideo" id=subtitle]] +[[!template text="which are not known." start="00:13:31.200" video="mainVideo" id=subtitle]] +[[!template text="You can just add them here..." start="00:13:34.560" video="mainVideo" id=subtitle]] +[[!template text="`set-format "kmacro"`" start="00:13:39.440" video="mainVideo" id=subtitle]] +[[!template text="and same thing for `set-counter`." start="00:13:44.720" video="mainVideo" id=subtitle]] +[[!template text="Okay, whatever." start="00:13:48.160" video="mainVideo" id=subtitle]] +[[!template text="This just takes a `format` argument," start="00:13:54.959" video="mainVideo" id=subtitle]] +[[!template text="and this one just takes an `arg` argument." start="00:13:57.120" video="mainVideo" id=subtitle]] +[[!template text="Okay, so let's see what this says now." start="00:14:05.920" video="mainVideo" id=subtitle]] +[[!template text="Hopefully, there's no warnings anymore." start="00:14:10.800" video="mainVideo" id=subtitle]] +[[!template text="We're done. Okay!" start="00:14:15.519" video="mainVideo" id=subtitle]] +[[!template new="1" text="Okay, the last one we're going to see" start="00:14:17.839" video="mainVideo" id=subtitle]] +[[!template text="is in `enwc`, I saw the other day..." start="00:14:20.079" video="mainVideo" id=subtitle]] +[[!template text="I think I have it here..." start="00:14:23.440" video="mainVideo" id=subtitle]] +[[!template text="here we go, yes..." start="00:14:27.760" video="mainVideo" id=subtitle]] +[[!template text="so `enwc` is an interesting package here" start="00:14:29.680" video="mainVideo" id=subtitle]] +[[!template text="because it has-- as you can see it has--" start="00:14:32.800" video="mainVideo" id=subtitle]] +[[!template text="it's lexical binding," start="00:14:35.680" video="mainVideo" id=subtitle]] +[[!template text="but actually some of the files in it" start="00:14:37.760" video="mainVideo" id=subtitle]] +[[!template text="do not use lexical binding," start="00:14:39.760" video="mainVideo" id=subtitle]] +[[!template text="so it has been partly converted" start="00:14:42.320" video="mainVideo" id=subtitle]] +[[!template text="but not completely." start="00:14:44.320" video="mainVideo" id=subtitle]] +[[!template text="So here I'm going to" start="00:14:46.160" video="mainVideo" id=subtitle]] +[[!template text="enable lexical binding." start="00:14:49.920" video="mainVideo" id=subtitle]] +[[!template text="I have also, I think, in `cm`..." start="00:14:54.160" video="mainVideo" id=subtitle]] +[[!template text="yes..." start="00:14:58.880" video="mainVideo" id=subtitle]] +[[!template text="so I enable it here," start="00:15:01.199" video="mainVideo" id=subtitle]] +[[!template text="and also, I think, `test`." start="00:15:04.000" video="mainVideo" id=subtitle]] +[[!template new="1" text="The test files are often" start="00:15:07.360" video="mainVideo" id=subtitle]] +[[!template text="somewhat problematic" start="00:15:09.360" video="mainVideo" id=subtitle]] +[[!template text="because very often they're not quite" start="00:15:11.839" video="mainVideo" id=subtitle]] +[[!template text="as heavily tested themselves, actually," start="00:15:15.199" video="mainVideo" id=subtitle]] +[[!template text="or they only run" start="00:15:18.880" video="mainVideo" id=subtitle]] +[[!template text="in very specific contexts," start="00:15:20.320" video="mainVideo" id=subtitle]] +[[!template text="and so they may have problems" start="00:15:22.160" video="mainVideo" id=subtitle]] +[[!template text="with missing `requires` or using packages" start="00:15:24.399" video="mainVideo" id=subtitle]] +[[!template text="which are not explicitly in the dependencies" start="00:15:27.360" video="mainVideo" id=subtitle]] +[[!template text="and those kinds of things." start="00:15:29.199" video="mainVideo" id=subtitle]] +[[!template text="I think this is not the case here," start="00:15:31.279" video="mainVideo" id=subtitle]] +[[!template text="but we'll see." start="00:15:33.360" video="mainVideo" id=subtitle]] +[[!template text="`enwc`..." start="00:15:35.440" video="mainVideo" id=subtitle]] +[[!template text="Yes, I want to save this one and that one." start="00:15:38.880" video="mainVideo" id=subtitle]] +[[!template new="1" text="Let's see what it says." start="00:15:42.320" video="mainVideo" id=subtitle]] +[[!template text="Okay, unused lexical variable `x`..." start="00:15:47.199" video="mainVideo" id=subtitle]] +[[!template text="`x`..." start="00:15:51.440" video="mainVideo" id=subtitle]] +[[!template text="Yes, so here we have an unused variable," start="00:15:52.240" video="mainVideo" id=subtitle]] +[[!template text="and indeed, it's not used." start="00:15:57.120" video="mainVideo" id=subtitle]] +[[!template text="It probably had to be named before" start="00:15:58.320" video="mainVideo" id=subtitle]] +[[!template text="because it was..." start="00:16:00.880" video="mainVideo" id=subtitle]] +[[!template text="with dynamic scoping," start="00:16:04.079" video="mainVideo" id=subtitle]] +[[!template text="the `dotimes` requires" start="00:16:05.120" video="mainVideo" id=subtitle]] +[[!template text="the variable to be named, actually," start="00:16:06.399" video="mainVideo" id=subtitle]] +[[!template text="because it's used internally somehow," start="00:16:08.160" video="mainVideo" id=subtitle]] +[[!template text="but with lexical scoping," start="00:16:10.399" video="mainVideo" id=subtitle]] +[[!template text="that's not the case," start="00:16:11.600" video="mainVideo" id=subtitle]] +[[!template text="so we can just put an underscore." start="00:16:12.320" video="mainVideo" id=subtitle]] +[[!template new="1" text="I'm going to change this" start="00:16:14.079" video="mainVideo" id=subtitle]] +[[!template text="because I really don't like" start="00:16:15.199" video="mainVideo" id=subtitle]] +[[!template text="this three-part `dotimes`." start="00:16:16.880" video="mainVideo" id=subtitle]] +[[!template text="I prefer to have" start="00:16:19.000" video="mainVideo" id=subtitle]] +[[!template text="the return value at the end." start="00:16:21.360" video="mainVideo" id=subtitle]] +[[!template text="It's sort of stashed hidden in the middle." start="00:16:23.040" video="mainVideo" id=subtitle]] +[[!template text="That's just a personal preference." start="00:16:26.480" video="mainVideo" id=subtitle]] +[[!template new="1" text="Okay, what else... we have a `widget`." start="00:16:29.680" video="mainVideo" id=subtitle]] +[[!template text="Okay, this argument here says that" start="00:16:31.920" video="mainVideo" id=subtitle]] +[[!template text="it's not used, so if we look at..." start="00:16:34.000" video="mainVideo" id=subtitle]] +[[!template text="We were here, right? Yes. Right here." start="00:16:44.320" video="mainVideo" id=subtitle]] +[[!template text="Indeed, `widget` is really not used." start="00:16:47.040" video="mainVideo" id=subtitle]] +[[!template text="(Sorry.)" start="00:16:50.480" video="mainVideo" id=subtitle]] +[[!template text="Here's what I get for using" start="00:16:53.600" video="mainVideo" id=subtitle]] +[[!template text="a somewhat vanilla configuration of Emacs," start="00:16:55.279" video="mainVideo" id=subtitle]] +[[!template text="compared to the one I use..." start="00:16:58.320" video="mainVideo" id=subtitle]] +[[!template text="the personally tricked one." start="00:17:01.279" video="mainVideo" id=subtitle]] +[[!template text="Actually, I can..." start="00:17:04.000" video="mainVideo" id=subtitle]] +[[!template text="so we can just mark this argument" start="00:17:05.439" video="mainVideo" id=subtitle]] +[[!template text="as unused," start="00:17:07.919" video="mainVideo" id=subtitle]] +[[!template text="and we don't want to remove the argument" start="00:17:09.360" video="mainVideo" id=subtitle]] +[[!template text="probably, or maybe we could;" start="00:17:11.199" video="mainVideo" id=subtitle]] +[[!template text="we could see where the function is used," start="00:17:12.480" video="mainVideo" id=subtitle]] +[[!template text="and here we see that it's passed" start="00:17:15.679" video="mainVideo" id=subtitle]] +[[!template text="to a higher-order function," start="00:17:18.542" video="mainVideo" id=subtitle]] +[[!template text="basically, so it's going to be..." start="00:17:20.959" video="mainVideo" id=subtitle]] +[[!template text="We can't really change" start="00:17:24.480" video="mainVideo" id=subtitle]] +[[!template text="the calling convention" start="00:17:25.360" video="mainVideo" id=subtitle]] +[[!template text="so we have to mark the argument" start="00:17:25.760" video="mainVideo" id=subtitle]] +[[!template text="as being just an unused argument," start="00:17:27.120" video="mainVideo" id=subtitle]] +[[!template text="but we're going to still receive it." start="00:17:29.600" video="mainVideo" id=subtitle]] +[[!template text="And here it says same thing:" start="00:17:34.000" video="mainVideo" id=subtitle]] +[[!template text="that `widget` is not used in this function." start="00:17:35.360" video="mainVideo" id=subtitle]] +[[!template text="Let's take a look at the function." start="00:17:38.240" video="mainVideo" id=subtitle]] +[[!template text="Indeed it seems it's not used," start="00:17:40.000" video="mainVideo" id=subtitle]] +[[!template text="and so we're just going to mark it" start="00:17:42.400" video="mainVideo" id=subtitle]] +[[!template text="as unused." start="00:17:44.000" video="mainVideo" id=subtitle]] +[[!template text="This is the part of the conversion" start="00:17:46.480" video="mainVideo" id=subtitle]] +[[!template text="to lexical scoping" start="00:17:48.320" video="mainVideo" id=subtitle]] +[[!template text="that's somewhat tricky sometimes" start="00:17:49.200" video="mainVideo" id=subtitle]] +[[!template text="because we don't really know" start="00:17:51.280" video="mainVideo" id=subtitle]] +[[!template text="whether this variable should be using" start="00:17:53.760" video="mainVideo" id=subtitle]] +[[!template text="lexical scoping or dynamic scoping." start="00:17:56.240" video="mainVideo" id=subtitle]] +[[!template text="The fact that it's not used" start="00:17:58.559" video="mainVideo" id=subtitle]] +[[!template text="is a hint that there's probably" start="00:18:00.480" video="mainVideo" id=subtitle]] +[[!template text="something going on," start="00:18:02.320" video="mainVideo" id=subtitle]] +[[!template text="so either it's not used" start="00:18:03.679" video="mainVideo" id=subtitle]] +[[!template text="because it should be using" start="00:18:04.960" video="mainVideo" id=subtitle]] +[[!template text="dynamic scoping--" start="00:18:06.400" video="mainVideo" id=subtitle]] +[[!template text="it is going to be used" start="00:18:07.200" video="mainVideo" id=subtitle]] +[[!template text="by some other code somewhere else--" start="00:18:08.080" video="mainVideo" id=subtitle]] +[[!template text="or it's really not used" start="00:18:10.480" video="mainVideo" id=subtitle]] +[[!template text="because it's just not used, right," start="00:18:11.840" video="mainVideo" id=subtitle]] +[[!template text="and so we need to distinguish the two," start="00:18:14.000" video="mainVideo" id=subtitle]] +[[!template text="and for that, I basically use" start="00:18:16.320" video="mainVideo" id=subtitle]] +[[!template text="my own judgment." start="00:18:20.880" video="mainVideo" id=subtitle]] +[[!template text="This is based typically on the fact that" start="00:18:22.240" video="mainVideo" id=subtitle]] +[[!template text="this is just a very short name," start="00:18:24.880" video="mainVideo" id=subtitle]] +[[!template text="and most local identifiers use short names," start="00:18:27.760" video="mainVideo" id=subtitle]] +[[!template text="whereas item values used for dynamic scoping" start="00:18:32.000" video="mainVideo" id=subtitle]] +[[!template text="typically have a package prefix" start="00:18:34.400" video="mainVideo" id=subtitle]] +[[!template text="or something like this." start="00:18:36.720" video="mainVideo" id=subtitle]] +[[!template text="So the fact that it's a short name" start="00:18:37.679" video="mainVideo" id=subtitle]] +[[!template text="gives me a good idea." start="00:18:38.960" video="mainVideo" id=subtitle]] +[[!template text="Here in this case," start="00:18:40.880" video="mainVideo" id=subtitle]] +[[!template text="I actually look at the code," start="00:18:41.520" video="mainVideo" id=subtitle]] +[[!template text="and we see that there's nothing in here" start="00:18:42.640" video="mainVideo" id=subtitle]] +[[!template text="that may actually refer" start="00:18:45.600" video="mainVideo" id=subtitle]] +[[!template text="to this variable `widget`," start="00:18:47.039" video="mainVideo" id=subtitle]] +[[!template text="so I think it's safe," start="00:18:48.080" video="mainVideo" id=subtitle]] +[[!template text="but in the general case," start="00:18:49.280" video="mainVideo" id=subtitle]] +[[!template text="we may look here and be surprised," start="00:18:51.360" video="mainVideo" id=subtitle]] +[[!template text="or, you know, you may call out" start="00:18:54.400" video="mainVideo" id=subtitle]] +[[!template text="the functions which may themselves end up" start="00:18:55.760" video="mainVideo" id=subtitle]] +[[!template text="referring to this variable." start="00:18:58.320" video="mainVideo" id=subtitle]] +[[!template text="So sometimes we need to investigate a" start="00:19:00.080" video="mainVideo" id=subtitle]] +[[!template text="little more." start="00:19:02.640" video="mainVideo" id=subtitle]] +[[!template text="We are most of the time not completely sure" start="00:19:03.840" video="mainVideo" id=subtitle]] +[[!template text="whether the result is correct or not," start="00:19:05.919" video="mainVideo" id=subtitle]] +[[!template text="of course, so the other thing" start="00:19:07.520" video="mainVideo" id=subtitle]] +[[!template text="you may want to check" start="00:19:09.520" video="mainVideo" id=subtitle]] +[[!template text="is also uses of things" start="00:19:10.640" video="mainVideo" id=subtitle]] +[[!template text="like `eval` or `symbol-value`." start="00:19:12.160" video="mainVideo" id=subtitle]] +[[!template text="So it's often a good idea to search," start="00:19:14.400" video="mainVideo" id=subtitle]] +[[!template text="and you do a search of `eval`," start="00:19:17.200" video="mainVideo" id=subtitle]] +[[!template text="and you see here it's using `eval`." start="00:19:18.799" video="mainVideo" id=subtitle]] +[[!template text="Hmmm... Okay, so what does this `eval` do?" start="00:19:21.490" video="mainVideo" id=subtitle]] +[[!template text="It's evaluating expressions" start="00:19:24.160" video="mainVideo" id=subtitle]] +[[!template text="that appear in `args` here" start="00:19:25.760" video="mainVideo" id=subtitle]] +[[!template text="so you can see where those args come from," start="00:19:28.240" video="mainVideo" id=subtitle]] +[[!template text="and we see here, these are expressions" start="00:19:31.840" video="mainVideo" id=subtitle]] +[[!template text="that don't do anything very special." start="00:19:35.120" video="mainVideo" id=subtitle]] +[[!template text="It's just using `make-supplicant-choice`," start="00:19:36.840" video="mainVideo" id=subtitle]] +[[!template text="and `make-supplicant-choice` itself" start="00:19:41.520" video="mainVideo" id=subtitle]] +[[!template text="just doesn't refer to `widget`, for example," start="00:19:44.960" video="mainVideo" id=subtitle]] +[[!template text="so you know we should be safe," start="00:19:47.120" video="mainVideo" id=subtitle]] +[[!template text="but while I'm here..." start="00:19:50.000" video="mainVideo" id=subtitle]] +[[!template text="okay, well, then we can do that later." start="00:19:52.559" video="mainVideo" id=subtitle]] +[[!template new="1" text="Well, that's actually the next warning," start="00:19:53.840" video="mainVideo" id=subtitle]] +[[!template text="exactly. So here we see that this is" start="00:19:55.679" video="mainVideo" id=subtitle]] +[[!template text="using the dynamically-scoped dialect," start="00:19:58.080" video="mainVideo" id=subtitle]] +[[!template text="so we convert it to lexical-scoped." start="00:20:00.000" video="mainVideo" id=subtitle]] +[[!template text="Of course, this may introduce errors," start="00:20:02.799" video="mainVideo" id=subtitle]] +[[!template text="but we hope it doesn't." start="00:20:04.559" video="mainVideo" id=subtitle]] +[[!template text="And actually, it was a good change here," start="00:20:07.200" video="mainVideo" id=subtitle]] +[[!template text="because if you see again," start="00:20:08.880" video="mainVideo" id=subtitle]] +[[!template text="this actually evals expressions" start="00:20:12.080" video="mainVideo" id=subtitle]] +[[!template text="that appear here in `args`," start="00:20:14.240" video="mainVideo" id=subtitle]] +[[!template text="and so these are expressions" start="00:20:16.159" video="mainVideo" id=subtitle]] +[[!template text="that are passed here." start="00:20:18.480" video="mainVideo" id=subtitle]] +[[!template text="So this expression here used to be" start="00:20:21.039" video="mainVideo" id=subtitle]] +[[!template text="evaluated with dynamic scoping," start="00:20:23.679" video="mainVideo" id=subtitle]] +[[!template text="even though it appears to be normal code" start="00:20:24.480" video="mainVideo" id=subtitle]] +[[!template text="within this file, which says" start="00:20:28.000" video="mainVideo" id=subtitle]] +[[!template text="it's using lexical scoping," start="00:20:29.760" video="mainVideo" id=subtitle]] +[[!template text="and so there are some remnants" start="00:20:32.559" video="mainVideo" id=subtitle]] +[[!template text="of dynamic scoping all over the place" start="00:20:34.400" video="mainVideo" id=subtitle]] +[[!template text="in Emacs still, because we have" start="00:20:36.640" video="mainVideo" id=subtitle]] +[[!template text="those calls of `eval` with a nil argument." start="00:20:37.840" video="mainVideo" id=subtitle]] +[[!template text="Here we have `cons`..." start="00:20:44.880" video="mainVideo" id=subtitle]] +[[!template text="that needs to be `hash quoted`." start="00:20:47.039" video="mainVideo" id=subtitle]] +[[!template new="1" text="Oh, and we have a reference" start="00:20:52.400" video="mainVideo" id=subtitle]] +[[!template text="to this variable `enwc-edit-id'." start="00:20:54.080" video="mainVideo" id=subtitle]] +[[!template text="So this is clearly" start="00:20:56.720" video="mainVideo" id=subtitle]] +[[!template text="a dynamic-scoped variable." start="00:20:57.520" video="mainVideo" id=subtitle]] +[[!template text="We can either add a `defvar`" start="00:21:00.400" video="mainVideo" id=subtitle]] +[[!template text="to silence the warning," start="00:21:02.000" video="mainVideo" id=subtitle]] +[[!template text="or maybe we can `require` the package." start="00:21:03.440" video="mainVideo" id=subtitle]] +[[!template text="The file that defines it..." start="00:21:06.799" video="mainVideo" id=subtitle]] +[[!template text="So let's see where it's defined." start="00:21:14.080" video="mainVideo" id=subtitle]] +[[!template text="Here it's defined in `enwc.el`," start="00:21:17.360" video="mainVideo" id=subtitle]] +[[!template text="so I'm going to try just to add" start="00:21:21.200" video="mainVideo" id=subtitle]] +[[!template text="the dependency." start="00:21:23.440" video="mainVideo" id=subtitle]] +[[!template text="I'm going to `require` here. This is risky." start="00:21:25.039" video="mainVideo" id=subtitle]] +[[!template text="We'll see when we compile a file later," start="00:21:27.840" video="mainVideo" id=subtitle]] +[[!template text="we may get a circular dependency" start="00:21:30.159" video="mainVideo" id=subtitle]] +[[!template text="because of it." start="00:21:32.320" video="mainVideo" id=subtitle]] +[[!template text="If that's the case, we're going to" start="00:21:34.720" video="mainVideo" id=subtitle]] +[[!template text="have to remove this `require`" start="00:21:36.320" video="mainVideo" id=subtitle]] +[[!template text="and instead put `defvar`s." start="00:21:38.320" video="mainVideo" id=subtitle]] +[[!template text="Sometimes it's worth actually" start="00:21:42.000" video="mainVideo" id=subtitle]] +[[!template text="looking further at the various files" start="00:21:42.559" video="mainVideo" id=subtitle]] +[[!template text="to see how to redefine the dependencies" start="00:21:44.640" video="mainVideo" id=subtitle]] +[[!template text="to break those circular dependencies," start="00:21:48.080" video="mainVideo" id=subtitle]] +[[!template text="but it's often not really" start="00:21:49.840" video="mainVideo" id=subtitle]] +[[!template text="worth the trouble." start="00:21:52.320" video="mainVideo" id=subtitle]] +[[!template text="Oh, no, that's not what--" start="00:21:55.679" video="mainVideo" id=subtitle]] +[[!template text="I'm not going to the right place..." start="00:21:58.400" video="mainVideo" id=subtitle]] +[[!template text="Here I was. So here `edit-map`." start="00:22:01.440" video="mainVideo" id=subtitle]] +[[!template text="Well, we can probably..." start="00:22:07.039" video="mainVideo" id=subtitle]] +[[!template text="it may disappear or..." start="00:22:09.760" video="mainVideo" id=subtitle]] +[[!template text="oh, I see." start="00:22:12.159" video="mainVideo" id=subtitle]] +[[!template text="Okay, so this `edit-map` actually is" start="00:22:13.760" video="mainVideo" id=subtitle]] +[[!template text="defined in this very file." start="00:22:16.320" video="mainVideo" id=subtitle]] +[[!template text="It's just that it's defined later." start="00:22:18.559" video="mainVideo" id=subtitle]] +[[!template text="So all we need to do" start="00:22:20.240" video="mainVideo" id=subtitle]] +[[!template text="is to move this definition" start="00:22:21.600" video="mainVideo" id=subtitle]] +[[!template text="to before its first use," start="00:22:24.320" video="mainVideo" id=subtitle]] +[[!template text="since otherwise it's going to be taken" start="00:22:27.200" video="mainVideo" id=subtitle]] +[[!template text="as lexically-scoped, which we don't want." start="00:22:28.960" video="mainVideo" id=subtitle]] +[[!template new="1" text="And while I'm here, I see this `copy-keymap`." start="00:22:33.520" video="mainVideo" id=subtitle]] +[[!template text="I don't like `copy-keymap`," start="00:22:35.360" video="mainVideo" id=subtitle]] +[[!template text="so I'm going to change this" start="00:22:38.400" video="mainVideo" id=subtitle]] +[[!template text="to a normal keymap," start="00:22:40.960" video="mainVideo" id=subtitle]] +[[!template text="and then I'm just going to use" start="00:22:44.080" video="mainVideo" id=subtitle]] +[[!template text="`set-keymap-parent` instead of `copy-keymap`" start="00:22:46.159" video="mainVideo" id=subtitle]] +[[!template text="to get basically the same result," start="00:22:50.080" video="mainVideo" id=subtitle]] +[[!template text="but without having copied anything." start="00:22:51.600" video="mainVideo" id=subtitle]] +[[!template text="And this one will disappear..." start="00:22:55.280" video="mainVideo" id=subtitle]] +[[!template text="this one as well-- or should hopefully," start="00:22:57.760" video="mainVideo" id=subtitle]] +[[!template text="thanks to the `require`." start="00:23:00.240" video="mainVideo" id=subtitle]] +[[!template text="Here we have a `hash` missing," start="00:23:03.360" video="mainVideo" id=subtitle]] +[[!template text="and we have some functions" start="00:23:09.840" video="mainVideo" id=subtitle]] +[[!template text="which are unknown," start="00:23:11.840" video="mainVideo" id=subtitle]] +[[!template text="so let's see..." start="00:23:14.000" video="mainVideo" id=subtitle]] +[[!template text="Where is this function defined?" start="00:23:14.666" video="mainVideo" id=subtitle]] +[[!template text="Nowhere. Huh, wonderful, okay." start="00:23:18.240" video="mainVideo" id=subtitle]] +[[!template text="So we'll just leave it like it is," start="00:23:21.679" video="mainVideo" id=subtitle]] +[[!template text="and that's going to be" start="00:23:25.200" video="mainVideo" id=subtitle]] +[[!template text="for the author of the package to fix." start="00:23:27.120" video="mainVideo" id=subtitle]] +[[!template text="How about this one?" start="00:23:31.360" video="mainVideo" id=subtitle]] +[[!template text="Oh, okay, so it's defined in `enwc.el`" start="00:23:37.120" video="mainVideo" id=subtitle]] +[[!template text="so presumably," start="00:23:40.240" video="mainVideo" id=subtitle]] +[[!template text="this is going to disappear as well." start="00:23:41.679" video="mainVideo" id=subtitle]] +[[!template text="One more..." start="00:23:50.159" video="mainVideo" id=subtitle]] +[[!template text="Okay, so this one" start="00:23:56.159" video="mainVideo" id=subtitle]] +[[!template text="is just like the previous one." start="00:23:58.640" video="mainVideo" id=subtitle]] +[[!template text="We're going to leave it at that." start="00:23:59.919" video="mainVideo" id=subtitle]] +[[!template text="And this is it! Huh, wonderful." start="00:24:04.000" video="mainVideo" id=subtitle]] +[[!template text="So let's recompile." start="00:24:06.720" video="mainVideo" id=subtitle]] +[[!template text="Oh, we have a warning for `fin`." start="00:24:16.080" video="mainVideo" id=subtitle]] +[[!template text="This variable seems not to be used" start="00:24:25.679" video="mainVideo" id=subtitle]] +[[!template text="anywhere in the file, so we're just" start="00:24:28.640" video="mainVideo" id=subtitle]] +[[!template text="going to remove it." start="00:24:32.000" video="mainVideo" id=subtitle]] +[[!template text="I leave it there just in case" start="00:24:33.440" video="mainVideo" id=subtitle]] +[[!template text="someone needs later on" start="00:24:34.880" video="mainVideo" id=subtitle]] +[[!template text="to look for a `fin` variable" start="00:24:36.000" video="mainVideo" id=subtitle]] +[[!template text="to see where it used to be." start="00:24:37.679" video="mainVideo" id=subtitle]] +[[!template text="Again, you know, maybe it's actually used..." start="00:24:39.760" video="mainVideo" id=subtitle]] +[[!template text="yeah, dynamic scoping somehow," start="00:24:41.600" video="mainVideo" id=subtitle]] +[[!template text="but given the short name," start="00:24:43.519" video="mainVideo" id=subtitle]] +[[!template text="I presume this is not the case." start="00:24:46.159" video="mainVideo" id=subtitle]] +[[!template text="Here, oh, that's the code removed" start="00:24:48.960" video="mainVideo" id=subtitle]] +[[!template text="that had a hash missing." start="00:24:51.200" video="mainVideo" id=subtitle]] +[[!template text="That's the one that's not defined." start="00:24:52.559" video="mainVideo" id=subtitle]] +[[!template text="This one is not defined," start="00:24:54.159" video="mainVideo" id=subtitle]] +[[!template text="and this is it." start="00:24:56.799" video="mainVideo" id=subtitle]] +[[!template new="1" text="Let's make a last recompilation" start="00:24:58.000" video="mainVideo" id=subtitle]] +[[!template text="to see if we missed yet something else." start="00:25:03.039" video="mainVideo" id=subtitle]] +[[!template text="Nope, and that's it, okay." start="00:25:06.080" video="mainVideo" id=subtitle]] +[[!template text="Well, here we go; we're done." start="00:25:07.919" video="mainVideo" id=subtitle]] +[[!template text="Okay so this was it." start="00:25:11.200" video="mainVideo" id=subtitle]] +[[!template text="You've seen, I think," start="00:25:14.240" video="mainVideo" id=subtitle]] +[[!template text="pretty much examples of all of those," start="00:25:15.440" video="mainVideo" id=subtitle]] +[[!template text="and I hope you enjoyed it." start="00:25:18.000" video="mainVideo" id=subtitle]] +[[!template text="Lessons to take home:" start="00:25:20.960" video="mainVideo" id=subtitle]] +[[!template text="use the byte compiler." start="00:25:22.580" video="mainVideo" id=subtitle]] +[[!template text="You can also use `flymake-mode` instead." start="00:25:23.919" video="mainVideo" id=subtitle]] +[[!template text="I recommend enabling it as much as you can," start="00:25:26.000" video="mainVideo" id=subtitle]] +[[!template text="and head the warnings." start="00:25:31.600" video="mainVideo" id=subtitle]] +[[!template text="Follow the warnings. Try to fix them." start="00:25:33.520" video="mainVideo" id=subtitle]] +[[!template text="If you can fix all of the warnings," start="00:25:35.440" video="mainVideo" id=subtitle]] +[[!template text="it's always much better," start="00:25:37.200" video="mainVideo" id=subtitle]] +[[!template text="because then the new warnings" start="00:25:38.080" video="mainVideo" id=subtitle]] +[[!template text="really show up." start="00:25:39.200" video="mainVideo" id=subtitle]] +[[!template text="And once you've done it, it's really" start="00:25:40.960" video="mainVideo" id=subtitle]] +[[!template text="kind of-- because there's always" start="00:25:42.880" video="mainVideo" id=subtitle]] +[[!template text="new things coming up." start="00:25:44.559" video="mainVideo" id=subtitle]] +[[!template text="And I think this is it." start="00:25:46.799" video="mainVideo" id=subtitle]] +[[!template text="I hope you liked it, and thank you" start="00:25:48.799" video="mainVideo" id=subtitle]] +[[!template text="for attending this presentation. Bye." start="00:25:50.720" video="mainVideo" id=subtitle]] +[[!template text="(captions by Hannah Miller)" start="00:25:56.000" video="mainVideo" id=subtitle]] |