Merge branch 'master' into pr/347

This commit is contained in:
Paul Tagliamonte 2013-12-02 23:41:54 -05:00
commit de424fd2b6
8 changed files with 34 additions and 36 deletions

11
.coveragerc Normal file
View File

@ -0,0 +1,11 @@
[run]
omit =
*/python?.?/*
*/lib-python/?.?/*.py
*/lib_pypy/_*.py
*/site-packages/nose/*
*/pypy/*
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover

View File

@ -7,13 +7,15 @@ python:
- "2.6"
# command to install dependencies
install:
- pip install -r requirements.txt --use-mirrors
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install argparse importlib unittest2 astor --use-mirrors; fi
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then pip install astor --use-mirrors; fi
- if [[ $TRAVIS_PYTHON_VERSION == 'pypy' ]]; then pip install astor --use-mirrors; fi
- pip install -r requirements.txt
- pip install coveralls
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install argparse importlib unittest2 astor; fi
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then pip install astor; fi
- if [[ $TRAVIS_PYTHON_VERSION == 'pypy' ]]; then pip install astor; fi
- python setup.py -q install
# # command to run tests
script: make travis
after_success: coveralls
notifications:
email:
- paultag@gmail.com

View File

@ -53,7 +53,7 @@ diff:
r: d tox diff
travis:
nosetests -s
nosetests -s --with-coverage --cover-package hy
ifeq (PyPy,$(findstring PyPy,$(shell python -V 2>&1 | tail -1)))
@echo "skipping flake8 on pypy"
else

View File

@ -8,7 +8,7 @@ Lisp and Python should love each other. Let's make it happen. [Try it](http://tr
[![Build Status](https://travis-ci.org/hylang/hy.png?branch=master)](https://travis-ci.org/hylang/hy)
[![Downloads](https://pypip.in/d/hy/badge.png)](https://crate.io/packages/hy)
[![version](https://pypip.in/v/hy/badge.png)](https://crate.io/packages/hy)
[![Coverage Status](https://coveralls.io/repos/hylang/hy/badge.png)](https://coveralls.io/r/hylang/hy)
Hylarious Hacks
---------------

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

@ -736,6 +736,7 @@ using the backquote (`) symbol.
.. code-block:: clj
;; let `qux' be a variable with value (bar baz)
`(foo ~qux)
; equivalent to '(foo (bar baz))
@ -751,6 +752,7 @@ be alternatively written using the (') symbol
.. code-block:: clj
=> (setv x '(print "Hello World"))
; variable x is set to expression & not evaluated
=> x
@ -758,6 +760,7 @@ be alternatively written using the (') symbol
=> (eval x)
Hello World
require
-------

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