跳到正文
原文
Hacker News · 首页· bhaprayan·· 2026-10-23AI 评分38

Impossible Machines:用声明式方式编程物理世界的构想演示

Show HN: Impossible Machines: declaratively program the physical world

AI 导读

作者 bhaprayan 分享了一个名为 Impossible Machines 的思想实验,探讨声明式编程范式(类似 SQL)如何应用于物理世界:用户只需演示期望的效果(如敲响铃铛),系统自动寻找实现方式(如连接曲柄),加入障碍物时会通过约束求解器自动绕过。由于没有执行器,作者用软件模拟了这一概念,并开放征集反馈与扩展思路。

正文

Hey all —

Sharing a thought experiment I put together. The premise: what might declarative programming feel like for the physical world?

We’re already familiar with this paradigm in software land (eg SQL etc where we declare what we want and the execution engine figures out how).

I didn’t have access to an actuator so I mocked up the concept in software. The way it works is you demonstrate the effect and the system figures out how to achieve it. So say you want to ring a bell and you have a crank. The system will find a way to connect the two. If you add obstacles it figures out how to work around them (runs a constraint solver runs behind the scenes).

I think what’s interesting about this is being able to think about the problem at a higher level of abstraction, with the system figuring out a way to achieve the intended effect.

Anyways, curious to read reactions, feedback, and interesting ideas on how to extend this!

来源:Hacker News · 首页 · news.ycombinator.com