agentultra
3773be1d1a
Rename anaphoirc.rst to anaphoric.rst
2013-11-30 10:47:08 -05:00
J Kenneth King
cbb7c5fd7f
Merge pull request #338 from agentultra/anaphoric-macros
...
Anaphoric macros
2013-11-30 07:37:08 -08:00
J Kenneth King
0b6d047239
Remove james@agentultra.com from copyright in core/macros.py
2013-11-30 10:35:57 -05:00
agentultra
5753fc0789
Fix typo in ap-map-when
2013-11-30 10:30:42 -05:00
agentultra
77db779019
Fix typo in ap-each
2013-11-30 10:29:41 -05:00
Henrique Carvalho Alves
62bc86a0b5
Fix sys.argv to reflect default Python behaviour
...
By default, calling the Python REPL without arguments causes
sys.argv to be a non-empty list with an empty string, and some
modules (e.g., pyNN) rely on that.
2013-11-29 23:51:41 -02:00
agentultra
cb6889314a
Add documentation and doc strings
2013-11-29 19:59:20 -05:00
agentultra
179017b9bd
Move anaphoric macros to contrib module
2013-11-28 23:53:02 -05:00
agentultra
20df6a5532
Make --map-when accept a predicate function instead of a form
...
This makes it look a little cleaner:
(list (--map-when odd? (* it 3) [1 2 3 4 5]))
2013-11-28 16:45:07 -05:00
agentultra
8e44cc3d9a
Add --each-while and --map-when
...
A couple of more macros:
hy> (--each-while [1 2 3 4 5] (< it 3) (print it))
1
2
3
hy>
```--each-while``` continues to evaluate the body form while the
predicate form is true for each element in the list.
```--map-when``` uses a predicate form to determine when to apply the
map form upon the element in the list:
hy> (list (--map-when (even? it) (* it 3) [1 2 3 4]))
[1, 6, 3, 12]
2013-11-28 16:15:23 -05:00
agentultra
2106a0e5d4
Add anaphoric versions of map, filter, and foreach
...
Anaphoric macros reduce the need to specify a lambda by binding a
special name in a form passed as a parameter to the macro. This allows
you to write more concise code:
(= (list (--filter (even? it) [1 2 3 4])) [2 4])
This patch just adds a few basic ones. Other forms that can be
converted to anaphoric versions include reduce, remove, enumerate,
etc.
2013-11-28 13:23:09 -05:00
Abhishek L
63a9e35f7f
Document eval
, quasiquote' and
quote'.
...
Also, fix the usage of `setv`.
2013-11-27 12:14:49 +02:00
Abhishek L
b8efb5c242
eg/twisted: Modified to follow the newer hy syntax
...
Updated example to follow newer function syntax, also replaced `caddr'
by `second'.
2013-11-24 21:22:12 +05:30
Berker Peksag
baa9f7436e
Merge pull request #332 from theanalyst/pypi-badges
...
Badges for pypi version and downloads.
2013-11-24 03:30:40 -08:00
Abhishek L
098058579a
Badges for pypi version and downloads
2013-11-24 15:44:25 +05:30
Paul Tagliamonte
5289934251
Merge branch 'master' into pr/315
2013-11-12 22:28:40 -05:00
Paul Tagliamonte
8c172c9c7e
Prepare 0.9.11
2013-11-12 21:59:34 -05:00
Paul Tagliamonte
a5273b233e
Update NEWS for 0.9.11
2013-11-12 21:56:56 -05:00
Berker Peksag
3cbef507e7
PyPI is now behind a CDN. The --use-mirrors
option is deprecated.
...
See PEP 449 and https://mail.python.org/pipermail/distutils-sig/2013-May/020848.html
for more information.
2013-11-11 03:08:48 +02:00
Paul Tagliamonte
e23d577105
Remove this script; no longer needed.
2013-11-10 10:03:43 -05:00
Nicolas Dandrimont
4962f4ca32
Merge pull request #320 from berkerpeksag/importlib-2.6
...
Add importlib to install_requires on Python 2.6.
2013-11-10 05:56:08 -08:00
Berker Peksag
1919963eb3
Add importlib to install_requires on Python 2.6.
...
Fixes #319 .
2013-11-10 14:55:36 +02:00
Paul Tagliamonte
60f3e79367
Moved tryhy to http://github.com/hylang/tryhy
2013-11-08 20:02:12 -05:00
Paul Tagliamonte
e3dd2f4bb8
Merge branch 'master' into pr/316
2013-11-08 19:56:46 -05:00
Paul Tagliamonte
f77ff5a482
Ignore me.
2013-11-08 19:53:18 -05:00
Johan Euphrosine
564bef5db8
eg/tryhy: add footer
2013-11-08 16:30:57 -08:00
Johan Euphrosine
d8515c54f9
eg/tryhy: add skin and meta tags, remove blink
2013-11-08 15:32:08 -08:00
Berker Peksag
5467d2f6be
Fix rply dependency.
...
To test this, replace the https://github.com/hylang/rply/zipball/master#egg=rply-0.6.2
url with https://github.com/berkerpeksag/rply/zipball/master#egg=rply-0.6.2
in setup.py.
$ cd hy
$ virtualenv dummy
$ . dummy/bin/activate
$ pip install .
$ pip install astor nose
$ make test
...
...
Ran 252 tests in 9.723s
OK
2013-11-04 16:12:11 +02:00
Guillermo Vaya
687f2c790f
Adding olasd's improvements
2013-11-03 11:11:21 +01:00
Guillermo Vaya
0f525a691d
removed unnecessary import
2013-11-03 11:11:11 +01:00
Nicolas Dandrimont
26b052c76e
language.hy whitespace fix
2013-11-02 20:50:21 +01:00
Nicolas Dandrimont
b8406dd920
Bootstrap a macro error-reporting test file
2013-11-02 20:50:21 +01:00
Nicolas Dandrimont
59e51166fb
Allow calling kwapply with mixed names and dicts
2013-11-02 20:50:21 +01:00
Nicolas Dandrimont
83bb1513db
Make apply api-compatible with python (args is not mandatory)
2013-11-02 20:50:20 +01:00
Guillermo Vaya
f5754b404e
Define kwapply as a macro
...
Define apply if python3
Added apply tests
2013-11-02 18:18:16 +01:00
Johan Euphrosine
68891f5d32
eg/tryhy: add server_sofware to welcome message
2013-11-02 01:25:17 -07:00
Johan Euphrosine
b099925eb2
eg/tryhy: add blinking cursor
2013-11-02 01:12:11 -07:00
Johan Euphrosine
c02a1c6b4a
eg/hytry: add performance settings
2013-11-02 00:49:33 -07:00
Johan Euphrosine
4976f0db0f
eg/tryhy: enable warmup request
2013-11-01 23:39:16 -07:00
Johan Euphrosine
50ee81df13
eg/tryhy: add version number
2013-11-01 23:36:59 -07:00
Johan Euphrosine
079e3002a7
ex/tryhy: per request repl instance
2013-11-01 16:21:54 -07:00
Johan Euphrosine
a090b86b5e
eg/tryhy: add error handling
2013-11-01 11:44:05 -07:00
Nicolas Dandrimont
2ab35332a0
Ship the hy files in hy/contrib
2013-11-01 04:04:12 +01:00
Johan Euphrosine
0aae750068
eg/tryhy: update title
...
eg/tryhy: update title
2013-10-31 14:56:04 -07:00
Johan Euphrosine
cccbcea13b
eg/tryhy: update appid
2013-10-31 14:47:06 -07:00
Johan Euphrosine
c32172e758
eg: add tryhy
2013-10-31 14:39:24 -07:00
Johan Euphrosine
e1b3f2cf74
eg: add appengine skeleton
2013-10-31 11:56:48 -07:00
Paul Tagliamonte
b4ff53e5f8
Merge branch 'master' into pr/314
2013-10-24 19:29:13 -04:00
Paul Tagliamonte
2778a8b379
Someone fix this with a real path
2013-10-22 21:08:33 -04:00
Christopher Allan Webber
8348b2b0fd
Fix the repo location
2013-10-17 15:35:17 -05:00