Commit Graph

500 Commits

Author SHA1 Message Date
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
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
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
Paul Tagliamonte
fc5d74ba85 Add in documentation for non-base 10 numbers 2015-09-15 12:18:56 -04:00
Gregor Best
2e1b2ff591 Merge pull request #928 from gilch/partition
Enhanced partition
2015-09-06 16:54:23 +02:00
gilch
6f93de68d7 added remaining itertools
Some names have been changed.
Removed redundant zipwith.
Made `first` and `last` more efficient.
2015-09-03 11:45:55 -06:00
gilch
4896980373 enhance partition 2015-09-02 22:54:24 -06:00
Tim Martin
818ed5da72 Added documentation for the (keyword?) function 2015-08-31 20:35:37 +01:00
gilch
a06c8a9af9 xi parameter may appear in function position 2015-08-12 08:50:18 -06:00
gilch
0bf1084d8c added xi-forms
These work like Clojure's `#()` anonymous function literals.
2015-08-11 19:11:17 -06:00
Ryan Gonzalez
6c076f76f7 Allow 'for' and 'cond' to take a multi-expression body (closes #868) 2015-08-10 10:14:55 +02:00
Gergely Nagy
54fb0102aa Merge pull request #875 from algernon/glc/defclass
defclass reimagined
2015-08-10 09:39:00 +02:00
Gergely Nagy
dee02c5928
docs: Minor corrections, related to the alias removals
Fixed up the documentation language here and there, related to the alias
removals in previous commits.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2015-08-10 09:33:23 +02:00
Gergely Nagy
8e2a892469
hy.contrib.alias: Move defn-alias and defmacro-alias here
As discussed in #880, move defn-alias and defmacro-alias to a contrib
module.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2015-08-10 09:24:48 +02:00
gilch
7d8ddd9ecb remove lisp-if / lisp-if-not in favor of lif / lif-not 2015-08-09 01:21:12 -06:00
gilch
4cdfdfbafe remove defun in favor of defn 2015-08-09 01:09:52 -06:00
gilch
33e0b4b3db remove progn in favor of do 2015-08-09 01:00:51 -06:00
gilch
66c1f38fcc remove catch in favor of except 2015-08-09 00:53:10 -06:00
gilch
e8d26f1067 remove throw in favor of raise 2015-08-09 00:52:42 -06:00
Tuukka Turto
ec3874377b Merge branch 'master' of github.com:hylang/hy into xor
Conflicts:
	hy/core/language.hy
2015-08-07 06:30:37 +03:00
Berker Peksag
2963ce6121 Tweak partition link. 2015-08-06 07:10:39 +03:00
gilch
bb00e709ee add partition form to core
the 2 argument version of Clojure's partition.

pre-expand ->> macro in partition

Docstring for partition.

add test-partition

Document partition.
2015-08-05 21:38:11 -06:00
Calem Bendell
12db748c97 corrected slice to cut in docs
corrected slice to cut in the documentation.

also corrected a line in parse tumblr that used slice
2015-08-05 13:21:37 +02:00
Gergely Nagy
cbc2eed900
defclass reimagined
defclass now has a new syntax:

 (defclass Name [BaseList]
   [property value
    property value] ;; optional

   (defn method [self]
     self.property))

Anything after the optional property list (which will be translated to a
setv within the class context) will be added to the class body. This
allows one to have side effects and complex expressions within the class
definition.

As a side effect, defining methods is much more friendly now!

Closes #850.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2015-08-04 16:43:07 +02:00
Tuukka Turto
eaf1a3023a Change xor to binary function
xor with more than two input parameters is not well defined and people
have different expectations on how it should behave. Avoid confusion by
sticking with two parameters only.
2015-08-03 05:37:39 +03:00
Tuukka Turto
ca8b6b4fe5 Add exclusive or logical operator
Added xor to complement and, or, not operators. Standard python
falsey/truthy semantics are followed. This implementation works for
two or more parameters.
2015-08-02 23:57:46 +03:00
Gregor Best
98704ddd1a fix typo 2015-07-30 16:07:25 +02:00
Gregor Best
0146cc8e4d Add docs for read-str 2015-07-30 16:07:25 +02:00
Ryan Gonzalez
016d25d104 Add one-argument division and rationals (closes #825 and #826) 2015-07-29 13:30:24 -05:00
Zack M. Davis
016557deab reader macro #@ for with-decorator
The `with-decorator` special form is not the most ergonomic—this commit
introduces a new builtin `#@` reader macro that expands to an invocation
of `with-decorator`. To support this, `reader_macroexpand` is made to
also look in the default `None` namespace, in imitation of how
regular (non-reader) macros defined in hy.core are looked up. The
docstring of `hy.macros.reader` is also edited slightly for accuracy.

This in the matter of issue #856.
2015-07-26 15:05:38 -07:00
Ryan Gonzalez
736d7a7991 Let setv take pairs of arguments (ref. #844) 2015-07-25 17:45:34 -05:00
Gregor Best
4fe67c11a4 Rework `flow' module doc
- Reworded intro a bit
- Cleaned up white space
- Reworded examples
2015-07-24 09:52:33 +02:00
Gergely Nagy
4642625378 Merge pull request #788 from nicolas-p/ap-pipe-ap-compose
Added ap-pipe and ap-compose macros
2015-07-23 15:08:18 +02:00
Morten Linderud
73a29fd377 Merge pull request #781 from zackmdavis/kwonly_connect
keyword-only arguments
2015-07-23 14:12:35 +02:00
Morten Linderud
e228245690 Merge pull request #760 from Tritlo/flow
Added flow macros
2015-07-23 14:08:46 +02:00
Zack M. Davis
4b00a84f9f documentation for &kwonly 2015-07-22 22:06:51 -07:00
Berker Peksag
144ee3b2f0 Merge branch 'pr/829' 2015-07-15 00:00:01 +03:00
Ryan Gonzalez
c94c0e8b50 Add set literals (closes #827) 2015-07-14 23:59:29 +03:00
Morten Linderud
c2fe74c4a2 Merge pull request #803 from farhaven/nonlocal-doc
Add documentation for the (nonlocal ...) directive
2015-07-01 15:30:30 +02:00
Gregor Best
b106e3c08d Expand doc for defn with &kwargs 2015-07-01 14:57:53 +02:00
Paul Tagliamonte
4d31af2264 Add @zackmdavis to core 2015-06-29 22:14:10 -04:00
Ewald Grusk
296b6eaa2a documents order of variable assignments in let expressions 2015-06-13 21:10:57 +02:00
Gregor Best
4adddbbf25 Allow specification of global table and module name for (eval ...) 2015-05-20 20:44:52 +02:00
Gregor Best
802ef0cd0d reword nonlocal doc a bit to mention nested fn scopes as well 2015-05-12 09:30:22 +02:00
Gregor Best
5743f6ae78 Add versionadded tag to nonlocal doc 2015-05-12 09:29:55 +02:00
Gregor Best
e4ed5cc357 Mention that nonlocal is for Python3.0 and up only 2015-05-12 00:00:54 +02:00
Gregor Best
9ed9bc5e11 Add documentation for the (nonlocal ...) directive
Signed-off-by: Gregor Best <gbe@unobtanium.de>
2015-05-11 23:38:02 +02:00
Berker Peksag
685688f04c Update versionadded directives.
0.11.0 is a backwards incompatible release.
2015-05-09 22:12:04 +03:00
nicolas-p
fad1a27439 Docs for ap-pipe and ap-compose
Added docs for the ap-pipe and ap-compose anaphoric macros.
2015-04-26 18:35:46 +02:00
Antony Woods
0496b7f7b6 Added name to AUTHORS and added documentation 2015-03-19 08:43:11 +00:00
Matt Shirley
1f19c6b12b Update style-guide.rst
I think you must have spilt something on your keyboard.
2015-03-13 09:23:38 -04:00
Nicolás Della Penna
750d7b51be minor change
changed the specific values to make the example slightly more clear
2015-03-12 03:38:15 +02:00
Adrià Garriga-Alonso
f7b5486b69 Assert now may take an optional label, like in Python 2015-02-22 17:34:19 +01:00
Zhao Shenyang
487710c093 add documents for symbol? 2015-01-30 01:21:26 +08:00
Matthias Pall Gissurarson
7be22e361b removed guard as it matches cond almost exactly, added case 2015-01-18 12:37:50 +00:00
Matthías Páll Gissurarson
a3670a8d57 added flow macros 2015-01-17 22:46:23 +00:00
Shrayas
ee4fecdafe Fix typo
It was mistyped as lisP comprehensions instead of lisT
comprehensions
2015-01-14 22:16:26 +05:30
Kevin Yap
19b55384f8 Correct indentation level of code blocks
Also, remove hard tabs from code blocks.
2015-01-02 21:05:02 -08:00
Kevin Yap
d684ea1eed Miscellaneous fixes to transplanted style guide 2015-01-02 20:25:07 -08:00
Kevin Yap
112a075d89 Match heading/subheading style to rest of Hy docs 2015-01-02 19:58:46 -08:00
Kevin Yap
a160c74a42 Transplant style guide from hylang/hy-style-guide 2015-01-02 19:56:07 -08:00
Christopher Allan Webber
706376277f Explaining that :keyword syntax is for post 0.10.1 only 2014-12-23 15:05:36 -06:00
Christopher Allan Webber
cacc14a7be Removing trailing whitespace from example 2014-12-23 14:39:40 -06:00
Christopher Allan Webber
6ec89af988 Dashes! Dashes everywhere! ... in the tutorial
The tutorial used underscores in Hy code everywhere.

Updated all examples to use dashes, as per Hy convention.
2014-12-23 14:27:38 -06:00
Christopher Allan Webber
d98e4fd733 Implement keyword argument passing... (foo-func 1 2 :kw1 "bar") works!
This code is heavily, *heavily* based off of Guillermo Vaya
(willyfrog)'s work... instead of defining its own keyword arg though, it
uses the "standard" :kwarg type, which is the main difference from
willyfrog's original branch.

Included tests and some documentation in the tutorial.

Also documented "apply" separately as an example of reproducing
*args and **kwargs.
2014-12-23 14:07:02 -06:00
Berker Peksag
cd93c0b03e Merge pull request #704 from iKevinY/doc-changes
Fixes to documentation (language & contributor modules)
2014-12-07 12:36:58 +02:00
Kevin Yap
8c0ac0862f Adhere to CPython's documentation guidelines
- Inline code is written using ``double backticks``
- Italicized text uses *asterisks* rather than `single backticks`
- Function parameters are italicized rather than written as inline code
2014-12-07 02:09:43 -08:00
Kevin Yap
d50485710c Change documentation code block language to Hy 2014-12-07 02:03:35 -08:00
Kevin Yap
d657e5eb2d Fixes to contributor module documentation
- Changed "Contrib" to "Contributor"
- Fixed mismatched inline code in list* usage
- Added missing hyperlink targets
2014-12-06 15:47:01 -08:00
Kevin Yap
997501bcc4 Fixes to language documentation
- Use backticks consistently for inline code
- Capitalize section headers and proper nouns
- Minor grammatical fixes
2014-12-06 15:46:44 -08:00
Berker Peksag
5034b5a918 Tweak Python interop section a bit. 2014-12-06 18:10:35 +02:00
Matthías Páll Gissurarson
ddc56a1e78 Added explanation on Hy <-> Python interop 2014-12-06 12:51:16 +00:00
Kevin Yap
3e0ea7a131 Various changes to documentation pages
- Standardized capitalization of Hy, Lisp(s), and Python.
- Added periods to the end of list items.
- Use inline code blocks for inline code.
- Stripped trailing whitespace.
- Other miscellaneous grammatical changes.
2014-12-05 23:15:48 -08:00
Gergely Nagy
684dc51ead docs: Drop the HyLambdaListKeyword docs
HyLambdaListKeyword was removed a while ago, drop its documentation too.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2014-12-05 16:23:03 +01:00
Ed Singleton
aa8f6a2ca1 Typo fix in docs 2014-12-05 15:07:44 +00:00
Bob Tolbert
05574f6ad7 Implement -m command line flag to run a module by name 2014-11-26 09:13:45 -07:00
Paul Tagliamonte
ec593154fe Merge branch 'master' into pr/637
Conflicts:
	hy/core/language.hy
2014-11-15 07:58:56 -05:00
Paul Tagliamonte
6d25237093 Merge branch 'master' into pr/658 2014-11-15 07:54:24 -05:00
Tianon Gravi
96410f506e Add a dedicated lisp-if-not / lif-not macro
This is in parallel to `if` / `if-not` (so not without precedent). :)
2014-11-06 12:44:15 -07:00
Berker Peksag
377c3ec5ee Update versionadded directive for merge-with. 2014-10-09 02:58:42 +03:00
bismigalis
76d7e3479a Added merge-with 2014-10-02 18:50:04 +04:00
Foxboron
89dec9ef44 Fixed example to be streamlined 2014-09-08 16:57:52 +02:00
Paul Tagliamonte
e3646bb874 add @microamp 2014-09-06 08:49:05 -04:00
han semaj
99db02668b Fix 'some' (first logical true value or nil) 2014-09-04 21:29:38 +12:00
Morten Linderud
bc0ef3ea14 Merge pull request #641 from microamp/issue-638
Fix #638: Make nth return default value when out of bounds
2014-09-03 14:28:01 +02:00
han semaj
6ca47df34c Include optional arg in docs (nth) 2014-09-03 20:53:28 +12:00
Foxboron
325f873f1e Fixed (read) docs as mentioned inn #641 2014-09-02 22:26:47 +02:00
han semaj
ecc664337d Make nth return default value when out of bounds 2014-08-23 23:35:31 +12:00
han semaj
23f31d4ac1 Reimplement butlast in terms of drop-last 2014-08-22 21:51:12 +12:00
han semaj
7f5c8e39d8 Implement drop-last 2014-08-22 21:09:59 +12:00
Tianon Gravi
8d893ead07 Add more complex example of (read) usage 2014-08-19 03:04:08 -06:00
Tianon Gravi
cf7e5ed3c0 Fix RST code-block rendering for (read) examples
Also removed trailing whitespace and added a blank line to separate the discrete examples
2014-08-19 02:55:47 -06:00
Paul Tagliamonte
37fc9e08d0 Merge branch 'master' into pr/635 2014-08-18 12:10:08 -04:00
han semaj
3f1a24bfe3 Implement interleave and interpose 2014-08-17 14:53:57 +12:00
Foxboron
c8adf9b726 Renamed stdin -> from-file and removed apply from tests + docs 2014-08-14 18:18:05 +02:00
Foxboron
f7675c829e Added read and tests 2014-08-12 18:37:46 +02:00
Abhishek L
1da6d0af43 docs: fix decorator to reflect multiple decorators
* docs/language/api.rst: the `with-decorator' builtin supports multiple
  decorators which it applies in order. Docs are updated to reflect this
2014-05-24 17:35:39 +05:30
Berker Peksag
0f0c4227b6 Merge pull request #604 from Duta/master
Minor typo
2014-05-17 22:29:44 +03:00
Bertie Wheen
02fa251175 Minor typo
Sorry for tiny commits :P
2014-05-17 19:04:41 +01:00
Bertie Wheen
a102a268a9 Rephrased confusing comment 2014-05-17 18:46:01 +01:00
Tuukka Turto
726d1735db Merge branch 'master' into pr/571
Conflicts:
	AUTHORS
	tests/native_tests/core.hy
2014-05-13 09:32:51 +03:00
Abhishek L
4f74652c73 the mega typo fix commit
Wow! much typos! such fix!
2014-05-05 23:47:14 +05:30
Abhishek L
f2beef6e70 Move contributing from hacking docs to repo root
A CONTRIBUTING.rst is added to the root of the repo, as Github
automatically recognizes this for incoming PRs
(ref: https://github.com/blog/1184-contributing-guidelines)

Most of the information is directly borrowed from the existing hacking
docs, which is restructured to refer to this file instead for
contribution guidelines
2014-05-03 17:37:30 +05:30
Abhishek L
ad0191f343 Merge master onto pr/580 2014-05-02 19:37:54 +05:30
Tuukka Turto
d539f73d4d correct ..versionadded:: for defmain
my mistake, should have spotted before merging and pushing
2014-05-02 12:27:19 +03:00
Tuukka Turto
b1a928037e Merge branch 'master' into pr/526 2014-05-02 10:34:37 +03:00
Tuukka Turto
ddcf192da4 Merge branch 'master' into pr/524 2014-04-30 10:16:30 +03:00
Berker Peksag
cdea12b276 Make hy2py public. 2014-04-30 01:51:21 +03:00
pyos
f02e044719 Move the documentation for zipwith to the correct place. 2014-04-29 18:04:21 +04:00
pyos
8e4b21103c Reimplement some built-ins in terms of the standard library.
As a result:

  * functions such as `nth` should work correctly on iterators;
  * `nth` will raise `IndexError` (in a fashion consistent with `get`)
    when the index is out of bounds;
  * `take`, etc. will raise `ValueError` instead of returning
    an ambiguous value if the index is negative;
  * `map`, `zip`, `range`, `input`, `filter` work the same way (Py3k one)
    on both Python 2 and 3 (see #523 and #331).
2014-04-29 18:03:43 +04:00
Tuukka Turto
01fa9d6a3c document set-comp 2014-04-28 21:35:28 +03:00
Tuukka Turto
3a66a2d1be document dict-comp and genexpr 2014-04-28 21:09:06 +03:00
Matthew Wampler-Doty
fa5f51e0f1 Adding Version Added 0.10.1 2014-04-25 08:19:22 -05:00
Ryan Gonzalez
4f8ab5af8c Changed conf.py to use RTD theme if available 2014-04-24 00:17:58 +03:00
Matthew Wampler-Doty
834b0019a7 Fixing doto to be API compatible with Clojure's doto 2014-04-21 12:35:56 -07:00
Tuukka Turto
f4b67e8bd8 documentation for doto
relates #567
2014-04-21 13:28:08 +03:00
Allison Kaptur
a76c3d1f51 add make flow to the hacking docs 2014-04-16 13:40:21 -04:00
Morten Linderud
e5e1489f0f Merge pull request #553 from berkerpeksag/missing-versionadded
Add a missing versionadded directive to the lisp-if/lif documentation.
2014-04-13 17:33:20 +02:00
Berker Peksag
c5dfba3c4f Fix a code-block in the lambda documentation. 2014-04-13 18:04:42 +03:00
Berker Peksag
07b9371cb8 Add a missing versionadded directive to the lisp-if/lif documentation. 2014-04-13 17:42:48 +03:00
Paul Tagliamonte
217f3ad65f Merge branch 'master' into pr/515 2014-04-10 22:52:41 -04:00
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
Brendan Curran-Johnson
ec4607d644 Quoting works
Hy seems to support quoting. I'm not familiar enough with lisp/hy to say much more
2014-03-13 04:51:43 +02:00
Abhishek L
eae5cf08f4 Typo fixes in internals doc 2014-02-24 21:42:36 +05:30
Christopher Allan Webber
6bc1bee24a Answer the question: is Hy a lisp flavored python or vice versa? The latter! 2014-02-24 09:55:11 -06:00
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
6e0486ba78 Update copyright year in docs. 2014-02-15 19:22:53 +02:00
Paul Tagliamonte
2f751df0f6 Merge branch 'master' into pr/489 2014-02-15 11:49:12 -05: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
Foxboron
66366b5bc9 Added defmulti 2014-02-05 16:07:48 +01:00
Abhishek L
4b54e3c748 Merge master onto pr/471
Conflicts:
	hy/core/language.hy
2014-01-30 21:50:23 +05:30
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
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
Abhishek L
fdd2ed39f0 Merge master onto pr/460 2014-01-20 21:15:43 +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
Jack Hooper
d028b8a7b2 Added closing bracket ']' 2014-01-18 22:22:33 +11:00
Jack Hooper
06d41f7cd0 Corrected chessboard example
A chessboard is 8 x 8. Yours was 8 x 9.
2014-01-18 16:33:40 +11: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
Nicolas Dandrimont
eedebd12b3 Merge branch 'master' into pr/443 2014-01-17 20:25:09 +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
f
8ec2719e2d Visual and text changes in quickstart page. Kind of beautifying. It also
includes transparent versions of Cuddles.
2014-01-17 04:02:33 +02: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
Paul Tagliamonte
8ababcb905 add clinton 2014-01-13 20:24:12 -05:00
Clinton N. Dreisbach
47d67b0062 Added loop/recur macro for tail-call optimization 2014-01-12 14:02:27 -05: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
Paul Tagliamonte
d4357fe35c Add @kenanb's logo to the docs. It's so amazing.
Thanks so much! Read more at:
 http://www.kenanb.com/posts/Hy-Programming-Language-Logo.html
2014-01-08 20:51:17 -05:00
Will Kahn-Greene
0999886d35 Update quickstart.rst
Nixing the float: left inducing thing so that it looks better
on RTD.
2014-01-06 17:13:04 -05: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