TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: A Spatial Environment for Python

169 点作者 paulshen大约 3 年前
Hi all! A little background: I&#x27;ve been working on natto.dev, a spatial environment for JavaScript. I&#x27;m really excited about new interfaces for code (leveraging metaphors we&#x27;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 <a href="https:&#x2F;&#x2F;natto.dev" rel="nofollow">https:&#x2F;&#x2F;natto.dev</a> (eg interactive outputs, multiplayer) so please check that out if this interests you.<p>I&#x27;m excited to share this spatial environment for Python. Imagine Jupyter cells arranged on a 2D canvas.<p>Some key differences from traditional Python notebooks:<p>- By default, cells rerun whenever its code changes or an input reruns, like a spreadsheet!<p>- Dependencies are explicit. There is no parsing or global scope.<p>- Duplicate panes by option-dragging. This is a core interaction in design tools for exploring ideas.<p>- State panes add interactive elements. Check out this scikit demo <a href="https:&#x2F;&#x2F;python.natto.dev&#x2F;example&#x2F;de5cae3dfbcb43919981cc1420309756" rel="nofollow">https:&#x2F;&#x2F;python.natto.dev&#x2F;example&#x2F;de5cae3dfbcb43919981cc14203...</a><p>- 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.<p>I would love to hear your feedback on any of this and your thoughts on new programming interfaces!

15 条评论

rsfern大约 3 年前
&gt; By default, cells rerun whenever its code changes or an input reruns, like a spreadsheet!<p>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<p>Can’t wait to try it!
评论 #31323268 未加载
评论 #31322658 未加载
Helmut10001大约 3 年前
Can you give a brief background what &quot;spatial&quot; means in this context? I do not see a map, or projections. Is it pure spatial-&quot;math&quot; (e.g. geometries) etc.?
评论 #31324570 未加载
评论 #31328354 未加载
pollier大约 3 年前
Nice tool ! IMO a self hosted option is mandatory for product adoption as python is often used to process data, which might be confidential enough to prevent the use of SaaS tooling from a not &quot;Well Known&quot; service provider...
评论 #31326287 未加载
codethief大约 3 年前
&gt; - Dependencies are explicit. There is no parsing or global scope.<p>I can&#x27;t express how happy it makes me to read this! So many &quot;modern&quot; tools these days come with global state and force you to do lots of implicit dependency juggling. This makes it hard to test things, to read code, to re-use code… It&#x27;s as if we have to keep re-learning the same lessons again, and again, and again…
knubie大约 3 年前
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 &#x2F; other namespaces into the canvas. I&#x27;m gonna have to play around with this.
评论 #31322747 未加载
beremaki大约 3 年前
I love it, I am not sure yet what I am going to do with it but I definitely want to use it. I really love this kind of software and the execution focuses on the right spots.<p>This looks like the result of a lot of work, keep on !
timinou大约 3 年前
A tangent: how hard would it be to integrate Elm into this? I think as a language it has a lot of teaching potential combined with natto.<p>One library that could be useful is elm-ta-interop maybe...
uniqueuid大约 3 年前
This is awesome, and I&#x27;d use it immediately if I could install it on a machine of mine.<p>One interesting thing to pursue may be memoization for block output (perhaps with limited slots or TTL).
评论 #31328378 未加载
carapace大约 3 年前
Have you checked out &quot;zooming&quot; user interfaces?<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Zooming_user_interface" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Zooming_user_interface</a>
drapado大约 3 年前
Amazing! Do you have plans to make it srlf-hosted? I&#x27;d love to try it!
smrtinsert大约 3 年前
Neato. I&#x27;m getting TouchDesigner vibes. I like the art browser.
评论 #31322726 未加载
zestyping大约 3 年前
This is really slick! Wow!
i_like_apis大约 3 年前
Very cool.<p>What is the front-end built in?
评论 #31323738 未加载
ge96大约 3 年前
cool UI design
colevels大约 3 年前
nice tools!