Christopher Allan Webber
d5194f23fa
Properly add yield-from, using python's real "yield from".
...
The yield-from that existed previously wasn't actually implementing the
full complexity of "yield from":
http://legacy.python.org/dev/peps/pep-0380/#formal-semantics
... this includes passing along errors, and many other things.
Also removes the yield-from backport macro, since it does not seem
possible at present to conditionally build macros.
Thus, there is no longer yield-from on pre-python-3.3 systems.
Includes updated docs and tests to reflect all this.
2014-04-10 14:07:49 -05:00
Christopher Allan Webber
774aad2ca8
defmain macro; handles the whole if __name__ == __main__ / main function dance
...
Example:
(defmain [&rest args]
(print "now we're having a fun time!")
(print args))
Which outputs:
$ hy test.hy
now we're having a fun time!
(['test.hy'],)
Includes documentation and tests.
2014-04-10 13:58:38 -05:00
Christopher Allan Webber
f3d978c5a3
Added lisp-if (or lif), with tests and documentation.
...
Now everyone can get along and everyone can have a pony, and that pony is
actually a unicorn that shoots rainbows from its horn.
2014-04-10 13:51:28 -05:00
Abhishek L
378ffae6f7
Fix versionadded in docs to 0.10.0 release
2014-04-10 23:51:32 +05:30
Berker Peksag
3528cc8278
Kill kwapply.
...
Closes #433 .
2014-04-09 20:10:31 +03:00
Christopher Allan Webber
fa69d80b8d
Merge pull request #528 from bcj/patch-2
...
and/or now short-circuit
2014-03-16 15:27:05 -05:00
Brendan Curran-Johnson
a210a673a2
and/or now short-circuit
...
Updated to reflect that and/or actually short-circuit now.
2014-03-14 16:53:10 -05:00
Bob Tolbert
4798863e0f
This change updates the required Pygments version to 1.6, which
...
supports Hy code.
All code-blocks in the documentation have been changed from
clojure to hy.
Also added docs/make.bat for Windows, so the top-level docs
target now works on Windows as well.
2014-03-14 09:01:47 -04:00
Abhishek L
eae5cf08f4
Typo fixes in internals doc
2014-02-24 21:42:36 +05:30
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
Paul Tagliamonte
58ebe4efec
Merge pull request #501 from microamp/master
...
Fix issue #498
2014-02-12 23:57:24 -05: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
Abhishek L
4b54e3c748
Merge master onto pr/471
...
Conflicts:
hy/core/language.hy
2014-01-30 21:50:23 +05:30
Abhishek L
bb5dac8af9
Merge master onto pr/473
2014-01-29 19:31:46 +05:30
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
fad67bd8f5
Merge branch 'master' into pr/468
2014-01-23 22:14:23 +01:00
Nicolas Dandrimont
b99af411c8
Merge branch 'master' into pr/461
...
Conflicts:
tests/native_tests/native_macros.hy
2014-01-23 21:57:17 +01:00
Nicolas Dandrimont
7b8f6fa9e4
Merge branch 'master' into pr/456
2014-01-23 21:43:09 +01:00
Abhishek L
10f1f24a18
Adding a simple `identity' function
...
* hy/core/language.hy: Adding a simple `identity` function that returns
the argument supplied to it
* docs/language/core.rst: Updated docs with identity function
2014-01-22 00:56:28 +05:30
Jack Hooper
ca40113e37
Corrected --spy cmdoption (I think)
...
For the --spy commmand line option, it currently says '''Print equivalent Hy code...'''. Now, I haven't actually gotten around to installing Hy on my computer yet, so I haven't had a chance to test this out to make sure, but from the looks of the code example, it looks as though it is printing out the equivalent Python code of the executed Hy code, not the other way around. This would certainly make more sense. As such, I have changed the word 'Hy' to 'Python' so that the documentation more accurately reflects what (one assumes) is going on.
2014-01-20 14:29:57 +11:00
Gergely Nagy
e90b24b73a
hy/core/macros.hy: Add an (if-not) macro
...
Sometimes it is better to start with the false condition, sometimes that
makes the code clearer. For that, the (if-not) macro, which simply
reverses the order of the condition blocks, can be of great use.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2014-01-18 22:56:20 +01:00
Gergely Nagy
21709f0199
hy/core/macros.hy: Add defn-alias / defun-alias
...
In the same vein as defmacro-alias, this implements defn-alias /
defun-alias, which does essentially the same thing as defmacro-alias,
but for functions.
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
2014-01-18 16:09:35 +01:00
Nicolas Dandrimont
8447a9dfdb
Merge branch 'master' into pr/455
2014-01-17 20:35:44 +01:00
Nicolas Dandrimont
331165da32
Merge branch 'master' into pr/450
2014-01-17 20:31:01 +01:00
Nicolas Dandrimont
27962fb441
Light copy-editing
2014-01-17 20:28:24 +01:00
rubberduckdev
d273ad112f
Rewording and reformatting plaintext
...
Is this rewording unwieldy?
2014-01-17 18:20:41 +02:00
Gergely Nagy
59ca6e4cd0
docs: Document (defmacro-alias)
...
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
2014-01-17 12:05:35 +01:00
Gergely Nagy
ac49818956
docs: Correct the defmacro syntax in the API docs
...
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
2014-01-17 12:02:19 +01:00
Foxboron
a35ecc41bd
Fix reader macros to actually be macros
2014-01-17 01:07:47 +01:00
Gergely Nagy
8de61c65e7
Merge pull request #447 from rubberduckdev/patch-2
...
Missing comma
2014-01-16 05:14:58 -08:00
Berker Peksag
685a1b80fa
Silence a "Title underline too short" warning.
2014-01-16 14:08:18 +02:00
Berker Peksag
60e66476f5
Merge pull request #449 from rubberduckdev/patch-3
...
Correcting a typo
2014-01-15 18:01:50 -08:00
Berker Peksag
e919f75aaf
Merge pull request #446 from rubberduckdev/patch-1
...
Missing "of"
2014-01-15 17:59:01 -08:00
Yuval Langer
e50ca4fc07
Correcting typos.
2014-01-16 03:54:44 +02:00
rubberduckdev
cd66f18e2e
Rewording
...
Not sure if the rewording is much better.
2014-01-16 02:40:46 +02:00
rubberduckdev
6c15f14ff7
Correcting a typo
2014-01-16 02:13:05 +02:00
rubberduckdev
7d5399570c
Missing comma
2014-01-16 01:45:34 +02:00
rubberduckdev
65e9d5ae7e
Missing "of"
2014-01-16 01:25:43 +02:00
Berker Peksag
94e1fc40f7
Fix a markup error in the apply doc.
...
See http://docs.hylang.org/en/latest/language/api.html#apply
for the example.
2014-01-14 06:08:54 +02:00
Abhishek L
bd53416a72
docs: update docs with coll? functionality
2014-01-12 15:52:14 +05:30
Clinton N. Dreisbach
3907c5bc53
Added docs for unquote and unquote-splice
2014-01-11 23:29:48 -05:00
Clinton N. Dreisbach
18c19043c7
Add note about underscore/dash shadowing
2014-01-11 09:58:47 -05:00
Clinton N. Dreisbach
977b47d3b4
Noted that args are optional with apply
2014-01-10 16:14:20 -05:00
Clinton N. Dreisbach
c03e798356
Added docs for apply
2014-01-10 16:09:56 -05:00
Nicolas Dandrimont
5017e3c211
Add documentation for the attribute access DSL
2014-01-09 18:36:24 +02:00
Berker Peksag
d9d113670e
Add versionadded directives for macroexpand and macroexpand-1.
2014-01-05 22:16:29 +05:30
Vasudev Kamath
5b3f6879c6
Added .. versionadded: 0.9.13 and quoted the arguments. Also added
...
missing true for python code generation example.
Signed-off-by: Vasudev Kamath <kamathvasudev@gmail.com>
2014-01-05 19:55:41 +05:30
Vasudev Kamath
1bdf0d04c3
Added documentation for new core function disassemble
...
Signed-off-by: Vasudev Kamath <kamathvasudev@gmail.com>
2014-01-05 19:41:38 +05:30
Nicolas Dandrimont
a1895f635c
reword the four steps a bit
2014-01-03 17:19:06 +01:00
Nicolas Dandrimont
1d5847823b
more precise disclaimer
2014-01-03 17:19:06 +01:00
Nicolas Dandrimont
72a300c6e3
Add some documentation about models
2014-01-03 17:19:06 +01:00
Nicolas Dandrimont
9e02eaca26
Whitespace fix
2014-01-03 17:19:06 +01:00
Nicolas Dandrimont
88451bbeaa
Merge branch 'better-macroexpand' of https://github.com/sbp/hy into sbp-better-macroexpand
...
Conflicts:
hy/core/language.hy
tests/native_tests/language.hy
2014-01-02 00:49:40 +01:00
Bob Tolbert
032200bcb4
Some small doc fixes
...
This cleans up a number of doc warnings, including a bad
underline for zero?
While there, added a nil? function to match up with the
new nil is None.
Also un-hid myself from coreteam.
2013-12-31 16:14:05 -07:00
Paul Tagliamonte
eeef65b505
Change the signature of (for) and (with).
...
(for) is restored to clojure-like flatness.
(with) can be used without the nested list if you don't care about the
name.
Tests and examples updated.
2013-12-31 13:35:31 -05:00
Bob Tolbert
05899423df
Changing --show_tracebacks to --show-tracebacks
2013-12-31 09:56:03 -07:00
Bob Tolbert
5040c29946
Cleaning up some comments from berker
2013-12-31 09:56:03 -07:00
Paul Tagliamonte
931ce889f9
s/rply/rpython/
2013-12-31 11:26:31 -05:00
Bob Tolbert
a5e46fdc04
Merge pull request #402 from paultag/paultag/docs/compiler
...
Paultag/docs/compiler
2013-12-31 08:25:37 -08:00
Foxboron
426d34288f
Added docs and one small bug fix in defreader
2013-12-31 15:46:21 +02:00
Paul Tagliamonte
a5b56be83e
Merge branch 'master' of github.com:hylang/hy
2013-12-30 17:33:07 -05:00
Paul Tagliamonte
67fd0ddbbe
Document the compiler a little.
2013-12-30 17:32:57 -05:00
Bob Tolbert
d7956d03c3
Adding documentation for flatten
2013-12-31 03:49:37 +05:30
Paul Tagliamonte
893c2bc46e
Merge branch 'master' into pr/400
2013-12-30 16:49:32 -05:00
Bob Tolbert
4e3b6fd4cf
Add some docs for gensym and siblings
2013-12-30 14:42:55 -07:00
Foxboron
d82636958b
added for and with macros
...
Fixed up anaphoric.hy and added the tests too native_tests/__init__.py
added __init__.hy
2013-12-29 16:50:21 +01:00
Nicolas Dandrimont
799c39ffad
Implement del
...
Closes #385 .
2013-12-22 20:26:57 +02:00
Berker Peksag
ecd13ef659
Add versionadded directive to cli.rst.
2013-12-06 07:51:32 +02:00
Berker Peksag
2c76d8ec90
Document command line options.
2013-12-05 22:03:05 +05:30
Abhishek L
d8c29f51d6
docs/api:formatting fixes in quote' and
unquote'
...
A newline was omitted which caused the examples not to render for quote
and unquote forms
2013-12-01 01:20:58 +05:30
Abhishek L
63a9e35f7f
Document eval
, quasiquote' and
quote'.
...
Also, fix the usage of `setv`.
2013-11-27 12:14:49 +02:00
Joe H. Rahme
3856467bf6
Uses square brackets for conds in docs
2013-10-16 18:31:18 +02:00
Sean B. Palmer
defccc6853
Added macroexpand-1
2013-10-11 13:50:10 +01:00
Sean B. Palmer
033198a90e
Added documentation for macroexpand
2013-10-11 12:06:22 +01:00
Sean B. Palmer
6364296a7b
Documented punycode conversion more thoroughly using a compound case
2013-10-10 15:59:19 +01: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
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
kaizoku
b892ec4e66
Add zero? predicate to check if an object is zero
2013-09-02 02:28:21 -07:00
Tuukka Turto
e845287941
fix def / setv example
2013-08-25 21:29:24 +03:00
Tuukka Turto
99ba2880a6
minor fix
2013-08-05 23:30:03 +03:00
Tuukka Turto
7709509ed3
documenting defn / defun
2013-08-05 23:23:35 +03:00
Tuukka Turto
635e47b2cb
documentation for defun / defn and let
2013-08-05 21:56:57 +03:00
Paul Tagliamonte
acfc5c6aa5
Merge branch 'master' into pr/236
2013-07-27 10:22:38 -04:00
Paul Tagliamonte
6d9b93567d
Merge branch 'master' into pr/262
2013-07-23 00:08:32 -04:00
Tuukka Turto
6665a2b490
clarified rest / cdr, cleaned up require
2013-07-23 06:39:29 +03:00
Tuukka Turto
151ac69ce8
working on documenting builtins
2013-07-23 00:36:34 +03:00
Tuukka Turto
c6410b7050
cond documentation
2013-07-22 23:59:21 +03:00
Tuukka Turto
ec76c6bee0
documentation for require
...
working on documenting macros
2013-07-22 23:36:59 +03:00
Guillermo Vaya
82e8598cd6
fix to assoc docs + new multiassoc definition
2013-07-22 18:48:21 +02:00
Tuukka Turto
a786577a8b
documentation for global
2013-07-19 15:57:25 +03:00
Tuukka Turto
22d8a78330
better macro example
2013-07-19 12:06:23 +03:00
Tuukka Turto
d580351b41
initial macrodef documentation
2013-07-18 15:00:24 +03:00
Paul Tagliamonte
967bb95534
Merge branch 'master' into pr/237
2013-07-16 21:05:31 -04:00
Paul Tagliamonte
3dde930ede
Merge branch 'master' into pr/236
2013-07-16 20:57:29 -04:00
Tuukka Turto
624dfdc8c9
clarified foreach - else
2013-07-16 20:23:38 +03:00