Open stereobooster opened 6 years ago
Hi, thanks for the bug report! It looks like what's going on is that in https://github.com/google/schism/commit/336a0bcfa91a525927c063d1ee54dda9798742d3 I significantly refactored the way the runtime works but never updated the playground. I'll try to get it updated, but I'm happy to review a PR if you'd rather take a stab at it.
I will take a look. There is a chance I can restore intended logic based on this commit
Fixed issue, but we still need a proper online playground. Please keep issue open for now
We can start with really simple one, like playground.html
. Later we can get something more advanced, like:
Thanks for getting the issue fixed. I agree it'd be awesome to have a playground more like the one you listed. We could also consider something like an interactive textbook, similar to http://io.livecode.ch/learn/namin/icfp2017-artifact-auas7pp
I have long standing dream to reconstruct SICP in web format with interactive code snippets
I'd be happy to help integrate this into https://webassembly.studio/ playground if there's interest.
@mbebenita - That'd be awesome! What all would it take to integrate into webassembly.studio?
So, all that would be needed is to host (as in available for download) the compiler somewhere, and then writing an example template. A contributor added support for AssemblyScript in a similar way.
WebAssembly.Studio basically has two integration points. When you click Build
, it loads build.ts
and runs the build
gulp task, and when you click Run
it loads main.html
in a sandbox. The rest is up to the template/project actually build and load the code. WebAssembly.Studio tries to emulate a local file system, so that users can easily download the project and run it locally.
A deeper integration where we add syntax highlighting, code completion, etc. for .ss
files requires more work. Luckily, that work would also benefit other embeddings of the Monaco editor which WebAssembly.Studio depends on.
That doesn't sound too hard, and I think it'd be really useful. It might be best to wait until we get some more features, like lambdas and garbage collection, or at least label it as experimental, but I'd love to see this added to WebAssembly.Studio.
What is blocking this?
At this point, I think it just needs someone to take the time to do it. Schism has lambdas, garbage collection, and tail calls now, as well as better error handling, so it has significantly fewer rough edges. I think now is a pretty decent time to do this.
The one downside is that now that Schism relies on experimental Wasm features, I don't think there are any browsers that can run it without using custom flags or command line arguments.
I think it's about the right time to get anyref and tail calls into chrome://flags, FWIW. I will see what I can do.
Any progress on getting those flags into chrome://flags
? I feel (perhaps naively?) that it brings those features one step closer to production :heart: Exciting stuff.
Hi. Thanks for starting this wonderful project. Had similar idea but thought about compiling Rust to wasm. This is even better.
I tried to create online playground - I forked repo, created
gh-pages
branch, renamedplayground.html
toindex.html
, but getting this error when visiting page https://stereobooster.github.io/schism/: