Jupyter-style notebooks are a good example of a deep architectural mistake that needs hacks on hacks on hacks to remain barely serviceable.
Luckily there are new approaches, e.g. Marimo and Pluto, that don't have the same root issue.
Luckily there are new approaches, e.g. Marimo and Pluto, that don't have the same root issue.