C++Now 2017: Niko Matsakis "Rust: Hack Without Fear!"

  Рет қаралды 60,706

CppNow

CppNow

Күн бұрын

Пікірлер: 57
@atommixz
@atommixz 7 жыл бұрын
The best video that explains the features of Rust. Everything is clear even without clear knowledge of the English language. Thank you very much!
@yupeiliu4383
@yupeiliu4383 7 жыл бұрын
An excellent video to learn Rust for C++ programmers.
@SiddharthKulkarniN
@SiddharthKulkarniN 5 жыл бұрын
What is I don't know C++
@oss4maz
@oss4maz 7 жыл бұрын
One of the best Rust talks out there, as a js fanatic myself, i finally found a systems programming language i can understand and use without fear of fucking things up lol
@jonathanrowlands1147
@jonathanrowlands1147 7 жыл бұрын
Excellent talk. The speaker was clear and concise. I've dabbled a bit in rust but never really looked much into parallelism features. The qsort example is really neat. The || syntax threw me off for a minute before realizing that it is just a closure!
@lppedd
@lppedd 6 жыл бұрын
First time I read |_, _| I was like "what the fuck is that??". Than it becomes clear.
@ArpitAgarwal1
@ArpitAgarwal1 6 жыл бұрын
This was a great talk for c++ programmers(intermediate) to learn about rust basics. It made me understand how I can start using rust
@thingsiplay
@thingsiplay 3 жыл бұрын
Listening to "Niko Matsakis" is just a joy.
@Dweepnes
@Dweepnes 7 жыл бұрын
Suddenly lifetimes do not look so scarry.
@Al-wt5kf
@Al-wt5kf 5 жыл бұрын
This helps me to write better C++ code, well prepared presentation!
@IvarsRuza
@IvarsRuza 6 жыл бұрын
Nice talk! Liked it a lot. I thought at one moment Niko will have heart-attack! Niko was so thrilled about Rust.
@fungiside
@fungiside 7 жыл бұрын
Fantastic talk!
@theplanebrain
@theplanebrain 11 ай бұрын
This is honestly, truly, mind blowing and amazing. Everything boiled down to what "you learned in Kindergarten". Just about.
@melvyniandrag
@melvyniandrag 7 жыл бұрын
Great talk, I've been wanting to learn about rust for a while. I feel weird about these talks about language B at a language A conference, though. At the Scipy conference there is always a small crowd talking about Julia. Kind of weird I think.
@distrologic2925
@distrologic2925 5 жыл бұрын
I really like this guys talks!
@DrewryPope
@DrewryPope 2 жыл бұрын
i love the early description of editions
@ThrashAbaddon
@ThrashAbaddon 4 жыл бұрын
You know it is a good talk when people interrupt you because they want to know more
@cgoobes
@cgoobes 7 жыл бұрын
Wow, c++ needs the package manager library thing.
@alexandrpirogov2895
@alexandrpirogov2895 7 жыл бұрын
Conan.io is trying to fill this gap
@bit2shift
@bit2shift 6 жыл бұрын
You won't see adherence from embedded system developers.
@climatechangedoesntbargain9140
@climatechangedoesntbargain9140 5 жыл бұрын
vcpkg
@loomismeister
@loomismeister 5 жыл бұрын
I think the cargo system, combined with its build system and single compiler, is one of rusts biggest weaknesses.
@ThrashAbaddon
@ThrashAbaddon 4 жыл бұрын
vcpkg is one really good cross platform package manager. I'm using it on win10 and it works great. In two commands you can download c++ package and install it, and then just #include it inside visual studio. This is great for just checking out if some library is ok. Try it out. :)
@informant09
@informant09 7 жыл бұрын
Really, really good talk !!
@mduckernz
@mduckernz 7 жыл бұрын
Excellent talk! :)
@mybigbeak
@mybigbeak 6 жыл бұрын
I watched this talk whwn it first came out. it was good to watch again now I'| more familiar with the language. and see it still taught me some stuff
@rafaelkss2009
@rafaelkss2009 7 жыл бұрын
Brilliant question made by 2nd guy. "Everything was a good idea back in the day". Now C++ syntax is garbage mostly due to retro compatibility and bad ideas.
@jianliuhu7882
@jianliuhu7882 6 жыл бұрын
Excellent Talk!
@evans8245
@evans8245 4 жыл бұрын
damn, i love it, i finished the book
@totoplopp6630
@totoplopp6630 7 жыл бұрын
Who here just started coding and doesn't get any of this stuff but is still super fascinated too?
@TheDuckofDoom.
@TheDuckofDoom. 7 жыл бұрын
Yeah catering to decades of old code can be quite an anchor. I like the epoch system described. Python should have pushed for the explicit use of #!/bin/python2 or ...python3 as a preferred style so the two interpreters can live on the same machine without the need for the user to call either of them to run a particular script. ( most 'nix machines already install the interpreters like this "/bin/python" just sim-links to one of them and the other must be used explicitly)
@PaulTopping1
@PaulTopping1 Жыл бұрын
Interesting but wouldn't the C++ publish function pass the vector by reference? Not sure what publish does but surely you don't want to copy the vector.
@traister101
@traister101 11 ай бұрын
That wasn't the point of the example. The point was to demonstrate ownership. Publish wants to own the book. In C++ the book is copied and _that copy_ is owned. You could move the book into the function but that leaves the book variable you moved out of in a invalid state, yet nothing stops you from messing with it. In Rust using the original book variable after you moved it (transferred ownership in Rust terms) *is a compile error*. If publish should only read from the book both languages have similar behavior there, a reference to const in C++ or a borrow in Rust.
@psna70
@psna70 7 жыл бұрын
at 34:50, the for loop should be 'for elem in self.iter()', not just 'for elem in self'.
@daboross2
@daboross2 7 жыл бұрын
I believe this actually will work as it is, because IntoIter is implemented on `&Vec` such that it iterates over `&T`
@psna70
@psna70 7 жыл бұрын
IntoIter is not the same thing as Iterator. You need to call .into_iter(), .iter(), or .iter_mut() to actually create the iterator. How does the Vec, or &Vec keep track of where it is in the iteration? It doesn't, the iterator that .iter() creates does, however, so you can actually iterate.
@daboross2
@daboross2 7 жыл бұрын
Yes, I agree with you here, but the way a `for in` loop works is by calling IntoIter::into_iter then iterating the result. this is a no-op for things already iterators, and then makes it also work with &Vec, etc.
@daboross2
@daboross2 7 жыл бұрын
See play.integer32.com/?gist=d08c439348a3101ddfda76b1b0f9de2e&version=stable
@psna70
@psna70 7 жыл бұрын
David Ross yea I must agree actually, I was wrong here. I've always called the iter methods manually, so I guess I just assumed that for only worked on actual iterators.
@minecraftermad
@minecraftermad 4 жыл бұрын
Ok but is the rust compiler turing complete?
@TheMrKeksLp
@TheMrKeksLp 4 жыл бұрын
Rust has proc macros which allow you to modify subgraphs of the AST at compile time. A bit better than just "turing complete"
@TheDuckofDoom.
@TheDuckofDoom. 7 жыл бұрын
Sounds snazzy. Uphill battle though, there is a good chance it will be overtaken by C++17 or 20 though as the C++ team has been adding many modern features that compete in the same realm, and Rust is not that different. (ie HDVD vs Blueray) Also Rust must become established which means splitting the existing pie into yet smaller pieces, getting into education, proven compiler reliability and efficiency etc.. Meanwhile C++ has the established bit in the bag, with well-refined compilers and all the works, ++ only needs to add a few features to match a most of what Rust can do. (as long as the needed features get in to one of them its a win, I don't really care which name is on the language)
@syntaxed2
@syntaxed2 6 жыл бұрын
Rust is 2 years old...pretty sure people said the same thing about C++ at such early life .
@ianhamilton350
@ianhamilton350 6 жыл бұрын
The rust compiler uses LLVM as the back end so it's at least as reliable and efficient as Clang
@climatechangedoesntbargain9140
@climatechangedoesntbargain9140 5 жыл бұрын
actually C++ will even have better compiler enforced safety: while rust only has unsafe, C++ will gain more granular tags, which allow more specific control
@heater5979
@heater5979 5 жыл бұрын
Yes, it's great to see C++ adding modern features. Type deduction, lambdas etc. But good grief, C++ has become massively complex. With a syntax and semantics so huge contorted that I don't believe there is a single person in the world that knows and understands it all let alone how all all the parts work together. That's before we start talking about the standard library. Certainly the compiler writers don't, if they did their error messages would actually be useful. But anyway, I think you are wrong. Certainly you can add some more features to C++ to match a lot of what is in Rust, BUT I suspect it's impossible to add the most important feature of Rust to C++, the assurance of correctness and safety. The prevention of all those buffer overflows, use after frees, null pointer errors, use of uninitialized variables, memory leaks, data races, switch fall thoughs, undefined cases, etc, etc, etc. Sure you can achieve such safety in C++ if you try hard enough. Why not let the compiler do all that checking work for you? I'm not totally sure but I think it's impossible with the C++ syntax and would require changing the semantics so much it would fail to compile most existing C++ programs. Ain't going to happen.
@bytefu
@bytefu 5 жыл бұрын
@@climatechangedoesntbargain9140 Yeah, great. And I will be a much better programmer in the future, so hire me, Google. I am tired of that never ending talk about what C++ will have in the future. It is complicated enough already, and it lacks basic safety features that Rust has _right now_, not tomorrow. I was shocked when I checked the C++ vector example and it compiled without even a warning, and then of course crashed when run. Come on man, stop living in a dream. How much time is needed to not only implement all the safe features for C++ but also to standardize them? Waiting another 10 years does not look like a viable option to me. And even if it all comes out tomorrow, what's the point? C++ will still have an enormous historical baggage that you cannot easily throw away, so it will never be as good as a language that was developed from scratch with C++ problems in mind.
@TechnologyRules
@TechnologyRules 4 жыл бұрын
Talk start at 0:55. Thank me later
@helkat9876
@helkat9876 5 жыл бұрын
C++ suuuucks
@TheamxxL
@TheamxxL 5 жыл бұрын
A C++ is not guilty for being used by noobs.
@ianakotey
@ianakotey Жыл бұрын
​@@TheamxxLThis is just as problematic as the original comment. Everyone is a noob when they touch programming for the first time, no matter the language. So, you're saying C++ should "not be for noobs"?
@TheNovakon
@TheNovakon 5 жыл бұрын
19:49 - Clone and copy semantics in RUST is horrible idea. Especially when primitives are not moved... I've found std::move more viable.
@dynfoxx
@dynfoxx 4 жыл бұрын
You don't need to know or care if a type is copy. Since copy acts as a move just cheaper. I maybe wrong but it seems a lot more straight forward than having to worry about std::move.
Niko Matsakis - Rust: Putting Ownership to Use
38:19
Curry On!
Рет қаралды 17 М.
Type Theory for Busy Engineers - Niko Matsakis
51:01
Rust Nederland (RustNL)
Рет қаралды 8 М.
Кәсіпқой бокс | Жәнібек Әлімханұлы - Андрей Михайлович
48:57
Learning Rust the wrong way - Ólafur Waage - NDC TechTown 2022
51:54
NDC Conferences
Рет қаралды 105 М.
-memory-safe C++ - Jim Radigan - CppCon 2022
1:05:45
CppCon
Рет қаралды 22 М.
Rust Data Modelling Without Classes
11:25
No Boilerplate
Рет қаралды 174 М.
[UPDATE] Mojo Is Faster Than Rust - Mojo Explains More
52:09
ThePrimeTime
Рет қаралды 265 М.
RustConf 2023 - How Powerful is Const
22:58
Rust
Рет қаралды 15 М.
8 deadly mistakes beginner Rust developers make
14:14
Let's Get Rusty
Рет қаралды 169 М.
From C ➡️ C++ ➡️  Rust
14:06
code_report
Рет қаралды 170 М.
Rust: A Language for the Next 40 Years - Carol Nichols
55:08
ChariotSolutions
Рет қаралды 359 М.