[Python-ideas] Enabling access to the AST for Python code

Wes Turner wes.turner at gmail.com
Fri Jul 3 02:55:10 CEST 2015


On Thu, May 21, 2015 at 9:22 PM, Andrew Barnert via Python-ideas <
python-ideas at python.org> wrote:

>
> > On May 21, 2015, at 19:08, Greg <greg.ewing at canterbury.ac.nz> wrote:
> >
> >> On 22/05/2015 1:51 p.m., Andrew Barnert via Python-ideas wrote:
> >> Or just use MacroPy, which
> >> wraps up all the hard stuff (especially 2.x compatibility) and
> >> provides a huge framework of useful tools. What do you want to do
> >> that can't be done that way?
> >
> > You might not want to drag in a huge framework just to
> > do one thing.
>
> But "all kinds of LINQ-style things, like ORMs" isn't just one thing. If
> you're going to build a huge framework, why not build it on top of another
> framework that does the hard part of the work for you?
>

* MacroPy looks interesting
* PonyORM -> SQLAlchemy


http://dask.pydata.org/en/latest/array-blaze.html#why-use-blaze

"""These different projects (Blaze -> dask.array -> NumPy -> Numba) act as
> different stages in a compiler. They start at abstract syntax trees, move
> to task DAGs, then to in-core computations, finally to LLVM and beyond. For
> simple problems you may only need to think about the middle of this chain
> (NumPy, dask.array) but as you require more performance optimizations you
> extend your interest to the outer edges (Blaze, Numba)."""


... http://continuum.io/blog/blaze

"""Once a graph is evaluated, Blaze attempts to gather all available type
> and metadata available from the user input to inform better computation
> selection and scheduling. The compiler converts expressions graph objects
> into an intermediate form called ATerm, drawn from the StrategoXT project.
> This intermediate form is roughly a subset of Python expressions but allows
> the explicit annotation of type and metadata information directly on the
> AST. The ATerm IR forms the meeting point where both Numba and Blaze can
> come together to code generation and graph rewriting to produce more
> efficient kernels."""



> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150702/f733c135/attachment-0001.html>


More information about the Python-ideas mailing list