7 ms·
Show HN: Marimo – open-source reactive Python notebook – running in WASM
Hi HN! Last month, we shared marimo [1][2], an open-source reactive notebook for Python. For those who missed it, marimo notebooks are reproducible, stored as Python files, executable as Python scripts, and deployable as web apps.
It’s now possible to run marimo notebooks entirely in the browser via WebAssembly (WASM).
- A marimo tutorial as a WASM notebook: https://marimo.app/l/c7h6pz https://marimo.app/l/c7h6pz
- Training a neural network with Karpathy’s micrograd: https://marimo.app/l/xpd4te https://marimo.app/l/xpd4te
- Visualizing attractors, as a read-only app: https://marimo.app/l/e9wii1?mode=read https://marimo.app/l/e9wii1?mode=read
- A blank notebook: https://marimo.new https://marimo.new
- Docs: https://docs.marimo.io/guides/wasm.html https://docs.marimo.io/guides/wasm.html
WASM notebooks let you experiment with code without having to install Python on your machine. These notebooks can be easily shared — marimo includes a button that generates a marimo.app URL (code encoded as a query parameter), and marimo.app has a built-in permalink generator. We also support embedding via iframes: you can use this to (say) author interactive documentation or standalone interactive blog posts. We now in fact use embedded WASM notebooks throughout our API docs.
Our WASM notebook is powered by Pyodide [3], a WASM-based Python distribution. Pyodide can run any Python package that has a pure Python wheel, as well as many popular libraries for scientific computing and machine learning, including Pandas, NumPy, SciPy, and scikit-learn. Over time, we expect more and more libraries to be packaged for Pyodide.
We’re very excited by the potential of WASM notebooks to make computing more accessible, and we’re in awe of all that the WASM and Pyodide contributors have accomplished. We have lots more planned (one example: we plan to make it easy to work with local files), and hope to share new developments with you in the future. In the meantime, please try https://marimo.app https://marimo.app out. We’d appreciate feedback!
P.S. Our support for WASM is very new; you may encounter sharp edges. Still, since WASM-compatibility was one of the most requested features from our previous HN, we felt it was worth sharing.
[1] https://news.ycombinator.com/item?id=38971966 https://news.ycombinator.com/item?id=38971966
[2] https://github.com/marimo-team/marimo https://github.com/marimo-team/marimo
[3] https://github.com/pyodide/pyodide https://github.com/pyodide/pyodide
- najork 3y agoKudos guys, I've been super impressed with your development velocity. Marimo is a pleasure to use.
- hellorashid 3y agoso cool!
- abdullahkhalids 3y agoExcellent work. How much theming do you support? Suppose I have some notebooks that I would like to host on my website. I would want those notebooks to have the same look and feel as the rest of my website.
- mscolnick 3y agoWe have light/dark mode. We plan to add other themes (mostly will just be changing colors/radius). You can inject any css that you want to directly in the notebook, but it is likely hard to style to match your exact website.
- bobnoff1 3y agoThis has been incredibly helpful at my startup, thanks for putting craft into a typically boring workflow.
- dzink 3y agoGreat work, but not viewable on mobile.
- jwilber 3y agoGreat work, guys. Really looking forward to more wasm integration and seeing what’s possible there!
- baggiponte 3y agoI discovered marimo by chance some months ago and have been surprised by the incredible pace of development. New features are being added constantly and the dev team is incredibly responsive and open. Keep it up!
- VyseofArcadia 3y agoThis seems like a good place to ask. What is the use-case for these scripting language "notebooks"? This isn't the only one for Python, and I know MATLAB has something similar. From the outside in, it just seems like one form of literate programming just got really popular, but surely there's more to it than that.
- deleted 3y ago[deleted]
- akshayka 3y agoCommon use cases include exploring data, training models, and running scientific experiments. A good notebook makes your data feel tangible, through direct manipulation -- letting you quickly experiment with code, data, and models that are in held in RAM, while also visualizing the results of your experiments and explorations. In addition, marimo notebooks in particular can also be used to build internal tools, since they make it very easy to create interactive UI elements that are synchronized with Python.
- abdullahkhalids 3y agoI am a scientist. I use notebooks the same way I use latex documents. To write reports that capture how I got a particular set of results. Most notebooks I write have a lot of text in them, discussing what I am thinking and why, how each cell fits into the global picture of what I am doing, and what the results mean.
- JayCeeM 3y agoAmazing to see WASM in action!
- vrtnis 3y agoThis is brilliant - great way to quickly put together and share interactive plots - thanks for this wasm release!
- oulipo 3y agoVery cool! What would you say is the selling-point of Marimo compared to Jupyter/JupyterLite?
- mscolnick 3y agoWe have an FAQ on how we differ from Jupyter https://docs.marimo.io/faq.html#faq-jupyter https://docs.marimo.io/faq.html#faq-jupyter the main differences: we are reproducible and reactive. we also aim to be more maintainable, reusable, shareable, and interactive. For JupyterLite: since we are reactive, you can run notebooks entirely as applications (https://marimo.app/l/e9wii1?mode=read https://marimo.app/l/e9wii1?mode=read). This means you can easily embed these in (or run them standlalone as) interactive documentation or interactive blog posts.
- oulipo 3y agoWhat would be really cool is an easy way to have Marimo include ChatGPT seamlessly, eg I can decide that ChatGPT is going to have access to my current notebook (and possibly see the previous cell output to get context), and write code in the next cell, for my next request (or improve the current cell code, etc) Then just bind this to DuckDb or other APIs and this should make it quite easy to build visualizations
- mscolnick 3y agoWe do support GitHub Copilot in the pip/conda installable version that you can run locally on your computer. (https://github.com/marimo-team/marimo https://github.com/marimo-team/marimo) We have considered adding more copilot features for refactoring or text-to-cell.
- oulipo 3y agoThat would be very nice! Would it be easy enough to add support for ChatGPT too?
- jpambrun 3y agoI stumbled on this about two weeks ago. It's amazing. It solves the global variables issues in notebook and saves as plain text. I showed it to my coworker and they were all very excited. With a plugin system it could replace gradio, streamlit and jupyter. I really hope it does.
- akshayka 3y agoWe've considered adding a plugin API. Are there any particular plugins you'd like to see implemented, or are you more interested in the resulting ecosystem that would emerge?
- jpambrun 3y agoI would like to build image labeling tools with bounding boxes and pixelwise segmentations. Ideally it would support 16bit grayscale medical image. As a stretch goal it would support 3d stacks of image for a CT or MR. This is obivously too much to ask, but I would like to have a way to build it. It would require some sort of custom frondend events making it to the back end.