Readit News logoReadit News
mscolnick commented on Learnpython.ai – The Interactive Python Learning Platform   learnpython.ai... · Posted by u/Donacgreece
mscolnick · a month ago
it would be awesome if this embedded marimo notebooks that run on WebAssembly (via https://marimo.app/)
mscolnick commented on Ranking Alternatives to Streamlit   streamlit-alt-leaderboard... · Posted by u/whiskyontheice
whiskyontheice · 3 months ago
Hey!

What's the best Streamlit alternative for you? Here's the ones I've got for the moment. Gradio Reflex NiceGUI Davia Dash Voila Appsmith Shiny Panel Marimo

Would love to know which one you're using and why ! Also let me know if I'm missing one :)

mscolnick · 2 months ago
1. marimo
mscolnick commented on Notebooks as reusable Python programs   marimo.io/blog/python-not... · Posted by u/akshayka
cjohnson318 · 6 months ago
I sometimes use notebooks mostly for taking notes, with a few code samples. In these cases, dealing with ipykernel and firing up a notebook is kind of a pain. Being able to open a "notebook" and make changes in vim sounds great.
mscolnick · 6 months ago
It wasn't included in the blog, but marimo also supports a markdown format, in case you're interested:

    marimo edit notebook.md

mscolnick commented on Notebooks as reusable Python programs   marimo.io/blog/python-not... · Posted by u/akshayka
0cf8612b2e1e · 6 months ago
You lose out on so many use cases without the stored output. The first that comes to mind is all of the learning resources that are now presented in notebooks.

Most learners do not need to fact check the instructor, but do want to see the operations which were run. Those that are curious can run/edit the notebook themselves.

Edit: The JupyterBook ecosystem (https://executablebooks.org/en/latest/gallery/) as an example of what is possible with stored plots/calculations. Most learners are just going to follow along with the material, but being able to optionally play with the data is the super power of the platform with minimal friction.

mscolnick · 6 months ago
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
mscolnick commented on Notebooks as reusable Python programs   marimo.io/blog/python-not... · Posted by u/akshayka
TheAlchemist · 6 months ago
This looks really very very neat.

One (not a great) workflow I have, is that I use notebooks as quicks UIs to visualize some results. 1. Run a simulation that outputs results to some file 2. Load results in a notebook and do some quick processing + visualization

Very often, I want to compare quickly between 2 different runs and end up copying down the cell with visualization, then just re-run the data load + processing + visualization and compare them.

My understanding is that this would not be possible with marimo, since it will re-run automatically the cell with my previous data right ?

mscolnick · 6 months ago
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

mscolnick commented on Notebooks as reusable Python programs   marimo.io/blog/python-not... · Posted by u/akshayka
abdullahkhalids · 6 months ago
The caching is a very nice feature, and will stop me from keeping my computer running for days/weeks while I work on a notebook.

If I understand it correctly, `@mo.persistent_cache(name="my_cache")` creates a binary file `my_cache` that I should commit as well if I don't want others to repeat the computation?

This kinda solves the problem, except for having two files per notebook, and that marimo notebooks are no longer viewable with output on github directly.

mscolnick · 6 months ago
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.

mscolnick commented on Notebooks as reusable Python programs   marimo.io/blog/python-not... · Posted by u/akshayka
abdullahkhalids · 6 months ago
One design decision they made is that outputs are not stored. This means these notebooks are not suitable replacement for heavy computation routines, where the notebook is a record of the final results. Other people are not expected to run minutes/hours long computation to see what the author intended.

You can work your way around it by storing the results in a separate file(s), and writing the boiler plate to let the reader load the results. Or they let you export to ipynb - which is still sharing two files.

Presumably the reason for this decision is making git diffs short. But to me the solution is to fix git diff to operate on JSON nicely, rather than changing the entire notebook format.

mscolnick · 6 months ago
> 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.

mscolnick commented on Show HN: Online Python Compiler with Libraries   cliprun.com/online-python... · Posted by u/andycloke
mscolnick · 6 months ago
Looks awesome! big fans of pyodide, congrats on the launch
mscolnick commented on Optimizing Jupyter Notebooks for LLMs   alexmolas.com/2025/01/15/... · Posted by u/alexmolas
mscolnick · 8 months ago
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

mscolnick commented on Show HN: WASM-powered codespaces for Python notebooks on GitHub   docs.marimo.io/guides/pub... · Posted by u/mscolnick
westurner · 8 months ago
> CORS and GitHub

The Godot docs mention coi-serviceworker; https://github.com/orgs/community/discussions/13309 :

gzuidhof/coi-serviceworker: https://github.com/gzuidhof/coi-serviceworker :

> Cross-origin isolation (COOP and COEP) through a service worker for situations in which you can't control the headers (e.g. GH pages)

CF Pages' free unlimited bandwidth and gitops-style deploy might solve for apps that require more than the 100GB software cap of free bandwidth GH has for open source projects.

mscolnick · 8 months ago
Thanks for sharing these resources

u/mscolnick

KarmaCake day140April 28, 2023View Original