Christopher Allan Webber
ecfd737fb9
Document how to supply docstrings to classes and class methods / lambdas
...
We want to encourage good practice, documentation-wise, amongst Hy
users!
2014-02-23 15:20:43 -06:00
Berker Peksag
6829d6fb3a
Tweak the zipwith doc a bit and add @kirbyfan64 to AUTHORS.
2014-02-22 02:21:34 +02:00
kirbyfan64
d282d65cde
Add zipwith
2014-02-22 02:14:27 +02:00
Berker Peksag
243a93499f
Merge pull request #504 from algernon/h/import-error-reporting
...
hy/compiler.py: import only handles HySymbol and HyList, bail on others
2014-02-21 16:47:13 +02:00
James King
b97e0258e1
Fix for #497
...
One would expect the form:
> (defmacro a (&rest b) b)
> (a 1 2)
To return a tuple object but we have no Hy model so it returns a HyList.
Not sure if this is the right thing to do.
2014-02-19 00:09:37 -05:00
Morten Linderud
c1147c93a8
Merge pull request #510 from paultag/paultag/bugfix/fix-quoting-keywords
...
Fix up quoting keywords.
2014-02-18 00:14:53 +01:00
Paul Tagliamonte
e219973853
Fix up quoting keywords.
...
Fixes this:
=> :foo
'\ufdd0:foo'
=> `:foo
'\ufdd0\ufdd0:foo'
2014-02-17 18:00:31 -05:00
Berker Peksag
6e0486ba78
Update copyright year in docs.
2014-02-15 19:22:53 +02:00
Paul Tagliamonte
2a8a7f3f79
Merge branch 'master' into pr/484
...
Conflicts:
AUTHORS
2014-02-15 11:57:43 -05:00
Paul Tagliamonte
b4b8fb44cf
Merge branch 'master' into pr/487
2014-02-15 11:55:27 -05:00
Paul Tagliamonte
2f751df0f6
Merge branch 'master' into pr/489
2014-02-15 11:49:12 -05:00
Paul Tagliamonte
3c9947a3f6
add @microamp to authors
2014-02-12 23:59:36 -05:00
Paul Tagliamonte
58ebe4efec
Merge pull request #501 from microamp/master
...
Fix issue #498
2014-02-12 23:57:24 -05:00
Gergely Nagy
6c846a24b1
hy/compiler.py: import only handles HySymbol and HyList, bail on others
...
When (import) encounters anything but a HySymbol or HyList, raise an
exception, as that is not valid in Hy. Previously, anything other than a
HySymbol or HyList was simply ignored, turning that particular import
into a no-op, which was both wrong and confusing.
Reported-by: Richard Parsons <richard.lee.parsons@gmail.com>
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2014-02-11 17:29:50 +01:00
Berker Peksag
d37bc10f93
Merge pull request #503 from rlp10/master
...
updated import documentation
2014-02-11 18:22:14 +02:00
Richard Parsons
6b4e3940aa
updated import documentation
2014-02-11 15:54:55 +00:00
han semaj
24a1567b00
Implement every? and some
2014-02-11 21:42:56 +13:00
Paul Tagliamonte
fed3ec302c
Merge pull request #499 from sdegutis/patch-1
...
Making readme more friendly
2014-02-10 18:38:42 -05:00
Steven Degutis
1af8e47a20
Making readme more friendly
2014-02-10 17:29:35 -06:00
Foxboron
66366b5bc9
Added defmulti
2014-02-05 16:07:48 +01:00
Berker Peksag
e6a6249eab
Merge pull request #494 from theanalyst/fix/distinct
...
faster distinct: maintain seen items in a set
2014-02-03 21:22:03 -08:00
Abhishek L
a41a3c7edc
faster distinct: maintain seen items in a set
...
* hy/core/language.hy: maintain the seen items in a set instead of a
list in `distinct`. This is much faster for lookups.
2014-02-04 01:35:41 +05:30
Abhishek L
4432c00c59
Replace forgotten instances of coll? function
...
Replacing coll? wherever applicable
2014-02-03 21:48:30 +05:30
Gergely Nagy
e8dfe5bfb2
hy.contrib.walk: Add support for walking cons cells
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2014-02-01 18:36:57 +01:00
Gergely Nagy
fa24042cb0
hy.contrib.walk: Add (macroexpand-all)
...
This function will recursively perform all possible macroexpansions in
the supplied form. Unfortunately, it also traverses into quasiquoted
parts, where it shouldn't, but it is a useful estimation of macro
expansion anyway.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2014-02-01 18:34:12 +01:00
Gergely Nagy
817b4688d8
hy.contrib.walk: New contrib module for walking the Hy AST
...
The hy.contrib.walk module provides a few functions to walk the Hy AST,
and potentially transform it along the way. The main entry point
is (walk), which takes two functions and a form as arguments, and
applies the first (inner) function to each element of the form, building
up a data structure of the same type as the original. Then applies outer
(the second function) to the result.
Two convenience functions are provided: (postwalk) and (prewalk), which
do a depth-first, post/pre-order traversal of the form.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2014-02-01 18:34:12 +01:00
Berker Peksag
a318afea3a
Port update_coreteam.py to Hy.
2014-01-31 03:43:03 +02:00
Abhishek L
4b54e3c748
Merge master onto pr/471
...
Conflicts:
hy/core/language.hy
2014-01-30 21:50:23 +05:30
Abhishek L
6a497886b0
Merge master onto pr/486
2014-01-30 19:28:10 +05:30
halit
afff5fd93b
Add new author
2014-01-30 15:55:30 +02:00
Berker Peksag
f0dd5ba74c
Move all badges to top of README.
2014-01-30 08:31:59 +02:00
Berker Peksag
b8ef4ccc3c
Update tutorial.
...
- Fix a couple of typos
- Use open() built-in instead of file()
- Update (for) and (with) examples
2014-01-30 08:27:25 +02:00
Abhishek L
76b9e7c5cd
Merge master onto pr/482
2014-01-29 20:25:14 +05:30
Abhishek L
bb5dac8af9
Merge master onto pr/473
2014-01-29 19:31:46 +05:30
Halit Alptekin
75748eb05d
Fix unicode error #483
2014-01-29 15:58:49 +02:00
Gergely Nagy
f17e52f1e5
README.md: Add Adderall to Hylarious Hacks
...
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
2014-01-29 10:09:21 +01:00
J Kenneth King
20d27b23e9
Merge pull request #480 from agentultra/digit-char
...
Add integer-char? to core
2014-01-28 15:15:22 -08:00
James King
cbb8cc1d37
Add integer-char? to core
2014-01-28 17:28:41 -05:00
Brian McKenna
6bfc4a8471
Attempt to fix HyDict#items for Python 3
...
Looks like Python 3 changed `zip` to returning an iterable and not a
list. We should be good to just wrap the call in `list`.
2014-01-26 10:56:40 -07:00
Brian McKenna
990d901d65
Fix single spaces between methods in test_dict.py
2014-01-25 20:29:09 -07:00
Brian McKenna
13a88b358e
Add Brian McKenna to AUTHORS
2014-01-25 18:15:49 -07:00
Brian McKenna
cef7091708
Add tests for HyDict methods
2014-01-25 18:15:17 -07:00
Brian McKenna
0177541d9b
Add items
, values
and keys
methods to HyDict
...
Useful for macros, for example:
(defmacro defn-checked [n x b]
`(defn ~n [(unquote-splice (.keys x))]
(print "Expecting:" (unquote-splice (.values x))) ~b))
(defn-checked hello {name str age int}
(print "Hello" name "you are" age))
(hello "Godzilla" 60)
;; Expecting: <type 'str'> <type 'int'>
;; Hello Godzilla you are 60
2014-01-25 15:55:38 -07:00
Morten Linderud
429cba39b9
Merge pull request #474 from berkerpeksag/hyc-doc
...
Document hyc command line options.
2014-01-25 12:19:51 -08:00
Berker Peksag
65f8bd2b91
Document hyc command line options.
2014-01-25 21:43:08 +02:00
Berker Peksag
d842426308
Reorganize documentation.
2014-01-25 21:01:16 +02:00
Nicolas Dandrimont
52144820ca
Add a cons object and related mechanisms
...
Closes : #183
2014-01-23 23:08:52 +01:00
Nicolas Dandrimont
bb2b868aaf
Make empty macroexpansions do the right thing
2014-01-23 23:07:31 +01:00
Nicolas Dandrimont
54757b8316
Slicing a HyList makes the same kind of object again
2014-01-23 23:07:31 +01:00
Nicolas Dandrimont
fad67bd8f5
Merge branch 'master' into pr/468
2014-01-23 22:14:23 +01:00