From 4325efb50057ebf42fea0c9e3dbf6a2cd2095dae Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Sun, 28 Nov 2021 13:56:26 -0500 Subject: Update --- ...-2021-test--test-blocks--eduardo-ochs--main.vtt | 493 +++++++++++++++++++++ 2021/captions/test.md | 167 +++++++ 2 files changed, 660 insertions(+) create mode 100644 2021/captions/emacsconf-2021-test--test-blocks--eduardo-ochs--main.vtt create mode 100644 2021/captions/test.md (limited to '2021/captions') diff --git a/2021/captions/emacsconf-2021-test--test-blocks--eduardo-ochs--main.vtt b/2021/captions/emacsconf-2021-test--test-blocks--eduardo-ochs--main.vtt new file mode 100644 index 00000000..f41f699b --- /dev/null +++ b/2021/captions/emacsconf-2021-test--test-blocks--eduardo-ochs--main.vtt @@ -0,0 +1,493 @@ +WEBVTT + +00:00.240 --> 00:00:01.839 +Hi! My name is Eduardo Ochs. + +00:00:01.839 --> 00:00:02.639 +I'm the author of + +00:00:02.639 --> 00:00:04.319 +an Emacs package called eev, + +00:00:04.319 --> 00:00:05.279 +and this talk is about + +00:00:05.279 --> 00:00:06.480 +a new feature of eev + +00:00:06.480 --> 00:00:08.400 +called "test blocks". + +00:08.400 --> 00:00:10.320 +Let's start by a demo. + +00:10.320 --> 00:00:12.320 +This is a file in Lua that defines + +00:00:12.320 --> 00:00:14.160 +these two functions here, + +00:14.160 --> 00:00:18.000 +and if we type <f8> several times here, + +00:18.000 --> 00:00:20.720 +the <f8>s create a Lua REPL here + +00:00:20.720 --> 00:00:22.240 +and then they send these lines + +00:00:22.240 --> 00:00:25.840 +to the REPL, where this line here + +00:00:25.840 --> 00:00:27.840 +loads this file into the REPL, + +00:00:27.840 --> 00:00:29.679 +and these other lines here + +00:29.679 --> 00:00:33.200 +are tests for these lines. + +00:33.200 --> 00:00:34.719 +There's a lot of information here, + +00:00:34.719 --> 00:00:36.160 +so let me organize them + +00:00:36.160 --> 00:00:40.480 +in a more visual way. + +00:40.480 --> 00:00:42.960 +This is our file in Lua. + +00:42.960 --> 00:00:44.559 +Lua sees this thing + +00:00:44.559 --> 00:00:46.160 +as a multi-line comment, + +00:00:46.160 --> 00:00:47.520 +but we are going to see it + +00:00:47.520 --> 00:00:48.879 +as a test block. + +00:00:48.879 --> 00:00:50.879 +And eev mode is active, + +00:00:50.879 --> 00:00:54.480 +so <f8> does the right thing. + +00:54.480 --> 00:00:56.800 +These three lines here + +00:00:56.800 --> 00:00:58.320 +set up the target buffer + +00:00:58.320 --> 00:01:00.000 +running a Lua REPL. + +00:01:00.000 --> 00:01:02.079 +You can see the the prompt + +00:01:02.079 --> 00:01:03.520 +of the REPL here, + +01:03.520 --> 00:01:04.640 +and these lines here + +00:01:04.640 --> 00:01:07.200 +are sent to the REPL. + +01:07.200 --> 00:01:08.960 +When we type <f8> + +00:01:08.960 --> 00:01:10.720 +on a line that starts + +01:10.720 --> 00:01:11.680 +with a red star, + +00:01:11.680 --> 00:01:13.600 +like these lines here, + +01:13.600 --> 00:01:15.119 +what <f8> does is that + +00:01:15.119 --> 00:01:17.537 +it sends the rest of the line-- + +00:01:17.537 --> 00:01:18.880 +sorry, it executes + +00:01:18.880 --> 00:01:21.119 +the rest of the line as Lisp. + +01:21.119 --> 00:01:23.920 +So the three <f8>s here + +01:23.920 --> 00:01:26.000 +executes these lines as Lisp, + +00:01:26.000 --> 00:01:29.520 +and they set up the target buffer here. + +01:29.520 --> 00:01:31.119 +When we type <f8> + +00:01:31.119 --> 00:01:32.720 +on a line that does not start + +00:01:32.720 --> 00:01:34.159 +with a red star, + +00:01:34.159 --> 00:01:35.680 +the <f8> sends the line + +00:01:35.680 --> 00:01:38.799 +to the target buffer and moves down. + +01:38.799 --> 00:01:40.619 +This line loads this file + +00:01:40.619 --> 00:01:45.200 +in the REPL, and these lines are tests. + +01:45.200 --> 00:01:46.799 +So we just saw how to use + +00:01:46.799 --> 00:01:48.240 +an existing test block; + +00:01:48.240 --> 00:01:49.840 +let's now see how to create + +00:01:49.840 --> 00:01:51.280 +a new test block. + +00:01:51.280 --> 00:01:52.640 +We just have to run this: + +01:52.640 --> 00:01:55.680 +M-x ee-insert-test-block - + +01:55.680 --> 00:01:58.079 +or M-x eeit. + +01:58.079 --> 00:02:01.439 +The result depends on the major mode. + +02:01.439 --> 00:02:03.920 +Let's understand that + +02:03.920 --> 00:02:06.079 +by looking at the source code. + +02:06.079 --> 00:02:08.720 +eeit is an alias to this function here, + +02:08.720 --> 00:02:09.920 +and this function is just + +00:02:09.920 --> 00:02:12.800 +five lines of code plus a docstring... + +02:12.800 --> 00:02:14.160 +and the docstring explains + +00:02:14.160 --> 00:02:15.920 +that if the major mode is foo-mode, + +00:02:15.920 --> 00:02:18.800 +then this function tries to call + +02:18.800 --> 00:02:21.360 +a function called ee-insert-test-foo-mode + +02:21.360 --> 00:02:24.800 +if that function exists, + +02:24.800 --> 00:02:27.280 +and that, if that function does not exist, + +02:27.280 --> 00:02:29.680 +then it yields an error. + +02:29.680 --> 00:02:31.120 +And here's an example + +00:02:31.120 --> 00:02:32.560 +of one such function. + +00:02:32.560 --> 00:02:34.800 +That's a function that inserts + +00:02:34.800 --> 00:02:37.280 +a test block in haskell-mode. + +02:37.280 --> 00:02:40.959 +Here we can see two functions like this: + +00:02:40.959 --> 00:02:46.080 +one for haskell-mode and one for js-mode. + +02:46.080 --> 00:02:48.560 +These functions look quite similar, + +00:02:48.560 --> 00:02:52.720 +but their effects look quite different. + +02:52.720 --> 00:02:54.800 +To make this comparison here, + +00:02:54.800 --> 00:02:57.280 +I started by writing-- + +02:57.280 --> 00:02:59.040 +by creating seven files, + +00:02:59.040 --> 00:03:01.120 +each one in a different language. + +03:01.120 --> 00:03:03.040 +Initially, each one of these files + +03:03.040 --> 00:03:04.159 +only had a comment + +00:03:04.159 --> 00:03:06.403 +with the name of the language... + +00:03:06.403 --> 00:03:10.560 +so: C, Haskell, Javascript, Org Mode, etc. + +03:10.560 --> 00:03:12.560 +In each one of these files, + +00:03:12.560 --> 00:03:16.959 +I typed M-x eeit to insert a test block. + +03:16.959 --> 00:03:18.319 +So here we can see that + +00:03:18.319 --> 00:03:20.319 +these test blocks are different. + +03:20.319 --> 00:03:21.440 +For example, the syntax + +00:03:21.440 --> 00:03:22.560 +for multi-line comments + +00:03:22.560 --> 00:03:25.200 +is different depending on the language. + +03:25.200 --> 00:03:27.440 +This block here that selects + +00:03:27.440 --> 00:03:30.100 +which REPL to run is also different, + +00:03:30.100 --> 00:03:34.080 +and this line here that tells the REPL + +00:03:34.080 --> 00:03:36.000 +to load the current file + +00:03:36.000 --> 00:03:37.680 +is also different, + +03:37.680 --> 00:03:39.680 +depending on the language. + +03:39.680 --> 00:03:41.840 +In some cases, I had to improvise a bit. + +03:41.840 --> 00:03:45.360 +For example, to implement test blocks + +00:03:45.360 --> 00:03:48.560 +in shell mode, I had to use + +03:48.560 --> 00:03:52.560 +this weird syntax using a here-document. + +03:52.560 --> 00:03:55.040 +In Tcl, I also had to improvise a bit, + +00:03:55.040 --> 00:03:55.920 +and in some cases, + +00:03:55.920 --> 00:03:57.840 +I had to improvise a lot. + +03:57.840 --> 00:04:00.159 +For example, in Org Mode, + +00:04:00.159 --> 00:04:02.400 +there isn't an obvious REPL to run, + +00:04:02.400 --> 00:04:03.840 +and there isn't an obvious way + +00:04:03.840 --> 00:04:06.480 +to load the the current Org file + +00:04:06.480 --> 00:04:09.360 +into the REPL, so the default action + +00:04:09.360 --> 00:04:12.560 +of M-x eeit in Org Mode + +00:04:12.560 --> 00:04:15.439 +is just to insert this thing here, + +04:15.439 --> 00:04:22.320 +that we can use to run a shell in a REPL. + +04:22.320 --> 00:04:25.280 +So these functions are quite similar. + +00:04:25.280 --> 00:04:26.240 +In the beginning, + +00:04:26.240 --> 00:04:27.919 +I was writing all of them by hand... + +00:04:27.919 --> 00:04:29.120 +but then I got bored + +00:04:29.120 --> 00:04:30.160 +and I wrote a function + +00:04:30.160 --> 00:04:33.840 +to help me write functions like that. + +04:33.840 --> 00:04:37.280 +This function is called find-eeit-links, + +00:04:37.280 --> 00:04:39.919 +and it creates a temporary buffer, + +04:39.919 --> 00:04:42.080 +and the contents of this temporary buffer + +00:04:42.080 --> 00:04:44.320 +depends on the major mode. For example, + +00:04:44.320 --> 00:04:45.680 +if the current mode is python-mode, + +04:45.680 --> 00:04:48.880 +then running this function here + +04:48.880 --> 00:04:50.160 +creates a temporary buffer + +00:04:50.160 --> 00:04:53.120 +that lets me write the support + +00:04:53.120 --> 00:04:55.440 +for test blocks in python-mode, + +00:04:55.440 --> 00:04:57.440 +or rewrite the function + +00:04:57.440 --> 00:04:59.040 +that supports test blocks + +04:59.040 --> 00:05:00.880 +in python-mode. + +05:00.880 --> 00:05:03.600 +So if I'm in python-mode and I run this, + +05:03.600 --> 00:05:06.639 +I get a temporary buffer like this, + +05:06.639 --> 00:05:08.639 +in which this thing is my template + +00:05:08.639 --> 00:05:11.039 +for the function. Usually, this string + +00:05:11.039 --> 00:05:11.919 +is totally wrong, + +00:05:11.919 --> 00:05:13.919 +I have to rewrite this string, + +05:13.919 --> 00:05:14.960 +but the rest is right. + +00:05:14.960 --> 00:05:16.960 +You can see python-mode here + +00:05:16.960 --> 00:05:18.479 +in the name of the function. + +00:05:18.479 --> 00:05:20.080 +So we have to edit this + +00:05:20.080 --> 00:05:22.840 +and save that to our ~/.emacs. + +05:22.840 --> 00:05:26.080 +By the way, these things here + +00:05:26.080 --> 00:05:28.880 +hyperlinks to many different things... + +05:28.880 --> 00:05:31.600 +This Elisp hyperlink here + +05:31.600 --> 00:05:32.880 +points to the source code, + +00:05:32.880 --> 00:05:36.880 +to the section in which these functions + +00:05:36.880 --> 00:05:39.919 +are defined. So you can see this here, + +00:05:39.919 --> 00:05:41.759 +the function that supports C, + +05:41.759 --> 00:05:42.800 +the function for Haskell, + +00:05:42.800 --> 00:05:46.400 +the function for Javascript, etc... + +05:46.400 --> 00:05:47.520 +and that's it! + +00:05:47.520 --> 00:05:49.440 +This is a five-minute talk, + +00:05:49.440 --> 00:05:50.960 +so I can't say much... + +05:50.960 --> 00:05:52.320 +If you want more information, + +00:05:52.320 --> 00:05:54.800 +or if you want to see real-world examples, + +00:05:54.800 --> 00:05:57.280 +how I use test blocks, etc. etc., + +00:05:57.280 --> 00:05:58.639 +see this page here... + +00:05:58.639 --> 00:06:01.253 +and I do not have time to explain this + +00:06:01.253 --> 00:06:02.560 +"By the way" here. + +06:02.560 --> 06:03.333 +So that's it! Thanks! =) + +06:03.333 --> 06:04.333 +[captions by Eduardo Ochs] diff --git a/2021/captions/test.md b/2021/captions/test.md new file mode 100644 index 00000000..d6beb515 --- /dev/null +++ b/2021/captions/test.md @@ -0,0 +1,167 @@ + +# Transcript + +[[!template text="Hi! My name is Eduardo Ochs." start="00:00:00.240" video="mainVideo" id=subtitle]] +[[!template text="I'm the author of" start="00:00:01.839" video="mainVideo" id=subtitle]] +[[!template text="an Emacs package called eev," start="00:00:02.639" video="mainVideo" id=subtitle]] +[[!template text="and this talk is about" start="00:00:04.319" video="mainVideo" id=subtitle]] +[[!template text="a new feature of eev" start="00:00:05.279" video="mainVideo" id=subtitle]] +[[!template text="called "test blocks"." start="00:00:06.480" video="mainVideo" id=subtitle]] +[[!template text="Let's start by a demo." start="00:00:08.400" video="mainVideo" id=subtitle]] +[[!template text="This is a file in Lua that defines" start="00:00:10.320" video="mainVideo" id=subtitle]] +[[!template text="these two functions here," start="00:00:12.320" video="mainVideo" id=subtitle]] +[[!template text="and if we type <f8> several times here," start="00:00:14.160" video="mainVideo" id=subtitle]] +[[!template text="the <f8>s create a Lua REPL here" start="00:00:18.000" video="mainVideo" id=subtitle]] +[[!template text="and then they send these lines" start="00:00:20.720" video="mainVideo" id=subtitle]] +[[!template text="to the REPL, where this line here" start="00:00:22.240" video="mainVideo" id=subtitle]] +[[!template text="loads this file into the REPL," start="00:00:25.840" video="mainVideo" id=subtitle]] +[[!template text="and these other lines here" start="00:00:27.840" video="mainVideo" id=subtitle]] +[[!template text="are tests for these lines." start="00:00:29.679" video="mainVideo" id=subtitle]] +[[!template text="There's a lot of information here," start="00:00:33.200" video="mainVideo" id=subtitle]] +[[!template text="so let me organize them" start="00:00:34.719" video="mainVideo" id=subtitle]] +[[!template text="in a more visual way." start="00:00:36.160" video="mainVideo" id=subtitle]] +[[!template text="This is our file in Lua." start="00:00:40.480" video="mainVideo" id=subtitle]] +[[!template text="Lua sees this thing" start="00:00:42.960" video="mainVideo" id=subtitle]] +[[!template text="as a multi-line comment," start="00:00:44.559" video="mainVideo" id=subtitle]] +[[!template text="but we are going to see it" start="00:00:46.160" video="mainVideo" id=subtitle]] +[[!template text="as a test block." start="00:00:47.520" video="mainVideo" id=subtitle]] +[[!template text="And eev mode is active," start="00:00:48.879" video="mainVideo" id=subtitle]] +[[!template text="so <f8> does the right thing." start="00:00:50.879" video="mainVideo" id=subtitle]] +[[!template text="These three lines here" start="00:00:54.480" video="mainVideo" id=subtitle]] +[[!template text="set up the target buffer" start="00:00:56.800" video="mainVideo" id=subtitle]] +[[!template text="running a Lua REPL." start="00:00:58.320" video="mainVideo" id=subtitle]] +[[!template text="You can see the the prompt" start="00:01:00.000" video="mainVideo" id=subtitle]] +[[!template text="of the REPL here," start="00:01:02.079" video="mainVideo" id=subtitle]] +[[!template text="and these lines here" start="00:01:03.520" video="mainVideo" id=subtitle]] +[[!template text="are sent to the REPL." start="00:01:04.640" video="mainVideo" id=subtitle]] +[[!template text="When we type <f8>" start="00:01:07.200" video="mainVideo" id=subtitle]] +[[!template text="on a line that starts" start="00:01:08.960" video="mainVideo" id=subtitle]] +[[!template text="with a red star," start="00:01:10.720" video="mainVideo" id=subtitle]] +[[!template text="like these lines here," start="00:01:11.680" video="mainVideo" id=subtitle]] +[[!template text="what <f8> does is that" start="00:01:13.600" video="mainVideo" id=subtitle]] +[[!template text="it sends the rest of the line--" start="00:01:15.119" video="mainVideo" id=subtitle]] +[[!template text="sorry, it executes" start="00:01:17.537" video="mainVideo" id=subtitle]] +[[!template text="the rest of the line as Lisp." start="00:01:18.880" video="mainVideo" id=subtitle]] +[[!template text="So the three <f8>s here" start="00:01:21.119" video="mainVideo" id=subtitle]] +[[!template text="executes these lines as Lisp," start="00:01:23.920" video="mainVideo" id=subtitle]] +[[!template text="and they set up the target buffer here." start="00:01:26.000" video="mainVideo" id=subtitle]] +[[!template text="When we type <f8>" start="00:01:29.520" video="mainVideo" id=subtitle]] +[[!template text="on a line that does not start" start="00:01:31.119" video="mainVideo" id=subtitle]] +[[!template text="with a red star," start="00:01:32.720" video="mainVideo" id=subtitle]] +[[!template text="the <f8> sends the line" start="00:01:34.159" video="mainVideo" id=subtitle]] +[[!template text="to the target buffer and moves down." start="00:01:35.680" video="mainVideo" id=subtitle]] +[[!template text="This line loads this file" start="00:01:38.799" video="mainVideo" id=subtitle]] +[[!template text="in the REPL, and these lines are tests." start="00:01:40.619" video="mainVideo" id=subtitle]] +[[!template text="So we just saw how to use" start="00:01:45.200" video="mainVideo" id=subtitle]] +[[!template text="an existing test block;" start="00:01:46.799" video="mainVideo" id=subtitle]] +[[!template text="let's now see how to create" start="00:01:48.240" video="mainVideo" id=subtitle]] +[[!template text="a new test block." start="00:01:49.840" video="mainVideo" id=subtitle]] +[[!template text="We just have to run this:" start="00:01:51.280" video="mainVideo" id=subtitle]] +[[!template text="M-x ee-insert-test-block -" start="00:01:52.640" video="mainVideo" id=subtitle]] +[[!template text="or M-x eeit." start="00:01:55.680" video="mainVideo" id=subtitle]] +[[!template text="The result depends on the major mode." start="00:01:58.079" video="mainVideo" id=subtitle]] +[[!template text="Let's understand that" start="00:02:01.439" video="mainVideo" id=subtitle]] +[[!template text="by looking at the source code." start="00:02:03.920" video="mainVideo" id=subtitle]] +[[!template text="eeit is an alias to this function here," start="00:02:06.079" video="mainVideo" id=subtitle]] +[[!template text="and this function is just" start="00:02:08.720" video="mainVideo" id=subtitle]] +[[!template text="five lines of code plus a docstring..." start="00:02:09.920" video="mainVideo" id=subtitle]] +[[!template text="and the docstring explains" start="00:02:12.800" video="mainVideo" id=subtitle]] +[[!template text="that if the major mode is foo-mode," start="00:02:14.160" video="mainVideo" id=subtitle]] +[[!template text="then this function tries to call" start="00:02:15.920" video="mainVideo" id=subtitle]] +[[!template text="a function called ee-insert-test-foo-mode" start="00:02:18.800" video="mainVideo" id=subtitle]] +[[!template text="if that function exists," start="00:02:21.360" video="mainVideo" id=subtitle]] +[[!template text="and that, if that function does not exist," start="00:02:24.800" video="mainVideo" id=subtitle]] +[[!template text="then it yields an error." start="00:02:27.280" video="mainVideo" id=subtitle]] +[[!template text="And here's an example" start="00:02:29.680" video="mainVideo" id=subtitle]] +[[!template text="of one such function." start="00:02:31.120" video="mainVideo" id=subtitle]] +[[!template text="That's a function that inserts" start="00:02:32.560" video="mainVideo" id=subtitle]] +[[!template text="a test block in haskell-mode." start="00:02:34.800" video="mainVideo" id=subtitle]] +[[!template text="Here we can see two functions like this:" start="00:02:37.280" video="mainVideo" id=subtitle]] +[[!template text="one for haskell-mode and one for js-mode." start="00:02:40.959" video="mainVideo" id=subtitle]] +[[!template text="These functions look quite similar," start="00:02:46.080" video="mainVideo" id=subtitle]] +[[!template text="but their effects look quite different." start="00:02:48.560" video="mainVideo" id=subtitle]] +[[!template text="To make this comparison here," start="00:02:52.720" video="mainVideo" id=subtitle]] +[[!template text="I started by writing--" start="00:02:54.800" video="mainVideo" id=subtitle]] +[[!template text="by creating seven files," start="00:02:57.280" video="mainVideo" id=subtitle]] +[[!template text="each one in a different language." start="00:02:59.040" video="mainVideo" id=subtitle]] +[[!template text="Initially, each one of these files" start="00:03:01.120" video="mainVideo" id=subtitle]] +[[!template text="only had a comment" start="00:03:03.040" video="mainVideo" id=subtitle]] +[[!template text="with the name of the language..." start="00:03:04.159" video="mainVideo" id=subtitle]] +[[!template text="so: C, Haskell, Javascript, Org Mode, etc." start="00:03:06.403" video="mainVideo" id=subtitle]] +[[!template text="In each one of these files," start="00:03:10.560" video="mainVideo" id=subtitle]] +[[!template text="I typed M-x eeit to insert a test block." start="00:03:12.560" video="mainVideo" id=subtitle]] +[[!template text="So here we can see that" start="00:03:16.959" video="mainVideo" id=subtitle]] +[[!template text="these test blocks are different." start="00:03:18.319" video="mainVideo" id=subtitle]] +[[!template text="For example, the syntax" start="00:03:20.319" video="mainVideo" id=subtitle]] +[[!template text="for multi-line comments" start="00:03:21.440" video="mainVideo" id=subtitle]] +[[!template text="is different depending on the language." start="00:03:22.560" video="mainVideo" id=subtitle]] +[[!template text="This block here that selects" start="00:03:25.200" video="mainVideo" id=subtitle]] +[[!template text="which REPL to run is also different," start="00:03:27.440" video="mainVideo" id=subtitle]] +[[!template text="and this line here that tells the REPL" start="00:03:30.100" video="mainVideo" id=subtitle]] +[[!template text="to load the current file" start="00:03:34.080" video="mainVideo" id=subtitle]] +[[!template text="is also different," start="00:03:36.000" video="mainVideo" id=subtitle]] +[[!template text="depending on the language." start="00:03:37.680" video="mainVideo" id=subtitle]] +[[!template text="In some cases, I had to improvise a bit." start="00:03:39.680" video="mainVideo" id=subtitle]] +[[!template text="For example, to implement test blocks" start="00:03:41.840" video="mainVideo" id=subtitle]] +[[!template text="in shell mode, I had to use" start="00:03:45.360" video="mainVideo" id=subtitle]] +[[!template text="this weird syntax using a here-document." start="00:03:48.560" video="mainVideo" id=subtitle]] +[[!template text="In Tcl, I also had to improvise a bit," start="00:03:52.560" video="mainVideo" id=subtitle]] +[[!template text="and in some cases," start="00:03:55.040" video="mainVideo" id=subtitle]] +[[!template text="I had to improvise a lot." start="00:03:55.920" video="mainVideo" id=subtitle]] +[[!template text="For example, in Org Mode," start="00:03:57.840" video="mainVideo" id=subtitle]] +[[!template text="there isn't an obvious REPL to run," start="00:04:00.159" video="mainVideo" id=subtitle]] +[[!template text="and there isn't an obvious way" start="00:04:02.400" video="mainVideo" id=subtitle]] +[[!template text="to load the the current Org file" start="00:04:03.840" video="mainVideo" id=subtitle]] +[[!template text="into the REPL, so the default action" start="00:04:06.480" video="mainVideo" id=subtitle]] +[[!template text="of M-x eeit in Org Mode" start="00:04:09.360" video="mainVideo" id=subtitle]] +[[!template text="is just to insert this thing here," start="00:04:12.560" video="mainVideo" id=subtitle]] +[[!template text="that we can use to run a shell in a REPL." start="00:04:15.439" video="mainVideo" id=subtitle]] +[[!template text="So these functions are quite similar." start="00:04:22.320" video="mainVideo" id=subtitle]] +[[!template text="In the beginning," start="00:04:25.280" video="mainVideo" id=subtitle]] +[[!template text="I was writing all of them by hand..." start="00:04:26.240" video="mainVideo" id=subtitle]] +[[!template text="but then I got bored" start="00:04:27.919" video="mainVideo" id=subtitle]] +[[!template text="and I wrote a function" start="00:04:29.120" video="mainVideo" id=subtitle]] +[[!template text="to help me write functions like that." start="00:04:30.160" video="mainVideo" id=subtitle]] +[[!template text="This function is called find-eeit-links," start="00:04:33.840" video="mainVideo" id=subtitle]] +[[!template text="and it creates a temporary buffer," start="00:04:37.280" video="mainVideo" id=subtitle]] +[[!template text="and the contents of this temporary buffer" start="00:04:39.919" video="mainVideo" id=subtitle]] +[[!template text="depends on the major mode. For example," start="00:04:42.080" video="mainVideo" id=subtitle]] +[[!template text="if the current mode is python-mode," start="00:04:44.320" video="mainVideo" id=subtitle]] +[[!template text="then running this function here" start="00:04:45.680" video="mainVideo" id=subtitle]] +[[!template text="creates a temporary buffer" start="00:04:48.880" video="mainVideo" id=subtitle]] +[[!template text="that lets me write the support" start="00:04:50.160" video="mainVideo" id=subtitle]] +[[!template text="for test blocks in python-mode," start="00:04:53.120" video="mainVideo" id=subtitle]] +[[!template text="or rewrite the function" start="00:04:55.440" video="mainVideo" id=subtitle]] +[[!template text="that supports test blocks" start="00:04:57.440" video="mainVideo" id=subtitle]] +[[!template text="in python-mode." start="00:04:59.040" video="mainVideo" id=subtitle]] +[[!template text="So if I'm in python-mode and I run this," start="00:05:00.880" video="mainVideo" id=subtitle]] +[[!template text="I get a temporary buffer like this," start="00:05:03.600" video="mainVideo" id=subtitle]] +[[!template text="in which this thing is my template" start="00:05:06.639" video="mainVideo" id=subtitle]] +[[!template text="for the function. Usually, this string" start="00:05:08.639" video="mainVideo" id=subtitle]] +[[!template text="is totally wrong," start="00:05:11.039" video="mainVideo" id=subtitle]] +[[!template text="I have to rewrite this string," start="00:05:11.919" video="mainVideo" id=subtitle]] +[[!template text="but the rest is right." start="00:05:13.919" video="mainVideo" id=subtitle]] +[[!template text="You can see python-mode here" start="00:05:14.960" video="mainVideo" id=subtitle]] +[[!template text="in the name of the function." start="00:05:16.960" video="mainVideo" id=subtitle]] +[[!template text="So we have to edit this" start="00:05:18.479" video="mainVideo" id=subtitle]] +[[!template text="and save that to our ~/.emacs." start="00:05:20.080" video="mainVideo" id=subtitle]] +[[!template text="By the way, these things here" start="00:05:22.840" video="mainVideo" id=subtitle]] +[[!template text="hyperlinks to many different things..." start="00:05:26.080" video="mainVideo" id=subtitle]] +[[!template text="This Elisp hyperlink here" start="00:05:28.880" video="mainVideo" id=subtitle]] +[[!template text="points to the source code," start="00:05:31.600" video="mainVideo" id=subtitle]] +[[!template text="to the section in which these functions" start="00:05:32.880" video="mainVideo" id=subtitle]] +[[!template text="are defined. So you can see this here," start="00:05:36.880" video="mainVideo" id=subtitle]] +[[!template text="the function that supports C," start="00:05:39.919" video="mainVideo" id=subtitle]] +[[!template text="the function for Haskell," start="00:05:41.759" video="mainVideo" id=subtitle]] +[[!template text="the function for Javascript, etc..." start="00:05:42.800" video="mainVideo" id=subtitle]] +[[!template text="and that's it!" start="00:05:46.400" video="mainVideo" id=subtitle]] +[[!template text="This is a five-minute talk," start="00:05:47.520" video="mainVideo" id=subtitle]] +[[!template text="so I can't say much..." start="00:05:49.440" video="mainVideo" id=subtitle]] +[[!template text="If you want more information," start="00:05:50.960" video="mainVideo" id=subtitle]] +[[!template text="or if you want to see real-world examples," start="00:05:52.320" video="mainVideo" id=subtitle]] +[[!template text="how I use test blocks, etc. etc.," start="00:05:54.800" video="mainVideo" id=subtitle]] +[[!template text="see this page here..." start="00:05:57.280" video="mainVideo" id=subtitle]] +[[!template text="and I do not have time to explain this" start="00:05:58.639" video="mainVideo" id=subtitle]] +[[!template text=""By the way" here." start="00:06:01.253" video="mainVideo" id=subtitle]] +[[!template text="So that's it! Thanks! =)" start="00:06:02.560" video="mainVideo" id=subtitle]] +[[!template text="captions by Eduardo Ochs" start="00:06:03.333" video="mainVideo" id=subtitle]] -- cgit v1.2.3