-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
[3/?] Add ability to run code examples in the playground: Fetch tutorial snippet from URL by file name #542
base: main
Are you sure you want to change the base?
[3/?] Add ability to run code examples in the playground: Fetch tutorial snippet from URL by file name #542
Conversation
to mark array entry as object rather than a string
…drich/pony-tutorial into code-samples-separate-files
… Capabilities" directory
…nce Capabilities" directory
…main.pony" code snippet
MD031 - Fenced code blocks should be surrounded by blank lines
As discussed in the previous PR, please leave those ones out of the code-samples subdirectory - leave out anything we don't plan to test by compiling.
We suggest using the ability to show a partial snippet of a code sample for a given set of lines, so that we can show only the partial example, but the outer code (hidden) would make the file in the code-samples directory compilable.
The same idea applies - we can put |
Would you like this to be addressed here or in #544? The problem with wrapping every code sample in an actor and calling it is, that it creates a whole lot of boilerplate code. This could possibly be done by the playground instead in ponylang/pony-playground#205 |
Okay, I tested an implementation into the playground, and while it is possible to implement, it will a) not work in all cases and b) not be versatile enough to be beneficial. However, I don't think, this should be done in #544, since this will be an additional huge amount of work, as every snippet needs to be tested and additional hidden code parts must be determined, separately. Maybe, this could even be done in another PR to keep track of the changes and their progress. Furthermore, technically, some pending draft PRs could be done in the meantime already, then. |
I don't think wrapping should be done by the playground. Having in sample but only displaying some in tutorial seems appropriate. I'm ok with that being a separate PR. @jemc thoughts? |
@SeanTAllen I added said PR just in case and listed my progress there alongside some questions: #545 |
👷 Deploy request for pony-tutorial pending review.Visit the deploys page to approve it
|
Co-authored-by: Joe Eli McIlvain <[email protected]> As requested in ponylang#544 (comment) From db1eb11
Co-authored-by: Joe Eli McIlvain <[email protected]> As requested in ponylang#544 (comment) From db1eb11 Follow-up to 3339fd2
See #340
Warning
Will only work, after #544 has been merged. Works in combination with ponylang/pony-playground#205. Contains changes from #544 until db1eb11
Example: https://deploy-preview-542--pony-tutorial.netlify.app/getting-started/hello-world#the-code
Open questions
What to do with the non-pony files?Files
Getting Started
Types
Expressions
Reference capabilities
Object capabilities
Generics
Packages
Testing
C-FFI
Gotchas
Appendices