Тёмный

Constant fun (const fn) with Rust - Rainer Stropek - Rust Linz June 2022 

Rust
Подписаться 64 тыс.
Просмотров 19 тыс.
50% 1

Everybody knows constants from other programming languages. But as so often, Rust is different and knows a lot of tricks regarding constants that other languages don't. Rust's const fn recently got new features (v1.61), so we decided to do an overview session about consts in Rust. This is a beginner-friendly session for people who are starting with Rust or haven't taken a deeper look into constants and const fn in Rust.

Наука

Опубликовано:

 

4 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 32   
@abduljabbarazam943
@abduljabbarazam943 2 года назад
This is the first time I have actually understood the const fn stuff. Very informative video. Thanks
@devonduty
@devonduty 2 года назад
Rainer, I absolutely love your presentation style, clear, concise and easy to understand! Keep up the great work you're doing for the Rust community!
@nirmalyasengupta6883
@nirmalyasengupta6883 Год назад
And, the enthusiasm that he wears, during the presentations. One cannot but gets drawn into the subject. I too, love your presentations, @Rainer.
@CodingHaribo
@CodingHaribo 2 года назад
What an incredible world! So much app initialisation startup time can now be removed and be pre-compiled! Yet another mechanic of rust that makes it wasteless and amazing!
@williamdroz6890
@williamdroz6890 2 года назад
Rainer is so good at teaching. Thank you and please continue :)
@peter9477
@peter9477 Год назад
I hadn't realized i could get around the inability to include a for loop by using while... I just assumed it was all loops that weren't handled in const functions. Thanks!
@darklajid
@darklajid 2 года назад
I absolutely love the content. That being said, I do wonder if there's a way to censor / blur the WhatsApp notification as 28:28? It's unfortunate that it came up, but worse for me is: It's giving away the name of someone unrelated to the video and (as a German) it's .. unfortunate/private information shared in the text. I'd expect that the person sending the text would prefer it to not show up on RU-vid (but then again, maybe Rainer cleared it with her).
@RustVideos
@RustVideos 2 года назад
Thank you for pointing that out, we totally missed this. We blurred the notification.
@masiarek
@masiarek 2 года назад
Thank you. Great to have a beginner friendly tutorial.
@joelmontesdeoca6572
@joelmontesdeoca6572 2 года назад
You give such great talks/tutorials. Thank you!
@jingzhang1875
@jingzhang1875 2 года назад
That's totally awesome! It really easy to catch and I did learn quite a lot!
@LeandroCoutinho
@LeandroCoutinho 2 года назад
Amazing stuff Rainer!
@sovrinfo
@sovrinfo 2 года назад
Great video. Thanks you a lot!
@-tsvk-
@-tsvk- 2 года назад
What are the performance differences between const function executions at compile time vs. regular run time (both unoptimized and optimized builds)? Let's say I have a very time-consuming const function that evaluates some mathematical/numerical calculation stuff (execution time in tens of minutes). Is the compile-time execution of that code as performant as an optimized release build running the same code at run time normally would be?
@TheBestTvarynka
@TheBestTvarynka 2 года назад
I love this explanation 🔥
@awilliamwest
@awilliamwest 2 года назад
Love the title! And I'm loving your channel; perhaps inspired to take Rust seriously! (We shall see...)
@Amejonah
@Amejonah 2 года назад
My reaction to this: 🤯😍
@uwuwgrhdhwj
@uwuwgrhdhwj 2 года назад
Excellent video
2 года назад
Great video! I'd be nice some extra levels of zoom to be more phone friendly.
@victorfds
@victorfds 2 года назад
So Good!
@yhuty929
@yhuty929 2 года назад
does anyome know what's the extension to show warnings and errors after a statement?
@yhuty929
@yhuty929 2 года назад
find it, it's error lens.
2 года назад
Scratching my head when I heard "const Mutex"... Oh it was static constructed at compile time!
@dragonmax2000
@dragonmax2000 2 года назад
Hello Rainer, awesome talk. Would you be kind to share the git repo with samples, here?
@thanatosor
@thanatosor 2 года назад
so const fn mean "constant fun" ? Nice. god bless us.
@dpeklak
@dpeklak 2 года назад
Toller Vortrag, vielen Dank!
@AdlerWeber
@AdlerWeber 2 года назад
Will for-loops eventually be available in const fns? Why isn’t this possible now?
@RecursiveTriforce
@RecursiveTriforce 2 года назад
He said for loops just call Iterator::next. An iterator has no constant length. It could even have infinite length. From context you can often deduce a length but the compiler doesn't try to.
@Artentus
@Artentus 2 года назад
To be able to do that two things are required: constant trait implementations and mutable references in constant functions. Both of those already exist as unstable features on nightly. Once both of them are stabilized for loops can be worked on.
@milomoisson
@milomoisson 2 года назад
Just for the title joke, I'll watch it...
@dorktales254
@dorktales254 2 года назад
Even more reasons why Rust is criminally too good
@smaplessmap5355
@smaplessmap5355 8 месяцев назад
So immutables are completly useless right? Over this immutable and mutable should be switched!, cause reusing variables occurs a lot more! Rust feels unnessesary complicated and confusing!
Далее
Rust Before Main - Ryan Levick - Rust Linz, July 2022
31:34
skibidi toilet multiverse 042 Trailer
01:57
Просмотров 2,6 млн
Пчёлы некроманты.
00:46
Просмотров 19 тыс.
RustConf 2023 - The Art and Science of Teaching Rust
28:01
A const int is not a constant.
9:16
Просмотров 68 тыс.
Rust Functions Are Weird (But Be Glad)
19:52
Просмотров 136 тыс.
Rust's Witchcraft
9:18
Просмотров 181 тыс.
Умный обзор умного iPhone 16 / 16 Pro
21:21
Mac USB
0:59
Просмотров 27 млн