6 ms·
It's great to see how far WebAssembly and Emscripten has come and this is a really cool app! > If you haven’t already tried Pyodide in action, go try it now! (
by amasad 8y ago
It's great to see how far WebAssembly and Emscripten has come and this is a really cool app!
> If you haven’t already tried Pyodide in action, go try it now! (50MB download)
I wonder though how ready is it for production usage. At Repl.it, years ago[1], we moved away from browser-based execution to the cloud because it excluded many users who don't have the client-side firepower to download/parse/execute this much JS/WASM.
Repl.it can already run a lot of the examples here [2] but I gotta say the DOM-integration is pretty neat. We could do interactive stuff on Repl.it using our new Graphics infrastructure (GFX)[3] but there is always the roundtrip delay. Here is the same matplotlib example running and streamed down on X11: https://repl.it/@amasad/matplotlib https://repl.it/@amasad/matplotlib
[1]: https://news.ycombinator.com/item?id=16578943 https://news.ycombinator.com/item?id=16578943
[2]: https://repl.it/@amasad/pyodide-example https://repl.it/@amasad/pyodide-example
[3]: https://repl.it/blog/gfx https://repl.it/blog/gfx
- ngcc_hk 8y agoThat is no doubt great tool. But imagine even one guy like me has manny gpu card for trying some large memory ai model (not even production). It just can’t work on the cloud during development. What the appeal of this is Standardise on certain way to do things and we can share with others. So far all python and r notebook. Is browser an option?
- zamadatix 8y agoBrowsers don't expose access to GPU compute APIs or multiple GPUs. Any web GPU usage you see right now is limited to shader programs on a single GPU.
- jononor 8y agoTensorflow.js can actually use WebGL to accelerate machine learning. Have not tried it though.
- zamadatix 8y agoTensorflow.js is a example of using the fragment shaders I was talking about: "Tensors are stored as WebGL textures and mathematical operations are implemented in WebGL shaders." https://www.tensorflow.org/js/guide/platform_environment https://www.tensorflow.org/js/guide/platform_environment
- azakai 8y agoBrowser vs server-side is always going to be a tradeoff, yeah. In some cases you're ok with paying for server time, and then don't need to depend on clients running your code. But in other cases it's much more cost-effective to run code on the client. Note that the browser has gotten a lot better in the years since repl.it moved away from running code there. In particular wasm parses and executes a lot faster and takes a lot less memory than JS.
- amasad 8y agoWe're overdue on toying around and reevaluating wasm. It would be particularly great if we can make the decision on a per-use-case basis. I.e. fallback to cloud in underpowered devices or instances where it makes more sense.
- arduinomancer 8y agoI'm curious what the security implications would be of running client side vs. server side for something like REPL.it.
- amasad 8y agoWe spend inordinate amount of time and money on security. We didn't when we ran clientside