Commit Graph

2826 Commits

Author SHA1 Message Date
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
Berker Peksag
f5285d6028 Merge pull request #776 from nikete/patch-1
minor change
2015-03-12 13:06:19 +02: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
Berker Peksag
55d4d20f79 Merge pull request #773 from NathanW2/run_file
Run file using hy -i
2015-02-28 19:07:04 +02:00
Nathan Woodrow
a3ad4df6a1 Run file using hy -i
Add test for -i using file
2015-02-28 18:11:42 +10:00
Abhishek Lekshmanan
2a4558f1d2 travis: run in container infra & remove pypy hacks
Using travis' container based infra which is faster & allows caching pip
and is faster, also after the environment update hy seems happy with
pypy2.5 so removing the hacks needed to pass that.
2015-02-26 11:29:11 +05:30
Morten Linderud
a3775316e7 Merge pull request #770 from rhaps0dy/master
Added myself to AUTHORS
2015-02-22 18:19:57 +01:00
Adrià Garriga-Alonso
f14a84125a Added myself to AUTHORS 2015-02-22 18:18:02 +01:00
Adrià Garriga-Alonso
f7b5486b69 Assert now may take an optional label, like in Python 2015-02-22 17:34:19 +01:00
Berker Peksag
49e7376b0e Merge pull request #765 from zackmdavis/appease_flake8
move imports and operators to satisfy new version of pep8 checker
2015-02-17 08:32:50 +02:00
Zack M. Davis
0fd6ed052c move imports and operators to satisfy new version of pep8 checker
jcrocholl/pep8 (used by flake8, used in Hy's continuous integration
builds) introduced an imports-at-top-of-file check in 1.6.0 and a
line-breaks-around-binary-operators check in 1.6.2. This commit makes
nonfunctional changes to bring the Hy codebase in compliance with this
tool, fixing #764.
2015-02-16 22:21:49 -08:00
Morten Linderud
5edcdd26b8 Merge pull request #763 from zackmdavis/hy_io_error
improve traceback legibility by means of distinguishing source of IOErrors
2015-02-17 00:30:24 +01:00
Zack M. Davis
f247470621 appends to AUTHORS 2015-02-16 14:52:41 -08:00
Zack M. Davis
4bea6dc59e distinguish IOError when loading file from that raised by program itself
Previously, Hy scripts that raised a subclass of IOError would be caught
by code intended to deal with IOErrors raised when Hy couldn't import
the script itself, resulting in either a misleading "Can't open file"
error message, or a misleading TypeError traceback from not being able
to format the "Can't open file" message (for IOErrors for which the
errno attribute was None). This commit (a straightforward implementation
of the idea proposed by @slimetree in #714) introduces a new HyIOError
class, raises that when `import_file_to_hst` can't open the file path,
and catches it in the `cmdline_handler`.

This is believed to fix #513, #714, and #727.
2015-02-16 14:27:18 -08:00
Abhishek L
31edaf6dee Merge pull request #762 from larme/add-is-symbol-function
add `symbol?` function to `hy.core`
2015-01-29 23:06:11 +05:30
Zhao Shenyang
95107df685 Add Shenyang Zhao to AUTHORS 2015-01-30 01:25:06 +08:00
Zhao Shenyang
487710c093 add documents for symbol? 2015-01-30 01:21:26 +08:00
Zhao Shenyang
dafcc7ec70 add symbol? function to hy.core
`symbol?` will test if the input is an instance of HySymbol. It's useful when writing macros.
2015-01-29 23:17:52 +08:00
Zhao Shenyang
dc607763e2 Fix some coding style problems 2015-01-24 09:25:04 +08:00
Zhao Shenyang
1046cd3ac5 Add test case for 'replace_hy_obj' 2015-01-24 08:50:47 +08:00
Zhao Shenyang
38cf570ca4 move 'wrap_value' test from macros/ to models/ 2015-01-24 08:32:20 +08:00
Zhao Shenyang
2375392962 Add 'replace_hy_obj' to safely replace Hy objects
Currently '.replace' method is used to replace hy objects. This is not
safe when we are not sure if the 'obj' in 'obj.replace(other)' is an
instance of HyObject.

In these cases, we can use function 'replace_hy_obj(obj, other)'
instead. This function will try to wrap 'obj' if it's not an instance of
HyObject.

This also means that we need a wrapping function in hy.models'. Hence I
moved the '_wrap_value' function from hy.macros into hy.models. To avoid
circular importing, the wrapper functions are provided individually by
each model type's own file.
2015-01-24 08:16:38 +08:00
Berker Peksag
8d6f9c3d84 Merge pull request #756 from icholy/master
Fix issues with tab completion.
2015-01-19 19:30:47 +02:00
Ilia Choly
7ef4d37169 Fix completion bugs
* freezing issue
* missing __name__
* reader & macro completion
* improve underscore to dash conversion
* python 3/2 string compatibility
2015-01-19 12:17:12 -05: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
Paul‮etnomailgaT‭
f70d9d43f2 Merge pull request #759 from icholy/fix-koan
fix typos in koan
2015-01-15 15:59:56 -05:00
Ilia Choly
925a1dd313 fix typos in koan 2015-01-15 15:06:10 -05:00
Abhishek L
11b308abb6 Merge pull request #757 from shrayasr/new-author
Merge master on to pr/757
2015-01-15 10:02:59 +05:30
Shrayas
f54fca11b0 Adding Shrayas to AUTHORS 2015-01-15 09:43:34 +05:30
Berker Peksag
050c0257fd Merge pull request #751 from shrayasr/typo-fix
Fix typos in tutorial docs
2015-01-15 06:00:16 +02:00
Berker Peksag
8457c348e6 Merge pull request #755 from icholy/master
Adapt attribute completion from IPython completer
2015-01-14 23:22:37 +02:00
Ilia Choly
a5654e33ee Adapt attribute completion from IPython completer 2015-01-14 16:22:17 -05:00
Morten Linderud
7829b8752c Merge pull request #753 from Tritlo/issue752
Added a fix for nested decorators. Fixes #752
2015-01-14 22:10:12 +01:00
Matthías Páll Gissurarson
1d5b455491 Added a fix for nested decorators. Fixes #752 2015-01-14 19:42:02 +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
34fb8a778c Merge pull request #737 from ALSchwalm/master
Add Adam Schwalm to authors list
2014-12-29 09:52:45 -06:00
Adam Schwalm
a3e88b13cf Add Adam Schwalm to authors list 2014-12-29 09:49:23 -06:00
Christopher Allan Webber
c037c7bdb0 Merge pull request #736 from ALSchwalm/multiline-str
Add support for multi-line strings in interpreter
2014-12-29 09:44:08 -06:00
Adam Schwalm
f1df108b31 Add support for multi-line strings in interpreter 2014-12-28 23:38:38 -06: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
12270ecaa3 paultag likes iter(exprs) better than exprs.__iter__()
We do what the BDFL says lest he shoot us with magic wizard sticks.
2014-12-23 14:32:03 -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
Christopher Allan Webber
96c591ff9d Gender-neutralizing line with "Mrs", which is a problematic title
See http://cognoscenti.wbur.org/2014/09/30/gender-politics-feminism-ms-miss-mrs-amy-carleton
as a light introduction to this.
2014-12-22 11:01:32 -06:00