On Dec 6, 2007 4:50 PM, Ondrej Certik <[EMAIL PROTECTED]> wrote:
> Hi Martin,
>
> On Dec 6, 2007 4:31 PM, chowy <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > I'm trying to use sympy within pypy to compile python code, but
> > without success. Did you try to do that ? I saw here (http://www.mail-
> > archive.com/[EMAIL PROTECTED]/msg02801.html), you have succeeded
> > to use sympy within pypy but did you try to translate python code into
> > C code, with the translator ? If you have succeeded, is sympy must be
> > installed as usual (as a module of python) or as a module of pypy ?
> >
> > For example, I try to compile this function :
> >
> > def test():
> >     import sympy
> >     n = sympy.Number(3,2)
> >     print n
> >
> >
> > I execute the translator :
> > python2.4 ../../pypy/bin/translatorshell.py
> >
> > >>> t = Translation(test)      # -> OK
> > >>> t.annotate([])    # -> failed
> >
> > ...
> > ...
> > ...
> >
> > ../pypy-1.0.0/pypy/annotation/description.py", line 396, in __init__
> >
> > assert base is object, ("multiple inheritance only supported "
> > AssertionError: multiple inheritance only supported with _mixin_:
> > <class 'sympy.core.numbers.Number'>
> >
> >
> >
> > Can you give me more inforrmations to use sympy with pypy ?
>
> Thanks for trying it out. I sometimes try SymPy in pypy, but the
> problem with pypy is that it is not yet a correct Python interpeter,
> so there is perfectly correct python code in SymPy, that fails in
> pypy, one example is in that link you provided.
>
> As to translating to C - if I understand correctly, one has to write
> in RPython, not Python, in order to get a C code. I tried to use
> Cython with SymPy and this works though:
>
> http://groups.google.com/group/sympy/browse_thread/thread/ad5545eb7fba17d/
>
> So maybe that's the way to go.
>
> As to PyPy, I really don't know what to think, because I always
> thought it's going to be a robust Python interpreter, written in
> RPython, but after the recent discussion at pypy-dev, the upstream
> seems kind of undecided.

PyPy seems to have a new blog here:

http://morepypy.blogspot.com/

and especially watch this recent google tech talk about pypy:

http://www.youtube.com/watch?v=GnPmErtqPXk

at the end, they are asked when they expect PyPy to be seen in
production and which features of CPython they support, he says they
support 2.4 (but sympy works on pure Python 2.4, but sometimes not in
pypy) and that hopefully sometime next year pypy could be more
production ready and that they want it to be more than a research
project. So we'll see how it goes. There is no doubt PyPy has a huge
potential and its 90% there already, but those last 10% are usually
the most difficult.

Ondrej

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to