Commit Graph

1775 Commits

Author SHA1 Message Date
Johnathon Sage
33e1cb17e1 Update AUTHORS
Added @johnathonmlady to the AUTHORS file
2015-11-14 17:02:00 -05:00
Johnathon Sage
38aa61cfa8 Merge pull request #2 from digitalvectorz/digitalvectorz-patch-yield
Update api.rst
2015-11-14 16:58:11 -05:00
Johnathon Sage
ec0eea1277 Update api.rst
(for [[( ... ) ( ... )]] )  --> HyMacroExpansionError: 'for' requires an even number of args.
2015-11-14 16:56:27 -05:00
Johnathon Sage
01fb8935fb Merge pull request #1 from digitalvectorz/digitalvectorz-patch-yield
Update api.rst
2015-11-14 16:22:15 -05:00
Johnathon Sage
7dbd3bcf7c Update api.rst
Extra closing '])' in yield "yields 'LexException'
2015-11-14 16:18:53 -05:00
Zack M. Davis
4d5eafb442 merge branch 'assign_err' (from pull request #964) 2015-11-13 22:31:57 -08:00
Ryan Gonzalez
283111b495 Improve error messages related to _storeize 2015-11-13 22:30:48 -08:00
Zack M. Davis
5af86d691d merge remote-tracking branch 'endrebak/anaphoric-import-info-missing' 2015-10-18 16:39:58 -07:00
Endre Bakken Stovner
66b16d15f5 Add import anamorphic macros info
Small change thanks to kirbyfan64
2015-10-18 21:15:47 +02:00
gilch
f4afb0ca7e variadic if
The `if` form now supports elif clauses.
It works like `cond` but without the implicit `do`.
The old `if` is now `if*`

variadic lif now supports "ellif" clauses.

Update if-no-waste compiler to use `if*` properly.

(Sometimes one character is all it takes.)

document if

reword truthiness
2015-10-17 19:51:03 -06:00
Tuukka Turto
9a334c83bb Merge branch 'pr/975' 2015-10-17 17:17:27 +03:00
Tuukka Turto
118343973b Merge branch 'master' into pr/976 2015-10-17 17:11:48 +03:00
Tuukka Turto
6ea6777663 Merge branch 'master' into pr/975 2015-10-17 17:11:31 +03:00
Tuukka Turto
b9eb7721da Merge branch 'master' into pr/974 2015-10-17 17:06:43 +03:00
Csilla Nagyne Martinak
58579320cd hy.core.macros: Add docstrings for -> and ->>
Borrowed from the API docs and Clojure, mostly.

Signed-off-by: Csilla Nagyne Martinak <csilla@csillger.hu>
2015-10-17 14:31:42 +02:00
Csilla Nagyne Martinak
acd98bb79e docs/tutorial: Simplify two examples
As part of the Grand Language Cleanup, a few examples in the tutorial
could be simplified:

* The --init-- function of the defclass example does not need an
  explicit None anymore.
* The apply example in the Hy<->Python interop section can use a
  keyword instead of a string in the last part.

This perhaps closes #971.

Signed-off-by: Csilla Nagyne Martinak <csilla@csillger.hu>
2015-10-17 14:07:32 +02:00
Csilla Nagyne Martinak
d79e56f2ef docs/tutorial: Add a short (require) example
Adds a short (require) example, along with a few words on why macros can't be imported.

Closes #966.

Signed-off-by: Csilla Nagyne Martinak <csilla@csillger.hu>
2015-10-17 13:58:47 +02:00
Csilla Nagyne Martinak
f73c862ffa docs: Document the (keyword) and (name) functions
Closes #733

Signed-off-by: Csilla Nagyne Martinak <csilla@csillger.hu>
2015-10-17 13:56:35 +02:00
Zack M. Davis
b875feccff merge branch 'f/one-arg-comparators' 2015-10-13 22:31:46 -07:00
Zack M. Davis
05857544f1 merge branch 'if-no-waste' 2015-10-13 21:59:18 -07:00
Berker Peksag
dab75f685d Merge pull request #951 from tuturto/macro-doc
Add section about macros in tutorial

Closes #926
2015-10-03 21:56:52 +03:00
Tuukka Turto
5a34285b08 Merge branch 'master' into pr/864 2015-10-03 21:05:46 +03:00
Tuukka Turto
af6ac92c0a Add section about macros in tutorial
relates #926
2015-10-03 13:24:43 +03:00
Gergely Nagy
0a942a069f Support one-arity comparison operators too
Comparison operators such as =, !=, <, >, <=, >= should support a
one-arity version too, and return true in those cases (except for !=,
which returns false).

This closes #949.

Reported-by: Matthew Egan Odendahl
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2015-10-03 11:01:48 +02:00
Gergely Nagy
7904632b05 Merge pull request #898 from algernon/glc/DOWN-WITH-THEM-BRACKETS
A big let and with change
2015-10-01 10:12:07 +02:00
Gergely Nagy
32f5d5dea7 Drop a set of brackets from with.
This changes with syntax from (with [[x (expr)] (expr)] ...) to (with
[x (expr) (expr)] ...). Should have no ill side effects apart from the
syntax change.

Closes #852.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2015-10-01 10:08:04 +02:00
Gergely Nagy
9f88e07e1d Drop a set of brackets from let.
This changes let to use a flat list of symbol-value pairs instead of a
vector of vectors. One side effect is that (let [[a 1] z]) is not
expressible now, and one will explicitly need to set a nil value for z,
such as: (let [a 1 z nil]).

Closes #713.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2015-10-01 10:08:04 +02:00
Gergely Nagy
9569537f8c Merge pull request #929 from gilch/itertools
Itertools
2015-10-01 10:03:16 +02:00
Gergely Nagy
8ce9c0c313 Merge pull request #882 from algernon/glc/apply-mangle
Teach apply about symbol mangling
2015-10-01 10:02:38 +02:00
Gergely Nagy
6d808bfda9 Merge pull request #881 from algernon/f/defclass-init-auto-nil
defclass should add an implicit nil return to --init--
2015-10-01 10:00:47 +02:00
Berker Peksag
a8c8afd679 Merge pull request #948 from jwilk/spelling
Fix typos
2015-09-30 00:05:24 +03:00
Jakub Wilk
3a1af0c219 Fix typos 2015-09-29 22:57:36 +02:00
Gergely Nagy
66aa14c88f Merge pull request #946 from gilch/patch-1
Add link to stable docs
2015-09-25 10:10:02 +02:00
Berker Peksag
7fbd5a791e Merge pull request #944 from michel-slm/patch-1
Update style-guide.rst
2015-09-25 09:19:50 +03:00
Matthew Egan Odendahl
a026a6a960 further clarification 2015-09-24 23:04:17 -06:00
Matthew Egan Odendahl
0213865525 Add link to stable docs
The language cleanup is confusing the new people. This is at least the third time.
2015-09-24 22:47:16 -06:00
Gergely Nagy
26f342d580 Teach apply about symbol mangling
apply now mangles strings and keywords according to the Hy mangling
rules (by using the same function, now imported from
hy.lex.parser). With this change, if the dict passed to apply has
keywords, strings or quoted symbols, they'll get mangled, to turn them
into proper keys.

This only works for the cases where the keys are directly in the apply
params. A previously deffed dict, or key through a variable will not be
mangled.

This closes #219.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2015-09-24 09:47:12 +02:00
Gergely Nagy
c89865aaf0 defclass should add an implicit nil to --init-- functions
To make it easier to write --init-- functions, defclass will now check
any (setv) expressions (and its property list), to find any --init--
declarations, and append a nil to the end.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2015-09-24 09:46:59 +02:00
Zack M. Davis
b1f497ae72 fix CI by moving exclude_lines .coveragerc setting to a new [report] §
On 21 September, all the continuous integration checks on a revision of
pull-request #920 were observed to fail with a "CoverageException:
Unrecognized option '[run] exclude_lines=' in config file
.coveragerc". One can only imagine that this was due to it trying to use
the new version 4.0 of Ned Batchelder's ever-popular coverage.py (just
released on 20 September), with which our existing .coveragerc would
seem to have not been compatible.
2015-09-23 22:44:19 -07:00
Michel Alexandre Salim
49a294e98d Update style-guide.rst
Re-indent `fib` examples to match that in original blog post - "Indentation shall be two spaces, except where matching the indentation of the previous line"
2015-09-23 00:39:08 +07:00
Ryan Gonzalez
c3190ca07d Optimize simple cases such as 'if True' 2015-09-22 12:37:04 -05:00
Ryan Gonzalez
21bbab4e09 Remove redundant assignments with nested ifs (closes #842) 2015-09-21 13:02:13 -05:00
Berker Peksag
456f33eb7c Merge pull request #938 from paultag/paultag/feature/hex-and-octel
Add hex and octel support to Hy integers
2015-09-16 20:55:05 +03:00
Paul Tagliamonte
fc5d74ba85 Add in documentation for non-base 10 numbers 2015-09-15 12:18:56 -04:00
Paul Tagliamonte
e05514bb4e Add hex and octel support to Hy integers
This allows us to parse things like 0xDEADBEEF or 0o080.

Filed as issue #937
2015-09-15 11:27:38 -04:00
Abhishek L
8be0e40c7a Merge pull request #936 from ALSchwalm/master
Remove hard-coded references to 'fn' and 'setv' in errors
2015-09-15 14:56:02 +05:30
Adam Schwalm
f9c3966e65 Remove hard-coded references to 'fn' and 'setv' in errors 2015-09-14 18:37:24 -05:00
Gregor Best
2e1b2ff591 Merge pull request #928 from gilch/partition
Enhanced partition
2015-09-06 16:54:23 +02:00
Morten Linderud
2a2ef883c0 Merge pull request #930 from timmartin/master
Add @timmartin to the AUTHORS file
2015-09-03 22:59:14 +02:00
Tim Martin
2670f92731 Add @timmartin to the AUTHORS file 2015-09-03 21:43:13 +01:00