关于 "yin-yang puzzle" 的详细历史背景吗?
Any history background about the "yin-yang puzzle" in detail?
关于 Whosebug 中已有的 "yin-yang puzzle" 有很多问题:
- How does the yin yang puzzle work?(我假设这是第一个)
- Haskell(这是我的问题)
- C# 5.0
- Typed languages
- ...(可能还有我没找到的东西)
我想知道何时以及谁找到了这个美丽的编程珍珠。所以我深入研究了它。这是我的发现:
- 第一个问题发布于 2010 年,涉及 wikipedia page。
- 本页面的当前版本参考了 Yin Wang 的博客。
- 不幸的是,他关闭了他的博客,但它在 Web Archive 中可用,截至 2012 年 7 月 27 日。
- 此网络博客涉及第一个堆栈溢出问题。
- 这意味着维基百科文章已在第一个问题被问到后更新。
- 维基百科文章历史显示最初的阴阳谜题是由注册用户在 2009 年添加的,没有任何引用。
现在我已经失去了追溯2009年之前历史的线索。看来这个谜题在2009年至少在一些社会已经广为人知了。由于原拼图在Scheme中,所以我假设是Scheme用户组。
谁能展示更多这方面的历史细节?
从 1999 年 comp.lang.scheme 开始:
https://groups.google.com/d/msg/comp.lang.scheme/Fysq_Wplxsw/awxEZ_uxW20J
From: mad...@news.ens.fr (David Madore)
Subject: call/cc mind-boggler
Date: 1999/06/24
Message-ID: <7ktbid$a29@nef.ens.fr>#1/1
X-Deja-AN: 493362808
Organization: Ecole normale superieure
Newsgroups: comp.lang.scheme
I sumbled (accidentally as it were) upon the following Scheme program:
(let* ((yin ((lambda (foo) (newline) foo)
(call/cc (lambda (bar) bar))))
(yang ((lambda (foo) (write-char #\*) foo)
(call/cc (lambda (bar) bar)))))
(yin yang))
(If you want the full story, I was inventing a language (called
``Unlambda'', essentially, an implementation of the lambda calculus
without the lambda operation) that is specially designed for
obfuscation, and whose interpreter is written in Scheme; I had written
a single program in it that was over 600 characters long to write the
integers consecutively (writing each integer by a line of asterisks).
Then I added the call/cc operation to the language, and while
experimenting with it I found that a 12-character program performed
exactly the same task as my longer program, namely ``r`ci`.*`ci (where
` means apply, c means call/cc and i is the identity, r and .* are
essentially newline and write *). Converting this program back to
Scheme gives the thing I have printed above. Well, that's the whole
story, I didn't claim it was interesting.)
关于 Whosebug 中已有的 "yin-yang puzzle" 有很多问题:
- How does the yin yang puzzle work?(我假设这是第一个)
- Haskell(这是我的问题)
- C# 5.0
- Typed languages
- ...(可能还有我没找到的东西)
我想知道何时以及谁找到了这个美丽的编程珍珠。所以我深入研究了它。这是我的发现:
- 第一个问题发布于 2010 年,涉及 wikipedia page。
- 本页面的当前版本参考了 Yin Wang 的博客。
- 不幸的是,他关闭了他的博客,但它在 Web Archive 中可用,截至 2012 年 7 月 27 日。
- 此网络博客涉及第一个堆栈溢出问题。
- 这意味着维基百科文章已在第一个问题被问到后更新。
- 维基百科文章历史显示最初的阴阳谜题是由注册用户在 2009 年添加的,没有任何引用。
现在我已经失去了追溯2009年之前历史的线索。看来这个谜题在2009年至少在一些社会已经广为人知了。由于原拼图在Scheme中,所以我假设是Scheme用户组。
谁能展示更多这方面的历史细节?
从 1999 年 comp.lang.scheme 开始:
https://groups.google.com/d/msg/comp.lang.scheme/Fysq_Wplxsw/awxEZ_uxW20J
From: mad...@news.ens.fr (David Madore)
Subject: call/cc mind-boggler
Date: 1999/06/24
Message-ID: <7ktbid$a29@nef.ens.fr>#1/1
X-Deja-AN: 493362808
Organization: Ecole normale superieure
Newsgroups: comp.lang.scheme
I sumbled (accidentally as it were) upon the following Scheme program:
(let* ((yin ((lambda (foo) (newline) foo)
(call/cc (lambda (bar) bar))))
(yang ((lambda (foo) (write-char #\*) foo)
(call/cc (lambda (bar) bar)))))
(yin yang))
(If you want the full story, I was inventing a language (called
``Unlambda'', essentially, an implementation of the lambda calculus
without the lambda operation) that is specially designed for
obfuscation, and whose interpreter is written in Scheme; I had written
a single program in it that was over 600 characters long to write the
integers consecutively (writing each integer by a line of asterisks).
Then I added the call/cc operation to the language, and while
experimenting with it I found that a 12-character program performed
exactly the same task as my longer program, namely ``r`ci`.*`ci (where
` means apply, c means call/cc and i is the identity, r and .* are
essentially newline and write *). Converting this program back to
Scheme gives the thing I have printed above. Well, that's the whole
story, I didn't claim it was interesting.)