Merge branch 'master' into pr/348

This commit is contained in:
Paul Tagliamonte 2013-12-02 23:41:07 -05:00
commit 611141a8e8
3 changed files with 12 additions and 30 deletions

View File

@ -83,3 +83,15 @@ To build the docs in HTML::
$ make html
Write docs---docs are good! Even this doc!
Core Development Rules
======================
All incoming changes need to be acked by 2 different members of Hylang's
core team. Additional review is clearly welcome, but we need a minimum of
2 signoffs for any change.
If a core member is sending in a PR, please find 2 core members that don't
include them PR submitter. The idea here is that one can work with the PR
author, and a second acks the entire change set.

View File

@ -1,24 +0,0 @@
#!/usr/bin/env hy
;; Very much a knockoff (straight port) of Dan Gulotta's 2013 MIT Mystery Hunt
;; puzzle "The Halting Problem". His Copyright terms are unclear, so presume
;; that this is distributable, but not free.
(defn evaluate [f] ((f (lambda [x] (+ x 1))) 0))
(defn successor [n] (lambda [f] (lambda [x] (f ((n f) x)))))
(defn plus [m n] ((n successor) m))
(defn exponent [m n] (n m))
(defn zero [f] (lambda [x] x))
(defn one [f] (lambda [x] (f x)))
(defn predecessor [n] (lambda [f] (lambda [x]
(((n (lambda [g] (lambda [h] (h (g f))))) (lambda [y] x)) (lambda [z] z)))))
(defn subtract [m n] ((m predecessor) n))
(setv two (plus one one))
(setv three (plus two one))
(print (evaluate (exponent three three)))

View File

@ -75,12 +75,6 @@ def test_bin_hy_icmd():
assert "figlet" in output
def test_bin_hy_file():
ret = run_cmd("hy eg/nonfree/halting-problem/halting.hy")
assert ret[0] == 0
assert "27" in ret[1]
def test_bin_hy_missing_file():
ret = run_cmd("hy foobarbaz")
assert ret[0] == 2