I happened to chance upon your videos on reddit. i had a hard time learning about macros from the book, and the clarity of your explanations is simply amazing. thanks for all the tutorial videos! they are of tremendous help! I can't wait for your subsequent videos.
@@_schwm cant wait for tutorials about basic and advanced use of traits (blanket implementaitons, trait objects etc) and generics. Your examples and way to explain things are very very catchy.
Thank you SOOOO MUCH for making this! The topic of proc-macros was intimidating for me to even approach because of my perceived difficulty and complexity of them. With how concise and clear this is written and done, and even explaining all the nuisances, and the reasoning for each part, it really makes proc-macros way more approachable! Huge thanks for taking the time to write and record this, its a HUGE help to get a understanding of what they really are, and how to start writing them~
@0:20 Function-like macros can also be procedural, though all declarative macros are function-like. Declarative macros are macros defined via macro_rules! and procedural macros are defined via proc_macro and run arbitrary Rust.
Excellent explanation! Thank you. Just a bit too fast for me. Felt like some seconds in between the concepts where needed for thinking. Ofacause pause is an option.
let me explain it by oversimplifying. `#var_name` is a special syntax for `quote::quote!` to generate code with variables that come before it. if your variable outside `quote::quote!` is a very simple type like string or integer, then inside `quote::quote!`, you can simply use `#var_name`. but, if `#var_name` is an array or vector, you should use `#(#var_name),*`, and possibly wrap it inside a `vec![]`. the reason why you do this if `#var_name` is a vector or array is because, while you're generating code, you need to iterate over each element inside `var_name`. so you can say `#(),*` is like a for-each loop while generating code.
Clear language, high level of explaining and simple to understand, neat slides. Liked and Subscribed.
Keep up the good work mate!
Really good video - with syn and quote, writing powerful macros is more effortless.
I happened to chance upon your videos on reddit.
i had a hard time learning about macros from the book, and the clarity of your explanations is simply amazing.
thanks for all the tutorial videos!
they are of tremendous help!
I can't wait for your subsequent videos.
Thank you so much. 😊
proud of finding this very good quality channel this early
Thank you. 😊
@@_schwm cant wait for tutorials about basic and advanced use of traits (blanket implementaitons, trait objects etc) and generics. Your examples and way to explain things are very very catchy.
same here. Rust... so much to learn, so interesting.
Short and easy to understand! Thank you very much!
Thank you SOOOO MUCH for making this!
The topic of proc-macros was intimidating for me to even approach because of my perceived difficulty and complexity of them.
With how concise and clear this is written and done, and even explaining all the nuisances, and the reasoning for each part, it really makes proc-macros way more approachable!
Huge thanks for taking the time to write and record this, its a HUGE help to get a understanding of what they really are, and how to start writing them~
You're so welcome! 😊
This is quality content. You explained the things which I considered complex with a simple example and easy words.
Nice video, waiting for more on attribute and function macros
Will be there in next 5 weeks I believe. Thank you. 🩶
Forgot to inform, it's been out.
Hello folks. Now we have a Discord server as well: discord.gg/uu8a5GjMg4 🙃
@0:20 Function-like macros can also be procedural, though all declarative macros are function-like. Declarative macros are macros defined via macro_rules! and procedural macros are defined via proc_macro and run arbitrary Rust.
These are awesome.
This is really amazing tutorial! I also stumbled upon it in reddit. Great job! thank yo uso much!
Thanks for watching. ☺️
Awesome video!
thanks! you deliver a very clear explanation.
awesomeeee 👏👏👏👏👏👏👏👏👏👏👏
you are awesome!
Very good!!
Thank you.
Thanks for the vid! Can you tell me what color scheme you're using? It's very pleasing.
Excellent explanation! Thank you. Just a bit too fast for me. Felt like some seconds in between the concepts where needed for thinking. Ofacause pause is an option.
thank you 😊
You're welcome 😊
Seems like visual studio is fighting you: you constantly have to clear out where it’s trying to be helpful
3:03 What is that terminal?
It's fish and tide. After you install fish, you can install fisher (fish package manager) and then tide here: github.com/jorgebucaran/awsm.fish
What kind of sorcery is this!!??
Unless you don't want to generate some code, writing macros is totally optional. So, a sorcery you can ignore indeed, my friend.
love me pls😇
Here I go. 😊
I followed allong until the !vec[#(#field_idents),*] syntax, that made my brain unhappy
let me explain it by oversimplifying.
`#var_name` is a special syntax for `quote::quote!` to generate code with variables that come before it.
if your variable outside `quote::quote!` is a very simple type like string or integer, then inside `quote::quote!`, you can simply use `#var_name`.
but, if `#var_name` is an array or vector, you should use `#(#var_name),*`, and possibly wrap it inside a `vec![]`.
the reason why you do this if `#var_name` is a vector or array is because, while you're generating code, you need to iterate over each element inside `var_name`. so you can say `#(),*` is like a for-each loop while generating code.
@@_schwm sum it up is just way to make vec with field identifier strings in it. I just hate the syntax...
Thank you 😊