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

It is the Rust Playground, not the Playpen #674

Closed
shepmaster opened this issue Apr 22, 2018 · 5 comments · Fixed by #1241
Closed

It is the Rust Playground, not the Playpen #674

shepmaster opened this issue Apr 22, 2018 · 5 comments · Fixed by #1241
Labels
A-Configuration Area: Configuration A-Playground Area: Playground

Comments

@shepmaster
Copy link
Member

"Playpen" was a very old name for it.

@mattico mattico self-assigned this Jul 26, 2018
@mattico mattico removed their assignment Oct 12, 2018
@ehuss ehuss added A-Playground Area: Playground A-Configuration Area: Configuration labels May 17, 2019
@pavelrappo
Copy link

It would definitely help if someone could describe the relationship between playground and playpen. When reading mdBook documentation it's not clear what the difference is between {{#playpen}} and fenced runnable code blocks. Both these types seem to be compiled and executed the same way by the Rust Playground.

@ehuss
Copy link
Contributor

ehuss commented Apr 10, 2020

playpen is just an old name for playground, they are one in the same.

{{#playpen file.rs}} is identical to:

    ```rust
    {{#include file.rs}}
    ```

It looks like {{#playpen}} predates {{#include}}. Probably not a super-strong reason to have both.

@pavelrappo
Copy link

I do like it as a metaphor, though. Kids go outside of their house to get to a playground. Toddlers stay inside and play in a playpen.

mdBook sends the snippets for compilation and execution, receives the results, and shows them in-place. Whereas rustdoc opens a new tab with your code copied to the playground.

Hope that makes sense.

@shepmaster
Copy link
Member Author

My original idea when opening this issue is that anything public-facing in mdBook be updated to use the term "playground". This probably would have backwards-compatibility effects, so I'd expect that playpen in code would stay around as aliases to the newly-renamed thing. Thus #playpen and #playground would do the same, but in all the docs it would only say "playground".

It's a low-priority change, but one that might be more valuable before more people are introduced to mdBook.

@pavelrappo
Copy link

Right. Being consistent and expanding vocabulary only if absolutely necessary are good goals. Rustdoc seems to be using the word "playground", so one more reason for mdBook to use that instead of "playpen".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Configuration Area: Configuration A-Playground Area: Playground
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants