Hacker Newsnew | past | comments | ask | show | jobs | submit | mscolnick's commentslogin

it would be awesome if this embedded marimo notebooks that run on WebAssembly (via https://marimo.app/)


1. marimo


It wasn't included in the blog, but marimo also supports a markdown format, in case you're interested:

    marimo edit notebook.md


The parent comment wasn't fully correct. marimo doesn't store outputs in the notebook file, but it does have many ways outputs are stored alongside the notebook, or remotely if you'd like: HTML, ipynb, pickle


It may be preferable to create a variable tied to a UI element that can be used as a toggle to view each analysis.

choice = mo.ui.dropdown(['train', 'split')

data = load(choice.value)

processed = process(data)

visualize(processed)

This way, you can toggle between just more than two if needed. If you need to see both at once, you'd want to refactor the processing and visualizing step into functions, and then just duplicate the finals cell(s).

marimo has a multi-column mode, so you can view them side-by-side


Marimo also has a nice Tabs widget that can contain whatever else Marimo can display in cleanly separated tabs.


The default "store" is a local FileStore. In your case, it will save the outputs to a file on disk called `my_cache`.

We plan to add more stores like Redis, S3-bucket, or an external server, since you may not always want to commit this file, but like you said want others to avoid the computation.


> One design decision they made is that outputs are not stored

This is not quite true. Outputs are not stored...in the Python file*. marimo does store outputs in the `/__marimo__` folder with settings enabled.

> writing the boiler plate to let the reader load the results.

Therea are some primitives to do this for you, such as mo.persistent_cache. This can be an annotation or 'with' block. It intelligently knows when either the source code or inputs change.

The plan is to take this one step further than storing just the output. Because marimo knows the dependencies of each cell, in a future version, it will store each output AND let you know which are stale based on code changes. This is being built by Dylan (from the blog) and inspired by Nix.


Looks awesome! big fans of pyodide, congrats on the launch


You might be interested in marimo [1], which does not store your outputs in the notebook artifact. Also the files are stored at pure-python instead of json, which LLMs much prefer / easier for them to parse.

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


Marimo is such a leap forward that I think the Jupyter people will adopt its concepts directly. So elegant, so useful, both for people and machines. Love it.


Thanks for sharing these resources


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

Search: