Commit Graph

1333 Commits

Author SHA1 Message Date
Nicolas Dandrimont
77baf3b9f3 Merge branch 'meth-fix' of https://github.com/Willyfrog/hy into Willyfrog-meth-fix
Conflicts:
	tests/__init__.py
2014-01-02 00:53:40 +01:00
Nicolas Dandrimont
74739bc43e Whitespace fix 2014-01-02 00:52:29 +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
Paul Tagliamonte
575388fc13 Merge branch 'master' into pr/397
Conflicts:
	hy/importer.py
2014-01-01 16:40:16 -05:00
Paul Tagliamonte
8adae9a01f No fox for you. 2014-01-01 12:41:22 -05:00
Paul Tagliamonte
553337080a Adding missing AUTHORs from the git log. Sorry, folks. 2014-01-01 12:39:06 -05: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
dfbdbdfb73 We're 0.9.12 2013-12-31 14:24:50 -05:00
Bob Tolbert
978ededf23 Merge pull request #406 from paultag/paultag/bugfix/im-an-idiot
Paultag/bugfix/im an idiot
2013-12-31 11:12:15 -08: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
Berker Peksag
3774a05d87 Add Kevin Zita to NEWS for 0.9.12. 2013-12-31 19:39:37 +02:00
Paul Tagliamonte
8cabf22749 add news for 0.9.12 2013-12-31 12:04:43 -05:00
Bob Tolbert
faf782560c Fixing tests for new 'for' syntax 2013-12-31 09:56:03 -07: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
Bob Tolbert
765dba3e56 More updates, including from Foxboron, for errors like (for) 2013-12-31 09:56:03 -07:00
Foxboron
f064d3f121 Errors into errors.py, added HyMacroExpansionError, fixed macro arg fail 2013-12-31 09:56:03 -07:00
Bob Tolbert
f6160c755a Much better version of new error messages.
This version is much simpler.

At the point that the exception is raised, we don't have access to
the actual source, just the current expression. but as the
exception percolates up, we can intercept it, add the source and
the re-raise it.

Then at the final point, in the cmdline handler, we can choose to
let the entire traceback print, or just the simpler, direct error
message.

And even with the full traceback, the last bit is nicely formatted
just like the shorter, simpler message.

The error message is colored if clint is installed, but to avoid
yet another dependency, you get monochrome without clint.

I'm sure there is a better way to do the markup, the current method
is kludgy but works.

I wish there was more shared code between HyTypeError and LexException
but they are kind of different in some fundamental ways.

This doesn't work (yet) with runtime errors generated from Python,
like NameError, but I have a method that can catch NameError and turn it
into a more pleasing output.

Finally, there is no obvious way to raise HyTypeError from pure Hy code,
so methods in core/language.hy throw ugly TypeError/ValueError.
2013-12-31 09:56:03 -07:00
Paul Tagliamonte
defbe22349 Merge branch 'master' of github.com:hylang/hy 2013-12-31 11:45:19 -05:00
Paul Tagliamonte
e754a58237 Merge branch 'master' into pr/363 2013-12-31 11:41:30 -05:00
Abhishek L
48f916b34f Add myself to authors 2013-12-31 21:58:40 +05:30
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
Berker Peksag
9b1990901c Fix |Unknown directive type "todo"| error. 2013-12-31 15:51:58 +02:00
Foxboron
426d34288f Added docs and one small bug fix in defreader 2013-12-31 15:46:21 +02:00
Paul Tagliamonte
b011048b41 allow one-shot merge 2013-12-30 18:02:03 -05: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
Abhishek L
0a80b87b7f Merge branch 'master' onto pr/395 2013-12-31 03:37:26 +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
Gergely Nagy
62522a5f86 Allow get with multiple arguments
When calling get with more than two arguments, treat the rest as indexes
into the expression from the former. That is, (get foo "bar" "baz")
would translate to foo["bar"]["baz"], and so on.

This fixes #362.

Requested-by: Sean B. Palmer <sean@miscoranda.com>
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2013-12-30 12:04:40 +01: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
Berker Peksag
8120a25c08 Add py_compile.{MAGIC, wr_long} to hy._compat.
Closes #344.
2013-12-29 13:10:36 +02:00
Paul Tagliamonte
f189f0a457 Add Kenan Bölükbaşı to AUTHORS. 2013-12-28 18:48:47 -05:00
Kenan Bölükbaşı
3f590f8916 Reflect parameters of code.InteractiveConsele in HyREPL in order to make hy run inside Blender. 2013-12-29 01:22:16 +02:00
Bob Tolbert
f6887ed7c2 Merge pull request #371 from paultag/paultag/feature/profile
Add profile macro.
2013-12-28 08:33:58 -08:00
Paul Tagliamonte
9656c7f53c Add profiling macros 2013-12-28 11:25:27 -05:00
Bob Tolbert
55a7ab1667 add nil as synonym for None 2013-12-27 13:50:19 -07:00
Bob Tolbert
b2bb161cb0 Merge pull request #391 from olasd/bugfix/apply-method-call
Fix apply with method calls
2013-12-27 11:46:59 -08:00
Abhishek L
141f44c09f Merge branch 'olasd:feature/only-macroexpand-when-needed' 2013-12-27 11:50:39 +05:30
Paul Tagliamonte
29c9e566e1 Merge branch 'paultag/ana/if' of github.com:paultag/hy into paultag/ana/if 2013-12-26 17:57:52 -05:00
Paul Tagliamonte
1dc26148c6 Merge branch 'master' into paultag/ana/if
Conflicts:
	hy/contrib/anaphoric.hy
2013-12-26 17:57:29 -05:00
Abhishek L
c69c14cc7d contrib/anaphoric: More anaphoric macros added
* hy/contrib/anaphoric.hy: The following anaphoric macros have been
  added
  `ap-reject` : Opposite of ap-filter, yields the elements when a `pred`
  evaluates to false
  `ap-dotimes` : Execute body forms (possibly for side-effects) n times
  with `it` bound from 0 to n-1
  `ap-first` : return the first element that passes predicate
  `ap-last`  : return the last element that passes predicate
  `ap-reduce`: anaphoric form of reduce that allows `acc` and `it` to
  create a function that is applied over the list

* docs/contrib/anaphoric.rst: updated docs to reflect these changes

* tests/__init__.py: updated to explicitly include tests for anaphoric
  macros
2013-12-26 05:57:06 +02:00
Nicolas Dandrimont
81d5f08100 Only call macroexpand when needed
We only need to call macroexpand on HyExpressions,
as this is already guarded in macroexpand_1. This
saves us a few funcalls.
2013-12-26 03:00:24 +01:00
Paul Tagliamonte
c7070f82b5 Add ap-if docs. 2013-12-25 20:28:32 -05:00
Paul Tagliamonte
6172b60e75 Add anaphoric if statement 2013-12-25 12:14:26 -05:00
Nicolas Dandrimont
cfbc792957 Fix apply with method calls
Apply didn't work on method calls (i.e. `(apply .foo [bar]) broke).
This slipped through because there were no tests of this behavior. I noticed
it while trying to merge the `meth` fixes.
2013-12-23 21:02:45 +01:00
Nicolas Dandrimont
744cd71171 Nuke the rply git checkout from tox.ini 2013-12-23 15:31:36 +01:00