Stackoverflow 中已有不少关于“阴阳之谜”的问题:
- 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: <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d2bfb3b6fcfcfc92bcb7a5a1fcb7bca1fcb4a0" rel="noreferrer noopener nofollow">[email protected]</a> (David Madore)
Subject: call/cc mind-boggler
Date: 1999/06/24
Message-ID: <<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="88bfe3fceae1ecace9bab1acb9c8e6edeea6ede6fba6eefa" rel="noreferrer noopener nofollow">[email protected]</a>>#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.)
关于scheme - 有关于 "yin-yang puzzle"的详细历史背景吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30409800/