hy/NEWS

613 lines
22 KiB
Plaintext
Raw Normal View History

Changes from 0.11.0
This release brings some quite significant changes on the language and as a
result very large portions of previously written Hy programs will require
changes. At the same time, documentation and error messages were improved,
hopefully making the language easier to use.
[ Language Changes ]
* New syntax for let, with and defclass
* defmacro will raise an error on &kwonly, &kwargs and &key arguments
* Keyword argument labels to functions are required to be strings
* slice replaced with cut to stop overloading the python built-in
* removed reduntant throw, catch, progn, defun, lisp-if, lisp-if-not,
filterfalse, true, false and nil
* global now takes multiple arguments
* Nonlocal keyword (Python 3 only)
* Set literals (#{1 2 3})
* Keyword-only arguments (Python 3 only)
* Setv can assign multiple variables at once
* Empty form allowed for setv, del and cond
* One-argument division, rationals and comparison operators (=, !=, <, >, <=, >=)
* partition form for chunking collection to n-sized tuples
* defn-alias and demacro-alias moved into hy.contrib.alias
* None is returned instead of the last form in --init--
* for and cond can take a multi-expression body
* Hex and octal support for integer literals
* Apply now mangles strings and keywords according to Hy mangling rules
* Variadic if
* defreader can use strings as macro names
* as-> macro added
* require syntax changed and now supports same features as import
* defmulti changed to work with dispatching function
* old defmulti renamed to defn
* Lazy sequences added to contrib
* defmacro! added for once-only evaluation for parameters
* comp, constantly, complement and juxt added
* keyword arguments allowed in method calls before the object
[ Bug Fixes ]
* Better error when for doesn't have body
* Better error detection with list comprehensions in Python 2.7
* Setting value to callable will raise an error
* defclass can have properties / methods with built-in names
* Better error messages on invalid macro arguments
* Better error messages with hy2py and hyc
* Cmdline error to string conversion.
* In python 3.3+, generator functions always return a value
* &rest can be used after &optional
[ Misc. Improvements ]
* Version information includes SHA1 of current commit
* Improved Python 3.5 support
* Allow specification of global table and module name for (eval ...)
* General documentation improvements
* Contrib.walk: Coerce non-list iterables into list form
* Flow macros (case and switch)
* ap-pipe and ap-compose macros
* #@ reader macro for with-decorator
* Type check `eval` parameters
* `and` and `or` short-circuit
* `and` and `or` accept zero or more arguments
* read-str for tokenizing a line
* botsbuildbots moved to contrib
* Trailing bangs on symbols are mangled
* xi forms (anonymous function literals)
* if form optimizations in some cases
* xor operator
* Overhauled macros to allow macros to ref the Compiler
* ap-if requires then branch
* Parameters for numeric operations (inc, dec, odd?, even?, etc.) aren't type checked
* import_file_to_globals added for use in emacs inferior lisp mode
* hy.core.reserved added for querying reserved words
* hy2py can use standard input instead of a file
* alias, curry, flow and meth removed from contrib
* contrib.anaphoric moved to hy.extra
2015-05-03 19:19:25 +02:00
Changes from 0.10.1
[ Language Changes ]
* new keyword-argument call syntax
* Function argument destructuring has been added.
* Macro expansion inside of class definitions is now supported.
* yield-from support for Python 2
* with-decorator can now be applied to classes.
* assert now accepts an optional assertion message.
2015-09-29 22:57:36 +02:00
* Comparison operators can now be used with map, filter, and reduce.
2015-05-03 19:19:25 +02:00
* new last function
* new drop-last function
* new lisp-if-not/lif-not macro
* new symbol? function
* butlast can now handle lazy sequences.
* Python 3.2 support has been dropped.
* Support for the @ matrix-multiplication operator (forthcoming in
Python 3.5) has been added.
[ Bug Fixes ]
* Nested decorators now work correctly.
* Importing hy modules under Python >=3.3 has been fixed.
* Some bugs involving macro unquoting have been fixed.
* Misleading tracebacks when Hy programs raise IOError have been
corrected.
[ Misc. Improvements ]
* attribute completion in REPL
* new -m command-line flag for running a module
* new -i command-line flag for running a file
* improved error messaging for attempted function definitions
without argument lists
* Macro expansion error messages are no longer truncated.
* Error messaging when trying to bind to a non-list non-symbol in a
let form has been improved.
2014-10-10 15:45:07 +02:00
Changes from 0.10.0
This release took some time (sorry, all my fault) but it's got a bunch of
2014-10-10 15:52:44 +02:00
really nice features. We hope you enjoy hacking with Hy as much as we enjoy
2014-10-10 15:45:07 +02:00
hacking on Hy.
In other news, we're Dockerized as an official library image!
<https://registry.hub.docker.com/_/hylang/>
2014-10-10 15:45:07 +02:00
$ docker run -it --rm hylang
hy 0.10.0 using CPython(default) 3.4.1 on Linux
=> ((lambda [] (print "Hello, World!")))
Hello, World!
- Hy Society
[ Language Changes ]
* Implement raise :from, Python 3 only.
* defmain macro
* name & keyword functions added to core
* (read) added to core
* shadow added to core
* New functions interleave interpose zip_longest added to core
* nth returns default value when out of bounds
* merge-with added
* doto macro added
2015-12-08 14:43:47 +01:00
* keyword? to find out keywords
2014-10-10 15:45:07 +02:00
* setv no longer allows "." in names
[Internals ]
* Builtins reimplemented in terms of python stdlib
* gensyms (defmacro/g!) handles non-string types better
[Tools]
* Added hy2py to installed scripts
[ Misc. Fixes ]
* Symbols like true, false, none can't be assigned
* Set sys.argv default to [''] like Python does
2015-09-29 22:57:36 +02:00
* REPL displays the python version and platform at startup
2014-10-10 15:45:07 +02:00
* Dockerfile added for https://registry.hub.docker.com/_/hylang/
[ Contrib changes ]
* Fix ap-first and ap-last for failure conditions
2014-04-11 05:00:53 +02:00
Changes from 0.9.12
0.10.0 - the "oh man I'm late for PyCon" release
Thanks to theanalyst (Abhi) for getting the release notes
together. You're the best!
- Hy Society
[ Breaking Changes ]
We're calling this release 0.10 because we broke
API. Sorry about that. We've removed kwapply in
favor of using `apply`. Please be sure to upgrade
all code to work with `apply`.
(apply function-call args kwargs) ; is the signature
[Thanks]
Major shoutout to Clinton Dreisbach for implementing loop/recur.
As always, massive hugs to olasd for the constant reviews and for
implementing HyCons cells. Thanks to @kenanb for redesigning the
new Hy logo.
Many thanks to algernon for working on adderall, which helped
push Hy further this cycle. Adderall is an implementation of miniKanren
in Hy. If you're interested in using Adderall, check out hydiomatic,
2016-01-15 16:54:39 +01:00
which prettifies Hy source using Adderall rules.
2014-04-11 05:00:53 +02:00
This release saw an increase of about 11 contributors for a point
release, you guys rock!
-Hy Society
[ Language Changes ]
* `for' revamped again (Last time, we hope!), this time using a saner
itertools.product when nesting
* `lisp-if'/`lif' added for the lisp-like everything is true if, giving
seasoned lispers a better if check (0 is a value, etc)
* Reader Macros are macros now!
* yield-from is now a proper yield from on Python 3. It also now breaks on
Python 2.x.
* Added if-not macro
* We finally have a lisp like cons cells
* Generator expressions, set & dict comprehensions are now supported
* (.) is a mini DSL for attribute access
* `macroexpand' & `macroexpand-1' added to core
* `disassemble' added to core, which dumps the AST or equivalent python code
* `coll?' added to core to check for a collection
* `identity' function added to core
[ Misc. Fixes ]
* Lots of doc fixes. Reorganization as well as better docs on Hy internals
* Universal Wheel Support
* Pygments > 1.6 supports Hy now. All codeblocks in docs have been changed
from clojure to hy
* Hy REPL supports invoking with --spy & -i options [reword]
* `first' and `rest' are functions and not macros anymore
* "clean" target added to Makefile
* hy2py supports a bunch of commandline options to show AST, source etc.
* Sub-object mangling: every identifier is split along the dots & mangled
separately
2014-04-11 05:00:53 +02:00
[ Bug Fixes ]
* Empty MacroExpansions work as expected
* Python 3.4 port. Sorry this wasn't in a 3.4 release time, we forgot to do
a release. Whoops.
* eg/lxml/parse-tumblr.hy works with Python 3
* hy2py works on Windows
* Fixed unicode encoding issue in REPL during unicode exceptions
* Fixed handling of comments at end of input (#382)
[ Contrib changes ]
* Curry module added to contrib
* Loop/recur module added which provides TCO at tail position
* defmulti has been added - check out more in the docs -- thanks to Foxboron for this one!
* Walk module for walking the Hy AST, features a `macroexpand-all` as well
Changes from Hy 0.9.11
2013-12-31 18:04:43 +01:00
tl;dr:
0.9.12 comes with some massive changes,
We finally took the time to implement gensym, as well as a few
other bits that help macro writing. Check the changelog for
what exactly was added.
The biggest feature, Reader Macros, landed later
in the cycle, but were big enough to warrant a release on its
2013-12-31 18:04:43 +01:00
own. A huge thanks goes to Foxboron for implementing them
and a massive hug goes out to olasd for providing ongoing
reviews during the development.
2013-12-31 18:39:37 +01:00
Welcome to the new Hy contributors, Henrique Carvalho Alves,
Kevin Zita and Kenan Bölükbaşı. Thanks for your work so far,
folks!
2013-12-31 18:04:43 +01:00
2013-12-31 18:39:37 +01:00
Hope y'all enjoy the finest that 2013 has to offer,
- Hy Society
2013-12-31 18:04:43 +01:00
* Special thanks goes to Willyfrog, Foxboron and theanalyst for writing
0.9.12's NEWS. Thanks, y'all! (PT)
[ Language Changes ]
* Translate foo? -> is_foo, for better Python interop. (PT)
* Reader Macros!
* Operators + and * now can work without arguments
* Define kwapply as a macro
* Added apply as a function
* Instant symbol generation with gensym
* Allow macros to return None
* Add a method for casting into byte string or unicode depending on python version
* flatten function added to language
* Add a method for casting into byte string or unicode depending on python version
* Added type coercing to the right integer for the platform
[ Misc. Fixes ]
2013-12-31 18:04:43 +01:00
* Added information about core team members
* Documentation fixed and extended
* Add astor to install_requires to fix hy --spy failing on hy 0.9.11.
* Convert stdout and stderr to UTF-8 properly in the run_cmd helper.
* Update requirements.txt and setup.py to use rply upstream.
* tryhy link added in documentation and README
* Command line options documented
* Adding support for coverage tests at coveralls.io
* Added info about tox, so people can use it prior to a PR
* Added the start of hacking rules
* Halting Problem removed from example as it was nonfree
* Fixed PyPI is now behind a CDN. The --use-mirrors option is deprecated.
* Badges for pypi version and downloads.
[ Syntax Fixes ]
2013-12-31 18:04:43 +01:00
* get allows multiple arguments
[ Bug Fixes ]
* OSX: Fixes for readline Repl problem which caused HyREPL not allowing 'b'
* Fix REPL completions on OSX
* Make HyObject.replace more resilient to prevent compiler breakage.
[ Contrib changes ]
* Anaphoric macros added to contrib
* Modified eg/twisted to follow the newer hy syntax
* Added (experimental) profile module
2013-11-13 03:56:56 +01:00
Changes from Hy 0.9.10
* Many thanks to Guillermo Vayá (Willyfrog) for preparing this release's
release notes. Major shout-out. (PT)
[ Misc. Fixes ]
* Many many many documentation fixes
* Change virtualenv name to be `hy'
* Rewrite language.hy not to require hy.core.macros
* Rewrite the bootstrap macros in hy
* Cleanup the hy.macros module
* Add comments to the functions and reorder them
* Translation of meth from Python to Hy
* PY3 should really check for Python >= 3
* Add hy._compat module to unify all Python 2 and 3 compatibility codes.
* Import future.print_statement in hy code
* Coerce the contents of unquote-splice'd things to a list
* Various setup.py enhancements.
* PEP8 fixes
* Use setuptools.find_packages()
* Update PyPI classifiers
* Update website URL
* Install the argparse module in Python 2.6 and before
* Delete the duplicate rply in install_requires. With the PyPI version,
tests are failed.
* Finally fixed access to hy.core.macros here. have to explicitly require
them.
[ Language Changes ]
* Slightly cleaner version of drop-while, could use yield-from when ready
* Added many native core functions
* Add zero? predicate to check if an object is zero
* Macro if-python2 for compile-time choice between Python 2 and Python 3
code branches
* Added new travis make target to skip flake8 on pypy but run
it on all others
* Add "spy mode" to REPL
* Add CL handling to hyc
* Add yield from via macro magic.
* Add some machinery to avoid importing hy in setup.py
* Add a rply-based parser and lexer
* Allow quoting lambda list keywords.
* Clarified rest / cdr, cleaned up require
* Make with return the last expression from its branch
* Fix yielding to not suck (#151)
2016-07-01 16:44:12 +02:00
* Make assoc accept multiple values, also added an even/odd check for
2013-11-13 03:56:56 +01:00
checkargs
* Added ability to parse doc strings set in defclass declarations,
* Provide bin scripts for both Windows and *nix
* Removes setf in favor of setv
2013-07-07 20:03:25 +02:00
Changes from Hy 0.9.9
[ Stupid Fixes ]
* I forgot to include hy.core.language in the sdist. (PT)
2013-07-05 04:25:40 +02:00
Changes from Hy 0.9.8
[ Syntax Fixes ]
* Macros are now module-specific, and must be required when used. (KH)
* Added a few more string escapes to the compiler (Thomas Ballinger)
* Keywords are pseudo-callable again, to get the value out of a dict. (PT)
* Empty expression is now the same as an empty vector. (Guillermo Vaya)
[ Language Changes ]
* HyDicts (quoted dicts or internal HST repr) are now lists
that compiled down to dicts by the Compiler later on. (ND)
* Macros can be constants as well. (KH)
* Add eval-when-compile and eval-and-compile (KH)
* Add break and continue to Hy (Morten Linderud)
* Core language libraries added. As example, I've included `take` and
`drop` in this release. More to come (PT)
2013-07-06 21:04:11 +02:00
* Importing a broken module's behavior now matches Python's more
closely. (Morten Linderud)
2013-07-05 04:25:40 +02:00
[ Misc. Fixes ]
* Ensure compiler errors are always "user friendly" (JD)
* Hy REPL quitter repr adjusted to match Hy syntax (Morten Linderud)
* Windows will no longer break due to missing readline (Ralph Moritz)
2013-05-08 15:50:43 +02:00
Changes from Hy 0.9.7
[ Syntax Fixes ]
2013-05-12 19:40:21 +02:00
* Quasi-quoting now exists long with quoting. Macros will also not
expand things in quotes.
* kwapply now works with symbols as well as raw dicts. (ND)
* Try / Except will now return properly again. (PT)
2015-09-29 22:57:36 +02:00
* Bare-names sprinkled around the AST won't show up anymore (ND)
2013-05-12 19:40:21 +02:00
[ Language Changes ]
* Added a new (require) form, to import macros for that module (PT)
* Native macros exist and work now! (ND)
2013-05-08 15:50:43 +02:00
* (fn) and (lambda) have been merged (ND)
* New (defclass) builtin for class definitions (JD)
2013-05-12 19:40:21 +02:00
* Add unquote-splicing (ND)
[ Errata ]
* Paul was an idiot and marked the j-related bug as a JD fix, it was
actually ND. My bad.
2013-05-08 15:50:43 +02:00
2013-05-06 05:03:55 +02:00
Changes from Hy 0.9.6
[ Syntax Fixes ]
* UTF-8 encoded hy symbols are now hy_... rather than __hy_..., it's
silly to prefex them as such. (PT)
* `j' is no longer always interpreted as a complex number; we use it much
more as a symbol. (ND)
2013-05-06 05:03:55 +02:00
* (decorate-with) has been moved to (with-decorate) (JD)
* New (unless) macro (JD)
* New (when) macro (JD)
* New (take) macro (@eigenhombre)
* New (drop) macro (@eigenhombre)
* import-from and import-as finally removed. (GN)
* Allow bodyless functions (JD)
* Allow variable without value in `let' declaration (JD)
* new (global) builtin (@eal)
* new lambda-list syntax for function defs, for var-arity, kwargs. (JK)
[ Language Changes ]
* *HUGE* rewrite of the compiler. Massive thanks go to olasd
and jd for making this happen. This solves just an insane number
of bugs. (ND, PT, JD)
* Eval no longer sucks with statements (ND)
* New magic binary flags / mis fixes with the hy interpreter
2013-05-06 05:03:55 +02:00
(WKG + @eigenhombre)
2013-04-15 04:17:15 +02:00
Changes from Hy 0.9.5
[ Syntax Fixes ]
* .pyc generation routines now work on Python 3. (Vladimir Gorbunov)
* Allow empty (do) forms (JD)
* The `else' form is now supported in `try' statements. (JD)
* Allow `(raise)', which, like Python, will re-raise
the last Exception. (JD)
* Strings, bools, symbols are now valid top-level entries. (Konrad Hinsen)
* UTF-8 strings will no longer get punycode encoded. (ND)
* bare (yield) is now valid. (PT)
* (try) now supports the (finally) form. (JD)
* Add in the missing operators and AugAssign operators. (JD)
* (foreach) now supports the (else) form. (JD)
[ Language Changes ]
2013-04-15 04:19:33 +02:00
=============== WARNING: WARNING: READ ME: READ ME: ===================
2013-04-15 04:17:15 +02:00
From here on out, we will only support "future division" as part of hy.
This is actually quite a pain for us, but it's going to be quite an
amazing feature.
2013-04-15 04:17:15 +02:00
This also normalizes behavior from Py 2 --> Py 3.
Thank you so much, Konrad Hinsen.
=======================================================================
* (pass) has been removed from the language; it's a wart that comes from
a need to create valid Python syntax without breaking the whitespace
bits. (JD)
* We've moved to a new import style, (import-from) and (import-as) will
be removed before 1.0. (GN)
* Prototypes for quoted forms (PT)
* Prototypes for eval (PT)
* Enhance tracebacks from language breakage coming from the compiler (JD)
* The REPL no longer bails out if the internals break (Konrad Hinsen)
* We now support float and complex numbers. (Konrad Hinsen)
* Keywords (such as :foo) are now valid and loved. (GN)
Changes from Hy 0.9.4
[ Syntax Fixes ]
* `try' now accepts `else': (JD)
(try BODY
(except [] BODY)
(else BODY))
2013-04-07 18:47:07 +02:00
Changes from Hy 0.9.4
[ Syntax Fixes ]
2013-04-08 01:44:52 +02:00
* Statements in the `fn' path early will not return anymore. (PT)
2013-04-07 19:03:45 +02:00
* Added "not" as the inline "not" operator. It's advised to still
use "not-in" or "is-not" rather than nesting. (JD)
2013-04-07 20:32:47 +02:00
* `let' macro added (PT)
2013-04-07 19:03:45 +02:00
* Added "~" as the "invert" operator. (JD)
2013-04-07 18:47:07 +02:00
* `catch' now accepts a new format: (JD)
(catch [] BODY)
(catch [Exception] BODY)
(catch [e Exception] BODY)
(catch [e [Exception1 Exception2]] BODY)
* With's syntax was fixed to match the rest of the code. It's now: (PT)
(with [name context-managed-fn] BODY)
(with [context-managed-fn] BODY)
2013-04-07 18:47:07 +02:00
[ Language Changes ]
2013-04-08 00:18:02 +02:00
* Added `and' and `or' (GN)
2013-04-07 21:07:24 +02:00
* Added the tail threading macro (->>) (PT)
2013-04-07 18:47:07 +02:00
* UTF encoded symbols are allowed, but mangled. All Hy source is now
presumed to be UTF-8. (JD + PT)
* Better builtin signature checking (JD)
* If hoisting (for things like printing the return of an if statement)
2013-04-07 19:24:46 +02:00
have been added. '(print (if true true true))' (PT)
2013-04-07 18:47:07 +02:00
[ Documentation ]
2013-04-07 19:24:46 +02:00
* Initial documentation added to the source tree. (PT)
2013-04-07 18:47:07 +02:00
Changes from Hy 0.9.3
[ Syntax Fixes ]
2013-04-07 19:03:45 +02:00
* Nested (do) expressions no longer break Hy (PT)
* `progn' is now a valid alias for `do' (PT)
* `defun' is now a valid alias for `defn' (PT)
* Added two new escapes for \ and " (PT)
2013-04-07 18:47:07 +02:00
[ Language Changes ]
2013-04-07 19:03:45 +02:00
* Show a traceback when a compile-error bubbles up in the Hy REPL (PT)
* `setf' / `setv' added, the behavior of `def` may change in the future.
* `print' no longer breaks in Python 3.x (PT)
* Added `list-comp' list comprehensions. (PT)
* Function hoisting (for things like inline invocation of functions,
e.g. '((fn [] (print "hi!")))' has been added. (PT)
2013-04-07 20:32:47 +02:00
* `while' form added. (ND)
(while [CONDITIONAL] BODY)
2013-04-07 19:03:45 +02:00
2013-04-07 18:47:07 +02:00
[ Documentation ]
2013-04-07 19:03:45 +02:00
* Initial docs added. (WKG + CW)
2013-04-07 18:47:07 +02:00
Changes from Hy 0.9.2
2013-04-07 19:24:19 +02:00
[ General Enhancements ]
* hy.__main__ added, `python -m hy' will now allow a hy shim into existing
Python scripts. (PT)
2013-04-07 18:47:07 +02:00
[ Language Changes ]
2013-04-07 19:24:19 +02:00
* `import-as' added to allow for importing modules. (Amrut Joshi)
* `slice' added to slice up arrays. (PT)
* `with-as' added to allow for context managed bits. (PT)
* `%' added to do Modulo. (PT)
* Tuples added with the '(, foo bar)' syntax. (PT)
* `car' / `first' added. (PT)
* `cdr' / `rest' added. (PT)
* hy --> .pyc compiler added. (PT)
* Completer added for the REPL Readline autocompletion. (PT)
* Merge the `meth' macros into hy.contrib. (PT)
* Changed __repr__ to match Hy source conventions. (PT)
* 2.6 support restored. (PT)
2013-04-07 18:47:07 +02:00
Changes from Hy 0.9.1
2013-04-07 19:24:19 +02:00
[ General Enhancements ]
* Hy REPL added. (PT)
* Doc templates added. (PT)
2013-04-07 18:47:07 +02:00
[ Language Changes ]
2013-04-07 19:24:19 +02:00
* Add `pass' (PT)
* Add `yield' (PT)
* Moved `for' to a macro, and move `foreach' to old `for'. (PT)
* Add the threading macro (`->'). (PT)
* Add "earmufs" in. (tenach)
* Add comments in (PT)
2013-04-07 18:47:07 +02:00
Changes from Hy 0.9.0
[ Language Changes ]
2013-04-07 19:24:19 +02:00
* Add `throw' (PT)
* Add `try' (PT)
* add `catch' (PT)
2013-04-07 18:47:07 +02:00
Changes from Hy 0.8.2
2013-04-07 19:24:19 +02:00
[ Notes ]
* Complete rewrite of old-hy. (PT)