News for hackers. Stuff that matters.
Re:Notebooks as reusable Python programs by duped on Wednesday March 19, 2025 @04:18PM (#43416807)
> Other people are not expected to run minutes/hours long computation to see what the author intended

Arguably this is a good thing. You shouldn't distribute things you can't prove have the same results and one way to do that is to require others to run the same computations.

Re:Notebooks as reusable Python programs by 0cf8612b2e1e on Wednesday March 19, 2025 @04:23PM (#43416871)
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.

Re:Notebooks as reusable Python programs by mscolnick on Wednesday March 19, 2025 @04:50PM (#43417195)
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
Re:Notebooks as reusable Python programs by epistasis on Wednesday March 19, 2025 @05:19PM (#43417424)
It's hard for me to imagine the use case where this is appropriate.

I have looked at marimo several times, and while it's great for interactive computing, and it has a fantastic team, it's not a replacement for notebooks and I find their use of the term "notebook" confusing. As a scientist, I don't understand what use case they are exploring, but I do know it's not the use case where Jupyter was created and it's not my current use case for Jupyter on teams I work with.

Re:Notebooks as reusable Python programs by abdullahkhalids on Wednesday March 19, 2025 @07:40PM (#43418422)
If you read what they think the problems to solve are, you will get it.

    small edits to code yield enormous Git diffs;
    code is copy-pasted across notebooks, instead of reused;
    magic commands limit the portability of notebook code;
    logic that would be useful as a script or library gets thrown away;
    logic that should be tested almost never is.
These are problems primarily a software engineer has. Not problems a scientist thinks are important. If you asked a scientist to list problems with Jupyter notebooks (and there are many), it would be very different list, primarily about science.
Re:Notebooks as reusable Python programs by akshayka on Wednesday March 19, 2025 @07:48PM (#43418489)
Yea. This blog post is definitely written for software-minded people who work with data. We do have another post that explains some of the problems that marimo hopes to solve for scientists, chief among them computational reproducibility and publishing interactive science communications on the web: https://marimo.io/blog/slac-marimo
Re:Notebooks as reusable Python programs by aaplok on Wednesday March 19, 2025 @04:26PM (#43416901)
> You shouldn't distribute things you can't prove have the same results

Why not? Can you expand on this because I don't see why this is not a good thing.

Besides if you distribute your code alongside your output, aren't you providing that proof anyway? People can run your code and see they are getting the same result.