“发射导弹”的由来是什么?

发布于 2024-08-31 01:50:14 字数 52 浏览 5 评论 0原文

在函数式编程的背景下,副作用的一个典型例子是“发射导弹”。这个说法从历史上是从哪里来的呢?

In the context of functional programming, a typical example of a side effect is "launch the missiles". Where does that expression come from historically?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

十秒萌定你 2024-09-07 01:50:14

“发射导弹”的历史由来?

祝你好运——这更像是一个研究问题,而不是一个编程问题。

这里有两个数据点:

  • 我至少在十年前就听说西蒙·佩顿·琼斯在演讲中使用了这个确切的短语作为例子。

  • 在 20 世纪 90 年代初,甚至可能在 1990 年,社会责任计算机专业人士制作了 T 恤,上面显示了原子弹爆炸和书面传说

    <块引用>

    最终的错误消息

    我敢打赌这句话至少可以追溯到那么远。

至少可以追溯到那么远。要获得真正的答案,您需要词典编纂者,而不是程序员。

Where does "launch the missiles" come from historically?

Good luck with that—it's more of a research question than a programming one.

Here are two data points:

  • I have heard Simon Peyton Jones use the exact phrase as an example in talks at least ten years ago.

  • In the early 1990s, maybe even in 1990, Computer Professionals for Social Responsibility had T-shirts made showing a picture of an atomic blast and the written legend

    The ultimate error message

    I'll wager the phrase goes back at least that far.

To get a real answer, you need a lexicographer, not a programmer.

橘虞初梦 2024-09-07 01:50:14

我没有证据证明这一点,但我总是假设它来自一段类似的有缺陷的 C 代码:

if (hasSecurityClearance = true)
{
  launchMissiles();
}

I have no proof of this but I always assumed it comes from a similar piece of buggy C code:

if (hasSecurityClearance = true)
{
  launchMissiles();
}
迷荒 2024-09-07 01:50:14

事务内存中的“发射导弹”用于强调 I/O 是不可撤销的。一旦导弹发射(即发送网络数据包),它就在途中并且无法回调。对于交易来说,这意味着您不能再中止。相反,由于您已经发布了结果 (BOOM),因此您必须找到一种方法来完成。

事务内存首次提出于 1993 年,当时 Wargames 发布并不再流行。 Simon Peyton-Jones 于 2006 年发表的 TM 论文(第2页)是我第一个发现“发射导弹”类比的地方。难道这就是起源?

"Launch the Missiles," in transactional memory, is used to emphasize that I/O is irrevocable. Once the missiles are launched (i.e. the network packet is sent), it's on its way and can't be called back. For a transaction, that means that you can't abort anymore. Instead, since you've already published your results (BOOM), you must find a way to finish.

Transactional memory was first proposed in 1993, well after Wargames was released and stopped being cool. This 2006 TM paper from Simon Peyton-Jones (page 2) is the first place where I've found the "launch the missiles" analogy. Could this be the origin?

邮友 2024-09-07 01:50:14

确实有一些软件应用程序可以管理洲际弹道导弹的发射,因此必须有一些项目的风险评估必须涵盖意外触发核毁灭的情况。然而,这句话似乎并不是指真实事件。当然,如果这样的事情真的发生过,你可以打赌黑色直升机一定很聪明地压制了它的所有痕迹。

无论如何,我认为这只是对“可能发生的最坏情况是什么?”这个问题的双曲线答案。起源可能来自电影“战争游戏”,其中人工智能几乎引发了一场核战争,因为它认为自己在玩游戏。

我想另一件事是,它并不是真正的副作用。导弹发射控制程序应该来发射导弹;只是,他们应该只在完成所有必要的检查后才启动它们。因此,要确保在完成第 1 步:唤醒总统、第 2 步:检查目标坐标之前,我们不会进入第 10 步:发射导弹强>等

There are software apps out there which do indeed manage the launching of ICBMs, so there must be projects whose Risk Assessment must cover the accidental triggering of nuclear annihilation. However, it doesn't seem as though the phrase refers to a real incident. Of course, if such a thing did ever happen, you can bet the Black Helicopters were out smartish to suppress all traces of it.

Anyway, I think it's just a hyperbolic answer to the question "What's the worst that could happen?" The origins probably come from something like the film 'Wargames', where an AI almost starts a nuclear war because it thinks it is playing a game.

I suppose the other thing is, it isn't really a side-effect. Missile launch control programs are supposed to launch the missiles; it's just, they should only launch 'em after all the necessary checks have been made. So it's about ensuring that we don't get to step 10: Launch the missiles until after we've been through Step 1: Wake the president, Step 2: Check the target coordinates, etc

眼藏柔 2024-09-07 01:50:14

我在回滚数据库事务的背景下听到过这样的说法,作为无法撤消的操作的示例:“很难取消发射导弹。”

I've heard it in the context of rollbacking database transactions, as an example of an action that can't be undone: "it's hard to un-launch a missile."

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文