diff options
Diffstat (limited to '2024')
3 files changed, 827 insertions, 2 deletions
diff --git a/2024/captions/emacsconf-2024-julia--exploring-shared-philosophies-in-julia-and-emacs--gabriele-bozzola--main.vtt b/2024/captions/emacsconf-2024-julia--exploring-shared-philosophies-in-julia-and-emacs--gabriele-bozzola--main.vtt new file mode 100644 index 00000000..b6e69c85 --- /dev/null +++ b/2024/captions/emacsconf-2024-julia--exploring-shared-philosophies-in-julia-and-emacs--gabriele-bozzola--main.vtt @@ -0,0 +1,616 @@ +WEBVTT captioned by gabriele + +00:00:00.000 --> 00:00:02.359 +Hello, I'm very excited to tell you + +00:00:02.360 --> 00:00:03.679 +about shared philosophies + +00:00:03.680 --> 00:00:06.479 +between the Julia programming language and Emacs. + +00:00:06.480 --> 00:00:08.679 +While Julia and Emacs might look like + +00:00:08.680 --> 00:00:10.279 +different pieces of software, + +00:00:10.280 --> 00:00:13.439 +I think there is profound commonalities between the two. + +00:00:13.440 --> 00:00:16.359 +Let's start by introducing Julia. + +00:00:16.360 --> 00:00:19.719 +Julia is a high-level dynamic programming language. + +00:00:19.720 --> 00:00:21.679 +Julia is free and open source software + +00:00:21.680 --> 00:00:24.639 +and is used primarily for scientific computing. + +00:00:24.640 --> 00:00:27.039 +The reason Julia is used for scientific computing + +00:00:27.040 --> 00:00:29.679 +is that while Julia is high level + +00:00:29.680 --> 00:00:32.559 +and has a syntax that looks like Python or MATLAB, + +00:00:32.560 --> 00:00:34.559 +Julia can be high performance. + +00:00:34.560 --> 00:00:36.519 +I use it to develop climate models + +00:00:36.520 --> 00:00:38.479 +that run on hundreds of GPUs. + +00:00:38.480 --> 00:00:43.399 +Models that are traditionally developed with C, C++, or Fortran. + +00:00:43.400 --> 00:00:44.759 +But how is this possible? + +00:00:44.760 --> 00:00:46.799 +How can Julia be high performance + +00:00:46.800 --> 00:00:48.799 +but also high level at the same time? + +00:00:48.800 --> 00:00:50.424 +What makes Julia, Julia? + +00:00:50.425 --> 00:00:52.469 +Well, what makes Julia, Julia + +00:00:52.470 --> 00:00:54.719 +is the idea of multiple dispatch. + +00:00:54.720 --> 00:00:58.999 +Multiple dispatch is the concept where a function call is resolved + +00:00:59.000 --> 00:01:02.359 +by looking at the types of every single argument involved. + +00:01:02.360 --> 00:01:04.959 +So, let's explore this with this example. + +00:01:04.960 --> 00:01:07.719 +Here, I define a function add that takes two objects + +00:01:07.720 --> 00:01:09.159 +and sums them together. + +00:01:09.160 --> 00:01:11.879 +And I call add with two different types. + +00:01:11.880 --> 00:01:14.639 +First with just integers and second with floats. + +00:01:14.640 --> 00:01:17.559 +So, let's look at what this produces. + +00:01:17.560 --> 00:01:20.439 +Here is the output of add in Julia. + +00:01:20.440 --> 00:01:23.279 +So, first we have add, a function with one method. + +00:01:23.280 --> 00:01:24.839 +I'm going to explain this in a second. + +00:01:24.840 --> 00:01:28.719 +And then we have our return values 12 and 12.0. + +00:01:28.720 --> 00:01:30.799 +What we cannot see here is that + +00:01:30.800 --> 00:01:33.439 +Julia has specialized code + +00:01:33.440 --> 00:01:35.119 +for the two different function calls. + +00:01:35.120 --> 00:01:38.359 +For integers and for floating points. + +00:01:38.360 --> 00:01:42.239 +Let's make this more explicit by specifically providing + +00:01:42.240 --> 00:01:45.079 +a new method for the case with floating point. + +00:01:45.080 --> 00:01:47.599 +So here, now I have an add function + +00:01:47.600 --> 00:01:50.119 +specifically for floating point. Instead of taking + +00:01:50.120 --> 00:01:54.759 +A + B, this returns A exponent B. Let's call this. + +00:01:54.760 --> 00:01:56.799 +And what we can see here is that + +00:01:56.800 --> 00:01:58.319 +now we have two methods. + +00:01:58.320 --> 00:02:00.559 +So, we add a new method to the same function. + +00:02:00.560 --> 00:02:01.639 +This is a method that is + +00:02:01.640 --> 00:02:03.679 +specifically for floating points. + +00:02:03.680 --> 00:02:06.959 +And instead of having the value 12, we have 100. + +00:02:06.960 --> 00:02:09.039 +And this is where the trick lies. + +00:02:09.040 --> 00:02:13.879 +Julia compiles the most, um, specialized version + +00:02:13.880 --> 00:02:16.839 +that can be compiled. So, a version with integers, + +00:02:16.840 --> 00:02:19.199 +a version with floats. And in this, + +00:02:19.200 --> 00:02:22.679 +compiling is an actual compilation with LLVM + +00:02:22.680 --> 00:02:24.479 +with optimization and so on. + +00:02:24.480 --> 00:02:27.439 +This is not just ahead of time compilation. + +00:02:27.440 --> 00:02:30.719 +Soon as the Julia knows the type, + +00:02:30.720 --> 00:02:33.719 +a function is compiled if it's not compiled already + +00:02:33.720 --> 00:02:35.079 +and then it's used. + +00:02:35.080 --> 00:02:37.159 +When types are stable and well inferred, + +00:02:37.160 --> 00:02:40.079 +this can lead to code that is as performant + +00:02:40.080 --> 00:02:42.159 +or comparable to C and Fortran. + +00:02:42.160 --> 00:02:45.159 +So, this is what makes Julia, Julia. + +00:02:45.160 --> 00:02:48.439 +Multiple dispatch with just ahead of time compilation + +00:02:48.440 --> 00:02:49.719 +of highly efficient code. + +00:02:49.720 --> 00:02:53.439 +So now, what makes Emacs, Emacs? + +00:02:53.440 --> 00:02:56.679 +Well, in my opinion, what makes Emacs, Emacs + +00:02:56.680 --> 00:03:01.159 +is interactivity, extensibility, and community. + +00:03:01.160 --> 00:03:06.199 +And I claim that Julia has the same three. + +00:03:06.200 --> 00:03:09.079 +Interactivity, extensibility, and community + +00:03:09.080 --> 00:03:11.839 +are three key pillars for Julia. + +00:03:11.840 --> 00:03:14.599 +More specifically, Julia encourages a + +00:03:14.600 --> 00:03:17.079 +REPL-driven, introspective, interactive workflow. + +00:03:17.080 --> 00:03:19.879 +It's largely open to extension and modification + +00:03:19.880 --> 00:03:23.559 +to the point that most of Julia is written in Julia. + +00:03:23.560 --> 00:03:25.959 +And Julia has a thriving and welcoming community + +00:03:25.960 --> 00:03:28.799 +with lots of packages. So, let me showcase + +00:03:28.800 --> 00:03:31.079 +a little bit of this REPL-driven, introspective, + +00:03:31.080 --> 00:03:34.359 +interactive workflow with the hope that commonalities + +00:03:34.360 --> 00:03:36.759 +with Emacs will emerge naturally. + +00:03:36.760 --> 00:03:39.919 +So, let's start by opening a Julia REPL. + +00:03:39.920 --> 00:03:41.759 +Here, I have a Julia REPL. + +00:03:41.760 --> 00:03:44.399 +Let me give you a tour of the Julia REPL. + +00:03:44.400 --> 00:03:47.759 +So, the REPL comes with lots of useful features, + +00:03:47.760 --> 00:03:51.559 +from a shell to a package manager. + +00:03:51.560 --> 00:03:54.999 +So, for example, let's add the random package. + +00:03:55.000 --> 00:03:58.279 +Um, yeah, I have the random package. + +00:03:58.280 --> 00:03:59.279 +I can look at what's inside. + +00:03:59.280 --> 00:04:01.279 +We have the statistics with random + +00:04:01.280 --> 00:04:02.479 +in this particular environment. + +00:04:02.480 --> 00:04:05.719 +Environments are fully declarative. + +00:04:05.720 --> 00:04:08.039 +So here we have the dependencies of this environment. + +00:04:08.040 --> 00:04:10.239 +And I can explore in this manifest, + +00:04:10.240 --> 00:04:13.999 +the specific versions that are used. + +00:04:14.000 --> 00:04:17.719 +So we have a shell, we have a package manager, + +00:04:17.720 --> 00:04:20.559 +and then we have a very powerful help system. + +00:04:20.560 --> 00:04:24.199 +So, for example, I can ask for help for length. + +00:04:24.200 --> 00:04:26.639 +And here we can see we have, well, + +00:04:26.640 --> 00:04:30.999 +the help for length. Lots of information about + +00:04:31.000 --> 00:04:33.399 +how to call length, the expected return values, + +00:04:33.400 --> 00:04:36.119 +examples. And now you can probably start seeing that + +00:04:36.120 --> 00:04:37.759 +this is not that different from calling length. + +00:04:37.760 --> 00:04:42.119 +So this is the output for length, + +00:04:42.120 --> 00:04:44.999 +or for help for length in in Emacs. + +00:04:45.000 --> 00:04:47.959 +So we have help, and we can do more. + +00:04:47.960 --> 00:04:51.879 +We can even look at the source code for length. + +00:04:51.880 --> 00:04:57.079 +So now, what we can see here is that now, well, + +00:04:57.080 --> 00:04:58.919 +we cannot see because it's zoomed in + +00:04:58.920 --> 00:05:02.799 +because the font size is huge, but in this page here, + +00:05:02.800 --> 00:05:04.759 +we can see the implementation of length. + +00:05:04.760 --> 00:05:06.719 +It's this line here in the middle, + +00:05:06.720 --> 00:05:09.719 +or these few lines here in the middle. + +00:05:09.720 --> 00:05:12.079 +And as you... Let's do this again. + +00:05:12.080 --> 00:05:12.999 +As we can see here at the bottom, + +00:05:13.000 --> 00:05:13.799 +what we are looking at, + +00:05:13.800 --> 00:05:15.639 +this is the source code of Julia. + +00:05:15.640 --> 00:05:17.039 +We can change this. + +00:05:17.040 --> 00:05:20.039 +There's even a macro edit + +00:05:20.040 --> 00:05:22.759 +if you want to change its length. + +00:05:22.760 --> 00:05:24.599 +And yeah, I use the word macro. + +00:05:24.600 --> 00:05:28.639 +Julia supports metaprogramming. + +00:05:28.640 --> 00:05:30.359 +And actually metaprogramming is + +00:05:30.360 --> 00:05:32.079 +one of the key features in Julia. + +00:05:32.080 --> 00:05:33.639 +It's used extensively in the core, + +00:05:33.640 --> 00:05:36.399 +but it's also used extensively in packages, + +00:05:36.400 --> 00:05:40.079 +both to extend the Julia ecosystem and functionalities, + +00:05:40.080 --> 00:05:43.479 +but also to develop full domain specific languages. + +00:05:43.480 --> 00:05:47.239 +Some of the useful macros are, well, I don't know, + +00:05:47.240 --> 00:05:52.239 +like time. Here, we have a built-in + +00:05:52.240 --> 00:05:55.799 +basic performance tool in in in Julia. + +00:05:55.800 --> 00:06:00.479 +And I want to showcase more introspection, macros. + +00:06:00.480 --> 00:06:02.959 +But for that, I'm going to do it slightly different. + +00:06:02.960 --> 00:06:04.039 +I'm going to open a file + +00:06:04.040 --> 00:06:06.239 +example.jl where I define a + +00:06:06.240 --> 00:06:08.039 +function, or our + +00:06:08.040 --> 00:06:09.519 +function add, there was an asterisk + +00:06:09.520 --> 00:06:11.199 +and I will go back to that in a second. + +00:06:11.200 --> 00:06:15.239 +So now, I am going to include this this file, + +00:06:15.240 --> 00:06:18.199 +and I can call my function add, one and two, + +00:06:18.200 --> 00:06:22.639 +and we get three. And now, what I can do is this. + +00:06:22.640 --> 00:06:28.039 +I can look at what code gets compiled + +00:06:28.040 --> 00:06:31.359 +when I call my when I call 1 + 2. + +00:06:31.360 --> 00:06:33.359 +And here, now we can see + +00:06:33.360 --> 00:06:34.639 +that there is some integer stuff. + +00:06:34.640 --> 00:06:38.159 +But if I make this floating point, + +00:06:38.160 --> 00:06:40.239 +now the compiled code changes. + +00:06:40.240 --> 00:06:43.599 +Now, maybe assembly code + +00:06:43.600 --> 00:06:45.079 +is a little bit too hard to read, + +00:06:45.080 --> 00:06:48.639 +so I can look at the LLVM IR representation. + +00:06:48.640 --> 00:06:50.399 +In this case we can see that there is promotion. + +00:06:50.400 --> 00:06:52.239 +The promotion will probably go away + +00:06:52.240 --> 00:06:56.039 +if I make everything float. So this we have F add, + +00:06:56.040 --> 00:06:57.999 +floating point add for a double, + +00:06:58.000 --> 00:06:59.439 +but we can also look at + +00:06:59.440 --> 00:07:04.239 +the Julia lowered representation + +00:07:04.240 --> 00:07:06.079 +after the abstract syntax tree is produced. + +00:07:06.080 --> 00:07:07.919 +The reason I put this in a file is because + +00:07:07.920 --> 00:07:10.119 +now what I can do is I can change this. + +00:07:10.120 --> 00:07:14.079 +And now, one and two will be two. + +00:07:14.080 --> 00:07:16.879 +So this to me is very reminiscent + +00:07:16.880 --> 00:07:18.719 +of how I work in Emacs, + +00:07:18.720 --> 00:07:20.239 +where there is a global state + +00:07:20.240 --> 00:07:22.959 +that I can access and modify any time + +00:07:22.960 --> 00:07:27.159 +with no restrictions. And this happens in in Julia too. + +00:07:27.160 --> 00:07:29.559 +Typically, we don't want to modify functions + +00:07:29.560 --> 00:07:32.519 +that are in other packages or they are in base, + +00:07:32.520 --> 00:07:34.079 +but we can do that. For example, + +00:07:34.080 --> 00:07:37.639 +I can change what is plus for integers. + +00:07:37.640 --> 00:07:41.079 +And if I change with this plus + +00:07:41.080 --> 00:07:43.759 +and make it so that any two integers return zero, + +00:07:43.760 --> 00:07:46.319 +well, I can do this. This will break Julia because, + +00:07:46.320 --> 00:07:48.359 +well, Julia is built in Julia. + +00:07:48.360 --> 00:07:51.399 +So if we break this, well, nothing will work. + +00:07:51.400 --> 00:07:53.399 +But I can do that. This to me is one of + +00:07:53.400 --> 00:07:56.199 +the signs of the powerful, introspective, + +00:07:56.200 --> 00:07:58.479 +and powerful interactive type of workflows + +00:07:58.480 --> 00:07:59.279 +that Julia enables. + +00:07:59.280 --> 00:08:03.479 +Finally, I want to talk about the general registry. + +00:08:03.480 --> 00:08:06.399 +This is the equivalent of Melpa. + +00:08:06.400 --> 00:08:08.759 +It comes with with Julia. + +00:08:08.760 --> 00:08:11.119 +But this is very akin to Melpa. + +00:08:11.120 --> 00:08:14.479 +It's built upon Git essentially. + +00:08:14.480 --> 00:08:19.399 +It's collaborative, as relies heavily on GitHub, GitLab. + +00:08:19.400 --> 00:08:21.119 +It's heavily automated. + +00:08:21.120 --> 00:08:24.479 +And comes with lots and lots of tools and packages. + +00:08:24.480 --> 00:08:27.559 +What's beautiful about all these tools and packages + +00:08:27.560 --> 00:08:30.279 +is that in the same way many of Emacs packages + +00:08:30.280 --> 00:08:32.399 +just play nicely with each other + +00:08:32.400 --> 00:08:34.879 +without any input from the developers, + +00:08:34.880 --> 00:08:37.559 +the same is true for Julia packages. + +00:08:37.560 --> 00:08:40.679 +The Julia packages are highly composable, + +00:08:40.680 --> 00:08:42.879 +so two developers can develop + +00:08:42.880 --> 00:08:44.719 +two distinct packages + +00:08:44.720 --> 00:08:47.639 +that end up playing nicely together for free + +00:08:47.640 --> 00:08:51.879 +because of the intrinsic structure, intrinsic way + +00:08:51.880 --> 00:08:54.079 +Julia objects are built. + +00:08:54.080 --> 00:08:57.479 +So, with all of this, I also want to mention that + +00:08:57.480 --> 00:09:00.079 +the community, in addition to have all these packages, + +00:09:00.080 --> 00:09:02.599 +is highly active, highly collaborative. + +00:09:02.600 --> 00:09:06.159 +The community meets regularly on places like Slack, + +00:09:06.160 --> 00:09:08.199 +as opposed to the Emacs community + +00:09:08.200 --> 00:09:10.039 +that I'd say maybe meets on Reddit. + +00:09:10.040 --> 00:09:12.999 +So, with all of this, I want to thank you + +00:09:13.000 --> 00:09:16.560 +for your attention, enjoy Emacs, and enjoy Julia. diff --git a/2024/info/julia-after.md b/2024/info/julia-after.md index 7a3e5008..021f1591 100644 --- a/2024/info/julia-after.md +++ b/2024/info/julia-after.md @@ -1,6 +1,215 @@ <!-- Automatically generated by emacsconf-publish-after-page --> +<a name="julia-mainVideo-transcript"></a> +# Transcript + +[[!template text="""Hello, I'm very excited to tell you""" start="00:00:00.000" video="mainVideo-julia" id="subtitle"]] +[[!template text="""about shared philosophies""" start="00:00:02.360" video="mainVideo-julia" id="subtitle"]] +[[!template text="""between the Julia programming language and Emacs.""" start="00:00:03.680" video="mainVideo-julia" id="subtitle"]] +[[!template text="""While Julia and Emacs might look like""" start="00:00:06.480" video="mainVideo-julia" id="subtitle"]] +[[!template text="""different pieces of software,""" start="00:00:08.680" video="mainVideo-julia" id="subtitle"]] +[[!template text="""I think there is profound commonalities between the two.""" start="00:00:10.280" video="mainVideo-julia" id="subtitle"]] +[[!template text="""Let's start by introducing Julia.""" start="00:00:13.440" video="mainVideo-julia" id="subtitle"]] +[[!template text="""Julia is a high-level dynamic programming language.""" start="00:00:16.360" video="mainVideo-julia" id="subtitle"]] +[[!template text="""Julia is free and open source software""" start="00:00:19.720" video="mainVideo-julia" id="subtitle"]] +[[!template text="""and is used primarily for scientific computing.""" start="00:00:21.680" video="mainVideo-julia" id="subtitle"]] +[[!template text="""The reason Julia is used for scientific computing""" start="00:00:24.640" video="mainVideo-julia" id="subtitle"]] +[[!template text="""is that while Julia is high level""" start="00:00:27.040" video="mainVideo-julia" id="subtitle"]] +[[!template text="""and has a syntax that looks like Python or MATLAB,""" start="00:00:29.680" video="mainVideo-julia" id="subtitle"]] +[[!template text="""Julia can be high performance.""" start="00:00:32.560" video="mainVideo-julia" id="subtitle"]] +[[!template text="""I use it to develop climate models""" start="00:00:34.560" video="mainVideo-julia" id="subtitle"]] +[[!template text="""that run on hundreds of GPUs.""" start="00:00:36.520" video="mainVideo-julia" id="subtitle"]] +[[!template text="""Models that are traditionally developed with C, C++, or Fortran.""" start="00:00:38.480" video="mainVideo-julia" id="subtitle"]] +[[!template text="""But how is this possible?""" start="00:00:43.400" video="mainVideo-julia" id="subtitle"]] +[[!template text="""How can Julia be high performance""" start="00:00:44.760" video="mainVideo-julia" id="subtitle"]] +[[!template text="""but also high level at the same time?""" start="00:00:46.800" video="mainVideo-julia" id="subtitle"]] +[[!template text="""What makes Julia, Julia?""" start="00:00:48.800" video="mainVideo-julia" id="subtitle"]] +[[!template text="""Well, what makes Julia, Julia""" start="00:00:50.425" video="mainVideo-julia" id="subtitle"]] +[[!template text="""is the idea of multiple dispatch.""" start="00:00:52.470" video="mainVideo-julia" id="subtitle"]] +[[!template text="""Multiple dispatch is the concept where a function call is resolved""" start="00:00:54.720" video="mainVideo-julia" id="subtitle"]] +[[!template text="""by looking at the types of every single argument involved.""" start="00:00:59.000" video="mainVideo-julia" id="subtitle"]] +[[!template text="""So, let's explore this with this example.""" start="00:01:02.360" video="mainVideo-julia" id="subtitle"]] +[[!template text="""Here, I define a function add that takes two objects""" start="00:01:04.960" video="mainVideo-julia" id="subtitle"]] +[[!template text="""and sums them together.""" start="00:01:07.720" video="mainVideo-julia" id="subtitle"]] +[[!template text="""And I call add with two different types.""" start="00:01:09.160" video="mainVideo-julia" id="subtitle"]] +[[!template text="""First with just integers and second with floats.""" start="00:01:11.880" video="mainVideo-julia" id="subtitle"]] +[[!template text="""So, let's look at what this produces.""" start="00:01:14.640" video="mainVideo-julia" id="subtitle"]] +[[!template text="""Here is the output of add in Julia.""" start="00:01:17.560" video="mainVideo-julia" id="subtitle"]] +[[!template text="""So, first we have add, a function with one method.""" start="00:01:20.440" video="mainVideo-julia" id="subtitle"]] +[[!template text="""I'm going to explain this in a second.""" start="00:01:23.280" video="mainVideo-julia" id="subtitle"]] +[[!template text="""And then we have our return values 12 and 12.0.""" start="00:01:24.840" video="mainVideo-julia" id="subtitle"]] +[[!template text="""What we cannot see here is that""" start="00:01:28.720" video="mainVideo-julia" id="subtitle"]] +[[!template text="""Julia has specialized code""" start="00:01:30.800" video="mainVideo-julia" id="subtitle"]] +[[!template text="""for the two different function calls.""" start="00:01:33.440" video="mainVideo-julia" id="subtitle"]] +[[!template text="""For integers and for floating points.""" start="00:01:35.120" video="mainVideo-julia" id="subtitle"]] +[[!template text="""Let's make this more explicit by specifically providing""" start="00:01:38.360" video="mainVideo-julia" id="subtitle"]] +[[!template text="""a new method for the case with floating point.""" start="00:01:42.240" video="mainVideo-julia" id="subtitle"]] +[[!template text="""So here, now I have an add function""" start="00:01:45.080" video="mainVideo-julia" id="subtitle"]] +[[!template text="""specifically for floating point. Instead of taking""" start="00:01:47.600" video="mainVideo-julia" id="subtitle"]] +[[!template text="""A + B, this returns A exponent B. Let's call this.""" start="00:01:50.120" video="mainVideo-julia" id="subtitle"]] +[[!template text="""And what we can see here is that""" start="00:01:54.760" video="mainVideo-julia" id="subtitle"]] +[[!template text="""now we have two methods.""" start="00:01:56.800" video="mainVideo-julia" id="subtitle"]] +[[!template text="""So, we add a new method to the same function.""" start="00:01:58.320" video="mainVideo-julia" id="subtitle"]] +[[!template text="""This is a method that is""" start="00:02:00.560" video="mainVideo-julia" id="subtitle"]] +[[!template text="""specifically for floating points.""" start="00:02:01.640" video="mainVideo-julia" id="subtitle"]] +[[!template text="""And instead of having the value 12, we have 100.""" start="00:02:03.680" video="mainVideo-julia" id="subtitle"]] +[[!template text="""And this is where the trick lies.""" start="00:02:06.960" video="mainVideo-julia" id="subtitle"]] +[[!template text="""Julia compiles the most, um, specialized version""" start="00:02:09.040" video="mainVideo-julia" id="subtitle"]] +[[!template text="""that can be compiled. So, a version with integers,""" start="00:02:13.880" video="mainVideo-julia" id="subtitle"]] +[[!template text="""a version with floats. And in this,""" start="00:02:16.840" video="mainVideo-julia" id="subtitle"]] +[[!template text="""compiling is an actual compilation with LLVM""" start="00:02:19.200" video="mainVideo-julia" id="subtitle"]] +[[!template text="""with optimization and so on.""" start="00:02:22.680" video="mainVideo-julia" id="subtitle"]] +[[!template text="""This is not just ahead of time compilation.""" start="00:02:24.480" video="mainVideo-julia" id="subtitle"]] +[[!template text="""Soon as the Julia knows the type,""" start="00:02:27.440" video="mainVideo-julia" id="subtitle"]] +[[!template text="""a function is compiled if it's not compiled already""" start="00:02:30.720" video="mainVideo-julia" id="subtitle"]] +[[!template text="""and then it's used.""" start="00:02:33.720" video="mainVideo-julia" id="subtitle"]] +[[!template text="""When types are stable and well inferred,""" start="00:02:35.080" video="mainVideo-julia" id="subtitle"]] +[[!template text="""this can lead to code that is as performant""" start="00:02:37.160" video="mainVideo-julia" id="subtitle"]] +[[!template text="""or comparable to C and Fortran.""" start="00:02:40.080" video="mainVideo-julia" id="subtitle"]] +[[!template text="""So, this is what makes Julia, Julia.""" start="00:02:42.160" video="mainVideo-julia" id="subtitle"]] +[[!template text="""Multiple dispatch with just ahead of time compilation""" start="00:02:45.160" video="mainVideo-julia" id="subtitle"]] +[[!template text="""of highly efficient code.""" start="00:02:48.440" video="mainVideo-julia" id="subtitle"]] +[[!template text="""So now, what makes Emacs, Emacs?""" start="00:02:49.720" video="mainVideo-julia" id="subtitle"]] +[[!template text="""Well, in my opinion, what makes Emacs, Emacs""" start="00:02:53.440" video="mainVideo-julia" id="subtitle"]] +[[!template text="""is interactivity, extensibility, and community.""" start="00:02:56.680" video="mainVideo-julia" id="subtitle"]] +[[!template text="""And I claim that Julia has the same three.""" start="00:03:01.160" video="mainVideo-julia" id="subtitle"]] +[[!template text="""Interactivity, extensibility, and community""" start="00:03:06.200" video="mainVideo-julia" id="subtitle"]] +[[!template text="""are three key pillars for Julia.""" start="00:03:09.080" video="mainVideo-julia" id="subtitle"]] +[[!template text="""More specifically, Julia encourages a""" start="00:03:11.840" video="mainVideo-julia" id="subtitle"]] +[[!template text="""REPL-driven, introspective, interactive workflow.""" start="00:03:14.600" video="mainVideo-julia" id="subtitle"]] +[[!template text="""It's largely open to extension and modification""" start="00:03:17.080" video="mainVideo-julia" id="subtitle"]] +[[!template text="""to the point that most of Julia is written in Julia.""" start="00:03:19.880" video="mainVideo-julia" id="subtitle"]] +[[!template text="""And Julia has a thriving and welcoming community""" start="00:03:23.560" video="mainVideo-julia" id="subtitle"]] +[[!template text="""with lots of packages. So, let me showcase""" start="00:03:25.960" video="mainVideo-julia" id="subtitle"]] +[[!template text="""a little bit of this REPL-driven, introspective,""" start="00:03:28.800" video="mainVideo-julia" id="subtitle"]] +[[!template text="""interactive workflow with the hope that commonalities""" start="00:03:31.080" video="mainVideo-julia" id="subtitle"]] +[[!template text="""with Emacs will emerge naturally.""" start="00:03:34.360" video="mainVideo-julia" id="subtitle"]] +[[!template text="""So, let's start by opening a Julia REPL.""" start="00:03:36.760" video="mainVideo-julia" id="subtitle"]] +[[!template text="""Here, I have a Julia REPL.""" start="00:03:39.920" video="mainVideo-julia" id="subtitle"]] +[[!template text="""Let me give you a tour of the Julia REPL.""" start="00:03:41.760" video="mainVideo-julia" id="subtitle"]] +[[!template text="""So, the REPL comes with lots of useful features,""" start="00:03:44.400" video="mainVideo-julia" id="subtitle"]] +[[!template text="""from a shell to a package manager.""" start="00:03:47.760" video="mainVideo-julia" id="subtitle"]] +[[!template text="""So, for example, let's add the random package.""" start="00:03:51.560" video="mainVideo-julia" id="subtitle"]] +[[!template text="""Um, yeah, I have the random package.""" start="00:03:55.000" video="mainVideo-julia" id="subtitle"]] +[[!template text="""I can look at what's inside.""" start="00:03:58.280" video="mainVideo-julia" id="subtitle"]] +[[!template text="""We have the statistics with random""" start="00:03:59.280" video="mainVideo-julia" id="subtitle"]] +[[!template text="""in this particular environment.""" start="00:04:01.280" video="mainVideo-julia" id="subtitle"]] +[[!template text="""Environments are fully declarative.""" start="00:04:02.480" video="mainVideo-julia" id="subtitle"]] +[[!template text="""So here we have the dependencies of this environment.""" start="00:04:05.720" video="mainVideo-julia" id="subtitle"]] +[[!template text="""And I can explore in this manifest,""" start="00:04:08.040" video="mainVideo-julia" id="subtitle"]] +[[!template text="""the specific versions that are used.""" start="00:04:10.240" video="mainVideo-julia" id="subtitle"]] +[[!template text="""So we have a shell, we have a package manager,""" start="00:04:14.000" video="mainVideo-julia" id="subtitle"]] +[[!template text="""and then we have a very powerful help system.""" start="00:04:17.720" video="mainVideo-julia" id="subtitle"]] +[[!template text="""So, for example, I can ask for help for length.""" start="00:04:20.560" video="mainVideo-julia" id="subtitle"]] +[[!template text="""And here we can see we have, well,""" start="00:04:24.200" video="mainVideo-julia" id="subtitle"]] +[[!template text="""the help for length. Lots of information about""" start="00:04:26.640" video="mainVideo-julia" id="subtitle"]] +[[!template text="""how to call length, the expected return values,""" start="00:04:31.000" video="mainVideo-julia" id="subtitle"]] +[[!template text="""examples. And now you can probably start seeing that""" start="00:04:33.400" video="mainVideo-julia" id="subtitle"]] +[[!template text="""this is not that different from calling length.""" start="00:04:36.120" video="mainVideo-julia" id="subtitle"]] +[[!template text="""So this is the output for length,""" start="00:04:37.760" video="mainVideo-julia" id="subtitle"]] +[[!template text="""or for help for length in in Emacs.""" start="00:04:42.120" video="mainVideo-julia" id="subtitle"]] +[[!template text="""So we have help, and we can do more.""" start="00:04:45.000" video="mainVideo-julia" id="subtitle"]] +[[!template text="""We can even look at the source code for length.""" start="00:04:47.960" video="mainVideo-julia" id="subtitle"]] +[[!template text="""So now, what we can see here is that now, well,""" start="00:04:51.880" video="mainVideo-julia" id="subtitle"]] +[[!template text="""we cannot see because it's zoomed in""" start="00:04:57.080" video="mainVideo-julia" id="subtitle"]] +[[!template text="""because the font size is huge, but in this page here,""" start="00:04:58.920" video="mainVideo-julia" id="subtitle"]] +[[!template text="""we can see the implementation of length.""" start="00:05:02.800" video="mainVideo-julia" id="subtitle"]] +[[!template text="""It's this line here in the middle,""" start="00:05:04.760" video="mainVideo-julia" id="subtitle"]] +[[!template text="""or these few lines here in the middle.""" start="00:05:06.720" video="mainVideo-julia" id="subtitle"]] +[[!template text="""And as you... Let's do this again.""" start="00:05:09.720" video="mainVideo-julia" id="subtitle"]] +[[!template text="""As we can see here at the bottom,""" start="00:05:12.080" video="mainVideo-julia" id="subtitle"]] +[[!template text="""what we are looking at,""" start="00:05:13.000" video="mainVideo-julia" id="subtitle"]] +[[!template text="""this is the source code of Julia.""" start="00:05:13.800" video="mainVideo-julia" id="subtitle"]] +[[!template text="""We can change this.""" start="00:05:15.640" video="mainVideo-julia" id="subtitle"]] +[[!template text="""There's even a macro edit""" start="00:05:17.040" video="mainVideo-julia" id="subtitle"]] +[[!template text="""if you want to change its length.""" start="00:05:20.040" video="mainVideo-julia" id="subtitle"]] +[[!template text="""And yeah, I use the word macro.""" start="00:05:22.760" video="mainVideo-julia" id="subtitle"]] +[[!template text="""Julia supports metaprogramming.""" start="00:05:24.600" video="mainVideo-julia" id="subtitle"]] +[[!template text="""And actually metaprogramming is""" start="00:05:28.640" video="mainVideo-julia" id="subtitle"]] +[[!template text="""one of the key features in Julia.""" start="00:05:30.360" video="mainVideo-julia" id="subtitle"]] +[[!template text="""It's used extensively in the core,""" start="00:05:32.080" video="mainVideo-julia" id="subtitle"]] +[[!template text="""but it's also used extensively in packages,""" start="00:05:33.640" video="mainVideo-julia" id="subtitle"]] +[[!template text="""both to extend the Julia ecosystem and functionalities,""" start="00:05:36.400" video="mainVideo-julia" id="subtitle"]] +[[!template text="""but also to develop full domain specific languages.""" start="00:05:40.080" video="mainVideo-julia" id="subtitle"]] +[[!template text="""Some of the useful macros are, well, I don't know,""" start="00:05:43.480" video="mainVideo-julia" id="subtitle"]] +[[!template text="""like time. Here, we have a built-in""" start="00:05:47.240" video="mainVideo-julia" id="subtitle"]] +[[!template text="""basic performance tool in in in Julia.""" start="00:05:52.240" video="mainVideo-julia" id="subtitle"]] +[[!template text="""And I want to showcase more introspection, macros.""" start="00:05:55.800" video="mainVideo-julia" id="subtitle"]] +[[!template text="""But for that, I'm going to do it slightly different.""" start="00:06:00.480" video="mainVideo-julia" id="subtitle"]] +[[!template text="""I'm going to open a file""" start="00:06:02.960" video="mainVideo-julia" id="subtitle"]] +[[!template text="""example.jl where I define a""" start="00:06:04.040" video="mainVideo-julia" id="subtitle"]] +[[!template text="""function, or our""" start="00:06:06.240" video="mainVideo-julia" id="subtitle"]] +[[!template text="""function add, there was an asterisk""" start="00:06:08.040" video="mainVideo-julia" id="subtitle"]] +[[!template text="""and I will go back to that in a second.""" start="00:06:09.520" video="mainVideo-julia" id="subtitle"]] +[[!template text="""So now, I am going to include this this file,""" start="00:06:11.200" video="mainVideo-julia" id="subtitle"]] +[[!template text="""and I can call my function add, one and two,""" start="00:06:15.240" video="mainVideo-julia" id="subtitle"]] +[[!template text="""and we get three. And now, what I can do is this.""" start="00:06:18.200" video="mainVideo-julia" id="subtitle"]] +[[!template text="""I can look at what code gets compiled""" start="00:06:22.640" video="mainVideo-julia" id="subtitle"]] +[[!template text="""when I call my when I call 1 + 2.""" start="00:06:28.040" video="mainVideo-julia" id="subtitle"]] +[[!template text="""And here, now we can see""" start="00:06:31.360" video="mainVideo-julia" id="subtitle"]] +[[!template text="""that there is some integer stuff.""" start="00:06:33.360" video="mainVideo-julia" id="subtitle"]] +[[!template text="""But if I make this floating point,""" start="00:06:34.640" video="mainVideo-julia" id="subtitle"]] +[[!template text="""now the compiled code changes.""" start="00:06:38.160" video="mainVideo-julia" id="subtitle"]] +[[!template text="""Now, maybe assembly code""" start="00:06:40.240" video="mainVideo-julia" id="subtitle"]] +[[!template text="""is a little bit too hard to read,""" start="00:06:43.600" video="mainVideo-julia" id="subtitle"]] +[[!template text="""so I can look at the LLVM IR representation.""" start="00:06:45.080" video="mainVideo-julia" id="subtitle"]] +[[!template text="""In this case we can see that there is promotion.""" start="00:06:48.640" video="mainVideo-julia" id="subtitle"]] +[[!template text="""The promotion will probably go away""" start="00:06:50.400" video="mainVideo-julia" id="subtitle"]] +[[!template text="""if I make everything float. So this we have F add,""" start="00:06:52.240" video="mainVideo-julia" id="subtitle"]] +[[!template text="""floating point add for a double,""" start="00:06:56.040" video="mainVideo-julia" id="subtitle"]] +[[!template text="""but we can also look at""" start="00:06:58.000" video="mainVideo-julia" id="subtitle"]] +[[!template text="""the Julia lowered representation""" start="00:06:59.440" video="mainVideo-julia" id="subtitle"]] +[[!template text="""after the abstract syntax tree is produced.""" start="00:07:04.240" video="mainVideo-julia" id="subtitle"]] +[[!template text="""The reason I put this in a file is because""" start="00:07:06.080" video="mainVideo-julia" id="subtitle"]] +[[!template text="""now what I can do is I can change this.""" start="00:07:07.920" video="mainVideo-julia" id="subtitle"]] +[[!template text="""And now, one and two will be two.""" start="00:07:10.120" video="mainVideo-julia" id="subtitle"]] +[[!template text="""So this to me is very reminiscent""" start="00:07:14.080" video="mainVideo-julia" id="subtitle"]] +[[!template text="""of how I work in Emacs,""" start="00:07:16.880" video="mainVideo-julia" id="subtitle"]] +[[!template text="""where there is a global state""" start="00:07:18.720" video="mainVideo-julia" id="subtitle"]] +[[!template text="""that I can access and modify any time""" start="00:07:20.240" video="mainVideo-julia" id="subtitle"]] +[[!template text="""with no restrictions. And this happens in in Julia too.""" start="00:07:22.960" video="mainVideo-julia" id="subtitle"]] +[[!template text="""Typically, we don't want to modify functions""" start="00:07:27.160" video="mainVideo-julia" id="subtitle"]] +[[!template text="""that are in other packages or they are in base,""" start="00:07:29.560" video="mainVideo-julia" id="subtitle"]] +[[!template text="""but we can do that. For example,""" start="00:07:32.520" video="mainVideo-julia" id="subtitle"]] +[[!template text="""I can change what is plus for integers.""" start="00:07:34.080" video="mainVideo-julia" id="subtitle"]] +[[!template text="""And if I change with this plus""" start="00:07:37.640" video="mainVideo-julia" id="subtitle"]] +[[!template text="""and make it so that any two integers return zero,""" start="00:07:41.080" video="mainVideo-julia" id="subtitle"]] +[[!template text="""well, I can do this. This will break Julia because,""" start="00:07:43.760" video="mainVideo-julia" id="subtitle"]] +[[!template text="""well, Julia is built in Julia.""" start="00:07:46.320" video="mainVideo-julia" id="subtitle"]] +[[!template text="""So if we break this, well, nothing will work.""" start="00:07:48.360" video="mainVideo-julia" id="subtitle"]] +[[!template text="""But I can do that. This to me is one of""" start="00:07:51.400" video="mainVideo-julia" id="subtitle"]] +[[!template text="""the signs of the powerful, introspective,""" start="00:07:53.400" video="mainVideo-julia" id="subtitle"]] +[[!template text="""and powerful interactive type of workflows""" start="00:07:56.200" video="mainVideo-julia" id="subtitle"]] +[[!template text="""that Julia enables.""" start="00:07:58.480" video="mainVideo-julia" id="subtitle"]] +[[!template text="""Finally, I want to talk about the general registry.""" start="00:07:59.280" video="mainVideo-julia" id="subtitle"]] +[[!template text="""This is the equivalent of Melpa.""" start="00:08:03.480" video="mainVideo-julia" id="subtitle"]] +[[!template text="""It comes with with Julia.""" start="00:08:06.400" video="mainVideo-julia" id="subtitle"]] +[[!template text="""But this is very akin to Melpa.""" start="00:08:08.760" video="mainVideo-julia" id="subtitle"]] +[[!template text="""It's built upon Git essentially.""" start="00:08:11.120" video="mainVideo-julia" id="subtitle"]] +[[!template text="""It's collaborative, as relies heavily on GitHub, GitLab.""" start="00:08:14.480" video="mainVideo-julia" id="subtitle"]] +[[!template text="""It's heavily automated.""" start="00:08:19.400" video="mainVideo-julia" id="subtitle"]] +[[!template text="""And comes with lots and lots of tools and packages.""" start="00:08:21.120" video="mainVideo-julia" id="subtitle"]] +[[!template text="""What's beautiful about all these tools and packages""" start="00:08:24.480" video="mainVideo-julia" id="subtitle"]] +[[!template text="""is that in the same way many of Emacs packages""" start="00:08:27.560" video="mainVideo-julia" id="subtitle"]] +[[!template text="""just play nicely with each other""" start="00:08:30.280" video="mainVideo-julia" id="subtitle"]] +[[!template text="""without any input from the developers,""" start="00:08:32.400" video="mainVideo-julia" id="subtitle"]] +[[!template text="""the same is true for Julia packages.""" start="00:08:34.880" video="mainVideo-julia" id="subtitle"]] +[[!template text="""The Julia packages are highly composable,""" start="00:08:37.560" video="mainVideo-julia" id="subtitle"]] +[[!template text="""so two developers can develop""" start="00:08:40.680" video="mainVideo-julia" id="subtitle"]] +[[!template text="""two distinct packages""" start="00:08:42.880" video="mainVideo-julia" id="subtitle"]] +[[!template text="""that end up playing nicely together for free""" start="00:08:44.720" video="mainVideo-julia" id="subtitle"]] +[[!template text="""because of the intrinsic structure, intrinsic way""" start="00:08:47.640" video="mainVideo-julia" id="subtitle"]] +[[!template text="""Julia objects are built.""" start="00:08:51.880" video="mainVideo-julia" id="subtitle"]] +[[!template text="""So, with all of this, I also want to mention that""" start="00:08:54.080" video="mainVideo-julia" id="subtitle"]] +[[!template text="""the community, in addition to have all these packages,""" start="00:08:57.480" video="mainVideo-julia" id="subtitle"]] +[[!template text="""is highly active, highly collaborative.""" start="00:09:00.080" video="mainVideo-julia" id="subtitle"]] +[[!template text="""The community meets regularly on places like Slack,""" start="00:09:02.600" video="mainVideo-julia" id="subtitle"]] +[[!template text="""as opposed to the Emacs community""" start="00:09:06.160" video="mainVideo-julia" id="subtitle"]] +[[!template text="""that I'd say maybe meets on Reddit.""" start="00:09:08.200" video="mainVideo-julia" id="subtitle"]] +[[!template text="""So, with all of this, I want to thank you""" start="00:09:10.040" video="mainVideo-julia" id="subtitle"]] +[[!template text="""for your attention, enjoy Emacs, and enjoy Julia.""" start="00:09:13.000" video="mainVideo-julia" id="subtitle"]] + Questions or comments? Please e-mail [emacsconf-org-private@gnu.org](mailto:emacsconf-org-private@gnu.org?subject=Comment%20for%20EmacsConf%202023%20julia%3A%20Exploring%20shared%20philosophies%20in%20Julia%20and%20Emacs) diff --git a/2024/info/julia-before.md b/2024/info/julia-before.md index 6d3d419a..fb68997a 100644 --- a/2024/info/julia-before.md +++ b/2024/info/julia-before.md @@ -8,12 +8,12 @@ The following image shows where the talk is in the schedule for Sat 2024-12-07. Format: 10-min talk ; Q&A: BigBlueButton conference room <https://media.emacsconf.org/2024/current/bbb-julia.html> Etherpad: <https://pad.emacsconf.org/2024-julia> Etherpad: <https://pad.emacsconf.org/2024-julia> Discuss on IRC: [#emacsconf-dev](https://chat.emacsconf.org/?join=emacsconf,emacsconf-dev) -Status: Ready to stream +Status: Now playing on the conference livestream <div>Times in different time zones:</div><div class="times" start="2024-12-07T18:00:00Z" end="2024-12-07T18:10:00Z"><div class="conf-time">Saturday, Dec 7 2024, ~1:00 PM - 1:10 PM EST (US/Eastern)</div><div class="others"><div>which is the same as:</div>Saturday, Dec 7 2024, ~12:00 PM - 12:10 PM CST (US/Central)<br />Saturday, Dec 7 2024, ~11:00 AM - 11:10 AM MST (US/Mountain)<br />Saturday, Dec 7 2024, ~10:00 AM - 10:10 AM PST (US/Pacific)<br />Saturday, Dec 7 2024, ~6:00 PM - 6:10 PM UTC <br />Saturday, Dec 7 2024, ~7:00 PM - 7:10 PM CET (Europe/Paris)<br />Saturday, Dec 7 2024, ~8:00 PM - 8:10 PM EET (Europe/Athens)<br />Saturday, Dec 7 2024, ~11:30 PM - 11:40 PM IST (Asia/Kolkata)<br />Sunday, Dec 8 2024, ~2:00 AM - 2:10 AM +08 (Asia/Singapore)<br />Sunday, Dec 8 2024, ~3:00 AM - 3:10 AM JST (Asia/Tokyo)</div></div><div><strong><a href="/2024/watch/dev/">Find out how to watch and participate</a></strong></div> - +<div class="vid"><video controls preload="none" id="julia-mainVideo"><source src="https://media.emacsconf.org/2024/emacsconf-2024-julia--exploring-shared-philosophies-in-julia-and-emacs--gabriele-bozzola--main.webm" />captions="""<track label="English" kind="captions" srclang="en" src="/2024/captions/emacsconf-2024-julia--exploring-shared-philosophies-in-julia-and-emacs--gabriele-bozzola--main.vtt" default />"""<p><em>Your browser does not support the video tag. Please download the video instead.</em></p></video><div></div>Duration: 09:17 minutes<div class="files resources"><ul><li><a href="https://pad.emacsconf.org/2024-julia">Open Etherpad</a></li><li><a href="https://media.emacsconf.org/2024/current/bbb-julia.html">Open public Q&A</a></li><li><a href="https://media.emacsconf.org/2024/emacsconf-2024-julia--exploring-shared-philosophies-in-julia-and-emacs--gabriele-bozzola--intro.webm">Download --intro.webm</a></li><li><a href="https://media.emacsconf.org/2024/emacsconf-2024-julia--exploring-shared-philosophies-in-julia-and-emacs--gabriele-bozzola--main.vtt">Download --main.vtt</a></li><li><a href="https://media.emacsconf.org/2024/emacsconf-2024-julia--exploring-shared-philosophies-in-julia-and-emacs--gabriele-bozzola--main.webm">Download --main.webm (17MB)</a></li><li><a href="https://media.emacsconf.org/2024/emacsconf-2024-julia--exploring-shared-philosophies-in-julia-and-emacs--gabriele-bozzola.mp4">Download .mp4 (24MB)</a></li></ul></div></div> # Description <!-- End of emacsconf-publish-before-page -->
\ No newline at end of file |