Live data from Hacker News

Show HN: A Spatial Environment for Python

python.natto.dev

1–10 of 34 posts

Show HN: A Spatial Environment for Python

#1
Hi all! A little background: I've been working on natto.dev, a spatial environment for JavaScript. I'm really excited about new interfaces for code (leveraging metaphors we're good at, spatial reasoning, making state visible, design tools, etc). With all the buzz around PyScript, I discovered Pyodide and got it working inside natto. This Python version is a stripped down version of https://natto.dev (eg interactive outputs, multiplayer) so please check that out if this interests you.

I'm excited to share this spatial environment for Python. Imagine Jupyter cells arranged on a 2D canvas.

Some key differences from traditional Python notebooks:

- By default, cells rerun whenever its code changes or an input reruns, like a spreadsheet!

- Dependencies are explicit. There is no parsing or global scope.

- Duplicate panes by option-dragging. This is a core interaction in design tools for exploring ideas.

- State panes add interactive elements. Check out this scikit demo https://python.natto.dev/example/de5cae3dfbcb43919981cc14203...

- Python execution happens in your browser as WASM via Pyodide (implementation detail, not design choice). This is currently a demo, not meant to replace your production ML notebooks.

I would love to hear your feedback on any of this and your thoughts on new programming interfaces!

Show HN: A Spatial Environment for Python
python.natto.dev

Re: Show HN: A Spatial Environment for Python

#4
> By default, cells rerun whenever its code changes or an input reruns, like a spreadsheet!

This is transformational — I’ve been using Pluto.jl a lot lately for prototyping library code and doing data analysis. Now when I work in python I find myself really missing that reactivity. The closest thing I’ve found is streamlit, which is cool but not quite as liberating IMO

Can’t wait to try it!

Re: Show HN: A Spatial Environment for Python

#8
Love the concept and design language! I had been thinking about making something like this for clojure for some time, but never got around to it. In my head I was thinking you would be able to drag in functions from libraries / other namespaces into the canvas. I'm gonna have to play around with this.

Re: Show HN: A Spatial Environment for Python

#10
post #4

> By default, cells rerun whenever its code changes or an input reruns, like a spreadsheet! This is transformational — I’ve been using Pluto.jl a lot lately for prototyping library code and doing data analysis. Now when I work in python I find myself really missing that reactivity. The closest thing I’ve found is streamlit, which is cool but not quite as liberating IMO Can’t wait to try it!

[deleted]
Post reply on HN