# Vision²
aka, so you want to visioneer
(nikomatsakis, tmandry)
---
## Sound familiar?
You see a big opportunity: a change that could have big impact.
<img src="https://i.imgur.com/TcEq03e.png" width="50%" alt="big idea"/>
----
But there are a lot of details to work out.
<img src="https://i.imgur.com/UOoAwX1.jpg" width="50%" alt="big idea"/>
----
And a lot of stakeholders, each arguing for something different.
<img src="https://i.imgur.com/Ft3ltHp.png" width="50%" alt="arguing"/>
---
## You might need a vision doc.
![You want vision? I'll show you f*** vision](https://media.giphy.com/media/mXuPwP0kxQqvu0M168/source.gif)
---
## Vision docs...
* ...can help us scale up open source design.
* ...can help us stay focused on our *goals*.
* ...can help us find alignment.
* ...are hard to do.
* That's where this presentation comes in!
---
## Let's go back to January...
![shane](https://i.imgur.com/szGRn1L.png)
Shane: "Let's talk about what Rust should be like in a few years!"
----
Me, at the time:
![geordi](https://media.giphy.com/media/XevlqTyQdJ9BP4TvKS/giphy.gif)
----
Me, a few days later:
![hard](https://media.giphy.com/media/xT5LMChMaNFBasBSRW/source.gif)
----
## Why was it hard?
* What are the most imp't problems?
* Complex space, too much for one person
* Little consensus, distinct subcommunities
---
## Idea: Let's build it together
<!-- ![powers combined](https://media.giphy.com/media/5n1U4FcDhhe81fvtw3/source.gif) -->
----
### What are the most imp't problems?
* Status quo narratives help you understand
----
### Complex, too much for one person
* Survey and assemble the bigger picture
* Engage stakeholders directly
* let them tell us what's important
----
### Little consensus
* Lift the focus from the details to the impact
---
## Shiny future I see
![bill & ted future](https://i.imgur.com/j8u3owD.png)
----
### Active projects of a certain scope develop a vision doc
* Async
* *(workin' on it...)*
* Const generics and const evaluation
* *(workin' on it...)*
* Embedded?
* Error handling?
* FFI and interop?
----
### People can use vision docs to see where Rust is going
"Ah, I can't wait for that version of Rust."
----
### Team members can use vision docs to place an RFC in context
<!-- ![Puzzle piece](https://media.giphy.com/media/3o6MbiSP9CgHbWtWVO/source.gif) -->
"OK, I see what we're trying to do and how this gets us there."
---
## Parts of a vision doc
* Characters and projects
* Status quo
* Shiny future
---
### Cast of characters
* **Alan**:
* coming from a GC'd language
* **Grace**:
* experienced systems programmer
* **Niklaus**:
* new to programming
* **Barbara**:
* Rust expert
----
### :star-struck: SO BEAUTIFUL :star-struck:
| Name | Bg | Has | Wants |
| --- | --- | --- | --- |
| Alan | GC'd | :bank: Safety | :racehorse: Perf. |
| Grace | C++ | :racehorse: Perf. | :bank: Safety |
| Niklaus | New | :tada: Excitement | :heart: Community |
| Barbara | Rust | :100: ...it all! | :100: Fits well |
----
### Goal for characters, projects
Help us quickly assess if we're still aligned with core values of Rust.
"But wait, if the Widget is Send, we just messed it up for Grace!"
![Killed kenny](https://media.giphy.com/media/WieqsBQwFzOy4/source.gif)
---
## Status quo stories
From [Alan needs async in traits](https://rust-lang.github.io/wg-async-foundations/vision/status_quo/alan_needs_async_in_traits.html):
*Alan is working on a project with Barbara. He is working on abstracting away the HTTP implementation the library uses.*
----
*Alan tries to create the async trait:*
```rust
trait HttpClient {
async fn perform(request: Request) -> Response;
}
```
----
*When he tries to compile this, he gets the error:*
```
--> src/lib.rs:2:5
|
2 | async fn perform(request: Request) -> Response;
| -----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| `async` because of this
|
= note: `async` trait functions are not currently supported
= note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
```
----
Story goes on to tell:
* How he tries the async-trait crate
* Learns how it works
* Tries to support a `#[no_std]` environment
* ...and ultimately fails
----
### Key points about status quo
* Describe current experience in narrative form
* Include *specific details* -- stay true to life!
* If covering controversial things, stick to the facts, describe what character experiences
* Can involve multiple characters
----
### Don't skip the status quo
![but I wanna](https://media.giphy.com/media/3o6Mb7bLHwGmwTxl3a/source.gif)
----
### Status quo writing sessions
Organizing group writing sessions can be really fun:
* One person driving, shared hackmd
* Other people sharing their experiences
* Start with rough overview with major points
* Try to knit them together into a story
* If you get stuck, ask someone:
* What did you do then?
---
## Shiny future
----
![hard](https://media.giphy.com/media/xT5LMChMaNFBasBSRW/source.gif)
----
### Missing step: organizing status quo stories
* Group things into the biggest problems
* Brainstorm the possible solutions to those problems
* without diving into too many details
----
### Explore the space
* Not sure how something should be?
* Write it out multiple ways!
* Writing a story is a fast way to explore the future
----
### Don't get too hung up in the *how*
* Focus on the user experience
* We can figure out how to do it
* or something that feels similar
----
### Expect to get it wrong
![predicted the future](https://media.giphy.com/media/xT5LMqL5YHcNBTffG0/source.gif)
Revisit the shiny future as we make progress and learn new things
---
## Resources
* [async vision doc (wip)](https://rust-lang.github.io/wg-async-foundations/)
* [const generics vision doc (wip-er)](https://hackmd.io/VOaGjRYsSXW4PR_VNwQmSQ)
* [vision-squared repository (wip-est)](https://nikomatsakis.github.io/vision-squared/)
---
## Some questions to chew on
* Might your project benefit from a vision doc?
* Would the characters work for you?
* When is the right time to try a vision doc?
* When is the wrong time?
* How can we "scale down" the vision doc?
{"metaMigratedAt":"2023-06-16T00:18:51.735Z","metaMigratedFrom":"YAML","title":"3: Vision²","breaks":true,"contributors":"[{\"id\":\"27d8f2ac-a5dc-4ebe-8c31-cc45bcd8447e\",\"add\":14459,\"del\":8135}]"}