Comments (6)
As for this being an introduction or not: I imagine you have a full day, so 5-6 hours to play with.
I was thinking of half a day. Concurrency in the morning as before, then Async in the afternoon. In any case pinning is too complicated :)
Yes, that would make sense if the material is light and fits. I'm thinking it won't actually fit and so we should prepare to use the full day.
That would match the current thinking of creating small spin-off courses for special topics. That was touched upon here.
But we'll see as the material gets written
from comprehensive-rust.
I just looked through my Rust books, and most don't actually cover async/await. The one that does is Rust for Rustaceans. Its ordering is similar to what's given above: it starts with polling, then futures, then a long section on pinning, then wakers and context, and finally spawning and tasks. I don't think that's appropriate for an introductory course, especially for the very end of one -- nobody's going to have headspace left to grok Pin at the end of day 4.
Instead, I think we should go in the opposite order, and start with an async fn
with some .await
's in it. From there we can drill down a little into futures and executors. A brief "how does it work" can cover polling, pin, and context/wakers, with acknowledgement that the coverage is incomplete. Finally, we can talk a bit about a few of the features corresponding to those in the thread concurrency chapter, as long as that's not too specific to any one runtime.
What do you think? I've gotten a start on this and I'll put up a PR shortly.
from comprehensive-rust.
I totally agree that for an introductory course it is better to avoid going into the details of pinning and polling. I think we could base the course materials on the first few chapters of https://rust-lang.github.io/async-book/, possibly, sections 1, 3, 4 and 6. But I have only skimmed through the book. I think that is more or less what you are suggesting :)
from comprehensive-rust.
nobody's going to have headspace left to grok Pin at the end of day 4.
it is better to avoid going into the details of pinning and polling
Yeah, I agree with that — I don't feel I fully understand pinning myself, but that doesn't stop me from writing async Rust code 😄
When writing this, be careful to avoid forward references. That is, try to apply a principle of showing things in a way that builds upon previously shown content. I didn't do that very strictly in the main course and I would like to start reorganizing it to follow this principle. Since this is new material, you have the chance of applying it from the beginning.
As for this being an introduction or not: I imagine you have a full day, so 5-6 hours to play with. I hope that is enough to let people get their hands dirty with some actual code. Maybe it could be useful to find a nice exercise and then work backwards to figure out what needs to be covered for people to solve it. I bet that pinning won't be super important then.
from comprehensive-rust.
When writing this, be careful to avoid forward references.
Very good point. Will keep this in mind.
As for this being an introduction or not: I imagine you have a full day, so 5-6 hours to play with.
I was thinking of half a day. Concurrency in the morning as before, then Async in the afternoon. In any case pinning is too complicated :)
from comprehensive-rust.
Done, thanks to the great work of @djmitche, @rbehjati, and @sakex!
from comprehensive-rust.
Related Issues (20)
- Inconsistent text in CR2 HOT 3
- Moving too quickly between pages on the popped-out "speaker notes" window resets to non-notes view HOT 1
- Do not text wrap links HOT 3
- Eliminate horizontal scrolling in rust code blocks HOT 14
- 404 page breaks translations
- Question about "Speaker Notes" in Destructuring page HOT 2
- Error-handling crates slide should be split HOT 1
- Spanish version HOT 1
- Update translation instructions on manipulating `.po` files
- Verify and prune CODEOWNERS list for translations HOT 2
- concurrency: Avoid `1..ROUND_NUMBER` loops HOT 1
- Cannot search for "`From` and `Into`"
- `From` and `Into` slide should emphasize losslessness and infallibility
- `let`...`else` example should demonstrate denesting HOT 1
- syntax: explain that rust pervasively allows separators to be used as terminators
- Call out `Neg` trait in speaker notes
- cortex-m-rt 0.7.4 has been yanked
- Possible clarification in chapter "6.2.1. for" HOT 1
- Page `Exercise: Iterator Method Chaining` rust code not rendering HOT 1
- Most code snippets don't work anymore HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from comprehensive-rust.