From 8f15985f7daf2150f63078a4d3a22d99a2144da6 Mon Sep 17 00:00:00 2001 From: EmacsConf Date: Sat, 2 Dec 2023 13:35:16 -0500 Subject: Automated commit --- ...all-languages--musa-alhassy--main--chapters.vtt | 20 + ...pment-for-all-languages--musa-alhassy--main.vtt | 607 +++++++++++++++++++++ 2023/info/eval-after.md | 206 +++++++ 2023/info/eval-before.md | 10 +- 4 files changed, 842 insertions(+), 1 deletion(-) create mode 100644 2023/captions/emacsconf-2023-eval--editor-integrated-repl-driven-development-for-all-languages--musa-alhassy--main--chapters.vtt create mode 100644 2023/captions/emacsconf-2023-eval--editor-integrated-repl-driven-development-for-all-languages--musa-alhassy--main.vtt diff --git a/2023/captions/emacsconf-2023-eval--editor-integrated-repl-driven-development-for-all-languages--musa-alhassy--main--chapters.vtt b/2023/captions/emacsconf-2023-eval--editor-integrated-repl-driven-development-for-all-languages--musa-alhassy--main--chapters.vtt new file mode 100644 index 00000000..01b7ca18 --- /dev/null +++ b/2023/captions/emacsconf-2023-eval--editor-integrated-repl-driven-development-for-all-languages--musa-alhassy--main--chapters.vtt @@ -0,0 +1,20 @@ +WEBVTT + + +00:00:04.880 --> 00:00:35.989 +Introduction + +00:00:35.989 --> 00:03:35.809 +The wonders of C-x C-e + +00:03:35.809 --> 00:04:51.143 +An overview of REPL Driven Development + +00:04:51.143 --> 00:07:28.029 +REPL Driven Development with Java + +00:07:28.029 --> 00:07:59.669 +Bring your own Read Protocol + +00:07:59.669 --> 00:09:37.029 +Use Case: RDD & Job Interviews diff --git a/2023/captions/emacsconf-2023-eval--editor-integrated-repl-driven-development-for-all-languages--musa-alhassy--main.vtt b/2023/captions/emacsconf-2023-eval--editor-integrated-repl-driven-development-for-all-languages--musa-alhassy--main.vtt new file mode 100644 index 00000000..a0242577 --- /dev/null +++ b/2023/captions/emacsconf-2023-eval--editor-integrated-repl-driven-development-for-all-languages--musa-alhassy--main.vtt @@ -0,0 +1,607 @@ +WEBVTT captioned by bhavin192 + +NOTE Introduction + +00:00:04.880 --> 00:00:10.000 +Hello, and welcome to EmacsConf 2023! + +00:00:10.001 --> 00:00:12.109 +My name is Musa Al-hassy, + +00:00:12.109 --> 00:00:15.549 +and I will be talking about "REPL-driven development." + +00:00:15.549 --> 00:00:18.269 +I like programming languages so much. + +00:00:18.269 --> 00:00:20.269 +I want to use them all over the place. + +00:00:20.269 --> 00:00:23.069 +I got a PhD in the topic. + +00:00:23.069 --> 00:00:25.349 +So let's just dive in. + +00:00:25.349 --> 00:00:27.949 +This is a lightning talk, + +00:00:27.949 --> 00:00:31.309 +so the details will be available in the repository. + +00:00:31.309 --> 00:00:33.469 +Links to longer videos and GIFs + +00:00:33.469 --> 00:00:35.989 +for those who are interested. + +NOTE The wonders of C-x C-e + +00:00:35.989 --> 00:00:37.309 +So the wonderful thing about Emacs + +00:00:37.309 --> 00:00:40.589 +is that you can execute Lisp anywhere. + +00:00:40.589 --> 00:00:42.829 +For example, I can go to this piece of Lisp, + +00:00:42.829 --> 00:00:45.576 +press Ctrl-x Ctrl-e (`C-x C-e`) + +00:00:45.576 --> 00:00:47.549 +and get a little pop-up. + +00:00:47.549 --> 00:00:49.669 +Alright, so here I pressed `C-x C-e` + +00:00:49.669 --> 00:00:51.389 +and this is what it ran. + +00:00:51.389 --> 00:00:52.776 +And what this package gives you + +00:00:52.776 --> 00:00:54.509 +is the same ability + +00:00:54.509 --> 00:00:56.909 +for any language of your choosing. + +00:00:56.909 --> 00:00:59.229 +So for example, here is some Java, + +00:00:59.229 --> 00:01:02.469 +and I bound it to Ctrl-x, Ctrl-j (`C-x C-j`). + +00:01:02.469 --> 00:01:07.149 +So I say `C-x C-j`, and this runs some code, + +00:01:07.149 --> 00:01:13.709 +and over here I get a little pop-up. + +00:01:13.709 --> 00:01:15.069 +The wonderful thing about + +00:01:15.069 --> 00:01:16.829 +being able to run code from anywhere + +00:01:16.829 --> 00:01:19.029 +is that you can keep it in normal text files + +00:01:19.029 --> 00:01:20.629 +or any kind of file you like. + +00:01:20.629 --> 00:01:23.669 +For example, you can have hyperlinks, + +00:01:23.669 --> 00:01:25.109 +as it were…, like this one. + +00:01:25.109 --> 00:01:28.549 +`C-x C-e`, and now we can see this down here. + +00:01:28.549 --> 00:01:30.789 +Learn about it. + +00:01:30.789 --> 00:01:34.189 +But being able to run other languages besides Emacs + +00:01:34.189 --> 00:01:36.149 +lets us do some interesting things. + +00:01:36.149 --> 00:01:39.589 +For example, in the middle of a JavaScript program, + +00:01:39.589 --> 00:01:43.429 +you might write a line like this. `C-x C-n`. + +00:01:43.429 --> 00:01:45.229 +And that says down here + +00:01:45.229 --> 00:01:47.269 +`javascript-eval` in the mode line, + +00:01:47.269 --> 00:01:49.643 +and so this just checks that some endpoint + +00:01:49.643 --> 00:01:51.189 +is working as intended. + +00:01:51.189 --> 00:01:52.749 +So you don't need to use an external tool + +00:01:52.749 --> 00:01:53.589 +to check endpoints. + +00:01:53.589 --> 00:01:57.469 +You can just use Emacs in your favorite language. + +00:01:57.469 --> 00:01:59.629 +You know, you can keep your spirit up. + +00:01:59.629 --> 00:02:03.709 +So, `C-x C-a` runs `applescript-eval`. + +00:02:03.709 --> 00:02:06.376 +[Computer]: You can do it, buddy. + +00:02:06.376 --> 00:02:13.269 +[Musa]: Maybe you heard that in the background? + +00:02:13.269 --> 00:02:15.389 +The cool thing is, your code immediately takes form. + +00:02:15.389 --> 00:02:18.469 +Right away, you see it doing things, you know, + +00:02:18.469 --> 00:02:20.349 +altering your environment. + +00:02:20.349 --> 00:02:24.429 +For example, this is JavaScript, + +00:02:24.429 --> 00:02:28.349 +and JavaScript here is gonna change Emacs for us. + +00:02:28.349 --> 00:02:32.109 +So `C-x C-n`. And you can see down here + +00:02:32.109 --> 00:02:34.669 +`javascript-eval` was invoked. + +00:02:34.669 --> 00:02:38.789 +It returned true, and this line of JavaScript + +00:02:38.789 --> 00:02:41.709 +altered our Emacs. So that's really nice. + +00:02:41.709 --> 00:02:43.749 +So you don't need to use just Emacs Lisp if you like. + +00:02:43.749 --> 00:02:46.149 +You can use other systems. + +00:02:46.149 --> 00:02:50.069 +As you saw, the output is shown in overlays. + +00:02:50.069 --> 00:02:52.869 +So here's, for example, `C-x C-p` to run + +00:02:52.869 --> 00:02:54.109 +some Python code. + +00:02:54.109 --> 00:02:55.476 +Notice it blinked in red + +00:02:55.476 --> 00:02:56.869 +because I thought red was nice. + +00:02:56.869 --> 00:02:58.389 +You can configure as you like. + +00:02:58.389 --> 00:02:59.409 +And if you hover over it, + +00:02:59.409 --> 00:03:01.869 +you can see the solution there, + +00:03:01.869 --> 00:03:04.669 +and you can see it in a variety of familiar ways + +00:03:04.669 --> 00:03:08.709 +if you use `C-x C-e` regularly. + +00:03:08.709 --> 00:03:09.989 +You can insert the results. + +00:03:09.989 --> 00:03:14.269 +You can find documentation about them. + +00:03:14.269 --> 00:03:15.989 +The idea here is that + +00:03:15.989 --> 00:03:20.389 +you have this familiar Lisp workflow + +00:03:20.389 --> 00:03:24.989 +with `C-x C-e`, and this package ports it over + +00:03:24.989 --> 00:03:27.069 +to your favorite language out. + +00:03:27.069 --> 00:03:28.343 +So you can eval things, + +00:03:28.343 --> 00:03:30.789 +you can insert them, and do as you like. + +00:03:30.789 --> 00:03:35.809 +I think that's really neat. + +NOTE An overview of REPL Driven Development + +00:03:35.809 --> 00:03:37.209 +This package allows you to do + +00:03:37.209 --> 00:03:39.109 +REPL driven development. + +00:03:39.109 --> 00:03:42.309 +In that, you can use it to grow your program. + +00:03:42.309 --> 00:03:43.709 +You don't need to restart it. + +00:03:43.709 --> 00:03:45.549 +You can see changes live. + +00:03:45.549 --> 00:03:50.149 +So here's, for example, this is in a Java runtime. + +00:03:50.149 --> 00:03:52.869 +You can see some balls bouncing around. + +00:03:52.869 --> 00:03:54.509 +I don't really know which one is the second one, + +00:03:54.509 --> 00:03:57.229 +but let's increase its size. `C-x C-j`. + +00:03:57.229 --> 00:04:00.189 +And this one increased in size, + +00:04:00.189 --> 00:04:02.189 +and you can see down here I pressed `C-x C-j`. + +00:04:02.189 --> 00:04:05.549 +Let's change the color to blue, + +00:04:05.549 --> 00:04:09.309 +`C-x C-j`, the color is blue. + +00:04:09.309 --> 00:04:12.376 +So all these changes are happening live. + +00:04:12.376 --> 00:04:14.429 +Three balls isn't really a ball pit. + +00:04:14.429 --> 00:04:18.989 +Let's go to 50 balls. There you go. + +00:04:18.989 --> 00:04:21.469 +So it's nice that you can do this + +00:04:21.469 --> 00:04:23.209 +without leaving your environment, + +00:04:23.209 --> 00:04:26.189 +without building, you can rapidly modify and see. + +00:04:26.189 --> 00:04:29.776 +I think that's nice. + +00:04:29.776 --> 00:04:32.829 +Unfortunately, I'm at the halfway point, + +00:04:32.829 --> 00:04:35.309 +so I won't be able to work through + +00:04:35.309 --> 00:04:37.109 +some of these nice problems, + +00:04:37.109 --> 00:04:38.676 +but you can see the videos + +00:04:38.676 --> 00:04:41.509 +or GIFs on the associated repo. + +00:04:41.509 --> 00:04:42.709 +Likewise for this one. + +00:04:42.709 --> 00:04:43.909 +This one would have been a lot of fun, + +00:04:43.909 --> 00:04:46.509 +but unfortunately, we're running short on time. + +00:04:46.509 --> 00:04:51.143 +Apologies. + +NOTE REPL Driven Development with Java + +00:04:51.143 --> 00:04:56.209 +The neat thing here is: this package tries to + +00:04:56.209 --> 00:05:00.269 +bring the feeling of Lisp to other languages. + +00:05:00.269 --> 00:05:03.509 +So the idea of a REPL, or a Read Eval Print Loop + +00:05:03.509 --> 00:05:06.949 +is R and P are data interchange protocols. + +00:05:06.949 --> 00:05:09.869 +Unfortunately, not every language has those, + +00:05:09.869 --> 00:05:12.709 +but this package kind of encourages us to + +00:05:12.709 --> 00:05:14.643 +implement them if we don't have them. + +00:05:14.643 --> 00:05:16.909 +Let me show you an example. + +00:05:16.909 --> 00:05:20.589 +What do I mean here? + +00:05:20.589 --> 00:05:22.709 +This is a Java file. + +00:05:22.709 --> 00:05:25.189 +I've loaded this definition in. + +00:05:25.189 --> 00:05:28.543 +We can press `C-x C-j`, + +00:05:28.543 --> 00:05:30.909 +and you see it's a list of person. + +00:05:30.909 --> 00:05:33.829 +I didn't give this a name, so its name is $59. + +00:05:33.829 --> 00:05:40.829 +If I hover over it, we can see the definition again. + +00:05:40.829 --> 00:05:44.429 +So it's a person called Hamid, age 5, + +00:05:44.429 --> 00:05:46.229 +another person called Jaafar, age 6. + +00:05:46.229 --> 00:05:52.229 +This pretty printing is nice for me as a human, + +00:05:52.229 --> 00:05:56.349 +but I can't execute this. This isn't valid Java. + +00:05:56.349 --> 00:06:00.609 +So I could do `C-u C-x C-j`. + +00:06:00.609 --> 00:06:05.109 +If I have the help of a read protocol inserted. + +00:06:05.109 --> 00:06:09.469 +Sorry, `C-x C-j`. There it is. + +00:06:09.469 --> 00:06:12.549 +So look, it gives me a `new Person` + +00:06:12.549 --> 00:06:14.349 +with the construction everything. + +00:06:14.349 --> 00:06:16.549 +Now I can work with. + +00:06:16.549 --> 00:06:17.949 +Java can work with this. + +00:06:17.949 --> 00:06:21.709 +So this can be quite useful for regression testing + +00:06:21.709 --> 00:06:25.749 +or just to find out what your method spits out. + +00:06:25.749 --> 00:06:29.869 +We can do the same thing. Here's a bigger example. + +00:06:29.869 --> 00:06:32.389 +Trying to see it in the overlay is a bit cramped. + +00:06:32.389 --> 00:06:34.589 +We can say `C-u C-x C-j`. + +00:06:34.589 --> 00:06:38.669 +All right, and now we have executable code. + +00:06:38.669 --> 00:06:40.876 +Okay, this is neat. + +00:06:40.876 --> 00:06:42.389 +If you want to do something with it. + +00:06:42.389 --> 00:06:45.789 +I'm not really interested. I have four new persons. + +00:06:45.789 --> 00:06:49.309 +If I really want to look at this, + +00:06:49.309 --> 00:06:55.649 +I can say `M-x java-eval-navigate-output`, + +00:06:55.649 --> 00:07:00.829 +and now I see my output as this hierarchical tree. + +00:07:00.829 --> 00:07:03.589 +I go down, I can see what's inside these, + +00:07:03.589 --> 00:07:06.709 +what's the type of this thing, what's in there. + +00:07:06.709 --> 00:07:09.349 +All right, so that's nice. + +00:07:09.349 --> 00:07:14.189 +The idea is that we're not limited to + +00:07:14.189 --> 00:07:15.629 +just textual output. + +00:07:15.629 --> 00:07:19.589 +We can render output, + +00:07:19.589 --> 00:07:22.229 +thanks to the power of Emacs, in any way we want. + +00:07:22.229 --> 00:07:26.749 +In a browser, in a LaTeX file, in an Org mode (file), + +00:07:26.749 --> 00:07:28.029 +however we really desire. + +NOTE Bring your own Read Protocol + +00:07:28.029 --> 00:07:32.989 +And if our language doesn't have an easy protocol, + +00:07:32.989 --> 00:07:36.143 +so what I did for Java in particular was: + +00:07:36.143 --> 00:07:38.643 +you take a blob, and you use some + +00:07:38.643 --> 00:07:43.149 +parsing expression grammars, or if you really want + +00:07:43.149 --> 00:07:44.949 +regular expression pattern matching, + +00:07:44.949 --> 00:07:46.829 +and you get some property list out, + +00:07:46.829 --> 00:07:51.349 +and then you construct an executable expression + +00:07:51.349 --> 00:07:53.149 +out of that. Like this `new Person`. + +00:07:53.149 --> 00:07:56.749 +It's nice that you can do these kind of things + +00:07:56.749 --> 00:07:59.669 +and that this software encourages you to do them. + +NOTE Use Case: RDD & Job Interviews + +00:07:59.669 --> 00:08:07.549 +So one use case I actually use + +00:08:07.549 --> 00:08:10.909 +besides learning things is… + +00:08:10.909 --> 00:08:14.776 +oops oops oopsies oopsies showing you metadata + +00:08:14.776 --> 00:08:15.509 +you shouldn't be looking at. + +00:08:15.509 --> 00:08:19.409 +Don't look at my metadata. Sorry about that. + +00:08:19.409 --> 00:08:23.209 +One place I actually use this besides learning + +00:08:23.209 --> 00:08:25.029 +and trying new libraries and APIs + +00:08:25.029 --> 00:08:26.776 +and stuff like that is, + +00:08:26.776 --> 00:08:29.509 +for example, when I interviewed for jobs + +00:08:29.509 --> 00:08:33.229 +last year (I was changing jobs), + +00:08:33.229 --> 00:08:34.676 +I would share my screen, + +00:08:34.676 --> 00:08:37.869 +and if the interviewer gave me + +00:08:37.869 --> 00:08:39.949 +some inputs and outputs to play with, + +00:08:39.949 --> 00:08:41.576 +I could do essentially + +00:08:41.576 --> 00:08:42.976 +some sort of test driven development + +00:08:42.976 --> 00:08:45.149 +and constantly evaluate things + +00:08:45.149 --> 00:08:46.589 +right in front of the interviewer. + +00:08:46.589 --> 00:08:49.949 +For some design questions + +00:08:49.949 --> 00:08:53.909 +rather than sketching out my ideas in a Google Doc, + +00:08:53.909 --> 00:08:55.509 +I would share my screen and be like, + +00:08:55.509 --> 00:08:57.989 +"Hey, here's actual executable code, + +00:08:57.989 --> 00:08:59.229 +we can stub some things out + +00:08:59.229 --> 00:09:00.576 +and have some types," + +00:09:00.576 --> 00:09:03.476 +and the idea is we can still check things + +00:09:03.476 --> 00:09:05.643 +and run them right there and then, + +00:09:05.643 --> 00:09:08.143 +which I thought was quite nice, and it helps to + +00:09:08.143 --> 00:09:10.309 +clarify your thought process, I guess. + +00:09:10.309 --> 00:09:15.149 +Anyhow, so that's my time, + +00:09:15.149 --> 00:09:19.829 +I hope you've enjoyed this little package, + +00:09:19.829 --> 00:09:22.869 +and again, sorry for the rush, + +00:09:22.869 --> 00:09:24.149 +it's a lightning talk. + +00:09:24.149 --> 00:09:29.069 +Feel free to find everything on the associated repo. + +00:09:29.069 --> 00:09:34.389 +And have a wonderful December Saturday. + +00:09:34.389 --> 00:09:37.029 +Take care! Bye bye, everyone. diff --git a/2023/info/eval-after.md b/2023/info/eval-after.md index 8815b464..665703d3 100644 --- a/2023/info/eval-after.md +++ b/2023/info/eval-after.md @@ -1,6 +1,212 @@ + +# Transcript + +[[!template new="1" text="""Hello, and welcome to EmacsConf 2023!""" start="00:00:04.880" video="mainVideo-eval" id="subtitle"]] +[[!template text="""My name is Musa Al-hassy,""" start="00:00:10.001" video="mainVideo-eval" id="subtitle"]] +[[!template text="""and I will be talking about "REPL-driven development."""" start="00:00:12.109" video="mainVideo-eval" id="subtitle"]] +[[!template text="""I like programming languages so much.""" start="00:00:15.549" video="mainVideo-eval" id="subtitle"]] +[[!template text="""I want to use them all over the place.""" start="00:00:18.269" video="mainVideo-eval" id="subtitle"]] +[[!template text="""I got a PhD in the topic.""" start="00:00:20.269" video="mainVideo-eval" id="subtitle"]] +[[!template text="""So let's just dive in.""" start="00:00:23.069" video="mainVideo-eval" id="subtitle"]] +[[!template text="""This is a lightning talk,""" start="00:00:25.349" video="mainVideo-eval" id="subtitle"]] +[[!template text="""so the details will be available in the repository.""" start="00:00:27.949" video="mainVideo-eval" id="subtitle"]] +[[!template text="""Links to longer videos and GIFs""" start="00:00:31.309" video="mainVideo-eval" id="subtitle"]] +[[!template text="""for those who are interested.""" start="00:00:33.469" video="mainVideo-eval" id="subtitle"]] +[[!template new="1" text="""So the wonderful thing about Emacs""" start="00:00:35.989" video="mainVideo-eval" id="subtitle"]] +[[!template text="""is that you can execute Lisp anywhere.""" start="00:00:37.309" video="mainVideo-eval" id="subtitle"]] +[[!template text="""For example, I can go to this piece of Lisp,""" start="00:00:40.589" video="mainVideo-eval" id="subtitle"]] +[[!template text="""press Ctrl-x Ctrl-e (`C-x C-e`)""" start="00:00:42.829" video="mainVideo-eval" id="subtitle"]] +[[!template text="""and get a little pop-up.""" start="00:00:45.576" video="mainVideo-eval" id="subtitle"]] +[[!template text="""Alright, so here I pressed `C-x C-e`""" start="00:00:47.549" video="mainVideo-eval" id="subtitle"]] +[[!template text="""and this is what it ran.""" start="00:00:49.669" video="mainVideo-eval" id="subtitle"]] +[[!template text="""And what this package gives you""" start="00:00:51.389" video="mainVideo-eval" id="subtitle"]] +[[!template text="""is the same ability""" start="00:00:52.776" video="mainVideo-eval" id="subtitle"]] +[[!template text="""for any language of your choosing.""" start="00:00:54.509" video="mainVideo-eval" id="subtitle"]] +[[!template text="""So for example, here is some Java,""" start="00:00:56.909" video="mainVideo-eval" id="subtitle"]] +[[!template text="""and I bound it to Ctrl-x, Ctrl-j (`C-x C-j`).""" start="00:00:59.229" video="mainVideo-eval" id="subtitle"]] +[[!template text="""So I say `C-x C-j`, and this runs some code,""" start="00:01:02.469" video="mainVideo-eval" id="subtitle"]] +[[!template text="""and over here I get a little pop-up.""" start="00:01:07.149" video="mainVideo-eval" id="subtitle"]] +[[!template text="""The wonderful thing about""" start="00:01:13.709" video="mainVideo-eval" id="subtitle"]] +[[!template text="""being able to run code from anywhere""" start="00:01:15.069" video="mainVideo-eval" id="subtitle"]] +[[!template text="""is that you can keep it in normal text files""" start="00:01:16.829" video="mainVideo-eval" id="subtitle"]] +[[!template text="""or any kind of file you like.""" start="00:01:19.029" video="mainVideo-eval" id="subtitle"]] +[[!template text="""For example, you can have hyperlinks,""" start="00:01:20.629" video="mainVideo-eval" id="subtitle"]] +[[!template text="""as it were…, like this one.""" start="00:01:23.669" video="mainVideo-eval" id="subtitle"]] +[[!template text="""`C-x C-e`, and now we can see this down here.""" start="00:01:25.109" video="mainVideo-eval" id="subtitle"]] +[[!template text="""Learn about it.""" start="00:01:28.549" video="mainVideo-eval" id="subtitle"]] +[[!template text="""But being able to run other languages besides Emacs""" start="00:01:30.789" video="mainVideo-eval" id="subtitle"]] +[[!template text="""lets us do some interesting things.""" start="00:01:34.189" video="mainVideo-eval" id="subtitle"]] +[[!template text="""For example, in the middle of a JavaScript program,""" start="00:01:36.149" video="mainVideo-eval" id="subtitle"]] +[[!template text="""you might write a line like this. `C-x C-n`.""" start="00:01:39.589" video="mainVideo-eval" id="subtitle"]] +[[!template text="""And that says down here""" start="00:01:43.429" video="mainVideo-eval" id="subtitle"]] +[[!template text="""`javascript-eval` in the mode line,""" start="00:01:45.229" video="mainVideo-eval" id="subtitle"]] +[[!template text="""and so this just checks that some endpoint""" start="00:01:47.269" video="mainVideo-eval" id="subtitle"]] +[[!template text="""is working as intended.""" start="00:01:49.643" video="mainVideo-eval" id="subtitle"]] +[[!template text="""So you don't need to use an external tool""" start="00:01:51.189" video="mainVideo-eval" id="subtitle"]] +[[!template text="""to check endpoints.""" start="00:01:52.749" video="mainVideo-eval" id="subtitle"]] +[[!template text="""You can just use Emacs in your favorite language.""" start="00:01:53.589" video="mainVideo-eval" id="subtitle"]] +[[!template text="""You know, you can keep your spirit up.""" start="00:01:57.469" video="mainVideo-eval" id="subtitle"]] +[[!template text="""So, `C-x C-a` runs `applescript-eval`.""" start="00:01:59.629" video="mainVideo-eval" id="subtitle"]] +[[!template text="""[Computer]: You can do it, buddy.""" start="00:02:03.709" video="mainVideo-eval" id="subtitle"]] +[[!template text="""[Musa]: Maybe you heard that in the background?""" start="00:02:06.376" video="mainVideo-eval" id="subtitle"]] +[[!template text="""The cool thing is, your code immediately takes form.""" start="00:02:13.269" video="mainVideo-eval" id="subtitle"]] +[[!template text="""Right away, you see it doing things, you know,""" start="00:02:15.389" video="mainVideo-eval" id="subtitle"]] +[[!template text="""altering your environment.""" start="00:02:18.469" video="mainVideo-eval" id="subtitle"]] +[[!template text="""For example, this is JavaScript,""" start="00:02:20.349" video="mainVideo-eval" id="subtitle"]] +[[!template text="""and JavaScript here is gonna change Emacs for us.""" start="00:02:24.429" video="mainVideo-eval" id="subtitle"]] +[[!template text="""So `C-x C-n`. And you can see down here""" start="00:02:28.349" video="mainVideo-eval" id="subtitle"]] +[[!template text="""`javascript-eval` was invoked.""" start="00:02:32.109" video="mainVideo-eval" id="subtitle"]] +[[!template text="""It returned true, and this line of JavaScript""" start="00:02:34.669" video="mainVideo-eval" id="subtitle"]] +[[!template text="""altered our Emacs. So that's really nice.""" start="00:02:38.789" video="mainVideo-eval" id="subtitle"]] +[[!template text="""So you don't need to use just Emacs Lisp if you like.""" start="00:02:41.709" video="mainVideo-eval" id="subtitle"]] +[[!template text="""You can use other systems.""" start="00:02:43.749" video="mainVideo-eval" id="subtitle"]] +[[!template text="""As you saw, the output is shown in overlays.""" start="00:02:46.149" video="mainVideo-eval" id="subtitle"]] +[[!template text="""So here's, for example, `C-x C-p` to run""" start="00:02:50.069" video="mainVideo-eval" id="subtitle"]] +[[!template text="""some Python code.""" start="00:02:52.869" video="mainVideo-eval" id="subtitle"]] +[[!template text="""Notice it blinked in red""" start="00:02:54.109" video="mainVideo-eval" id="subtitle"]] +[[!template text="""because I thought red was nice.""" start="00:02:55.476" video="mainVideo-eval" id="subtitle"]] +[[!template text="""You can configure as you like.""" start="00:02:56.869" video="mainVideo-eval" id="subtitle"]] +[[!template text="""And if you hover over it,""" start="00:02:58.389" video="mainVideo-eval" id="subtitle"]] +[[!template text="""you can see the solution there,""" start="00:02:59.409" video="mainVideo-eval" id="subtitle"]] +[[!template text="""and you can see it in a variety of familiar ways""" start="00:03:01.869" video="mainVideo-eval" id="subtitle"]] +[[!template text="""if you use `C-x C-e` regularly.""" start="00:03:04.669" video="mainVideo-eval" id="subtitle"]] +[[!template text="""You can insert the results.""" start="00:03:08.709" video="mainVideo-eval" id="subtitle"]] +[[!template text="""You can find documentation about them.""" start="00:03:09.989" video="mainVideo-eval" id="subtitle"]] +[[!template text="""The idea here is that""" start="00:03:14.269" video="mainVideo-eval" id="subtitle"]] +[[!template text="""you have this familiar Lisp workflow""" start="00:03:15.989" video="mainVideo-eval" id="subtitle"]] +[[!template text="""with `C-x C-e`, and this package ports it over""" start="00:03:20.389" video="mainVideo-eval" id="subtitle"]] +[[!template text="""to your favorite language out.""" start="00:03:24.989" video="mainVideo-eval" id="subtitle"]] +[[!template text="""So you can eval things,""" start="00:03:27.069" video="mainVideo-eval" id="subtitle"]] +[[!template text="""you can insert them, and do as you like.""" start="00:03:28.343" video="mainVideo-eval" id="subtitle"]] +[[!template text="""I think that's really neat.""" start="00:03:30.789" video="mainVideo-eval" id="subtitle"]] +[[!template new="1" text="""This package allows you to do""" start="00:03:35.809" video="mainVideo-eval" id="subtitle"]] +[[!template text="""REPL driven development.""" start="00:03:37.209" video="mainVideo-eval" id="subtitle"]] +[[!template text="""In that, you can use it to grow your program.""" start="00:03:39.109" video="mainVideo-eval" id="subtitle"]] +[[!template text="""You don't need to restart it.""" start="00:03:42.309" video="mainVideo-eval" id="subtitle"]] +[[!template text="""You can see changes live.""" start="00:03:43.709" video="mainVideo-eval" id="subtitle"]] +[[!template text="""So here's, for example, this is in a Java runtime.""" start="00:03:45.549" video="mainVideo-eval" id="subtitle"]] +[[!template text="""You can see some balls bouncing around.""" start="00:03:50.149" video="mainVideo-eval" id="subtitle"]] +[[!template text="""I don't really know which one is the second one,""" start="00:03:52.869" video="mainVideo-eval" id="subtitle"]] +[[!template text="""but let's increase its size. `C-x C-j`.""" start="00:03:54.509" video="mainVideo-eval" id="subtitle"]] +[[!template text="""And this one increased in size,""" start="00:03:57.229" video="mainVideo-eval" id="subtitle"]] +[[!template text="""and you can see down here I pressed `C-x C-j`.""" start="00:04:00.189" video="mainVideo-eval" id="subtitle"]] +[[!template text="""Let's change the color to blue,""" start="00:04:02.189" video="mainVideo-eval" id="subtitle"]] +[[!template text="""`C-x C-j`, the color is blue.""" start="00:04:05.549" video="mainVideo-eval" id="subtitle"]] +[[!template text="""So all these changes are happening live.""" start="00:04:09.309" video="mainVideo-eval" id="subtitle"]] +[[!template text="""Three balls isn't really a ball pit.""" start="00:04:12.376" video="mainVideo-eval" id="subtitle"]] +[[!template text="""Let's go to 50 balls. There you go.""" start="00:04:14.429" video="mainVideo-eval" id="subtitle"]] +[[!template text="""So it's nice that you can do this""" start="00:04:18.989" video="mainVideo-eval" id="subtitle"]] +[[!template text="""without leaving your environment,""" start="00:04:21.469" video="mainVideo-eval" id="subtitle"]] +[[!template text="""without building, you can rapidly modify and see.""" start="00:04:23.209" video="mainVideo-eval" id="subtitle"]] +[[!template text="""I think that's nice.""" start="00:04:26.189" video="mainVideo-eval" id="subtitle"]] +[[!template text="""Unfortunately, I'm at the halfway point,""" start="00:04:29.776" video="mainVideo-eval" id="subtitle"]] +[[!template text="""so I won't be able to work through""" start="00:04:32.829" video="mainVideo-eval" id="subtitle"]] +[[!template text="""some of these nice problems,""" start="00:04:35.309" video="mainVideo-eval" id="subtitle"]] +[[!template text="""but you can see the videos""" start="00:04:37.109" video="mainVideo-eval" id="subtitle"]] +[[!template text="""or GIFs on the associated repo.""" start="00:04:38.676" video="mainVideo-eval" id="subtitle"]] +[[!template text="""Likewise for this one.""" start="00:04:41.509" video="mainVideo-eval" id="subtitle"]] +[[!template text="""This one would have been a lot of fun,""" start="00:04:42.709" video="mainVideo-eval" id="subtitle"]] +[[!template text="""but unfortunately, we're running short on time.""" start="00:04:43.909" video="mainVideo-eval" id="subtitle"]] +[[!template text="""Apologies.""" start="00:04:46.509" video="mainVideo-eval" id="subtitle"]] +[[!template new="1" text="""The neat thing here is: this package tries to""" start="00:04:51.143" video="mainVideo-eval" id="subtitle"]] +[[!template text="""bring the feeling of Lisp to other languages.""" start="00:04:56.209" video="mainVideo-eval" id="subtitle"]] +[[!template text="""So the idea of a REPL, or a Read Eval Print Loop""" start="00:05:00.269" video="mainVideo-eval" id="subtitle"]] +[[!template text="""is R and P are data interchange protocols.""" start="00:05:03.509" video="mainVideo-eval" id="subtitle"]] +[[!template text="""Unfortunately, not every language has those,""" start="00:05:06.949" video="mainVideo-eval" id="subtitle"]] +[[!template text="""but this package kind of encourages us to""" start="00:05:09.869" video="mainVideo-eval" id="subtitle"]] +[[!template text="""implement them if we don't have them.""" start="00:05:12.709" video="mainVideo-eval" id="subtitle"]] +[[!template text="""Let me show you an example.""" start="00:05:14.643" video="mainVideo-eval" id="subtitle"]] +[[!template text="""What do I mean here?""" start="00:05:16.909" video="mainVideo-eval" id="subtitle"]] +[[!template text="""This is a Java file.""" start="00:05:20.589" video="mainVideo-eval" id="subtitle"]] +[[!template text="""I've loaded this definition in.""" start="00:05:22.709" video="mainVideo-eval" id="subtitle"]] +[[!template text="""We can press `C-x C-j`,""" start="00:05:25.189" video="mainVideo-eval" id="subtitle"]] +[[!template text="""and you see it's a list of person.""" start="00:05:28.543" video="mainVideo-eval" id="subtitle"]] +[[!template text="""I didn't give this a name, so its name is $59.""" start="00:05:30.909" video="mainVideo-eval" id="subtitle"]] +[[!template text="""If I hover over it, we can see the definition again.""" start="00:05:33.829" video="mainVideo-eval" id="subtitle"]] +[[!template text="""So it's a person called Hamid, age 5,""" start="00:05:40.829" video="mainVideo-eval" id="subtitle"]] +[[!template text="""another person called Jaafar, age 6.""" start="00:05:44.429" video="mainVideo-eval" id="subtitle"]] +[[!template text="""This pretty printing is nice for me as a human,""" start="00:05:46.229" video="mainVideo-eval" id="subtitle"]] +[[!template text="""but I can't execute this. This isn't valid Java.""" start="00:05:52.229" video="mainVideo-eval" id="subtitle"]] +[[!template text="""So I could do `C-u C-x C-j`.""" start="00:05:56.349" video="mainVideo-eval" id="subtitle"]] +[[!template text="""If I have the help of a read protocol inserted.""" start="00:06:00.609" video="mainVideo-eval" id="subtitle"]] +[[!template text="""Sorry, `C-x C-j`. There it is.""" start="00:06:05.109" video="mainVideo-eval" id="subtitle"]] +[[!template text="""So look, it gives me a `new Person`""" start="00:06:09.469" video="mainVideo-eval" id="subtitle"]] +[[!template text="""with the construction everything.""" start="00:06:12.549" video="mainVideo-eval" id="subtitle"]] +[[!template text="""Now I can work with.""" start="00:06:14.349" video="mainVideo-eval" id="subtitle"]] +[[!template text="""Java can work with this.""" start="00:06:16.549" video="mainVideo-eval" id="subtitle"]] +[[!template text="""So this can be quite useful for regression testing""" start="00:06:17.949" video="mainVideo-eval" id="subtitle"]] +[[!template text="""or just to find out what your method spits out.""" start="00:06:21.709" video="mainVideo-eval" id="subtitle"]] +[[!template text="""We can do the same thing. Here's a bigger example.""" start="00:06:25.749" video="mainVideo-eval" id="subtitle"]] +[[!template text="""Trying to see it in the overlay is a bit cramped.""" start="00:06:29.869" video="mainVideo-eval" id="subtitle"]] +[[!template text="""We can say `C-u C-x C-j`.""" start="00:06:32.389" video="mainVideo-eval" id="subtitle"]] +[[!template text="""All right, and now we have executable code.""" start="00:06:34.589" video="mainVideo-eval" id="subtitle"]] +[[!template text="""Okay, this is neat.""" start="00:06:38.669" video="mainVideo-eval" id="subtitle"]] +[[!template text="""If you want to do something with it.""" start="00:06:40.876" video="mainVideo-eval" id="subtitle"]] +[[!template text="""I'm not really interested. I have four new persons.""" start="00:06:42.389" video="mainVideo-eval" id="subtitle"]] +[[!template text="""If I really want to look at this,""" start="00:06:45.789" video="mainVideo-eval" id="subtitle"]] +[[!template text="""I can say `M-x java-eval-navigate-output`,""" start="00:06:49.309" video="mainVideo-eval" id="subtitle"]] +[[!template text="""and now I see my output as this hierarchical tree.""" start="00:06:55.649" video="mainVideo-eval" id="subtitle"]] +[[!template text="""I go down, I can see what's inside these,""" start="00:07:00.829" video="mainVideo-eval" id="subtitle"]] +[[!template text="""what's the type of this thing, what's in there.""" start="00:07:03.589" video="mainVideo-eval" id="subtitle"]] +[[!template text="""All right, so that's nice.""" start="00:07:06.709" video="mainVideo-eval" id="subtitle"]] +[[!template text="""The idea is that we're not limited to""" start="00:07:09.349" video="mainVideo-eval" id="subtitle"]] +[[!template text="""just textual output.""" start="00:07:14.189" video="mainVideo-eval" id="subtitle"]] +[[!template text="""We can render output,""" start="00:07:15.629" video="mainVideo-eval" id="subtitle"]] +[[!template text="""thanks to the power of Emacs, in any way we want.""" start="00:07:19.589" video="mainVideo-eval" id="subtitle"]] +[[!template text="""In a browser, in a LaTeX file, in an Org mode (file),""" start="00:07:22.229" video="mainVideo-eval" id="subtitle"]] +[[!template text="""however we really desire.""" start="00:07:26.749" video="mainVideo-eval" id="subtitle"]] +[[!template new="1" text="""And if our language doesn't have an easy protocol,""" start="00:07:28.029" video="mainVideo-eval" id="subtitle"]] +[[!template text="""so what I did for Java in particular was:""" start="00:07:32.989" video="mainVideo-eval" id="subtitle"]] +[[!template text="""you take a blob, and you use some""" start="00:07:36.143" video="mainVideo-eval" id="subtitle"]] +[[!template text="""parsing expression grammars, or if you really want""" start="00:07:38.643" video="mainVideo-eval" id="subtitle"]] +[[!template text="""regular expression pattern matching,""" start="00:07:43.149" video="mainVideo-eval" id="subtitle"]] +[[!template text="""and you get some property list out,""" start="00:07:44.949" video="mainVideo-eval" id="subtitle"]] +[[!template text="""and then you construct an executable expression""" start="00:07:46.829" video="mainVideo-eval" id="subtitle"]] +[[!template text="""out of that. Like this `new Person`.""" start="00:07:51.349" video="mainVideo-eval" id="subtitle"]] +[[!template text="""It's nice that you can do these kind of things""" start="00:07:53.149" video="mainVideo-eval" id="subtitle"]] +[[!template text="""and that this software encourages you to do them.""" start="00:07:56.749" video="mainVideo-eval" id="subtitle"]] +[[!template new="1" text="""So one use case I actually use""" start="00:07:59.669" video="mainVideo-eval" id="subtitle"]] +[[!template text="""besides learning things is…""" start="00:08:07.549" video="mainVideo-eval" id="subtitle"]] +[[!template text="""oops oops oopsies oopsies showing you metadata""" start="00:08:10.909" video="mainVideo-eval" id="subtitle"]] +[[!template text="""you shouldn't be looking at.""" start="00:08:14.776" video="mainVideo-eval" id="subtitle"]] +[[!template text="""Don't look at my metadata. Sorry about that.""" start="00:08:15.509" video="mainVideo-eval" id="subtitle"]] +[[!template text="""One place I actually use this besides learning""" start="00:08:19.409" video="mainVideo-eval" id="subtitle"]] +[[!template text="""and trying new libraries and APIs""" start="00:08:23.209" video="mainVideo-eval" id="subtitle"]] +[[!template text="""and stuff like that is,""" start="00:08:25.029" video="mainVideo-eval" id="subtitle"]] +[[!template text="""for example, when I interviewed for jobs""" start="00:08:26.776" video="mainVideo-eval" id="subtitle"]] +[[!template text="""last year (I was changing jobs),""" start="00:08:29.509" video="mainVideo-eval" id="subtitle"]] +[[!template text="""I would share my screen,""" start="00:08:33.229" video="mainVideo-eval" id="subtitle"]] +[[!template text="""and if the interviewer gave me""" start="00:08:34.676" video="mainVideo-eval" id="subtitle"]] +[[!template text="""some inputs and outputs to play with,""" start="00:08:37.869" video="mainVideo-eval" id="subtitle"]] +[[!template text="""I could do essentially""" start="00:08:39.949" video="mainVideo-eval" id="subtitle"]] +[[!template text="""some sort of test driven development""" start="00:08:41.576" video="mainVideo-eval" id="subtitle"]] +[[!template text="""and constantly evaluate things""" start="00:08:42.976" video="mainVideo-eval" id="subtitle"]] +[[!template text="""right in front of the interviewer.""" start="00:08:45.149" video="mainVideo-eval" id="subtitle"]] +[[!template text="""For some design questions""" start="00:08:46.589" video="mainVideo-eval" id="subtitle"]] +[[!template text="""rather than sketching out my ideas in a Google Doc,""" start="00:08:49.949" video="mainVideo-eval" id="subtitle"]] +[[!template text="""I would share my screen and be like,""" start="00:08:53.909" video="mainVideo-eval" id="subtitle"]] +[[!template text=""""Hey, here's actual executable code,""" start="00:08:55.509" video="mainVideo-eval" id="subtitle"]] +[[!template text="""we can stub some things out""" start="00:08:57.989" video="mainVideo-eval" id="subtitle"]] +[[!template text="""and have some types,"""" start="00:08:59.229" video="mainVideo-eval" id="subtitle"]] +[[!template text="""and the idea is we can still check things""" start="00:09:00.576" video="mainVideo-eval" id="subtitle"]] +[[!template text="""and run them right there and then,""" start="00:09:03.476" video="mainVideo-eval" id="subtitle"]] +[[!template text="""which I thought was quite nice, and it helps to""" start="00:09:05.643" video="mainVideo-eval" id="subtitle"]] +[[!template text="""clarify your thought process, I guess.""" start="00:09:08.143" video="mainVideo-eval" id="subtitle"]] +[[!template text="""Anyhow, so that's my time,""" start="00:09:10.309" video="mainVideo-eval" id="subtitle"]] +[[!template text="""I hope you've enjoyed this little package,""" start="00:09:15.149" video="mainVideo-eval" id="subtitle"]] +[[!template text="""and again, sorry for the rush,""" start="00:09:19.829" video="mainVideo-eval" id="subtitle"]] +[[!template text="""it's a lightning talk.""" start="00:09:22.869" video="mainVideo-eval" id="subtitle"]] +[[!template text="""Feel free to find everything on the associated repo.""" start="00:09:24.149" video="mainVideo-eval" id="subtitle"]] +[[!template text="""And have a wonderful December Saturday.""" start="00:09:29.069" video="mainVideo-eval" id="subtitle"]] +[[!template text="""Take care! Bye bye, everyone.""" start="00:09:34.389" video="mainVideo-eval" id="subtitle"]] + + + +Captioner: bhavin192 + Questions or comments? Please e-mail [Alhassy@gmail.com](mailto:Alhassy@gmail.com?subject=Comment%20for%20EmacsConf%202022%20eval%3A%20Editor%20Integrated%20REPL%20Driven%20Development%20for%20all%20languages) diff --git a/2023/info/eval-before.md b/2023/info/eval-before.md index 7e8939d4..8022037d 100644 --- a/2023/info/eval-before.md +++ b/2023/info/eval-before.md @@ -8,12 +8,20 @@ The following image shows where the talk is in the schedule for Sat 2023-12-02. Format: 10-min talk; Q&A: ask questions via Etherpad/IRC; we'll e-mail the speaker and post answers on this wiki page after the conference Etherpad: Discuss on IRC: [#emacsconf-dev](https://chat.emacsconf.org/?join=emacsconf,emacsconf-dev) -Status: Ready to stream +Status: Now playing on the conference livestream
Times in different timezones:
Saturday, Dec 2 2023, ~1:35 PM - 1:45 PM EST (US/Eastern)
which is the same as:
Saturday, Dec 2 2023, ~12:35 PM - 12:45 PM CST (US/Central)
Saturday, Dec 2 2023, ~11:35 AM - 11:45 AM MST (US/Mountain)
Saturday, Dec 2 2023, ~10:35 AM - 10:45 AM PST (US/Pacific)
Saturday, Dec 2 2023, ~6:35 PM - 6:45 PM UTC
Saturday, Dec 2 2023, ~7:35 PM - 7:45 PM CET (Europe/Paris)
Saturday, Dec 2 2023, ~8:35 PM - 8:45 PM EET (Europe/Athens)
Sunday, Dec 3 2023, ~12:05 AM - 12:15 AM IST (Asia/Kolkata)
Sunday, Dec 3 2023, ~2:35 AM - 2:45 AM +08 (Asia/Singapore)
Sunday, Dec 3 2023, ~3:35 AM - 3:45 AM JST (Asia/Tokyo)
Find out how to watch and participate
+
[[!template id="chapters" vidid="eval-mainVideo" data=""" +00:04.880 Introduction +00:35.989 The wonders of C-x C-e +03:35.809 An overview of REPL Driven Development +04:51.143 REPL Driven Development with Java +07:28.029 Bring your own Read Protocol +07:59.669 Use Case: RDD & Job Interviews +"""]]
Duration: 09:37 minutes
# Description \ No newline at end of file -- cgit v1.2.3