I'm learning rust atm and I've watched a couple of your videos by now. I'm impressed with your articulation, pronunciation, delivery and knowledge of Rust. You'll be the first person I'd recommend to anyone interested in learning the Rust language. Stay awesome, Jon! 🌻🌞
Excellent overview. Perfect for sharing with my colleagues and friends who are already very competent in another language, but are Rust-curious. Thank you.
I’ve written a lot of C, C#, JavaScript, and TypeScript code. I’ve also briefly used Java, Python, Swift, and Golang. But man, Rust is the most elegant language of all.
This is great! And it was two years ago already! How do you feel now? I'm still in my first months into Rust and i've been feeling so happy with my choice!
Yeah, I know, it's not great. I tried running a couple of volume normalizers over it, and it didn't seem to help. Not entirely sure why. I think what happened was that there was someone manually controlling the audio levels during the presentation, and I guess they got it very wrong at times..
@@jonhoo Sounds like someone messed up the settings on a compressor in the signal chain and turned the attack and release times all the way up. Let me know if you still want to fix this. I have some experience mixing down audio for podcasts and can probably make this better.
@@MendeltSiebenga Thanks, I appreciate that, but sadly I can't replace the audio track on a TH-cam video after the fact, so not much to do about it at this point. I suppose I could upload a new version and point people to it, but not sure that's worth it.
@@jonhoo yeah, its a bit annoying but still pretty comprehensible. Not worth re-uploading. And the contents of the presentarion make up for the audio 😁
For what it's worth, I've added a lavalier recorder to my Amazon wishlist to ensure that all future talks will have proper sound! 😅 www.amazon.com/hz/wishlist/ls/EI8GP25AL8FU?ref_=wl_share
I have watched a few of Jon's videos...man you have a serious aptitude for programming especially with Rust. Look forward to more videos popping up on the web from this guy!
i've been reading rust on/off for a long time and finally bit the bullet. tried it and the compiler helps so much and is also helpful as f. my first project was a big mess with a lot of clones. then i rewrote it in a much better way after more reading and ran perfectly. i've mostly been programming C# and some C++ too. wouldn't say i'm advanced c++ but knew enough to use references and pointers easily and add libraries without problem and use them. i shot myself in the foot sometimes with c++ but rust feels a lot better. get it to compile and follow their rules and it just works. i recommend using clippy in the beginning too. steep intro curve but worth it
Somewhat similar to me. I didn't use clone but my initial rewrite of a C# project wasn't in the form I wanted it. But a year later I revisited it after having worked my way through a fair bit of Rustlings and last week I was able to adapt it to the form I originally wanted (with interfaces -> traits). The compiler certainly helped!
Great info about rust. I'm used to C++ and have been learning rust for around two months, and I find this very clear in explaining rust's concepts and differences compared to other languagues (and why they are so)
I think there is a bug at [16:00] -- match decompress() has a match guard (if e.is_eof()) -- which means the match statement does not cover every case - it shouldn't compile.
Just like "Good artists copy, great artists steal" that quote is true but hard to actually understand. I mean, just take a look at Go for an epic misinterpretation of the sophistication of simplicity
I am a student from China . I can tell from the video that you are definitely a geeker, if your video could be watched in my country , you will be popular very quickly. However not every chinese student who learn Rust can watch such nice videos.
While the audio is not great, it in no way hampers hearing and comprehending what is being said. I heard and understood every word, and I thought the content was excellent.
The borrow checker is only hard if you are used to write Imperative and OO code. For Functional programmers this I still a less strict language since mutability are aloud
Thanks for the great video Jon! This is truly a great resource to share with others who are not entirely familiar with Rust when arguing for using Rust in a project.
if you haven't yet. try it. it's a steep intro because of the compiler slapping your hands constantly because of all safety checks and working a bit differently. but after wards. it's really good. i've found C++ to be annoying to type in because of header/source and then all the ways to shoot yourself in the foot. python i guess kinda like my C# knowledge but i still like rust more so far even though i'm so far a kinda newbie more
Jon is so right through! I’m a bit of a language connoisseur. I’ve researched the inner workings of languages like JavaScript, C#, Python, Java, Haskel, Elm, C, Assembly and even x86 and RiskV instruction sets. Rust is the most exciting language to work with so far! Elm is another exciting one as a functional language for the frontend.
@@arnox4554 it works well. Not perfect but there is nothing stopping the core language from running there. You may need to port over the std. Or use nonstd libraries.
Awesome talk! Thank you for putting it together! Rust has been on my radar for a long time, but after this presentation I'll definitely going to commit to learn it.
I missed a comparison with Haskell, IMHO it is the language most similar to rust. Except that rust solves the problem of data copying in Haskell by allowing controlled mutation.
Rust is in few words, a imperativet language that use study of programming language (mostly functional) from the læst 40 years and use it. I still has to ufølsom what is the difference are in "strong" typing in C# and java and strong typing in ML language like F#, Haskell, sml and now Rust.
Unfortunately ADTs and their friend the match statement significantly increase compile time (the latter being NP-hard), so even though it was technically done around the 70s it didnt become practical until much later. I still love them though.
Abstractions that go away at compile time hurt reflection and anything cool you could do with it. That said I could use a more modern and clean system programming language in my kit.
I honestly love rust and prefer it over c++ and I use C# most of the time so you can imagine that really not familiar with objects in rust since they are implemented so differently
Thanks for the video! I highly appreciate the quality of the material you are making and sharing! And not only as a rust-learner, but also as an English learner. 🙃
@@gareginasatryan6761 Your statements are misleading, if not outright false. Rust is a multiparadigm language, one of the paradigms most definitely is OOP. It's just not dogmatic about it and doesn't follow every idea that other languages had (not least because the last few decades have taught us that some of these ideas were terrible). You want to work with fully encapsulated, virtually dispatched objects that live on the heap? Go ahead, it's your choice. You'll probably realize that most of the time you don't actually need the overhead that comes with that and instead organically reserve it to the parts where it's actually useful. The best thing is, Rust's strictness about things like ownership, mutability and the like enforces OOP best practices. You, and everybody else on the project, will actually use things like dependency injection instead of just talking about it and then still using circular references everywhere because it's more convenient... and we're pretty sure the GC will catch that (or: We can just fix it when we get segfault), right? And this will never run concurrently, right? Please. The "downside" is that you'll get punished if you don't understand the problem you're working on and its design requirements before you start typing. Of course you'll also get punished if you do the same in something like Java but in a less concrete way where you kinda know that your code smells but it's far less obvious that a major refactor is the only way out.
Hi thanks for nice presentation :) Just one thing I wonder: is there a reason, that an extern marked functions still have to use the no_mangle construct instead of having this sort of auto-set? As some developer I generally do not want to be exposed to compiler-interna (i.e., I don't want to know that the compiler mangles normally as long as I don't really need to). I see no reason why external identifiers should be mangled ever?
That's a good question! The same question was raised back in the day I discovered: github.com/rust-lang/rust/issues/11089, and the decision not to have no_mangle be the default was decided in this 2014 meeting: github.com/rust-lang/meeting-minutes/blob/master/weekly-meetings/2014-01-21.md#no_mangle-for-extern-fns. To quote: "because it breaks the module system. if libraries A and B both define extern functions foo, if you make no_mangle automatic/implcit, then library C cannot link againt A and B simultaneously".
@@jonhoo Thanks for the research. Although, I don't really understand the reasoning. If two libraries would expose the same function they would "no_mangle" them anyways, having the same problem. Also I don't see how an external library wants to link against a mangled function. Isn't the whole purpose of no_mangle to enable this without recovering the changed name?
Yeah, I'm not sure I completely follow it either. I think it comes down to whether extern "C" (or even other externs) without #[no_mangle] is ever useful. I can't immediately think of a use-case, but I also don't work a lot on the FFI side of Rust development. May be worth asking over on the internals forums at internals.rust-lang.org/ for a better answer!
Yeah, it's awful. Nearest as I can tell, what I was sent was almost a screen recording of the web broadcast of the talk. And the mic itself seems to have had some very aggressive noise cancellation/dynamic audio tuning applied to it. For what it's worth, I now have my own lapel mic that I'll be using when I give talks in the future :)
Man.. I saw the volume complaints in the comments and skimmed the video thinking "I don't know what they mean, seems fine to me". But sitting here now trying to listen to this is extremely frustrating and distracting. I really hope someone can figure out how to fix the leveling in this video because it's currently pretty damn unbearable. I'm about 4 minutes in and I honestly just can't listen to this anymore. It's like, hurting my brain. 😢 Hopefully you have better luck with your next talk. I'll subscribe and hope for more in the future. Thanks for sharing anyways.. hopefully some other people can work their way through the audio and get something useful out of it.
Yeah, it's really unfortunate. They had proper audio equipment at the venue, but somehow the recording didn't go as planned, so all I was left with was this recording of the webcast of the talk. And, sadly, it turns out that it's quite hard to clean it up. Even if I could somehow though, TH-cam also doesn't let me replace the audio track, so I'd have to upload a new video altogether. I guess here's to hoping I'll do the entire talk again some time! I think it's a little easier on your ears if you keep the volume a little lower, but it's still not great..
Rust has been trying to solve the old programming dilema that back in the 90s JAVA promised to solve. I have used a numbers of programming languages and there is always one language I keep going back to and that language is C. The reason being that other than assembly language you can find a C compiler for it I almost all cases. Again I don’t think languages should be chosen solely on preference but availability and flexibility should be considered before starting any project
Following compiler errors until it compiles again when refactoring completely and utterly sucks. That is donkey work you want the compiler or IDE, something on the computer, to do for you. Programmer productivity is every bit as important as all the speed and safety. Also it is a LOT more safe to not have to do this sort of thing by humans trudging through it.
The IDE can do much of it for you in Rust too, that's not quite what I was getting at. Instead, the fact that so much is checked at compile time in Rust means that even if you have to make large changes (maybe even tool assisted), it's much easier to be confident that you didn't miss something, because the compiler will probably tell you.
To some extent. The type system supports type inference in the Hindley-Milner style, monadic operators (such as the question mark (?) operator) and combinators are available for most of the built-in algebraic types such as Option or Result. Though type system is not as advanced as in certain function programming languages and currently lacking Generic Associated Types, Dependent Types, Higher-Kinded Types.
Correct. Or rather, you're in the same position as with C++. You can't publish proprietary templates, since the compiler needs the code that is templated to instantiate the template for new types/values. Anything you can expose through the C ABI (so, for example, no generics) you can publish as shared libraries/object files.
Hi, thanks for this wonderful masterclass, but please please if it's possible upload it again with better sound quality, only 20 minutes play and my ears can't take it anymore. Thanks!!
Unfortunately this is the audio I was provided with. I've since bought a lapel mic to use to record future talks myself rather than relying on the capture process, but there's not much to do about this one. If someone had the skills + time to clean up the audio, and it made a significant difference, I might do a re-upload, but I think the audio may just be beyond repair. My suggestion would be to run it at a lower than usual volume and then turn on subtitles :)
@@jonhoo If you want, I can fix the audio for you. I think youtube still allows reupload of audio without needing to reupload the entire vid and lose all comments and views
@@samuelleeuwenburg No, unfortunately TH-cam won't let you replace any part of the video without a reupload :'( They used to have a limited feature to do this to do soundtracks, but replacement is sadly a no-go.
I know python and java but I don't understand the comparisons he is making in the start of his presentation. What topics do those concepts lie under? eg. runtime, gc, buffer overflows, data races, static typing etc.
runtime - processes that run while your program run e.g. garbage collector (gc) gc - garbage collector automatically frees unused memory in the heap buffer overflows - a rust array is guaranteed to not exceed its size at compile time data races - undefined behavior caused by multiple threads having unrestricted access to a shared resource static typing - variable types are determined and checked at compile time (its opposite dynamic typing checks variable types during runtime).
Do I need to turn down the brightness on my monitor :D I know, it's for projector ;) I have an excuse to wear my sunglasses at night, just like the song
I'm new to Rust and this is a very useful talk and well-presented. Regarding the drawbacks, it seems that the inability to have pre-compiled libraries might be a big disadvantage. It means you can't hide your source code which is what you'd want to do if you want to sell a library. It doesn't seem like generics is a good enough excuse. Couldn't you just disallow generics across a library interface? Just have a library interface essentially be like a C interface?
Oh, yeah, I think I mention this, but it may not have come across clearly: you can absolutely compile Rust down to a library that uses the C ABI. That means no generics or other Rust-isms in the interface, but it will be binary only and easy to interact with just like C libraries are.
@@jonhoo Thanks for taking the time to answer Jon. Yes, it wasn't clear to me from the presentation especially since @57:00 it says "No prebuilt libraries". After watching videos and reading about Rust for the past week I really like it a lot. But there was only one thing that really turned me off though you might consider it minor. I don't get why the creators of Rust have to force their favorite style on everyone else. I'm particularly talking about the enforcement of the Egyptian brace style which I dislike. It makes much more sense to line up braces on the left so you can see that your scopes are lined up and your eye doesn't have to go searching for the opening brace who-knows-where at the end of some line. Makes no sense. The other one is the enforcement of snake case on variable names. I've always used camel case for everything (I really dislike underlines. I don't like typing them and it's a waste of a character). Though I can probably live with that more than the brace thing. I'm aware I can get rid of the warnings using an attribute or something. But will using my own style get me ostracized from the Rust community? And I won't be able to use any of the formatting utilities. I've been doing C++ since the early 90's and traditionally you have to be able to deal with other people's style. I realize the creators of Rust are going for consistency. But I don't see the advantage of Egyptian braces over lining them up on the left.
The language doesn't require that you do either of those, and you can disable the warnings as well if you'd like. You will find that those are both pretty universal in the Rust community, but they are definitely not _enforced_ :) You can also continue to use the standard formatter by changing its settings appropriately. That all said, the Rust community does seem to favor "do whatever rustfmt says", and I think there is immense value in that. Even though it may not be your particular preference, having a single uniform style helps readability a lot (which is why Go for example does the same). As for why Egyptian style, that I couldn't tell you. Personally, I prefer to fit more code on screen, so to me the brace on an extra line is wasted space to me. The function signature is already the "start block" for the scope, so why add an additional line at that indentation level? Whether that's the reason it was chosen, I have no idea. I really hope you don't discard a language as a candidate because you don't like how it aligns braces though!
@@jonhoo "to me the brace on an extra line is wasted space to me" First, you do not need to have an extra line. Just move the opening brace to the next line at the left. Second, white space is a good thing anyway. More so when looking at someone else's code. I don't like to trust indentation only. It could be off due to extra tabs or spaces. "The function signature is already the "start block" for the scope" Well, you don't know that until you go looking for the open brace, which is what really defines the start. And it's harder to notice whether it's there or missing when it's off to the right. I wouldn't decide not to use Rust just because of formatting. Before that I'll just format it how I want unless I'm working on someone else's code in which case I'll format it like they do. Who knows, maybe I'll start a movement to change the formatting since I think I have a better argument. Now Python, that's a different story. I'm not a Python programmer. But to require a certain white-space indentation to start a block? I can't help saying that was not a good idea and I'll never use Python just for that reason. :)
A brace to the left of indented code? That sounds awful! :p I guess I just don't have problems with using indentation for this. If all your code goes through the formatter anyway, you know the indentation is always right, and never "off".
Unfortunately I cannot replace the audio track on TH-cam once the video has been uploaded. It's also surprisingly difficult to fix an audio stream in such a bad state as this. I now have a lapel mic of my own to properly record future talks :) I would recommend turning the volume down and enabling subtitles.
Guys please help me. With Rust, Can I write real time notifications system with APIs or ecommerce easily? Why dont I find any ecommerce Rust tutorial from scracth? Any help would be appreciated!
easily ? nope . rust is harder than C or C++ . cuz you need to use everything it gives and trust me it doesn't give you too much , barely it supports struct and you need impl stupid thing to connect struct and impl to each OTHER XD its boring and hard and time-consuming Xd and unless there's some real things being added up there there's no way it can be popular with its hell-ish syntax
I don’t wish that :) I think it forces you to learn about and understand deeper programming and computer science concepts. Which only makes you a better all around programmer, no matter your preferred languages.
@@lyingcat9022 absolutely agree! So many things you gloss over in other language rust forces you to confront. Plus it feels great to write once you get better
Syntax is tricky, because you sort of need syntax to be able to express additional concepts in the language. For example, Go has simpler syntax than Rust, but it also does not have many of the features that Rust has. Generics for example _basically_ requires introducing syntax. I think Rust strikes a good balance, but it's true that there is some syntax you'll have to get used to when you start out. Overuse of symbols is related to this, though I don't think Rust is a particularly egregious offender there? Not sure what you mean by "weird prebuild names"? Rust mangles names by default, that's true, but that's a very common (and sane) practice these days in modern languages.
The syntax is just too complex to be called a 'productive' language. I wish the syntax could be simplified someday. But the idea of memory safety offered by this language is awesome.
That is hard thing to do, but if you decide to do so, good luck! This should be a good starting point: dhghomon.github.io/easy_rust/Chapter_1.html EDIT: I highly suggest you also follow along a tutorial video series, like "Let's Get Rusty"'s series: th-cam.com/play/PLai5B987bZ9CoVR-QEIN9foz4QCJ0H2Y8.html
0:17 - So if Rust is an *Option,* that means that we can either use *Some* or *None.*
took me a second to unwrap that...lol
@@sriramkota That was really unEXPECTed.
Be careful, Rust is watching every *move* you make :)
@@clitaiulian4497 and every thing you *take*
@@sriramkota For me it was no match
I'm learning rust atm and I've watched a couple of your videos by now. I'm impressed with your articulation, pronunciation, delivery and knowledge of Rust. You'll be the first person I'd recommend to anyone interested in learning the Rust language. Stay awesome, Jon! 🌻🌞
I fully relate.
He's a computer science PhD, **with a TH-cam channel**! 😇
Excellent overview. Perfect for sharing with my colleagues and friends who are already very competent in another language, but are Rust-curious. Thank you.
I’ve written a lot of C, C#, JavaScript, and TypeScript code. I’ve also briefly used Java, Python, Swift, and Golang. But man, Rust is the most elegant language of all.
This is great! And it was two years ago already! How do you feel now? I'm still in my first months into Rust and i've been feeling so happy with my choice!
You just meant woke! Be concise!
It's nice that the fact that Rust has a great regex library is mentioned in drawbacks section.
Great stuff, thanks for putting this together. Only thing I'd improve here is to normalize the video's audio as the volume fluctuates a lot.
Yeah, I know, it's not great. I tried running a couple of volume normalizers over it, and it didn't seem to help. Not entirely sure why. I think what happened was that there was someone manually controlling the audio levels during the presentation, and I guess they got it very wrong at times..
@@jonhoo Sounds like someone messed up the settings on a compressor in the signal chain and turned the attack and release times all the way up. Let me know if you still want to fix this. I have some experience mixing down audio for podcasts and can probably make this better.
@@MendeltSiebenga Thanks, I appreciate that, but sadly I can't replace the audio track on a TH-cam video after the fact, so not much to do about it at this point. I suppose I could upload a new version and point people to it, but not sure that's worth it.
@@jonhoo yeah, its a bit annoying but still pretty comprehensible. Not worth re-uploading. And the contents of the presentarion make up for the audio 😁
For what it's worth, I've added a lavalier recorder to my Amazon wishlist to ensure that all future talks will have proper sound! 😅 www.amazon.com/hz/wishlist/ls/EI8GP25AL8FU?ref_=wl_share
I have watched a few of Jon's videos...man you have a serious aptitude for programming especially with Rust. Look forward to more videos popping up on the web from this guy!
Haha, thank you, I appreciate that!
i've been reading rust on/off for a long time and finally bit the bullet. tried it and the compiler helps so much and is also helpful as f. my first project was a big mess with a lot of clones. then i rewrote it in a much better way after more reading and ran perfectly.
i've mostly been programming C# and some C++ too. wouldn't say i'm advanced c++ but knew enough to use references and pointers easily and add libraries without problem and use them.
i shot myself in the foot sometimes with c++ but rust feels a lot better. get it to compile and follow their rules and it just works. i recommend using clippy in the beginning too.
steep intro curve but worth it
Somewhat similar to me. I didn't use clone but my initial rewrite of a C# project wasn't in the form I wanted it. But a year later I revisited it after having worked my way through a fair bit of Rustlings and last week I was able to adapt it to the form I originally wanted (with interfaces -> traits). The compiler certainly helped!
Great info about rust. I'm used to C++ and have been learning rust for around two months, and I find this very clear in explaining rust's concepts and differences compared to other languagues (and why they are so)
I really like how this guy explains stuff
Yes, he's absolutely accurate in describing things! This accuracy is really, really rare!
me too, super clear and easy to follow :)
Best Rust talk I've seen up to now, really motivates me to spend more time on working with Rust...
@Cosmo Kramer ...and use a generous amount of *?*
@Cosmo Kramer ooooooooooooooo
@Cosmo Kramer ooooooooooooo
@Cosmo Kramer y
@Cosmo Kramer o
Very good talk. Unfortunate audio but still absolutely worth it.
Been coding in Rust for 6 month now, I use it even for things it's not good at, I don't really care.
lol
I think there is a bug at [16:00] -- match decompress() has a match guard (if e.is_eof()) -- which means the match statement does not cover every case - it shouldn't compile.
“Simplicity is the ultimate sophistication.”
Just like "Good artists copy, great artists steal" that quote is true but hard to actually understand.
I mean, just take a look at Go for an epic misinterpretation of the sophistication of simplicity
Hey, it's the guy from the Missing Semester lectures. Thanks for the talk!
You remembered. Thanks
I am a student from China . I can tell from the video that you are definitely a geeker, if your video could be watched in my country , you will be popular very quickly. However not every chinese student who learn Rust can watch such nice videos.
Why not ask Jon if you can mirror this video but voiced over or subtitled in Mandarin? I doubt he'll have an issue with that.
一起学
老夏 同学你有学习群么?
While the audio is not great, it in no way hampers hearing and comprehending what is being said. I heard and understood every word, and I thought the content was excellent.
The borrow checker is only hard if you are used to write Imperative and OO code. For Functional programmers this I still a less strict language since mutability are aloud
@FichDich InDemArsch I didn't say it was functional.. I'm just comparing the typechecker to those of the ML family
I wish all programmers that hold tightly to C++ would watch this, the world could be a better place if people switched from C++ to Rust
Thanks for the great video Jon! This is truly a great resource to share with others who are not entirely familiar with Rust when arguing for using Rust in a project.
As an experienced C/C++/Python programmer, I have to admit this video makes me really want to learn and use Rust. Thanks a lot!
Rust is asking for it :'D
if you haven't yet. try it. it's a steep intro because of the compiler slapping your hands constantly because of all safety checks and working a bit differently. but after wards. it's really good.
i've found C++ to be annoying to type in because of header/source and then all the ways to shoot yourself in the foot.
python i guess kinda like my C# knowledge but i still like rust more so far even though i'm so far a kinda newbie more
This is an awesome talk! How can someone not like this video?
I will listen to this advice and see how far I can get with Rust in a week.
how far did you get?
wow jon this will inspire people to use rust
Immutable by default is single feature I want to learn and try Rust. Really good overview.
One can feel your personal enthusiasm and joy you had while working with the language. Wants me to start right away. Very nice. Thank you, Jon!
This is well done, explains things without assuming much prior knowledge. Good stuff!
Most loved language 6 years in a row
ALL Rust intros should be like this: Focus on the purpose and benefits - rather than the syntax!
Jon is so right through! I’m a bit of a language connoisseur. I’ve researched the inner workings of languages like JavaScript, C#, Python, Java, Haskel, Elm, C, Assembly and even x86 and RiskV instruction sets. Rust is the most exciting language to work with so far! Elm is another exciting one as a functional language for the frontend.
How do you think it would do in terms of rather low-level software like drivers, OSes, and software for embedded devices?
@@arnox4554 it works well. Not perfect but there is nothing stopping the core language from running there. You may need to port over the std. Or use nonstd libraries.
Awesome talk! Thank you for putting it together!
Rust has been on my radar for a long time, but after this presentation I'll definitely going to commit to learn it.
I missed a comparison with Haskell, IMHO it is the language most similar to rust. Except that rust solves the problem of data copying in Haskell by allowing controlled mutation.
Really good explained Rust language, need to watch the presentation once more time. Thanks!
19:14 in and it's doing a good job of convincing me considering I'm awful at writing documentation.
I enjoy the elaborate character of your presentation and something I would do, so it's highly skilled. Good job!
Rust is in few words, a imperativet language that use study of programming language (mostly functional) from the læst 40 years and use it. I still has to ufølsom what is the difference are in "strong" typing in C# and java and strong typing in ML language like F#, Haskell, sml and now Rust.
I like that Rust has Algebraic Datatypes, but they are by no means a "Modern" language feature, they've been around since the 70's.
Modern by systems language standards ;)
Unfortunately ADTs and their friend the match statement significantly increase compile time (the latter being NP-hard), so even though it was technically done around the 70s it didnt become practical until much later. I still love them though.
In Rust we trust!
Abstractions that go away at compile time hurt reflection and anything cool you could do with it. That said I could use a more modern and clean system programming language in my kit.
Very informative! I'm started to like to learn Rust Lang and this Presentation was very awesome and helpful. Thank you!
I honestly love rust and prefer it over c++ and I use C# most of the time so you can imagine that really not familiar with objects in rust since they are implemented so differently
The only problem with rust is lack of vacancies
This is excellent for a rust beginner! Thanks 😊
Thanks for the video! I highly appreciate the quality of the material you are making and sharing! And not only as a rust-learner, but also as an English learner. 🙃
My man should be in sales! He could sell a lead weight to a drowning man.
So keen to see you do another talk, Jon! Hope to be there for one someday!
Best Rust talk ever, in my opinion!
Wow, testing the docs code is brilliant
What if you could compile with a runtime for rich debugging during development, but leave it out for release?
This talk is REALLY convincing
I am a happy rust programmer :)
hey, good talk. I started learning rust. Looking forward to good rust content from you
Rust is incredible... finally a language with the power of C++ but modern features.
Rust isn’t really suited for large codebase GUI apps because OOP lends itself better in that setting. But as a C replacement, definitely
@@gareginasatryan6761 is rust not object orientated?
firexgodx980 not according to its devs.
@@gareginasatryan6761 Your statements are misleading, if not outright false.
Rust is a multiparadigm language, one of the paradigms most definitely is OOP. It's just not dogmatic about it and doesn't follow every idea that other languages had (not least because the last few decades have taught us that some of these ideas were terrible). You want to work with fully encapsulated, virtually dispatched objects that live on the heap? Go ahead, it's your choice. You'll probably realize that most of the time you don't actually need the overhead that comes with that and instead organically reserve it to the parts where it's actually useful.
The best thing is, Rust's strictness about things like ownership, mutability and the like enforces OOP best practices. You, and everybody else on the project, will actually use things like dependency injection instead of just talking about it and then still using circular references everywhere because it's more convenient... and we're pretty sure the GC will catch that (or: We can just fix it when we get segfault), right? And this will never run concurrently, right? Please.
The "downside" is that you'll get punished if you don't understand the problem you're working on and its design requirements before you start typing. Of course you'll also get punished if you do the same in something like Java but in a less concrete way where you kinda know that your code smells but it's far less obvious that a major refactor is the only way out.
@@gareginasatryan6761 Don't forget that inheritance OO doesn't lend itself to GUI particularly well either
Great video! This really has increased my interest in Rust.
Hi thanks for nice presentation :) Just one thing I wonder: is there a reason, that an extern marked functions still have to use the no_mangle construct instead of having this sort of auto-set? As some developer I generally do not want to be exposed to compiler-interna (i.e., I don't want to know that the compiler mangles normally as long as I don't really need to). I see no reason why external identifiers should be mangled ever?
That's a good question! The same question was raised back in the day I discovered: github.com/rust-lang/rust/issues/11089, and the decision not to have no_mangle be the default was decided in this 2014 meeting: github.com/rust-lang/meeting-minutes/blob/master/weekly-meetings/2014-01-21.md#no_mangle-for-extern-fns. To quote: "because it breaks the module system. if libraries A and B both define extern functions foo, if you make no_mangle automatic/implcit, then library C cannot link againt A and B simultaneously".
@@jonhoo Thanks for the research. Although, I don't really understand the reasoning. If two libraries would expose the same function they would "no_mangle" them anyways, having the same problem. Also I don't see how an external library wants to link against a mangled function. Isn't the whole purpose of no_mangle to enable this without recovering the changed name?
Yeah, I'm not sure I completely follow it either. I think it comes down to whether extern "C" (or even other externs) without #[no_mangle] is ever useful. I can't immediately think of a use-case, but I also don't work a lot on the FFI side of Rust development. May be worth asking over on the internals forums at internals.rust-lang.org/ for a better answer!
Thanks for giving such wonderful explanation.
What a great pres!
in my opinion, no OOP is not a drawback
Sold! Fantastic presentation.
Best talk on the topic, worth million views,👍
audio dynamics are so bad never seen anything like that. its like sin function applied to dynamics for the whole talk.
Yeah, it's awful. Nearest as I can tell, what I was sent was almost a screen recording of the web broadcast of the talk. And the mic itself seems to have had some very aggressive noise cancellation/dynamic audio tuning applied to it. For what it's worth, I now have my own lapel mic that I'll be using when I give talks in the future :)
Man.. I saw the volume complaints in the comments and skimmed the video thinking "I don't know what they mean, seems fine to me". But sitting here now trying to listen to this is extremely frustrating and distracting. I really hope someone can figure out how to fix the leveling in this video because it's currently pretty damn unbearable. I'm about 4 minutes in and I honestly just can't listen to this anymore. It's like, hurting my brain. 😢 Hopefully you have better luck with your next talk. I'll subscribe and hope for more in the future. Thanks for sharing anyways.. hopefully some other people can work their way through the audio and get something useful out of it.
Yeah, it's really unfortunate. They had proper audio equipment at the venue, but somehow the recording didn't go as planned, so all I was left with was this recording of the webcast of the talk. And, sadly, it turns out that it's quite hard to clean it up. Even if I could somehow though, TH-cam also doesn't let me replace the audio track, so I'd have to upload a new video altogether. I guess here's to hoping I'll do the entire talk again some time! I think it's a little easier on your ears if you keep the volume a little lower, but it's still not great..
Great talk, I'm sold.
Rust has been trying to solve the old programming dilema that back in the 90s JAVA promised to solve. I have used a numbers of programming languages and there is always one language I keep going back to and that language is C. The reason being that other than assembly language you can find a C compiler for it I almost all cases. Again I don’t think languages should be chosen solely on preference but availability and flexibility should be considered before starting any project
Following compiler errors until it compiles again when refactoring completely and utterly sucks. That is donkey work you want the compiler or IDE, something on the computer, to do for you. Programmer productivity is every bit as important as all the speed and safety. Also it is a LOT more safe to not have to do this sort of thing by humans trudging through it.
The IDE can do much of it for you in Rust too, that's not quite what I was getting at. Instead, the fact that so much is checked at compile time in Rust means that even if you have to make large changes (maybe even tool assisted), it's much easier to be confident that you didn't miss something, because the compiler will probably tell you.
Thanks for such an awesome presentation!
Is rust friends with category theory ?
To some extent. The type system supports type inference in the Hindley-Milner style, monadic operators (such as the question mark (?) operator) and combinators are available for most of the built-in algebraic types such as Option or Result. Though type system is not as advanced as in certain function programming languages and currently lacking Generic Associated Types, Dependent Types, Higher-Kinded Types.
If libraries have to be compiled from source does that means people cannot publish proprietary libraries?
Correct. Or rather, you're in the same position as with C++. You can't publish proprietary templates, since the compiler needs the code that is templated to instantiate the template for new types/values. Anything you can expose through the C ABI (so, for example, no generics) you can publish as shared libraries/object files.
Hi, thanks for this wonderful masterclass, but please please if it's possible upload it again with better sound quality, only 20 minutes play and my ears can't take it anymore. Thanks!!
Unfortunately this is the audio I was provided with. I've since bought a lapel mic to use to record future talks myself rather than relying on the capture process, but there's not much to do about this one. If someone had the skills + time to clean up the audio, and it made a significant difference, I might do a re-upload, but I think the audio may just be beyond repair. My suggestion would be to run it at a lower than usual volume and then turn on subtitles :)
@@jonhoo Ok Jon, great! I really liked your talk. Thanks!
@@jonhoo
If you want, I can fix the audio for you. I think youtube still allows reupload of audio without needing to reupload the entire vid and lose all comments and views
@@samuelleeuwenburg No, unfortunately TH-cam won't let you replace any part of the video without a reupload :'( They used to have a limited feature to do this to do soundtracks, but replacement is sadly a no-go.
Just need a serverless framework on top of kubernetes/docker, and rust will the next language to learn (or even better, yet another kube but in rust)
knative
I really like how he say: GO AWAY! :-)
I know python and java but I don't understand the comparisons he is making in the start of his presentation. What topics do those concepts lie under? eg. runtime, gc, buffer overflows, data races, static typing etc.
runtime - processes that run while your program run e.g. garbage collector (gc)
gc - garbage collector automatically frees unused memory in the heap
buffer overflows - a rust array is guaranteed to not exceed its size at compile time
data races - undefined behavior caused by multiple threads having unrestricted access to a shared resource
static typing - variable types are determined and checked at compile time (its opposite dynamic typing checks variable types during runtime).
Thank you for all your videos :)
thank you, very informative overview and special thanks for being objective and including the drawbacks
Great talk. What are your thoughts on #Dlang ?
Do I need to turn down the brightness on my monitor :D I know, it's for projector ;) I have an excuse to wear my sunglasses at night, just like the song
Rust book has an object oriented in Rust chapter
I'm new to Rust and this is a very useful talk and well-presented.
Regarding the drawbacks, it seems that the inability to have pre-compiled libraries might be a big disadvantage. It means you can't hide your source code which is what you'd want to do if you want to sell a library. It doesn't seem like generics is a good enough excuse. Couldn't you just disallow generics across a library interface? Just have a library interface essentially be like a C interface?
Oh, yeah, I think I mention this, but it may not have come across clearly: you can absolutely compile Rust down to a library that uses the C ABI. That means no generics or other Rust-isms in the interface, but it will be binary only and easy to interact with just like C libraries are.
@@jonhoo Thanks for taking the time to answer Jon. Yes, it wasn't clear to me from the presentation especially since @57:00 it says "No prebuilt libraries".
After watching videos and reading about Rust for the past week I really like it a lot. But there was only one thing that really turned me off though you might consider it minor. I don't get why the creators of Rust have to force their favorite style on everyone else. I'm particularly talking about the enforcement of the Egyptian brace style which I dislike. It makes much more sense to line up braces on the left so you can see that your scopes are lined up and your eye doesn't have to go searching for the opening brace who-knows-where at the end of some line. Makes no sense. The other one is the enforcement of snake case on variable names. I've always used camel case for everything (I really dislike underlines. I don't like typing them and it's a waste of a character). Though I can probably live with that more than the brace thing. I'm aware I can get rid of the warnings using an attribute or something. But will using my own style get me ostracized from the Rust community? And I won't be able to use any of the formatting utilities.
I've been doing C++ since the early 90's and traditionally you have to be able to deal with other people's style. I realize the creators of Rust are going for consistency. But I don't see the advantage of Egyptian braces over lining them up on the left.
The language doesn't require that you do either of those, and you can disable the warnings as well if you'd like. You will find that those are both pretty universal in the Rust community, but they are definitely not _enforced_ :) You can also continue to use the standard formatter by changing its settings appropriately.
That all said, the Rust community does seem to favor "do whatever rustfmt says", and I think there is immense value in that. Even though it may not be your particular preference, having a single uniform style helps readability a lot (which is why Go for example does the same).
As for why Egyptian style, that I couldn't tell you. Personally, I prefer to fit more code on screen, so to me the brace on an extra line is wasted space to me. The function signature is already the "start block" for the scope, so why add an additional line at that indentation level? Whether that's the reason it was chosen, I have no idea. I really hope you don't discard a language as a candidate because you don't like how it aligns braces though!
@@jonhoo "to me the brace on an extra line is wasted space to me"
First, you do not need to have an extra line. Just move the opening brace to the next line at the left. Second, white space is a good thing anyway. More so when looking at someone else's code.
I don't like to trust indentation only. It could be off due to extra tabs or spaces.
"The function signature is already the "start block" for the scope"
Well, you don't know that until you go looking for the open brace, which is what really defines the start. And it's harder to notice whether it's there or missing when it's off to the right.
I wouldn't decide not to use Rust just because of formatting. Before that I'll just format it how I want unless I'm working on someone else's code in which case I'll format it like they do. Who knows, maybe I'll start a movement to change the formatting since I think I have a better argument. Now Python, that's a different story. I'm not a Python programmer. But to require a certain white-space indentation to start a block? I can't help saying that was not a good idea and I'll never use Python just for that reason. :)
A brace to the left of indented code? That sounds awful! :p
I guess I just don't have problems with using indentation for this. If all your code goes through the formatter anyway, you know the indentation is always right, and never "off".
This dude has used Python a while ago... Twisted lol Amazing talk btw.
Thanks for sharing this video.
Dang, this seemed like a great talk but it's kinda unwatchable with the audio issues! Please fix!
Unfortunately I cannot replace the audio track on TH-cam once the video has been uploaded. It's also surprisingly difficult to fix an audio stream in such a bad state as this. I now have a lapel mic of my own to properly record future talks :) I would recommend turning the volume down and enabling subtitles.
@@jonhoo I'd use a compressor.
@@jonhoo Thanks for your reply! Will try your recommendation.
Great talk Jon. Thanks a lot.
Guys please help me. With Rust, Can I write real time notifications system with APIs or ecommerce easily? Why dont I find any ecommerce Rust tutorial from scracth? Any help would be appreciated!
easily ? nope . rust is harder than C or C++ . cuz you need to use everything it gives and trust me it doesn't give you too much , barely it supports struct and you need impl stupid thing to connect struct and impl to each OTHER XD
its boring and hard and time-consuming Xd and unless there's some real things being added up there there's no way it can be popular with its hell-ish syntax
wonderful tech talk. very informative and balanced. wish rust was easier to learn though.
Been struggling for a few months, definitely worth it!
I don’t wish that :) I think it forces you to learn about and understand deeper programming and computer science concepts. Which only makes you a better all around programmer, no matter your preferred languages.
@@lyingcat9022 absolutely agree! So many things you gloss over in other language rust forces you to confront. Plus it feels great to write once you get better
@@driedurchin Just give it time, and don'† give up. Rust is not intrinsically complicated, but has some new ideas that takes time to learn properly.
I learned "it" (actually the concepts present in Rust) in C++ already - the hard way 😐
Wave sounds. Sad when a talk seems quite nice. Enjoy!
Cool! Thank you
Please make learning videos on rust.
He does. Check out his yt profile.
I bet, when there is a security vulnerability in moria one day, it will be called balrog :D
Most likely! :-)
@@Deukapi where did you heard such a thing xD
@@Deukapi Can you elaborate this in detail :D
great talk thanks jon
Huge C++ libraries are a bother in C++ itself
True lol
Rust is the only language that's verbose and terse at the same time.
Verbose is not always a bad thing. Powershell is a heck a lot more verbose than bash, but it’s more readable and easier to write.
awesome intro for Rust
I want to use it but I can't stand its cryptic syntax and overuse of symbols and wierd prebuild names.
Syntax is tricky, because you sort of need syntax to be able to express additional concepts in the language. For example, Go has simpler syntax than Rust, but it also does not have many of the features that Rust has. Generics for example _basically_ requires introducing syntax. I think Rust strikes a good balance, but it's true that there is some syntax you'll have to get used to when you start out. Overuse of symbols is related to this, though I don't think Rust is a particularly egregious offender there?
Not sure what you mean by "weird prebuild names"? Rust mangles names by default, that's true, but that's a very common (and sane) practice these days in modern languages.
The syntax is just too complex to be called a 'productive' language. I wish the syntax could be simplified someday. But the idea of memory safety offered by this language is awesome.
wot
Great talk!
#amflearningbydoing #amflearning #rust is awesomeeee
I would not call them drawbacks, but dev opportunities
Who is this person licking the insides of my skull for the entire talk? xd
Can someone please suggest link for learning rust for someone without any prior knowledge about programming.
That is hard thing to do, but if you decide to do so, good luck!
This should be a good starting point: dhghomon.github.io/easy_rust/Chapter_1.html
EDIT: I highly suggest you also follow along a tutorial video series, like "Let's Get Rusty"'s series: th-cam.com/play/PLai5B987bZ9CoVR-QEIN9foz4QCJ0H2Y8.html
@@ゾカリクゾ thank you very much