text stringlengths 0 1.62k |
|---|
[313.22 --> 318.16] good at making compilers so we wanted to make sure that we had a broader set of use cases than just |
[318.16 --> 322.36] building the rust compiler itself which is why servo is important but also the stuff that you is doing |
[322.36 --> 329.20] is very important no steve i'm interested uh i think i first came across rust back when you first |
[329.20 --> 334.18] published rust for rubyists um which i went back in time and checked that your i think your first |
[334.18 --> 342.50] commit on that was december 22nd 2012 so yep uh talk about an early adopter what was it about rust |
[342.50 --> 348.64] way back in the day that initially got you excited so in college most of my friends actually did |
[348.64 --> 354.86] operating systems phds eventually and uh we had started to work on an operating system at that time |
[354.86 --> 359.20] we knew that c and c plus plus had some problems and d was a really big thing so we actually worked |
[359.20 --> 365.18] on building an operating system back in d1 back in the college days and uh i sort of found the web and |
[365.18 --> 369.72] went into ruby and sort of left the system space but they kind of continued doing that and i'd always |
[369.72 --> 373.22] remembered that for later and i've always sort of had a love for low-level programming even though it's |
[373.22 --> 377.74] not what i've done in my work in the last couple years so i was at home visiting my parents for |
[377.74 --> 382.70] christmas and uh there's not a lot to do in the middle of nowhere where i'm from and so i was like |
[382.70 --> 389.54] cruising the internet and found this announcement about rust uh 0.5 being released and uh i was like |
[389.54 --> 393.22] oh this is systems programming language i haven't done that in forever like i would love to get into |
[393.22 --> 399.82] this let me check it out and i found that the tutorial while it explains what to do like after i |
[399.82 --> 404.58] read it i didn't know how to write a rust program like i read it all i sat down at an editor i was like |
[404.58 --> 410.58] i what do i do from here so i just got in the irc room and i started asking dumb questions like |
[410.58 --> 414.94] literally like how do you hello world and like things like that and then wrote them all out into |
[414.94 --> 420.22] what became rust for rubyists so that was sort of that christmas break um and i found the language |
[420.22 --> 424.40] really charming i found all the people that were involved really fantastic and so i just kind of |
[424.40 --> 432.18] stuck with it from there so rust is a mozilla project or mozilla research um and you work now at |
[432.18 --> 438.00] mozilla on it can you maybe speak on their behalf of like why rust what was the point what's the win |
[438.00 --> 443.02] for mozilla and what's the thrust of the project do you know about the pwn to own browser competition |
[443.02 --> 447.72] that happens yeah they don't last very long yeah they don't last very long but what's interesting |
[447.72 --> 453.28] is if you look at what the vulnerabilities are so uh this i'm not as familiar with this most recent |
[453.28 --> 457.76] one because i've been studying the last one a lot more but in the in the not the one that just |
[457.76 --> 463.30] ended but the one before that uh firefox had four remote code execution vulnerabilities and all of |
[463.30 --> 470.22] those were due to um errors like iterator invalidation and use after free and this kind of memory unsafety |
[470.22 --> 477.92] situation so mozilla with firefox and other projects writes a lot of c++ and they feel the pain of c++ |
[477.92 --> 485.44] in many ways and so part of the uh the reason to fund rust development was to like figure out if they could |
[485.44 --> 490.48] write a good programming language that would make them be able to write web browsers that are safer |
[490.48 --> 495.62] but while not sacrificing performance so historically programming languages have sort of given you this |
[495.62 --> 502.40] trade-off of we give you maximum control but then you have to double check everything versus we don't give |
[502.40 --> 507.92] you much control but everything is safe by default uh and so rust is trying to break that dichotomy down |
[507.92 --> 514.94] and give you a language that gives you both things yeah so uh so i don't work for mozilla um you said |
[514.94 --> 520.24] rust is a mozilla project uh one thing i really like about the mozilla research team is how much |
[520.24 --> 525.68] they care about making projects they they work on at mozilla be real community projects and obviously |
[525.68 --> 531.18] that's pretty rough because uh if you have five full-time people working on something and then you |
[531.18 --> 536.78] have a community there's an actual tension between those things but uh i've i've really enjoyed how much |
[536.78 --> 544.36] the team there has has looked to diversify the group uh and increase the number of people involved |
[544.36 --> 549.80] who are not just people working at mozilla um obviously rust has a bunch of phds working on it |
[549.80 --> 554.72] um and that that ends up being important to solve the kinds of problems that steve was just talking about |
[554.72 --> 561.78] before rust uh existed the the whole story of what rust is was just an academic concept um and rust is |
[561.78 --> 566.88] really the first time that that it became put into use as a production language um so that that's |
[566.88 --> 572.06] important and does involve hiring some phds to do some research work but i've also really enjoyed how |
[572.06 --> 578.38] much the mozilla team and and the mozilla research organization has how much time they spent getting |
[578.38 --> 583.24] people who are not at mozilla being important members of the decision making process of governance and |
[583.24 --> 588.60] all that so you hit it when did you first come across it and how long did it take you between |
[588.60 --> 593.20] finding it you know hit your radar and being like wow i'm gonna build something with this |
[593.20 --> 599.78] yeah so i i knew dave herman from mozilla research he was a friend of mine and so i knew that the rust project |
[599.78 --> 605.60] existed conceptually um and like a lot of other people i was looking for an excuse to use rust but i never |
[605.60 --> 610.70] really had any good ones uh and the product that i was working on at work uh it's called skylight |
[610.70 --> 617.24] it's a production management it's a performance monitoring app for rails apps and so uh one of the things |
[617.24 --> 620.86] that we do is we just have a thing that runs inside your rails app collects data and sends it to |
[620.86 --> 625.38] our server so that's just something that that we have to write and so the first version of that like |
[625.38 --> 630.68] you would expect was written in ruby and that version would basically go and would monkey patch |
[630.68 --> 635.54] your stuff or use that to support notifications or whatever and then it would uh get the information |
[635.54 --> 641.32] sent to the server and pretty early on we discovered that we had some bad memory usage problems |
[641.32 --> 645.92] um this is something that a lot of our users reported we could impact especially pathological |
[645.92 --> 652.60] cases we could end up using 100 or 200 megabytes of memory but even you know 20 30 40 50 megabytes |
[652.60 --> 658.06] of memory is a lot of memory to ask someone to give up to monitor their application um so i was |
[658.06 --> 663.18] basically tasked with getting the memory management story under control so i went in there and i looked |
[663.18 --> 669.06] at the ruby application really evaluated it and i was able i made some good progress i was able to get |
[669.06 --> 673.40] the memory usage down i was able to fix some of the pathological cases but the process of doing that |
[673.40 --> 677.16] made me realize that i simply didn't have the control over the memory usage that i would need |
[677.16 --> 682.50] to keep this maintained and then every anytime anybody ever touched the rails app or sorry the |
[682.50 --> 686.74] ruby app there was a good chance that they would have significant regression because i had to do really |
[686.74 --> 693.58] black magic stuff to even get some modest improvements so uh carl at the time one of our |
[693.58 --> 698.62] co-founders had started to do an experiment to write uh the agent in c++ and he actually made some |
[698.62 --> 703.76] good progress but uh i personally don't trust my c++ code and i was extremely nervous about |
[703.76 --> 708.62] having us as a team maintain code that could in theory set fault in production right so it was |
[708.62 --> 713.02] fairly important to us if we're asking people to run code that that code not be able to explode |
[713.02 --> 718.78] um so i started uh poking around at rust and i basically yeah i said you know rust is still pretty |
[718.78 --> 724.18] new but i i'm pretty sure i can get a you know prototype of a small piece an mvp which is just the part |
[724.18 --> 728.94] that serialized and deserialized the data structures into protobufs and sent them to our server i think |
[728.94 --> 734.00] i can get that part done in you know a week or two and so i i said if i can get it done then we should |
[734.00 --> 738.70] make further progress so i spent a week or two and i was successful at doing that part um actually that |
[738.70 --> 742.50] the reason i did that part was that that part in ruby was one of the worst parts of the system it was |
[742.50 --> 748.16] the one that was most bad of memory and so pretty quickly we were able to take this uh fairly |
[748.16 --> 754.00] memory heavy thing in ruby rewrite it rust and ship the native binary to our users um the reason |
[754.00 --> 758.06] we that i was really interested in rust and the reason why carl was interested in c++ was that |
[758.06 --> 764.54] i had a lot of experience embedding javascript runtimes in ruby um both spider monkey and then later on v8 |
[764.54 --> 771.02] i worked on those projects and embedding a gc inside of another gc is just asking for never-ending pain |
[771.02 --> 776.96] so having a language that we could use without any gc whatsoever and have it do quote-unquote manual |
[776.96 --> 782.92] memory management was very attractive so uh the tldr is i had a really big problem which was |
[782.92 --> 788.24] write this agent uh and have it use less memory and i was able even at that point to get up and |
[788.24 --> 791.28] running with something that worked and gave us value in a pretty short amount of time |
[791.28 --> 796.74] and and so something that was very very memory uh had good memory usage didn't have a gc |
[796.74 --> 802.04] was very fast and also that i could chip with very low risk of seg faults in a short period of time |
[802.04 --> 808.48] awesome so steve was excited you was excited anytime you guys are excited the rest of us tend to get a |
[808.48 --> 816.92] little bit excited uh let's maybe maybe a lot of it let's talk about the language um it's defining |
[816.92 --> 821.86] features and i'm going to kind of turn to steve since it's your job to like write the docs and to |
[821.86 --> 827.48] to explain it to us noobs and then you can just kind of hop in and help out uh wherever you think he |
[827.48 --> 834.52] needs it so rest defining feature is memory safety without garbage collection steve can can you unpack |
[834.52 --> 840.26] that for us sure so uh in the beginning there were programming languages that sort of let you do |
[840.26 --> 844.60] whatever you want right like assembly code uh we'll start from that level of distraction obviously you |
[844.60 --> 849.00] know this started even before that with machine code yada yada don't want to get in there but uh |
[849.00 --> 855.06] things like assembly uh and the languages that came right after it uh gave you this low level access |
[855.06 --> 859.92] to memory and the problem with giving you that low level access is that you can do bad things |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.