4 ms·
I agree that Observable is fantastic, but also wish it was more open. I'm building something similar called Starboard Notebook[0] that has a different set of t
by protoduction 6y ago
I agree that Observable is fantastic, but also wish it was more open.
I'm building something similar called Starboard Notebook[0] that has a different set of trade-offs. It ends up being something in between Jupyter and Observable:
* One of the goals is to build Jupyter how it would have been if it was designed for the web (only).
* It's open source [1], plays nice with git (the format is plaintext), and supports local viewing & editing [2]
* Because of that you can host it yourself, put it on your blog / github pages, anywhere.
* There is little magic, it actually is just Javascript at it's base. This means you can use standard browser APIs and HTML, and when you are ready to "graduate" the notebook implementation that should be straightforward. In my eyes notebooks are only for the first 20% of the work that does 80% of the job for small applications/experimentation (which is often where it ends anyway).
* You can "build the ship as you sail": you can load new cell types dynamically at runtime. This is also how Python is supported (through WebAssembly).
* You can have interop with Python and Javascript which is really powerful. Example: Create a drag an drop form using HTML+JS, then process the dropped CSV file using Pandas and visualize using matplotlib.
[0]: https://starboard.gg https://starboard.gg
[1]: https://github.com/gzuidhof/starboard-notebook https://github.com/gzuidhof/starboard-notebook
[2]: https://github.com/gzuidhof/starboard-cli https://github.com/gzuidhof/starboard-cli
- Jugurtha 6y agoPlaying with this a bit. It appears I can't use `pip` with `pyodide` and have to use `micropip` with: micropip.install('torch') Which fails with a message: Couldn't find a pure Python 3 wheel for 'torch' Would you agree that this is a substitute for "pencil and paper" to express ideas around data?
- protoduction 6y agoI think the support for HTML,CSS,JS is unlike any other notebook, as well as the possibility to change the runtime at runtime (importing by URL new language plugins / other functionality). This makes it great for documentation (with examples you can actually execute), as an output format for automated reports, as a scriptable Tensorboard, as a platform for interactive articles, and for educational purposes (tutorials, homework). Python works for stuff that was written for it purposefully. Some python libraries work great: numpy, matplotlib, pandas. But many others are not supported directly and can be installed through micropip, but that's quite confusing! These are the issues with Pyodide currently: * All python code that is executed is synchronous, which means it can not make requests (or call sleep). You can actually make a request using pyodide.open_url('path'), but that makes a synchronous request which isn't really a good idea for anything but small files. I believe asynchronous Python is possible, recent versions of emscripten support it, but it needs someone to put the pieces together (which is not easy!) * Some packages are huge without being split up. Scipy is actually the only one that's really problematic, I believe it's around 80MB? It should be possible to split it up (into scipy.interpolate, scipy.stats, etc) * Micropip is asynchronous, so you get a promise when you use micropip.install('my-package'), but you can't "await" it. * Loading Python initially freezes the browser for a second or two.. not a great user experience. * Libraries which are not pure python currently need to be manually made compatible with patches - including torch. Python in the browser (not just in Starboard) needs more love. This is powered by Pyodide[0] which has been making steady progress, but the project is without corporate backing since Mozilla's change of direction. Perhaps Observable can allocate some of their funding towards supporting Python in their notebooks too through this project? Also consider this a call to action for other contributors who want to see Python in the browser become a reality :) [0]: https://github.com/iodide-project/pyodide https://github.com/iodide-project/pyodide