Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(docs): preflight and inflight concepts #3173

Merged
merged 6 commits into from
Jul 2, 2023

Conversation

Chriscbr
Copy link
Contributor

@Chriscbr Chriscbr commented Jun 29, 2023

First pass at rewriting of the concepts doc page on preflight and inflight. The goal is for this doc to be educational but functional, so I started with trying to motivate the concept as quickly as possible (avoiding marketing / history lessons / manifestos about the future of cloud / pitches about the right way to build applications), though I'd be interested in any feedback / suggestions for improving this intro. (We could also remove the intro entirely, and it might actually be better?)

After I tried to come up with a path that goes through the major "mechanics" where the sequence of ideas and code snippets hopefully didn't depend too much on too much knowledge about the standard library resources or about Json or optionals etc. I'm also interested in any suggestions for tightening this up / coming up with better examples etc. Since we don't distinguish against capturing reassignable variables or mutable collections as of #3064, I didn't go into much depth about what types of values can be lifted.

Also I moved the content about resource identifiers into the "application tree" doc.

Checklist

  • Title matches Winglang's style guide
  • Description explains motivation and solution
  • Tests added (always)
  • Docs updated (only required for features)
  • Added pr/e2e-full label if this feature requires end-to-end testing

By submitting this pull request, I confirm that my contribution is made under the terms of the Monada Contribution License.

@ShaiBer
Copy link
Contributor

ShaiBer commented Jun 30, 2023

Hey @Chriscbr, great work!
It is really amazing how similar problems give birth to similar solutions :) my preflight-inflight tutorial contains very similar flow and code examples to your doc (also starting with preflight, moving to inflight and then how to reference preflight from inflight. It also focuses on the bucket's addObject versus input method) .
I'm going to take some things from your doc into the tutorial, like explicitly explaining why inflight code can only call inflight code and preflight can only call preflight.
You might want to take some things from the tutorial version too, like a shorter intro that dives more quickly to the jist of it, or an advanced section that explains more what the compiler does to enable the inflight and preflight interactions. Also a brief discussion about mutability.
One thing I haven't added to the tutorial yet that I think is also relevant here is a TLDR section, or cheat sheet with the main rules and takeaways.
You can see the tutorial here. It's not complete yet and the mutability section needs a complete overhaul thanks to Eyal's change :) but I'd love to get feedback on it and maybe we can then have a session to see how the two can become even more similar. They should also link to each other.

@Chriscbr
Copy link
Contributor Author

@ShaiBer Thanks for the suggestions. I shamelessly stole some text from your tutorial from the intro (I liked it better than my intro) and also reordered some of the ideas of the doc better based on the tutorial.

@ShaiBer
Copy link
Contributor

ShaiBer commented Jun 30, 2023

Hehe no shame @Chriscbr , I bet in the end I'll steal more from you than you stole from me :)

@mergify
Copy link
Contributor

mergify bot commented Jul 2, 2023

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 714122a into main Jul 2, 2023
4 checks passed
@mergify mergify bot deleted the rybickic/preflight-inflight-docs branch July 2, 2023 10:59
@monadabot
Copy link
Contributor

Congrats! 🚀 This was released in Wing 0.23.8.

revitalbarletz pushed a commit that referenced this pull request Jul 3, 2023
First pass at rewriting of the concepts doc page on preflight and inflight. The goal is for this doc to be educational but functional, so I started with trying to motivate the concept as quickly as possible (avoiding marketing / history lessons / manifestos about the future of cloud / pitches about the right way to build applications), though I'd be interested in any feedback / suggestions for improving this intro. (We could also remove the intro entirely, and it might actually be better?)

After I tried to come up with a path that goes through the major "mechanics" where the sequence of ideas and code snippets hopefully didn't depend _too_ much on too much knowledge about the standard library resources or about `Json` or optionals etc. I'm also interested in any suggestions for tightening this up / coming up with better examples etc. Since we don't distinguish against capturing reassignable variables or mutable collections as of #3064, I didn't go into much depth about what types of values can be lifted.

Also I moved the content about resource identifiers into the "application tree" doc.

## Checklist

- [ ] Title matches [Winglang's style guide](https://docs.winglang.io/contributing/pull_requests#how-are-pull-request-titles-formatted)
- [ ] Description explains motivation and solution
- [ ] Tests added (always)
- [ ] Docs updated (only required for features)
- [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing

*By submitting this pull request, I confirm that my contribution is made under the terms of the [Monada Contribution License](https://docs.winglang.io/terms-and-policies/contribution-license.html)*.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants