Commit Graph

1219 Commits

Author SHA1 Message Date
Nicolas Dandrimont
80feaf57fc Make HyObject.replace more resilient
This makes it work on quoted objects
2013-10-11 08:13:17 +02:00
Guillermo Vaya
f61d702788 Int conversion to long in py2.x
Updated to current master
    Droped HyInt/HyLong commit
2013-10-11 01:49:42 +02:00
Paul Tagliamonte
312d4816ce nom'ing @olasd's redirect 2013-10-10 17:44:06 -04:00
Paul Tagliamonte
187268c960 Merge branch 'master' into pr/300 2013-10-10 17:42:51 -04:00
Paul Tagliamonte
8377097a36 Merge branch 'master' into pr/298 2013-10-10 17:30:03 -04:00
Paul Tagliamonte
e053157ff1 Merge branch 'master' into pr/294 2013-10-10 17:25:13 -04:00
Paul Tagliamonte
656d646198 change virtualenv name to be `hy' 2013-10-10 17:17:43 -04:00
Paul Tagliamonte
a70bcc1f2f Merge branch 'master' into pr/306 2013-10-10 17:17:20 -04:00
Sean B. Palmer
6364296a7b Documented punycode conversion more thoroughly using a compound case 2013-10-10 15:59:19 +01:00
Berker Peksag
221a9b4918 Mention virtualenvwrapper in the hacking guide. 2013-10-09 12:36:35 +03:00
Paul Tagliamonte
e5f91c48e9 Merge pull request #304 from berkerpeksag/patch-1
Update hacking guide.
2013-10-07 20:04:05 -07:00
Berker Peksag
0248e42633 Update hacking guide. 2013-10-08 06:00:25 +03:00
Guillermo Vaya
25bf3dec42 Add a method for casting into byte string or unicode depending on python version 2013-10-03 23:39:17 +02:00
Berker Peksag
a038d3c592 Remove the redundant pass statement. 2013-09-30 12:55:05 +03:00
Nicolas Dandrimont
a90c866327 Rewrite language.hy not to require hy.core.macros
As was intended when the bootstrap and core macros were separated.
2013-09-29 18:13:28 +02:00
Nicolas Dandrimont
875d5f2ff5 Rewrite the bootstrap macros in hy
This gets rid of the dichotomy between bootstrap.py and macros.hy,
by making both files hy modules.

I added some error checking to make the macros more resilient. The
biggest (user-visible) change is the change in cond, which now only
accepts lists as arguments. Tests updated accordingly.

Closes: #176 (whoops, no more bootstrap)
2013-09-29 18:13:28 +02:00
Nicolas Dandrimont
d5bf328aa7 Cleanup the hy.macros module
Add comments to the functions, reorder, make the file clearer
2013-09-29 18:13:28 +02:00
Nicolas Dandrimont
9ea153fd7e Add @berkerpeksag to AUTHORS 2013-09-29 15:10:33 +02:00
Nicolas Dandrimont
295e1240ad PY3 should really check for Python >= 3 2013-09-29 14:53:44 +02:00
Berker Peksag
f21ddeeded Add hy._compat module.
There was a couple of duplicate imports and type checkings in the
codebase. So I added a new module to unify all Python 2 and 3
compatibility codes.

Also, this is a somewhat common pattern in Python. See Jinja2 for
example:

https://github.com/mitsuhiko/jinja2/blob/master/jinja2/_compat.py
2013-09-29 12:10:08 +03:00
Tuukka Turto
203dc4e6b2 Merge pullrequest #296 2013-09-29 08:49:52 +03:00
Jack
e4e07e32b0 Update README.md
Current url errors: "Choose a redirect for quickstart.html on hy.readthedocs.org"
2013-09-27 20:42:51 -04:00
khinsen
99a5064318 Merge pull request #297 from olasd/print-function
Always import __future__.print_statement in hy code
2013-09-27 00:04:37 -07:00
Guillermo Vaya
ff7c71b9c9 comply with hy's tao rules for getattr 2013-09-23 23:34:45 +02:00
Guillermo Vaya
3f1243f88c changed to use short version of macros 2013-09-23 23:34:45 +02:00
Guillermo Vaya
d495473c54 Translation of meth from Python to Hy 2013-09-23 23:34:45 +02:00
Nicolas Dandrimont
f6aa7e953d Always import __future__.print_statement in hy code
This allows us to drop the print special-casing in the
compiler, and makes behavior consistent in Python2/3.
2013-09-22 15:31:15 +02:00
Nicolas Dandrimont
6a7d97c286 Add test for unquote-splice behavior 2013-09-22 15:12:59 +02:00
Nicolas Dandrimont
48dd968461 Coerce the contents of unquote-splice'd things to a list
This fixes the conversion issue in the following macro:

(defmacro doodle [&rest body]
  `(do ~@body))
2013-09-22 15:08:43 +02:00
Nicolas Dandrimont
7a403a2660 Merge branch 'patch-1' of https://github.com/berkerpeksag/hy into berkerpeksag-patch-1 2013-09-22 12:27:22 +02:00
Berker Peksag
522553ffec Various setup.py enhancements.
- PEP8 fixes
- Use setuptools.find_packages()
- Update PyPI classifiers
- Update website URL
- Install the argparse module in Python 2.6 and before
- Delete the duplicate rply in install_requires. With the PyPI
  version, tests are failed.
2013-09-20 09:08:29 +03:00
Bob Tolbert
7e8a7edbdc finally fixed access to hy.core.macros here. have to explicitly require them 2013-09-14 12:17:06 -06:00
Bob Tolbert
d9dee8ec67 One more commit to change the test for Python 2/3 to a macro
Note that this can't use the macro in hy.core.macros so there
is a local copy in language.hy
2013-09-03 18:41:11 -06:00
Bob Tolbert
9d2ad4b4ff slightly cleaner version of drop-while, could use yield-from when ready 2013-09-03 13:52:00 -06:00
Bob Tolbert
399ea1889a Second (smaller) set of native core functions
This rounds out the first pass at a set of core functions, adding
some that were not in the first PR.

From here I'm working on a contrib.seq and contrib.io module to
hold less obvious but maybe interesting native functions that can
move to core if desired.

This should also close out issure #150 asking for some core
functions like these.
2013-09-03 13:52:00 -06:00
Paul Tagliamonte
b2c51d0130 Merge branch 'master' into pr/287 2013-09-02 22:55:31 -04:00
kaizoku
b892ec4e66 Add zero? predicate to check if an object is zero 2013-09-02 02:28:21 -07:00
Konrad Hinsen
b11f2fcf49 Macro if-python2 for compile-time choice between Python 2 and Python 3 code branches 2013-09-02 09:58:35 +02:00
Paul Tagliamonte
e693a0267a Merge branch 'master' into pr/280 2013-09-01 18:56:17 -04:00
Nicolas Dandrimont
22204a326d Merge pull request #282 from tuturto/doc
fix def / setv example
2013-08-26 04:25:05 -07:00
Tuukka Turto
e845287941 fix def / setv example 2013-08-25 21:29:24 +03:00
Bob Tolbert
0e10f7b283 Removed duplicate flake8 since it has moved into requirements.txt 2013-08-24 11:24:25 -06:00
Bob Tolbert
fdb2385223 Add flake8 to Travis-CI to prevent these from coming back
Added new travis make target to skip flake8 on pypy but run it on all others
2013-08-24 11:14:29 -06:00
Bob Tolbert
e33c27d447 Fixing blank line Flake8 failures 2013-08-24 08:33:13 -06:00
Bob Tolbert
b5b2ec4896 Merge pull request #266 from paultag/paultag/feature/yield-from
Paultag/feature/yield from
2013-08-24 07:15:42 -07:00
khinsen
f3c17bac33 Merge pull request #275 from khinsen/spy-mode
Add "spy mode" to REPL
2013-08-20 01:17:13 -07:00
Konrad Hinsen
a3847191b6 Merge branch 'master' into spy-mode 2013-08-20 10:12:23 +02:00
Julien Danjou
e158fba865 Merge pull request #265 from rwtolbert/hyc_args_fix
Add CL handling to hyc
2013-08-20 01:10:44 -07:00
Konrad Hinsen
3321daa4cf Add "spy mode" to REPL
With the command-line option --spy, the Hy REPL prints the Python
equivalent of each expression before evaluating it.
2013-08-19 15:27:55 +02:00
Paul Tagliamonte
1c12b2870e Add yield from via macro magic.
This will let us use (basic) yield from behavior from Python 2. This
 isn't complete, and is low-hanging fruit for others willing to hack
 on hy.

 I've also changed the macrosystem to allow for proper bootstrapping.
 This is similar to how it's done elsewhere in the codebase (stdlib
 stuff).
2013-08-17 11:37:48 -04:00