Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Marimo – open-source reactive Python notebook – running in WASM (marimo.app)
102 points by mscolnick on Feb 29, 2024 | hide | past | favorite | 21 comments
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

- Training a neural network with Karpathy’s micrograd: https://marimo.app/l/xpd4te

- Visualizing attractors, as a read-only app: https://marimo.app/l/e9wii1?mode=read

- A blank notebook: https://marimo.new

- Docs: 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 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

[2] https://github.com/marimo-team/marimo

[3] https://github.com/pyodide/pyodide




I 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.


We'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?


I 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.


I 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!


What 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


We do support GitHub Copilot in the pip/conda installable version that you can run locally on your computer. (https://github.com/marimo-team/marimo)

We have considered adding more copilot features for refactoring or text-to-cell.


That would be very nice! Would it be easy enough to add support for ChatGPT too?


This is brilliant - great way to quickly put together and share interactive plots - thanks for this wasm release!


Excellent 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.


We 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.


This has been incredibly helpful at my startup, thanks for putting craft into a typically boring workflow.


Kudos guys, I've been super impressed with your development velocity. Marimo is a pleasure to use.


Great work, guys.

Really looking forward to more wasm integration and seeing what’s possible there!


Very cool!

What would you say is the selling-point of Marimo compared to Jupyter/JupyterLite?


We have an FAQ on how we differ from 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). This means you can easily embed these in (or run them standlalone as) interactive documentation or interactive blog posts.


Great work, but not viewable on mobile.


Amazing to see WASM in action!


so cool!


This 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.


Common 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.


I 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.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: