Open lpil opened 10 months ago
I'd like to take a crack at this, if that's alright. Do you want it in the tour repo or a different one? I think having it in the same one makes sense since the functionality is going to be similar
I'm not sure. Maybe a different one so we can use github actions and get play.gleam.run
?
It'd be pretty much the same code but with a different UI and some code to compress the user's code and put it in the hash string like this one does: https://github.com/JohnDoneth/gleam-playground
That seems reasonable. Would you mind setting up a repo then and I'll take a crack at it?
Thank you. Here you go! https://github.com/gleam-lang/playground
Thanks!
I'm not sure. Maybe a different one so we can use github actions and get
play.gleam.run
?It'd be pretty much the same code but with a different UI and some code to compress the user's code and put it in the hash string like this one does: https://github.com/JohnDoneth/gleam-playground
This is lovely, I also like that there is no server side storage but the compressed query string logic (that I once improved :D over there). Maybe we can get multiple module tabs and saving/loading as a file bundle in some fashion?
It could be nice to have something like the Svelte playground. It allows for multiple files and shows the compiled output live. You can also download a zip bundle of your files. For the sharing, it would be reasonably simple to compress a JSON string of the form:
[
{"file":"app.gleam","content":"import gleam/io\n..."},
...
]
I also like the example scripts the Go playground includes
Let's start with one file and make that a good experience and then we can decide if it's worth the additional work at that time. We have to be efficient with our actions and having multiple files doesn't unlock anything in particular that I can think of.
I agree, I'm just making sure we can support upgrades if we do decide to do them. It might not be multiple files, but maybe specifying the Gleam version, adding a name to the shared example, etc.
I don't want to support anything but the latest Gleam version or any project related features such as files. We just want a simple playground with sharing to start as that's where the main value is. We are very time pressed so efficiency is the name of the game.
Got it!
would be glad to offer any assistance to this initative 😃
I am actively working on a playground based on the tour website code that has a different set of goals ( repo: https://github.com/samifouad/linkhash, web: https://linkha.sh ), but I'd love to see an official one
feel free to pluck anything out of there you might find useful
Thanks so much @samifouad!
Use the same tech as the language tour to make a little place one can edit and run Gleam in their browser.
Prior art:
MVP features
Secondary features