News for hackers. Stuff that matters.
Re:Closer to production quality Python notebooks with `marim... by dmadisetti on Tuesday October 07, 2025 @05:44PM (#45509302)
marimo notebooks double as python Python programs, which means they can be lint-ed like any other code. `marimo check` catches notebook-specific issues (variable redefinition across cells, circular dependencies) with Rust-inspired (and uv; uv is amazing) error messages. It outputs JSON for AI agents to self-correct, integrates into CI pipelines, and includes `--fix` flags for automatic repairs. The team is already using it in their own CI and seeing Claude Code iterate on notebooks without human intervention.
Re:Closer to production quality Python notebooks with `marim... by aitchnyu on Thursday October 16, 2025 @12:40AM (#45601519)
IME Agents work fine on human readable error messages.
Re:Closer to production quality Python notebooks with `marim... by sixo on Thursday October 16, 2025 @12:56AM (#45601587)
Unfortunately the code in Marimo notebooks implements cross-variable references as untyped function arguments, meaning that nothing passed between cells can be type-safe. This makes it very hard to use tooling directly on the Python representation of notebooks.
Re:Closer to production quality Python notebooks with `marim... by dmadisetti on Thursday October 16, 2025 @01:14AM (#45601663)
Arguments are typed if explicitly specified in definition, e.g.

    ```python
    @app.cell
    def my_cell():
        x : int = 1
        return (x,)

    @app.cell
    def consumer(x : int):
        y = x
        return
    ```
We've talked about building out implicit typing into our serialization- but that may be a larger can of worms.
Re:Closer to production quality Python notebooks with `marim... by sixo on Thursday October 16, 2025 @03:15PM (#45609509)
That would be wonderful. A lot of the arguments are just imports, and these would have probably have the largest upside. It would be great if there was a construct like

    import numpy

    @app.cell
    def my_cell(np: types.ModuleType[numpy]):
        ... editor treats np like `import numpy as np` ...

I do not use Python enough to know if something like this can be hacked together. But if not, I imagine could be PIPed into the standard library if a convincing case were made for it.
Re:Closer to production quality Python notebooks with `marim... by dmadisetti on Friday October 17, 2025 @08:28PM (#45623709)
We've addressed this too by allowing a setup cell:

    ...

    with app.setup:
        import numpy as np
    
    @app.cell
    def cell_uses_np():
        # no np needed in signature
        result = np....
The best part about this pattern is that it enables "pure" (only dependent on setup cell) functions to be addressable:

    with app.setup:
        from typing import Optional, Any

    @app.function
    def my_fn(arg: Optional[Any]) -> Any:
        ...
but nice convergent design :) glad to see to see we're addressing pain points
Re:Closer to production quality Python notebooks with `marim... by sixo on Saturday October 18, 2025 @09:11PM (#45631454)
ah, I recall seeing that feature but had not taken a look at it for imports.

Imports ARE the case where untyped cell arguments are most annoying, but of course it would be nice to get it for free in all cases.