Merge pull request #92 from pbrunet/master

lazy and other
Never use negative indices as template parameter

clang++ chokes on this, and current behavior was definitively broken
anyway.
More type inference optimizations

g++ faces a memory burst when meeting too much templated code. This
commit uses several techniques to avoid this, mainly by

* perform some type inference at pythran level (not easy because we
  manipulate abstract types intra-procedurally)
* alias operators that have the same typing behavior (e.g. + and -)

the new generator made a few flaws in the C++ typing part appear, they
are now fixed (at least on my machine...)
Optimizations using iterators :

* Analyse of potential iterators, even in user-created functions.
* Transformation of List Comprehensions intos map(...) when possible
* Transformations of intrinsics into iterators (ex : map -> imap)
* Transformation of remaining List Comprehensions into Generator Expressions
* Docstring with each transformation
* Test cases
Fix the reversed xrange implementation.
Fix constness of empty_list bool operator.
core::ltuple improvements

* automatic casting to std::tuple
* allow concatenation with std::tuple
Fix bug in imap iterator comparison

* handle the case of a map over two sequences of different size: stop as
  soon as one sequence is exhausted.
Fix type inference when combining ltuples and tuples

* relying on operator+ is a bad idea for tuples
Workaround some recursive typing limitations
Fix bug when concatenating empty ltuples
Make randrange test more robust

Increase the number of throws and cross fingers...
Rework Pythran config management

* use ConfigParser from standard library
* all libraries, path and constants are loaded from this config
* load defaults from pythran.cfg (system)
* load extra from ~/.pythranrc
* during setup, update the system config file based on target platform
* simplify the pythran.compile interface
First sketch of ndarray support implementation

* python <> C++ bridge
* functions zeros, ones, empty, arange, linspace, sum
  cumsum, min, max, transpose, *_likes, all...
* constants pi, e
* indexing with scalar or tuples
* sharing across array references
* make spec parser aware of numpy
Use expression templates to implement numpy ufunc

* Use a combination of boost::simd and OpenMP for parallel computations
* Only activate SIMD extensions when AVX is found
* Always use unaligned load/store :(
* support all ufunc through nt2
Rework ndarray implementation

Legacy structure made it impossible to implement extended slices, and
the interface was unclear.

New implementation uses the classical way to represent N dimensional
array through a pointer to the data and array of pointers to hold the
intermediate dimensions.
Do not include nt2 simd version in scalar mode

This results in faster compilation time
Harmonize numpy expression handling

* rely on size() method to get the number of elements in the expression
  (shape agnostic)
* rely on at(long) method to access a given element in the expression
* rely on load(long) method to load a vector from the expression
* slices respect this interface
* ndarray respect this interface
Implementation and test of several numpy functions

* alen
* all
* allclose
* alltrue
* amax
* amin
* angle
* any
* append
* argmax
* argmin
* argsort
* argwhere
* around
* array2string
* array_equal
* array_equiv
* array_split
* array_str
* asarray
* asarray_chkfinite
* ascontiguousarray
* asscalar
* asarray_chkfinite
* ascontiguousarray
* asscalar
* atleast_1d
* atleast_2d
* atleast_3d
* average
* base_repr
* binary_repr
* bincount
* clip
* concatenate
* conj
* conjugate
* copy
* cumprod
* cumproduct
* delete_
* diag
* diagflat
* equal
Consistently rebuild env during constant folding

Try hard to gather the proper imports