[Script Info] Title: [Events] Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: 0,0:03:15.74,0:03:17.82,Default,,0000,0000,0000,,--People are not important -- Dialogue: 0,0:03:18.84,0:03:23.33,Default,,0000,0000,0000,,--There are no people in technology, \Njust replaceable components -- Dialogue: 0,0:03:23.33,0:03:27.53,Default,,0000,0000,0000,,(Laughter) Dialogue: 0,0:06:15.77,0:06:17.22,Default,,0000,0000,0000,,Alright let's do this. Dialogue: 0,0:06:21.04,0:06:25.95,Default,,0000,0000,0000,,Alright, I'm going to tell\Nyou about what Rust is, Dialogue: 0,0:06:25.95,0:06:29.06,Default,,0000,0000,0000,,why Rust is a part of Mozilla's work Dialogue: 0,0:06:29.06,0:06:32.05,Default,,0000,0000,0000,,and when it's going to start \Nbeing a part of Mozilla's work. Dialogue: 0,0:06:32.56,0:06:33.32,Default,,0000,0000,0000,,Let's begin. Dialogue: 0,0:06:33.86,0:06:36.02,Default,,0000,0000,0000,,So Rust is a new programming language Dialogue: 0,0:06:36.03,0:06:40.03,Default,,0000,0000,0000,,that has been created inside Mozilla Dialogue: 0,0:06:40.65,0:06:42.29,Default,,0000,0000,0000,,and shared with the outside world. Dialogue: 0,0:06:43.50,0:06:44.87,Default,,0000,0000,0000,,The goal of it Dialogue: 0,0:06:44.87,0:06:45.66,Default,,0000,0000,0000,,is basically Dialogue: 0,0:06:46.27,0:06:48.73,Default,,0000,0000,0000,,anytime when you traditionally Dialogue: 0,0:06:48.73,0:06:50.33,Default,,0000,0000,0000,,as a developer have Dialogue: 0,0:06:50.82,0:06:51.86,Default,,0000,0000,0000,,reached for C++ Dialogue: 0,0:06:51.86,0:06:55.34,Default,,0000,0000,0000,,because you needed certain guarantees\Nabout performance for example Dialogue: 0,0:06:55.34,0:06:57.31,Default,,0000,0000,0000,,we want Rust to be a viable alternative Dialogue: 0,0:06:57.31,0:06:58.48,Default,,0000,0000,0000,,in every single case. Dialogue: 0,0:06:58.48,0:07:00.75,Default,,0000,0000,0000,,There should be no reason to choose C++ Dialogue: 0,0:07:00.75,0:07:01.90,Default,,0000,0000,0000,,over Rust Dialogue: 0,0:07:02.62,0:07:04.36,Default,,0000,0000,0000,,in the ideal future. Dialogue: 0,0:07:07.17,0:07:09.30,Default,,0000,0000,0000,,So it began as a side project Dialogue: 0,0:07:09.30,0:07:11.37,Default,,0000,0000,0000,,of a Mozillian named Graydon Hoare Dialogue: 0,0:07:11.37,0:07:13.94,Default,,0000,0000,0000,,back in before 2009. Dialogue: 0,0:07:13.94,0:07:16.03,Default,,0000,0000,0000,,He started working on it full-time Dialogue: 0,0:07:16.03,0:07:17.58,Default,,0000,0000,0000,,in 2009 Dialogue: 0,0:07:17.58,0:07:20.88,Default,,0000,0000,0000,,because Mozilla saw the\Nideas that he had and said Dialogue: 0,0:07:20.88,0:07:23.16,Default,,0000,0000,0000,,"We can see how we\Ncould put this into Firefox... Dialogue: 0,0:07:23.16,0:07:26.39,Default,,0000,0000,0000,,...and make the product better\Nif we actually had this language". Dialogue: 0,0:07:26.39,0:07:30.36,Default,,0000,0000,0000,,So that's when we started investing\Ntime and resources into it. Dialogue: 0,0:07:31.54,0:07:32.88,Default,,0000,0000,0000,,Fast forward a few years Dialogue: 0,0:07:32.89,0:07:36.88,Default,,0000,0000,0000,,we now have a team under\Nthe Mozilla Research umbrella Dialogue: 0,0:07:36.88,0:07:39.15,Default,,0000,0000,0000,,who's working full-time\Non improving the language Dialogue: 0,0:07:40.03,0:07:44.04,Default,,0000,0000,0000,,and we released\Nversion 1.0 last year Dialogue: 0,0:07:44.04,0:07:46.53,Default,,0000,0000,0000,,and every 6 weeks we\Nnow release a new version Dialogue: 0,0:07:46.54,0:07:48.44,Default,,0000,0000,0000,,so we just released 1.13 Dialogue: 0,0:07:49.30,0:07:51.27,Default,,0000,0000,0000,,and there is a large community Dialogue: 0,0:07:51.27,0:07:53.41,Default,,0000,0000,0000,,around the language now Dialogue: 0,0:07:54.11,0:07:56.03,Default,,0000,0000,0000,,so not only do we have developers Dialogue: 0,0:07:56.03,0:07:57.43,Default,,0000,0000,0000,,working in Mozilla on it Dialogue: 0,0:07:57.53,0:08:00.52,Default,,0000,0000,0000,,some of those developers are part\Nof what's called the Core Team Dialogue: 0,0:08:00.52,0:08:03.47,Default,,0000,0000,0000,,and those are the people that\Ndecide the future of the language Dialogue: 0,0:08:03.47,0:08:06.12,Default,,0000,0000,0000,,and help shape where\Nit's going as time goes on Dialogue: 0,0:08:06.52,0:08:08.10,Default,,0000,0000,0000,,so in addition to our employees Dialogue: 0,0:08:08.10,0:08:09.45,Default,,0000,0000,0000,,we have volunteers Dialogue: 0,0:08:09.46,0:08:11.42,Default,,0000,0000,0000,,and employees from other companies Dialogue: 0,0:08:11.42,0:08:14.77,Default,,0000,0000,0000,,that are now depending on\NRust for their products Dialogue: 0,0:08:14.77,0:08:17.22,Default,,0000,0000,0000,,and they're helping shape this ecosystem Dialogue: 0,0:08:17.22,0:08:21.26,Default,,0000,0000,0000,,which then has a large number of libraries Dialogue: 0,0:08:21.26,0:08:23.54,Default,,0000,0000,0000,,that are being developed by people Dialogue: 0,0:08:23.54,0:08:25.40,Default,,0000,0000,0000,,who are enthusiastic about the language Dialogue: 0,0:08:25.40,0:08:28.88,Default,,0000,0000,0000,,it's got a lot of downloads happening\Nsince the last time I gave this talk Dialogue: 0,0:08:28.88,0:08:32.21,Default,,0000,0000,0000,,there've been 10 million more downloads\Nand 300 new libraries published Dialogue: 0,0:08:32.21,0:08:34.99,Default,,0000,0000,0000,,so there's a lot going on,\Nthere's also the friends of Rust Dialogue: 0,0:08:35.00,0:08:38.25,Default,,0000,0000,0000,,which I'll show you Dialogue: 0,0:08:38.27,0:08:42.54,Default,,0000,0000,0000,,there is a page showing lots of different\Ncompanies that've told us Dialogue: 0,0:08:42.54,0:08:45.20,Default,,0000,0000,0000,,"Yes, we are relying on\NRust in production... Dialogue: 0,0:08:45.20,0:08:49.19,Default,,0000,0000,0000,,...we are very excited\Nabout its prospects". Dialogue: 0,0:08:49.72,0:08:51.93,Default,,0000,0000,0000,,So, lots of cool things going on there. Dialogue: 0,0:08:58.30,0:09:00.89,Default,,0000,0000,0000,,So the reason for Rust Dialogue: 0,0:09:00.89,0:09:04.10,Default,,0000,0000,0000,,is that we have in the past Dialogue: 0,0:09:04.10,0:09:06.74,Default,,0000,0000,0000,,what 10 or more years of using Firefox Dialogue: 0,0:09:06.74,0:09:08.48,Default,,0000,0000,0000,,and Javascript in Firefox Dialogue: 0,0:09:08.48,0:09:10.44,Default,,0000,0000,0000,,sorry C++ and Javascript in Firefox Dialogue: 0,0:09:10.45,0:09:12.44,Default,,0000,0000,0000,,we've come across the fact that Dialogue: 0,0:09:12.68,0:09:15.22,Default,,0000,0000,0000,,there are some pervasive problems Dialogue: 0,0:09:15.53,0:09:17.85,Default,,0000,0000,0000,,that are caused by using C++ Dialogue: 0,0:09:18.97,0:09:22.89,Default,,0000,0000,0000,,that is writing code that\Nmakes use of local threads Dialogue: 0,0:09:22.89,0:09:24.45,Default,,0000,0000,0000,,is very difficult Dialogue: 0,0:09:24.46,0:09:26.39,Default,,0000,0000,0000,,it's easy to write incorrect code Dialogue: 0,0:09:26.39,0:09:29.56,Default,,0000,0000,0000,,and it is very easy to write\Ncode which is unsafe Dialogue: 0,0:09:29.56,0:09:31.29,Default,,0000,0000,0000,,and that translates into Dialogue: 0,0:09:31.29,0:09:33.13,Default,,0000,0000,0000,,security exploits Dialogue: 0,0:09:33.35,0:09:35.70,Default,,0000,0000,0000,,things that are stored by governments Dialogue: 0,0:09:35.70,0:09:36.74,Default,,0000,0000,0000,,and by hackers Dialogue: 0,0:09:36.74,0:09:37.73,Default,,0000,0000,0000,,all over the world Dialogue: 0,0:09:37.73,0:09:39.23,Default,,0000,0000,0000,,and used to Dialogue: 0,0:09:39.53,0:09:41.22,Default,,0000,0000,0000,,steal data from users Dialogue: 0,0:09:41.22,0:09:42.87,Default,,0000,0000,0000,,and take over their computers Dialogue: 0,0:09:42.88,0:09:44.29,Default,,0000,0000,0000,,using the browser as a vector. Dialogue: 0,0:09:44.29,0:09:47.74,Default,,0000,0000,0000,,There's a huge number of these\Nthat are released every year Dialogue: 0,0:09:47.75,0:09:51.75,Default,,0000,0000,0000,,by security investigators Dialogue: 0,0:09:51.96,0:09:53.84,Default,,0000,0000,0000,,and there's competitions showing Dialogue: 0,0:09:53.84,0:09:57.30,Default,,0000,0000,0000,,who can pwn a browser the quickest. Dialogue: 0,0:09:57.59,0:10:01.50,Default,,0000,0000,0000,,So we looked for ways to address this Dialogue: 0,0:10:01.52,0:10:02.69,Default,,0000,0000,0000,,by creating a new language Dialogue: 0,0:10:02.69,0:10:03.58,Default,,0000,0000,0000,,and it turns out Dialogue: 0,0:10:03.58,0:10:05.59,Default,,0000,0000,0000,,that actually both of these issues Dialogue: 0,0:10:05.59,0:10:08.30,Default,,0000,0000,0000,,make it difficult to write parallel code Dialogue: 0,0:10:08.31,0:10:10.20,Default,,0000,0000,0000,,that makes use of modern hardware Dialogue: 0,0:10:10.83,0:10:13.68,Default,,0000,0000,0000,,and writing code that is\Nsafe and not exploitable Dialogue: 0,0:10:13.68,0:10:15.40,Default,,0000,0000,0000,,turns out they can both be addressed Dialogue: 0,0:10:15.40,0:10:18.42,Default,,0000,0000,0000,,by introducing the concept of\NOwnership in the language. Dialogue: 0,0:10:18.42,0:10:20.63,Default,,0000,0000,0000,,So let's talk about what that means. Dialogue: 0,0:10:20.73,0:10:24.20,Default,,0000,0000,0000,,Ownership encapsulates two ideas basically Dialogue: 0,0:10:24.97,0:10:27.74,Default,,0000,0000,0000,,it is what the owner of a value is Dialogue: 0,0:10:27.74,0:10:30.04,Default,,0000,0000,0000,,and whether there are\Nmultiple owners of a value Dialogue: 0,0:10:30.04,0:10:33.62,Default,,0000,0000,0000,,or mulitple users that are sharing a value Dialogue: 0,0:10:34.14,0:10:38.13,Default,,0000,0000,0000,,and additionally when that\Nvalue is actually valid. Dialogue: 0,0:10:38.29,0:10:41.46,Default,,0000,0000,0000,,What is the point in the program Dialogue: 0,0:10:41.46,0:10:44.06,Default,,0000,0000,0000,,in which it's actually safe\Nto interact with the value. Dialogue: 0,0:10:44.100,0:10:47.00,Default,,0000,0000,0000,,And so from this we can derive a few rules Dialogue: 0,0:10:47.79,0:10:50.26,Default,,0000,0000,0000,,that if there is only a\Nsingle owner for a value Dialogue: 0,0:10:50.26,0:10:54.17,Default,,0000,0000,0000,,that value can be destroyed\Nwhen the owner goes out of scope Dialogue: 0,0:10:54.17,0:10:56.86,Default,,0000,0000,0000,,because there are no ways to\Nreference that value anymore Dialogue: 0,0:10:57.67,0:11:00.04,Default,,0000,0000,0000,,similarly if a value\Nhas only a single owner Dialogue: 0,0:11:00.04,0:11:02.06,Default,,0000,0000,0000,,that means that it is legal to mutate it Dialogue: 0,0:11:02.06,0:11:05.68,Default,,0000,0000,0000,,because no one can observe\Nthe change to that value Dialogue: 0,0:11:06.44,0:11:07.36,Default,,0000,0000,0000,,and finally Dialogue: 0,0:11:07.57,0:11:09.78,Default,,0000,0000,0000,,if you have multiple owners Dialogue: 0,0:11:09.79,0:11:10.68,Default,,0000,0000,0000,,you need to have Dialogue: 0,0:11:10.68,0:11:11.99,Default,,0000,0000,0000,,something called Borrowing Dialogue: 0,0:11:11.100,0:11:13.79,Default,,0000,0000,0000,,which is, you still have a single owner Dialogue: 0,0:11:13.79,0:11:15.31,Default,,0000,0000,0000,,but other people can observe it Dialogue: 0,0:11:15.32,0:11:17.80,Default,,0000,0000,0000,,but it cant be changed during that time. Dialogue: 0,0:11:18.02,0:11:21.28,Default,,0000,0000,0000,,So let's talk about an analogy here, Dialogue: 0,0:11:21.80,0:11:23.87,Default,,0000,0000,0000,,if I've got a colouring book and a marker Dialogue: 0,0:11:23.88,0:11:25.08,Default,,0000,0000,0000,,and some friends Dialogue: 0,0:11:25.09,0:11:27.10,Default,,0000,0000,0000,,we can establish some rules Dialogue: 0,0:11:28.10,0:11:30.72,Default,,0000,0000,0000,,the colouring book and\Nthe marker are my property Dialogue: 0,0:11:30.72,0:11:32.79,Default,,0000,0000,0000,,so they go with me wherever I go Dialogue: 0,0:11:32.80,0:11:35.35,Default,,0000,0000,0000,,if I leave no one else can\Nobserve the book Dialogue: 0,0:11:35.35,0:11:36.34,Default,,0000,0000,0000,,or colour in it Dialogue: 0,0:11:36.96,0:11:40.95,Default,,0000,0000,0000,,however I am able to loan\Nthe book to someone else Dialogue: 0,0:11:40.95,0:11:42.79,Default,,0000,0000,0000,,and that means they're\Nborrowing it from me Dialogue: 0,0:11:42.79,0:11:44.82,Default,,0000,0000,0000,,that also means that I can't colour\Nin it while they're borrowing it Dialogue: 0,0:11:44.82,0:11:45.77,Default,,0000,0000,0000,,because that's rude Dialogue: 0,0:11:46.54,0:11:49.17,Default,,0000,0000,0000,,so they can also choose to\Nlend it to people around them Dialogue: 0,0:11:50.22,0:11:52.55,Default,,0000,0000,0000,,but that means that if\Nanyone else is borrowing it Dialogue: 0,0:11:52.56,0:11:55.20,Default,,0000,0000,0000,,they need to give it back\Nto me before they leave Dialogue: 0,0:11:55.20,0:11:56.35,Default,,0000,0000,0000,,because it's my property Dialogue: 0,0:11:56.35,0:11:57.92,Default,,0000,0000,0000,,and only I can leave with it. Dialogue: 0,0:11:59.54,0:12:00.38,Default,,0000,0000,0000,,Additionally, Dialogue: 0,0:12:02.76,0:12:03.99,Default,,0000,0000,0000,,if I have the marker Dialogue: 0,0:12:03.99,0:12:05.30,Default,,0000,0000,0000,,I'm able to colour in the book Dialogue: 0,0:12:05.30,0:12:06.35,Default,,0000,0000,0000,,if I have the book Dialogue: 0,0:12:07.05,0:12:09.07,Default,,0000,0000,0000,,I can also give the marker to someone else Dialogue: 0,0:12:09.07,0:12:11.79,Default,,0000,0000,0000,,and that means they can colour\Nin the book if they have it Dialogue: 0,0:12:11.79,0:12:14.07,Default,,0000,0000,0000,,but that means that I'm\Nno longer able to colour Dialogue: 0,0:12:14.07,0:12:15.93,Default,,0000,0000,0000,,because there's only a single marker. Dialogue: 0,0:12:16.44,0:12:17.15,Default,,0000,0000,0000,,And finally, Dialogue: 0,0:12:17.15,0:12:20.34,Default,,0000,0000,0000,,if I want to leave but I dont actually\Nhave the book in my posession Dialogue: 0,0:12:20.34,0:12:24.51,Default,,0000,0000,0000,,there's a problem, either I need to wait\Nuntil someone gives me the book back Dialogue: 0,0:12:24.51,0:12:27.04,Default,,0000,0000,0000,,or I need to actually give\Nit to someone else and say Dialogue: 0,0:12:27.04,0:12:30.01,Default,,0000,0000,0000,,"OK, it's not my property anymore,\N...it's yours to deal with". Dialogue: 0,0:12:32.01,0:12:33.62,Default,,0000,0000,0000,,So Ownership in Rust. Dialogue: 0,0:12:36.54,0:12:40.54,Default,,0000,0000,0000,,If we have a type we call a ColouringBook Dialogue: 0,0:12:40.54,0:12:42.24,Default,,0000,0000,0000,,and it gives us a constructor Dialogue: 0,0:12:42.24,0:12:44.43,Default,,0000,0000,0000,,that returns a new instance\Nof a ColouringBook. Dialogue: 0,0:12:44.43,0:12:45.27,Default,,0000,0000,0000,,We can say OK, Dialogue: 0,0:12:45.28,0:12:47.86,Default,,0000,0000,0000,,here is a variable called a Book Dialogue: 0,0:12:47.86,0:12:49.50,Default,,0000,0000,0000,,which we will say Dialogue: 0,0:12:49.50,0:12:51.75,Default,,0000,0000,0000,,stores this ColouringBook value. Dialogue: 0,0:12:51.75,0:12:52.100,Default,,0000,0000,0000,,That means that we can now Dialogue: 0,0:12:52.100,0:12:54.33,Default,,0000,0000,0000,,call this Colour method Dialogue: 0,0:12:54.33,0:12:57.25,Default,,0000,0000,0000,,which will change the\NColouring Book in some way, Dialogue: 0,0:12:57.25,0:12:58.17,Default,,0000,0000,0000,,it'll colour in it. Dialogue: 0,0:12:58.17,0:12:59.56,Default,,0000,0000,0000,,That's fine, we can mutate it Dialogue: 0,0:12:59.56,0:13:01.28,Default,,0000,0000,0000,,because we only have a single owner. Dialogue: 0,0:13:03.98,0:13:05.40,Default,,0000,0000,0000,,So what happens if Dialogue: 0,0:13:05.42,0:13:06.92,Default,,0000,0000,0000,,someone borrows the Book? Dialogue: 0,0:13:06.92,0:13:09.24,Default,,0000,0000,0000,,We now have another variable\Ncalled Borrowed Book Dialogue: 0,0:13:09.39,0:13:10.94,Default,,0000,0000,0000,,and we use the ampersand Dialogue: 0,0:13:10.94,0:13:13.20,Default,,0000,0000,0000,,to show that we are borrowing the value Dialogue: 0,0:13:13.20,0:13:15.69,Default,,0000,0000,0000,,that's stored in this value called Book Dialogue: 0,0:13:15.69,0:13:17.12,Default,,0000,0000,0000,,- this variable called Book. Dialogue: 0,0:13:17.12,0:13:18.99,Default,,0000,0000,0000,,This is an Immutable Borrow. Dialogue: 0,0:13:20.49,0:13:22.52,Default,,0000,0000,0000,,That means that it is not possible Dialogue: 0,0:13:23.01,0:13:25.32,Default,,0000,0000,0000,,to mutate the original value anymore Dialogue: 0,0:13:25.32,0:13:26.70,Default,,0000,0000,0000,,because it's borrowed. Dialogue: 0,0:13:27.31,0:13:28.17,Default,,0000,0000,0000,,So we cannot colour in the book Dialogue: 0,0:13:28.17,0:13:30.45,Default,,0000,0000,0000,,while it's borrowed by someone else. Dialogue: 0,0:13:31.21,0:13:32.62,Default,,0000,0000,0000,,This follows our analogy. Dialogue: 0,0:13:34.19,0:13:35.32,Default,,0000,0000,0000,,The other thing however Dialogue: 0,0:13:35.32,0:13:37.52,Default,,0000,0000,0000,,is that if someone else is\Nborrowing the book, Dialogue: 0,0:13:37.58,0:13:39.16,Default,,0000,0000,0000,,they also cannot colour in it. Dialogue: 0,0:13:39.16,0:13:40.49,Default,,0000,0000,0000,,They don't have the marker. Dialogue: 0,0:13:40.49,0:13:44.64,Default,,0000,0000,0000,,In this case they only have\Nan Mutable Borrow Dialogue: 0,0:13:44.81,0:13:46.32,Default,,0000,0000,0000,,so they cannot mutate it. Dialogue: 0,0:13:49.10,0:13:50.62,Default,,0000,0000,0000,,So we can work around this Dialogue: 0,0:13:50.64,0:13:52.93,Default,,0000,0000,0000,,by using what's called a Mutable Borrow. Dialogue: 0,0:13:52.93,0:13:53.61,Default,,0000,0000,0000,,This says OK, Dialogue: 0,0:13:53.61,0:13:55.47,Default,,0000,0000,0000,,give me the book and\Ngive me the marker Dialogue: 0,0:13:55.88,0:13:58.76,Default,,0000,0000,0000,,and then they have both those elements Dialogue: 0,0:13:58.76,0:14:01.22,Default,,0000,0000,0000,,necessary in order\Nto actually colour in it Dialogue: 0,0:14:01.22,0:14:02.62,Default,,0000,0000,0000,,and mutate it in this case. Dialogue: 0,0:14:02.62,0:14:03.99,Default,,0000,0000,0000,,So we have the ampersand Dialogue: 0,0:14:03.99,0:14:05.63,Default,,0000,0000,0000,,followed by the Mute keyword Dialogue: 0,0:14:05.63,0:14:06.35,Default,,0000,0000,0000,,and this means Dialogue: 0,0:14:06.35,0:14:08.66,Default,,0000,0000,0000,,give me a Mutable Borrow Dialogue: 0,0:14:08.66,0:14:10.16,Default,,0000,0000,0000,,to the value that follows. Dialogue: 0,0:14:13.31,0:14:15.40,Default,,0000,0000,0000,,However the thing to note here Dialogue: 0,0:14:15.40,0:14:19.00,Default,,0000,0000,0000,,is that we cannot use\Nthe original variable Dialogue: 0,0:14:19.02,0:14:19.92,Default,,0000,0000,0000,,called Book Dialogue: 0,0:14:19.92,0:14:21.92,Default,,0000,0000,0000,,in order to mutate it while it's borrowed. Dialogue: 0,0:14:21.92,0:14:23.63,Default,,0000,0000,0000,,We cannot have two different\Npeople colouring in it Dialogue: 0,0:14:23.63,0:14:25.77,Default,,0000,0000,0000,,because only one person\Ncan colour at a time. Dialogue: 0,0:14:29.74,0:14:32.32,Default,,0000,0000,0000,,So let's go back to the\Nexample we had before. Dialogue: 0,0:14:32.51,0:14:34.25,Default,,0000,0000,0000,,So we've got a Book value Dialogue: 0,0:14:34.25,0:14:35.54,Default,,0000,0000,0000,,we're allowed to colour in it Dialogue: 0,0:14:35.54,0:14:37.06,Default,,0000,0000,0000,,because there's no one borrowing it Dialogue: 0,0:14:37.06,0:14:38.33,Default,,0000,0000,0000,,then on the next line Dialogue: 0,0:14:38.33,0:14:40.32,Default,,0000,0000,0000,,we have an Immutable Borrow Dialogue: 0,0:14:41.42,0:14:42.77,Default,,0000,0000,0000,,and we're not allowed to colour Dialogue: 0,0:14:42.77,0:14:44.20,Default,,0000,0000,0000,,in the original one again Dialogue: 0,0:14:44.20,0:14:45.12,Default,,0000,0000,0000,,this is fine Dialogue: 0,0:14:45.13,0:14:46.17,Default,,0000,0000,0000,,it's borrowed Dialogue: 0,0:14:46.17,0:14:47.45,Default,,0000,0000,0000,,it can't be coloured in. Dialogue: 0,0:14:48.31,0:14:49.32,Default,,0000,0000,0000,,So let's fix this Dialogue: 0,0:14:50.30,0:14:52.59,Default,,0000,0000,0000,,this is where we talk about lifetimes Dialogue: 0,0:14:52.59,0:14:54.26,Default,,0000,0000,0000,,because remember how I said that Dialogue: 0,0:14:54.26,0:14:56.72,Default,,0000,0000,0000,,we can figure out\Nwhen a value is valid? Dialogue: 0,0:14:56.73,0:14:59.39,Default,,0000,0000,0000,,So this means that if we have a scope here Dialogue: 0,0:14:59.40,0:15:01.41,Default,,0000,0000,0000,,deliniated by Dialogue: 0,0:15:01.41,0:15:03.23,Default,,0000,0000,0000,,the curly braces Dialogue: 0,0:15:03.23,0:15:05.65,Default,,0000,0000,0000,,this means that inside the curly braces Dialogue: 0,0:15:05.66,0:15:08.00,Default,,0000,0000,0000,,anything that is unique inside there Dialogue: 0,0:15:08.03,0:15:10.29,Default,,0000,0000,0000,,no longer exists outside of them. Dialogue: 0,0:15:10.30,0:15:12.41,Default,,0000,0000,0000,,So if we create this Borrowed Book value Dialogue: 0,0:15:12.42,0:15:14.88,Default,,0000,0000,0000,,and we borrow from the Book value Dialogue: 0,0:15:14.88,0:15:16.86,Default,,0000,0000,0000,,we have a Mutable Borrow Dialogue: 0,0:15:16.86,0:15:18.18,Default,,0000,0000,0000,,and that's fine Dialogue: 0,0:15:18.22,0:15:19.53,Default,,0000,0000,0000,,we can then do something with this Dialogue: 0,0:15:19.53,0:15:21.08,Default,,0000,0000,0000,,that doesn't require mutating it Dialogue: 0,0:15:21.09,0:15:23.78,Default,,0000,0000,0000,,we can just look through the\NBook, we can investigate it, Dialogue: 0,0:15:24.03,0:15:26.20,Default,,0000,0000,0000,,and that doesn't mutate it, that's fine. Dialogue: 0,0:15:26.31,0:15:29.95,Default,,0000,0000,0000,,And so previously calling Colour\Non the original Book value Dialogue: 0,0:15:29.95,0:15:31.04,Default,,0000,0000,0000,,would've been an error Dialogue: 0,0:15:31.04,0:15:32.14,Default,,0000,0000,0000,,because it was borrowed Dialogue: 0,0:15:32.14,0:15:34.06,Default,,0000,0000,0000,,but now the borrow no longer exists Dialogue: 0,0:15:34.06,0:15:37.19,Default,,0000,0000,0000,,because it is only valid within\Nthe scope of these braces. Dialogue: 0,0:15:37.19,0:15:38.68,Default,,0000,0000,0000,,This is how we can control Dialogue: 0,0:15:38.68,0:15:40.53,Default,,0000,0000,0000,,the scope of a Borrow. Dialogue: 0,0:15:43.38,0:15:45.60,Default,,0000,0000,0000,,So finally we can also transfer Ownership. Dialogue: 0,0:15:45.60,0:15:49.02,Default,,0000,0000,0000,,This is how we talk about giving\Naway the Book to someone else. Dialogue: 0,0:15:49.02,0:15:51.10,Default,,0000,0000,0000,,By default we can say OK, Dialogue: 0,0:15:52.21,0:15:54.23,Default,,0000,0000,0000,,we'll create a new variable called Book 2 Dialogue: 0,0:15:54.24,0:15:57.22,Default,,0000,0000,0000,,and it will have the contents\Nof the Book variable Dialogue: 0,0:15:57.65,0:15:59.18,Default,,0000,0000,0000,,and we can now colour in Book 2. Dialogue: 0,0:15:59.18,0:16:01.84,Default,,0000,0000,0000,,That's fine, it's not a borrow\Nthere's no ampersand there Dialogue: 0,0:16:01.84,0:16:03.80,Default,,0000,0000,0000,,we are giving control of the value Dialogue: 0,0:16:03.81,0:16:05.20,Default,,0000,0000,0000,,to another variable Dialogue: 0,0:16:07.21,0:16:08.03,Default,,0000,0000,0000,,and additionally Dialogue: 0,0:16:08.03,0:16:10.11,Default,,0000,0000,0000,,if you try to compile this\Nyou'll note that Dialogue: 0,0:16:10.11,0:16:12.60,Default,,0000,0000,0000,,we can no longer interact\Nwith the Book variable Dialogue: 0,0:16:12.61,0:16:14.61,Default,,0000,0000,0000,,because we transfered Ownership Dialogue: 0,0:16:14.61,0:16:15.98,Default,,0000,0000,0000,,it doesn't exist anymore Dialogue: 0,0:16:15.99,0:16:17.73,Default,,0000,0000,0000,,the compiler knows this and can say Dialogue: 0,0:16:17.73,0:16:20.21,Default,,0000,0000,0000,,"Nope, that is not safe\Nwhat you're trying to do". Dialogue: 0,0:16:21.61,0:16:25.27,Default,,0000,0000,0000,,And you'll note the link up here\Nactually goes to a playground Dialogue: 0,0:16:25.27,0:16:28.05,Default,,0000,0000,0000,,where you can play with the\NRust compiler in your browser Dialogue: 0,0:16:28.05,0:16:31.86,Default,,0000,0000,0000,,and there's a sample for this code\Nthat you can experiment with there Dialogue: 0,0:16:31.86,0:16:33.38,Default,,0000,0000,0000,,already prepared for you. Dialogue: 0,0:16:35.72,0:16:36.45,Default,,0000,0000,0000,,So Dialogue: 0,0:16:37.03,0:16:39.24,Default,,0000,0000,0000,,we understand Borrowing\Na little bit better now Dialogue: 0,0:16:39.24,0:16:41.07,Default,,0000,0000,0000,,especially with the analogy Dialogue: 0,0:16:41.08,0:16:43.09,Default,,0000,0000,0000,,but how does this\Nactually help in practice? Dialogue: 0,0:16:43.09,0:16:45.78,Default,,0000,0000,0000,,How does this address the two\Ncases we talked about before? Dialogue: 0,0:16:45.78,0:16:48.42,Default,,0000,0000,0000,,Using values after they're no longer valid Dialogue: 0,0:16:48.92,0:16:56.06,Default,,0000,0000,0000,,and writing code that works with\Nmultiple threads at the same time. Dialogue: 0,0:16:56.56,0:16:57.27,Default,,0000,0000,0000,,So first Dialogue: 0,0:16:57.78,0:17:01.08,Default,,0000,0000,0000,,with Use-after-free problems Dialogue: 0,0:17:02.43,0:17:04.57,Default,,0000,0000,0000,,those happen in C++ Dialogue: 0,0:17:04.57,0:17:07.55,Default,,0000,0000,0000,,because you'll have pointers in your code Dialogue: 0,0:17:07.76,0:17:09.43,Default,,0000,0000,0000,,but the pointers are not associated Dialogue: 0,0:17:09.43,0:17:11.18,Default,,0000,0000,0000,,with the value they're pointing to. Dialogue: 0,0:17:11.18,0:17:12.77,Default,,0000,0000,0000,,So you could delete Dialogue: 0,0:17:12.78,0:17:15.06,Default,,0000,0000,0000,,the memory that they're pointing to Dialogue: 0,0:17:15.06,0:17:17.21,Default,,0000,0000,0000,,but the pointers are still\Npointing at that memory Dialogue: 0,0:17:17.21,0:17:19.75,Default,,0000,0000,0000,,and so if you aren't careful\Nyou can end up using pointers Dialogue: 0,0:17:19.75,0:17:21.03,Default,,0000,0000,0000,,that are pointing to invalid memory. Dialogue: 0,0:17:21.37,0:17:22.42,Default,,0000,0000,0000,,So in Rust Dialogue: 0,0:17:22.43,0:17:24.26,Default,,0000,0000,0000,,the compiler is actually tracking this Dialogue: 0,0:17:24.54,0:17:26.82,Default,,0000,0000,0000,,so it doesn't let you write code Dialogue: 0,0:17:26.84,0:17:28.43,Default,,0000,0000,0000,,that has the potential Dialogue: 0,0:17:29.02,0:17:32.38,Default,,0000,0000,0000,,where pointers could point at\Nmemory that no longer is valid Dialogue: 0,0:17:32.74,0:17:33.99,Default,,0000,0000,0000,,and that means that Dialogue: 0,0:17:33.99,0:17:37.11,Default,,0000,0000,0000,,you're always taking\Nborrowed pointers to values Dialogue: 0,0:17:37.77,0:17:39.09,Default,,0000,0000,0000,,where the compiler says Dialogue: 0,0:17:39.09,0:17:41.26,Default,,0000,0000,0000,,"OK. I know exactly how\Nlong this value is valid for... Dialogue: 0,0:17:41.26,0:17:45.10,Default,,0000,0000,0000,,...because I know what the owner\Nis and therefore any pointers to it... Dialogue: 0,0:17:45.11,0:17:51.36,Default,,0000,0000,0000,,...must no longer exist before\Nthe owner no longer exists" Dialogue: 0,0:17:54.24,0:17:55.03,Default,,0000,0000,0000,,and additionally Dialogue: 0,0:17:55.04,0:17:56.46,Default,,0000,0000,0000,,you can also Dialogue: 0,0:17:56.46,0:17:59.82,Default,,0000,0000,0000,,because the Rust compiler also\Ntracks outstanding Borrows Dialogue: 0,0:17:59.82,0:18:00.91,Default,,0000,0000,0000,,you can also say Dialogue: 0,0:18:00.91,0:18:04.54,Default,,0000,0000,0000,,"OK, we are guaranteed that\Nthere's no way to mutate this... Dialogue: 0,0:18:04.54,0:18:08.47,Default,,0000,0000,0000,,...while anyone else is borrowing\Nand trying to look at the value" Dialogue: 0,0:18:08.47,0:18:10.40,Default,,0000,0000,0000,,and this addresses another case Dialogue: 0,0:18:10.40,0:18:12.06,Default,,0000,0000,0000,,where this can happen in C++ Dialogue: 0,0:18:12.06,0:18:14.77,Default,,0000,0000,0000,,where you end up changing the value Dialogue: 0,0:18:14.77,0:18:18.65,Default,,0000,0000,0000,,like reallocating a pointer or something\Nwhile other things are trying to point to Dialogue: 0,0:18:18.65,0:18:20.47,Default,,0000,0000,0000,,memory that it was relying on Dialogue: 0,0:18:21.42,0:18:23.94,Default,,0000,0000,0000,,and as for parallel code\Nwith multiple threads Dialogue: 0,0:18:25.45,0:18:27.23,Default,,0000,0000,0000,,the issue arises with Data Races Dialogue: 0,0:18:27.24,0:18:28.87,Default,,0000,0000,0000,,where you have multiple threads Dialogue: 0,0:18:28.88,0:18:31.57,Default,,0000,0000,0000,,that are sharing values and\Nthey're also mutating them. Dialogue: 0,0:18:31.57,0:18:34.35,Default,,0000,0000,0000,,It's the same issue we\Njust talked about basically Dialogue: 0,0:18:34.36,0:18:36.54,Default,,0000,0000,0000,,where they're not\Ncoordinated in figuring out Dialogue: 0,0:18:36.54,0:18:39.78,Default,,0000,0000,0000,,when it's safe to write to a value and\Nwhen it's safe to read from a value Dialogue: 0,0:18:39.78,0:18:41.72,Default,,0000,0000,0000,,because you might get intermediate values Dialogue: 0,0:18:41.72,0:18:43.81,Default,,0000,0000,0000,,when the write hasn't completed yet. Dialogue: 0,0:18:44.30,0:18:49.78,Default,,0000,0000,0000,,So Rust addresses this by forcing you\Nto either transfer ownership of values Dialogue: 0,0:18:49.78,0:18:51.35,Default,,0000,0000,0000,,that another thread needs to use Dialogue: 0,0:18:51.35,0:18:53.93,Default,,0000,0000,0000,,so that two threads cannot\Nshare the same value Dialogue: 0,0:18:53.93,0:18:55.03,Default,,0000,0000,0000,,or Dialogue: 0,0:18:55.03,0:18:57.96,Default,,0000,0000,0000,,ensuring that any values that you\Ndo share between the threads Dialogue: 0,0:18:57.96,0:18:59.43,Default,,0000,0000,0000,,abide by certain restrictions Dialogue: 0,0:18:59.43,0:19:01.78,Default,,0000,0000,0000,,that prevent invalid writes from happening Dialogue: 0,0:19:01.78,0:19:03.65,Default,,0000,0000,0000,,and invalid reads from happening Dialogue: 0,0:19:03.65,0:19:05.38,Default,,0000,0000,0000,,so that races can't happen Dialogue: 0,0:19:05.39,0:19:10.98,Default,,0000,0000,0000,,and it's impossible to write code that\Nis not actually thread safe. Dialogue: 0,0:19:13.48,0:19:14.18,Default,,0000,0000,0000,,So Dialogue: 0,0:19:14.19,0:19:15.48,Default,,0000,0000,0000,,how this actually applies Dialogue: 0,0:19:15.48,0:19:17.22,Default,,0000,0000,0000,,to what we're doing at Mozilla Dialogue: 0,0:19:17.22,0:19:19.62,Default,,0000,0000,0000,,is that we've got the Mozilla\NResearch organisation Dialogue: 0,0:19:19.62,0:19:22.97,Default,,0000,0000,0000,,and so part of them are working\Non improving Rust the language. Dialogue: 0,0:19:22.97,0:19:24.66,Default,,0000,0000,0000,,However another part of them Dialogue: 0,0:19:24.66,0:19:26.92,Default,,0000,0000,0000,,are working on building a\Nbrand new web browser Dialogue: 0,0:19:26.93,0:19:28.64,Default,,0000,0000,0000,,because Firefox is not enough. Dialogue: 0,0:19:29.36,0:19:30.95,Default,,0000,0000,0000,,This one's called Servo Dialogue: 0,0:19:30.96,0:19:33.21,Default,,0000,0000,0000,,and so we're building it\Nfrom the ground up Dialogue: 0,0:19:33.48,0:19:35.34,Default,,0000,0000,0000,,and the reason we're doing this is that Dialogue: 0,0:19:35.34,0:19:36.97,Default,,0000,0000,0000,,there are decisions that were made Dialogue: 0,0:19:36.97,0:19:38.52,Default,,0000,0000,0000,,design decisions for Firefox Dialogue: 0,0:19:38.53,0:19:40.21,Default,,0000,0000,0000,,that were made a decade ago Dialogue: 0,0:19:40.21,0:19:44.20,Default,,0000,0000,0000,,which are very difficult to\Nchange at this point in time Dialogue: 0,0:19:44.22,0:19:45.93,Default,,0000,0000,0000,,it'd be a huge amount of work Dialogue: 0,0:19:45.93,0:19:48.50,Default,,0000,0000,0000,,to redesign parts of Firefox\Nwe think could be better Dialogue: 0,0:19:48.50,0:19:49.86,Default,,0000,0000,0000,,but it's also difficult Dialogue: 0,0:19:49.87,0:19:53.34,Default,,0000,0000,0000,,to verify whether that would be Dialogue: 0,0:19:53.34,0:19:55.93,Default,,0000,0000,0000,,a worthwhile use of time\Nwithout actually doing it Dialogue: 0,0:19:55.93,0:19:58.17,Default,,0000,0000,0000,,so we compromise by creating\Na brand new browser Dialogue: 0,0:19:58.17,0:20:00.09,Default,,0000,0000,0000,,where we can actually try out new ideas Dialogue: 0,0:20:00.09,0:20:02.75,Default,,0000,0000,0000,,and give ourselves a playground\Nto experiment with things Dialogue: 0,0:20:02.75,0:20:05.37,Default,,0000,0000,0000,,we could do better in Firefox\Nand if they work out great Dialogue: 0,0:20:05.37,0:20:10.12,Default,,0000,0000,0000,,we can then start transferring them\Nback into Firefox and integrate them Dialogue: 0,0:20:10.12,0:20:11.07,Default,,0000,0000,0000,,and additionally Dialogue: 0,0:20:11.07,0:20:12.66,Default,,0000,0000,0000,,this means that we can experiment Dialogue: 0,0:20:12.66,0:20:16.94,Default,,0000,0000,0000,,with letting out pages Dialogue: 0,0:20:16.94,0:20:18.44,Default,,0000,0000,0000,,doing that in parallel Dialogue: 0,0:20:18.44,0:20:20.55,Default,,0000,0000,0000,,rather than all other browsers today Dialogue: 0,0:20:20.55,0:20:22.96,Default,,0000,0000,0000,,which do them sequentially\Nand single-thread Dialogue: 0,0:20:22.98,0:20:24.42,Default,,0000,0000,0000,,we can do things Dialogue: 0,0:20:24.43,0:20:25.98,Default,,0000,0000,0000,,like experiment with the way Dialogue: 0,0:20:25.98,0:20:27.05,Default,,0000,0000,0000,,that we Dialogue: 0,0:20:27.05,0:20:28.40,Default,,0000,0000,0000,,redraw things to the screen Dialogue: 0,0:20:28.40,0:20:30.27,Default,,0000,0000,0000,,and do it more like a computer game Dialogue: 0,0:20:30.86,0:20:33.47,Default,,0000,0000,0000,,we can do things like change the way Dialogue: 0,0:20:33.47,0:20:35.66,Default,,0000,0000,0000,,that we're managing memory Dialogue: 0,0:20:35.66,0:20:37.79,Default,,0000,0000,0000,,for the parts of the web page Dialogue: 0,0:20:37.79,0:20:40.41,Default,,0000,0000,0000,,so that it's more integrated\Nwith the garbage collection Dialogue: 0,0:20:40.41,0:20:41.80,Default,,0000,0000,0000,,that the Javascript code Dialogue: 0,0:20:41.81,0:20:43.83,Default,,0000,0000,0000,,ends up ineracting with Dialogue: 0,0:20:43.85,0:20:46.31,Default,,0000,0000,0000,,so all of this are things\Nthat we're doing in Servo Dialogue: 0,0:20:46.31,0:20:48.03,Default,,0000,0000,0000,,and we're getting some great results Dialogue: 0,0:20:48.03,0:20:49.60,Default,,0000,0000,0000,,and some of them are already Dialogue: 0,0:20:49.60,0:20:51.96,Default,,0000,0000,0000,,being integrated back into Firefox. Dialogue: 0,0:20:53.43,0:20:55.50,Default,,0000,0000,0000,,So we're already shipping foot code today Dialogue: 0,0:20:55.50,0:20:57.50,Default,,0000,0000,0000,,in Firefox that's written in Rust. Dialogue: 0,0:20:57.77,0:21:00.36,Default,,0000,0000,0000,,For example we have parts\Nof our Media Stack where Dialogue: 0,0:21:00.36,0:21:06.51,Default,,0000,0000,0000,,we have code that's just responsible\Nfor reading parts of video files Dialogue: 0,0:21:06.51,0:21:09.50,Default,,0000,0000,0000,,which has been a source of security\Nvulnerabilities in the past Dialogue: 0,0:21:09.50,0:21:11.62,Default,,0000,0000,0000,,and there's no reason\Nthat should be the case Dialogue: 0,0:21:11.62,0:21:13.15,Default,,0000,0000,0000,,so we rewrite it in Rust Dialogue: 0,0:21:13.15,0:21:14.97,Default,,0000,0000,0000,,and we get safety by default. Dialogue: 0,0:21:14.98,0:21:16.76,Default,,0000,0000,0000,,So that's shipping in Firefox today. Dialogue: 0,0:21:16.76,0:21:18.89,Default,,0000,0000,0000,,We've also got a project called Oxidation Dialogue: 0,0:21:18.89,0:21:21.08,Default,,0000,0000,0000,,which is a list on the wiki Dialogue: 0,0:21:21.08,0:21:23.95,Default,,0000,0000,0000,,of all the pieces that\Nwe're in the process Dialogue: 0,0:21:23.95,0:21:27.27,Default,,0000,0000,0000,,of writing in Rust in Firefox today Dialogue: 0,0:21:27.66,0:21:29.27,Default,,0000,0000,0000,,some of the most challenging ones Dialogue: 0,0:21:29.27,0:21:30.07,Default,,0000,0000,0000,,that I mentioned previously Dialogue: 0,0:21:30.07,0:21:31.53,Default,,0000,0000,0000,,the Rendering Engine Dialogue: 0,0:21:31.53,0:21:34.98,Default,,0000,0000,0000,,the Style System and Layout Dialogue: 0,0:21:34.98,0:21:37.10,Default,,0000,0000,0000,,those are being integrated\Ninto Firefox today Dialogue: 0,0:21:37.10,0:21:38.88,Default,,0000,0000,0000,,as part of the Quantum Project Dialogue: 0,0:21:38.88,0:21:40.82,Default,,0000,0000,0000,,and so you can basically expect that Dialogue: 0,0:21:40.82,0:21:42.82,Default,,0000,0000,0000,,the amount of Rust code in Firefox Dialogue: 0,0:21:42.82,0:21:44.09,Default,,0000,0000,0000,,will increase over time Dialogue: 0,0:21:44.09,0:21:47.16,Default,,0000,0000,0000,,there's been a lot of really good\Nresults panning out so far Dialogue: 0,0:21:48.19,0:21:50.22,Default,,0000,0000,0000,,especially for areas where Dialogue: 0,0:21:50.22,0:21:52.33,Default,,0000,0000,0000,,they shouldn't be security sensitive Dialogue: 0,0:21:52.33,0:21:54.51,Default,,0000,0000,0000,,that they need to be high performance Dialogue: 0,0:21:54.52,0:21:56.51,Default,,0000,0000,0000,,those could be great places Dialogue: 0,0:21:56.51,0:21:58.33,Default,,0000,0000,0000,,for integrating Rust code Dialogue: 0,0:21:58.33,0:22:01.07,Default,,0000,0000,0000,,because you've got those by default Dialogue: 0,0:22:03.61,0:22:05.57,Default,,0000,0000,0000,,so if you'd like to know more about Rust Dialogue: 0,0:22:05.57,0:22:06.77,Default,,0000,0000,0000,,and Mozilla Dialogue: 0,0:22:06.77,0:22:09.44,Default,,0000,0000,0000,,you can check out the Rust\NPlayground I mentioned earlier Dialogue: 0,0:22:09.44,0:22:12.16,Default,,0000,0000,0000,,that allows you to experiment\Nwith writing Rust code Dialogue: 0,0:22:12.16,0:22:13.20,Default,,0000,0000,0000,,in your browser Dialogue: 0,0:22:13.20,0:22:14.82,Default,,0000,0000,0000,,we've got a nice introductory book Dialogue: 0,0:22:14.82,0:22:17.54,Default,,0000,0000,0000,,that covers everything you need\Nto know about the language Dialogue: 0,0:22:17.54,0:22:19.28,Default,,0000,0000,0000,,called The Rust Programming Language Dialogue: 0,0:22:19.28,0:22:23.00,Default,,0000,0000,0000,,which is accessible from the language\Nwebsite and we've got IRC channels Dialogue: 0,0:22:23.00,0:22:26.85,Default,,0000,0000,0000,,which are designed for both beginners\Nwho like to interact with other people Dialogue: 0,0:22:26.85,0:22:29.74,Default,,0000,0000,0000,,who really want to answer\Nyour questions right there Dialogue: 0,0:22:29.74,0:22:32.48,Default,,0000,0000,0000,,as well as a huge community\Nin the Rust channel Dialogue: 0,0:22:32.48,0:22:35.48,Default,,0000,0000,0000,,who really adore asking\Nand answering questions. Dialogue: 0,0:22:36.94,0:22:37.64,Default,,0000,0000,0000,,That's all. Dialogue: 0,0:22:37.64,0:22:38.74,Default,,0000,0000,0000,,Thank you very much. Dialogue: 0,0:22:39.52,0:22:42.10,Default,,0000,0000,0000,,[Applause] Dialogue: 0,0:22:42.10,0:22:43.36,Default,,0000,0000,0000,,Any questions? Dialogue: 0,0:22:48.84,0:22:49.61,Default,,0000,0000,0000,,Yes Dialogue: 0,0:22:53.16,0:22:56.40,Default,,0000,0000,0000,,What would be a good way to\Nstart contributing or participating? Dialogue: 0,0:22:57.28,0:22:59.02,Default,,0000,0000,0000,,There's a few ways Dialogue: 0,0:22:59.02,0:23:02.12,Default,,0000,0000,0000,,so if there are Dialogue: 0,0:23:04.84,0:23:05.61,Default,,0000,0000,0000,,let me see Dialogue: 0,0:23:05.61,0:23:08.70,Default,,0000,0000,0000,,if there are libraries that you\Nwould like to use from Rust Dialogue: 0,0:23:08.70,0:23:09.92,Default,,0000,0000,0000,,that don't exist yet Dialogue: 0,0:23:11.30,0:23:14.10,Default,,0000,0000,0000,,writing either libraries\Nfrom scratch in Rust Dialogue: 0,0:23:14.10,0:23:16.11,Default,,0000,0000,0000,,to scratch that itch Dialogue: 0,0:23:16.11,0:23:16.82,Default,,0000,0000,0000,,very handy Dialogue: 0,0:23:16.82,0:23:18.40,Default,,0000,0000,0000,,publishing that for the community Dialogue: 0,0:23:18.40,0:23:21.93,Default,,0000,0000,0000,,or if there are libraries\Nwritten in C which already exist Dialogue: 0,0:23:21.93,0:23:25.31,Default,,0000,0000,0000,,which would give you functionality\Nbut don't exist in Rust yet Dialogue: 0,0:23:25.31,0:23:26.91,Default,,0000,0000,0000,,then writing bindings in Rust Dialogue: 0,0:23:26.91,0:23:30.25,Default,,0000,0000,0000,,around a C library Dialogue: 0,0:23:30.26,0:23:31.67,Default,,0000,0000,0000,,is very useful Dialogue: 0,0:23:32.77,0:23:35.60,Default,,0000,0000,0000,,because that allows you to\Nbuild safer abstractions Dialogue: 0,0:23:35.60,0:23:38.38,Default,,0000,0000,0000,,on top of things that would\Notherwise be potentially unsafe Dialogue: 0,0:23:38.38,0:23:40.63,Default,,0000,0000,0000,,but is really easy to\Nintegrate with C code Dialogue: 0,0:23:40.63,0:23:44.67,Default,,0000,0000,0000,,which is one reason why it's working\Nout so well to integrate Rust in Firefox. Dialogue: 0,0:23:46.87,0:23:49.35,Default,,0000,0000,0000,,There's lots of other suggestions\Non the Rust website Dialogue: 0,0:23:49.35,0:23:52.47,Default,,0000,0000,0000,,of ways to participate in\Nthe Rust Community Dialogue: 0,0:23:53.01,0:23:54.61,Default,,0000,0000,0000,,if that's what you're asking. Dialogue: 0,0:23:58.08,0:23:59.18,Default,,0000,0000,0000,,Yes Lucy? Dialogue: 0,0:24:15.82,0:24:19.19,Default,,0000,0000,0000,,What are the most compelling\Nreasons for someone to learn Dialogue: 0,0:24:19.21,0:24:24.86,Default,,0000,0000,0000,,the language and potentially start\Nparticipating and contributing? Dialogue: 0,0:24:27.19,0:24:29.24,Default,,0000,0000,0000,,One thing I've heard\Nis that actually people Dialogue: 0,0:24:29.25,0:24:32.20,Default,,0000,0000,0000,,who don't already have what's called Dialogue: 0,0:24:32.20,0:24:33.85,Default,,0000,0000,0000,,systems programming experience Dialogue: 0,0:24:33.85,0:24:36.89,Default,,0000,0000,0000,,so a lot of experience\Nusing C++ for example Dialogue: 0,0:24:36.90,0:24:38.88,Default,,0000,0000,0000,,one of the lower level languages Dialogue: 0,0:24:38.88,0:24:41.15,Default,,0000,0000,0000,,people coming from a web\Ndevelopment background Dialogue: 0,0:24:41.15,0:24:43.83,Default,,0000,0000,0000,,people writing a lot of \NJavascript, Ruby, Python Dialogue: 0,0:24:44.81,0:24:47.52,Default,,0000,0000,0000,,what I've heard is that people\Ncoming from those languages Dialogue: 0,0:24:47.52,0:24:50.62,Default,,0000,0000,0000,,are actually getting\Ntheir first experience Dialogue: 0,0:24:50.63,0:24:52.52,Default,,0000,0000,0000,,doing low level programming stuff Dialogue: 0,0:24:54.07,0:24:57.50,Default,,0000,0000,0000,,but in a way which is much less daunting Dialogue: 0,0:24:57.51,0:24:59.41,Default,,0000,0000,0000,,than C or C++ Dialogue: 0,0:24:59.42,0:25:02.81,Default,,0000,0000,0000,,where they know that the\Ncompiler has their back Dialogue: 0,0:25:02.81,0:25:06.14,Default,,0000,0000,0000,,in ways that the compilers\Nfor C++, for example, don't Dialogue: 0,0:25:06.39,0:25:08.23,Default,,0000,0000,0000,,and it will tell you when\Nyou're making mistakes Dialogue: 0,0:25:08.23,0:25:10.28,Default,,0000,0000,0000,,and it won't let you make those mistakes Dialogue: 0,0:25:10.28,0:25:11.43,Default,,0000,0000,0000,,which is pretty exciting. Dialogue: 0,0:25:14.99,0:25:17.70,Default,,0000,0000,0000,,There are two people who I know Dialogue: 0,0:25:17.70,0:25:20.09,Default,,0000,0000,0000,,who come from Ruby Dialogue: 0,0:25:20.09,0:25:21.27,Default,,0000,0000,0000,,Javascript backgrounds Dialogue: 0,0:25:21.27,0:25:23.49,Default,,0000,0000,0000,,who are now putting together Dialogue: 0,0:25:23.50,0:25:25.26,Default,,0000,0000,0000,,a series of tutorials Dialogue: 0,0:25:25.26,0:25:28.24,Default,,0000,0000,0000,,for teaching people how to do\Nkernel programming using Rust Dialogue: 0,0:25:29.53,0:25:32.25,Default,,0000,0000,0000,,with the intention that other\Npeople are coming from those Dialogue: 0,0:25:32.25,0:25:34.10,Default,,0000,0000,0000,,high level backgrounds Dialogue: 0,0:25:34.10,0:25:35.95,Default,,0000,0000,0000,,and trying this out for the first time Dialogue: 0,0:25:35.95,0:25:39.61,Default,,0000,0000,0000,,so there's a lot of ways to experiment\Nwith things that traditionally has been Dialogue: 0,0:25:39.61,0:25:41.17,Default,,0000,0000,0000,,rather unapproachable Dialogue: 0,0:25:41.18,0:25:44.28,Default,,0000,0000,0000,,for large segments of the\Ndeveloper population. Dialogue: 0,0:25:49.79,0:25:52.36,Default,,0000,0000,0000,,Pretty compelling reason really Dialogue: 0,0:25:52.36,0:25:55.36,Default,,0000,0000,0000,,and even if you do have\Nexperience doing C++ Dialogue: 0,0:25:55.36,0:25:57.13,Default,,0000,0000,0000,,and lower level things like that Dialogue: 0,0:25:59.14,0:26:02.25,Default,,0000,0000,0000,,I find that not having to worry\Nabout whole classes of problems Dialogue: 0,0:26:02.25,0:26:03.30,Default,,0000,0000,0000,,you can make Dialogue: 0,0:26:03.30,0:26:06.41,Default,,0000,0000,0000,,as a developer in those languages Dialogue: 0,0:26:06.41,0:26:07.73,Default,,0000,0000,0000,,makes a huge difference Dialogue: 0,0:26:07.73,0:26:10.31,Default,,0000,0000,0000,,it allows you to reason\Nabout your code better Dialogue: 0,0:26:10.33,0:26:13.73,Default,,0000,0000,0000,,it allows you to be more\Nadventurous with your code. Dialogue: 0,0:26:15.26,0:26:34.94,Default,,0000,0000,0000,,(Inaudible audience discussion) Dialogue: 0,0:26:39.63,0:26:41.39,Default,,0000,0000,0000,,So the questions was Dialogue: 0,0:26:41.84,0:26:44.15,Default,,0000,0000,0000,,one of the things people have talked about Dialogue: 0,0:26:45.26,0:26:49.82,Default,,0000,0000,0000,,is that Rust should be able to make\Nthe process of refactoring your code Dialogue: 0,0:26:50.42,0:26:54.25,Default,,0000,0000,0000,,easier, safer, generally less complicated Dialogue: 0,0:26:54.25,0:26:55.96,Default,,0000,0000,0000,,and less uncertain Dialogue: 0,0:26:55.96,0:26:58.43,Default,,0000,0000,0000,,and has there been talk of that Dialogue: 0,0:26:58.43,0:27:00.15,Default,,0000,0000,0000,,has there been evidence of that Dialogue: 0,0:27:00.15,0:27:00.89,Default,,0000,0000,0000,,and yes Dialogue: 0,0:27:00.89,0:27:02.85,Default,,0000,0000,0000,,there's actually a really great blog post Dialogue: 0,0:27:02.86,0:27:04.01,Default,,0000,0000,0000,,in the past couple weeks Dialogue: 0,0:27:04.02,0:27:05.68,Default,,0000,0000,0000,,of someone who was Dialogue: 0,0:27:05.69,0:27:07.53,Default,,0000,0000,0000,,refactoring their code Dialogue: 0,0:27:07.55,0:27:11.70,Default,,0000,0000,0000,,and the compiler kept pointing out\Nways in which it would not be safe Dialogue: 0,0:27:11.70,0:27:13.79,Default,,0000,0000,0000,,to refactor it in that certain way Dialogue: 0,0:27:13.80,0:27:16.03,Default,,0000,0000,0000,,because it was shared between threads Dialogue: 0,0:27:17.34,0:27:18.60,Default,,0000,0000,0000,,like he would fix that thing Dialogue: 0,0:27:18.60,0:27:20.51,Default,,0000,0000,0000,,and it would go down the \Nrabbit hole a little bit further Dialogue: 0,0:27:20.51,0:27:22.61,Default,,0000,0000,0000,,and say "Oh now this isn't safe anymore". Dialogue: 0,0:27:22.61,0:27:26.28,Default,,0000,0000,0000,,and was this very compiler\Nguided refactoring session Dialogue: 0,0:27:26.30,0:27:27.49,Default,,0000,0000,0000,,which he wrote about Dialogue: 0,0:27:27.51,0:27:29.56,Default,,0000,0000,0000,,and documented top to bottom Dialogue: 0,0:27:29.58,0:27:32.08,Default,,0000,0000,0000,,and it's great, it seems to just Dialogue: 0,0:27:32.09,0:27:33.01,Default,,0000,0000,0000,,verify the premise Dialogue: 0,0:27:33.01,0:27:36.97,Default,,0000,0000,0000,,that this does prevent you\Nfrom making mistakes. Dialogue: 0,0:27:43.38,0:27:44.95,Default,,0000,0000,0000,,Alright let's call it there. Dialogue: 0,0:27:44.97,0:27:47.07,Default,,0000,0000,0000,,Thank you for attending everybody Dialogue: 0,0:27:47.07,0:27:50.28,Default,,0000,0000,0000,,[Applause]