Re: [pypy-dev] cppyy: C++ bindings for PyPy

2012-04-23 Thread wlavrijsen
Hi Alex, Distro is latest gentoo, amd64 with sse2 and sse3 (core i5). there's an older version of (Py)ROOT distributed with gentoo: http://packages.gentoo.org/package/sci-physics/root Do you want to use that package, or pick up a more recent version (doesn't matter for Reflex, I think, as

Re: [pypy-dev] cppyy: C++ bindings for PyPy

2012-04-23 Thread Alex Pyattaev
Distro is latest gentoo, amd64 with sse2 and sse3 (core i5). libssl is in 2 versions: dev-libs/openssl-0.9.8u:0.9.8 dev-libs/openssl-1.0.0h:0 so pick one that suits you better. Anyway, default binary pypy works fine. Currently i have only one typemap in my *.i file for swig, and it allows PyObje

Re: [pypy-dev] output readable c

2012-04-23 Thread Antonio Cuni
Hi Bookaa, On 04/23/2012 08:19 AM, Armin Rigo wrote: > > Bookaa, the person to do that can be you. In that case you need to > learn about Mercurial version control and the http://bitbucket.org > repository. I would recommend that you register on bitbucket, and > create your own fork of "pypy/py

Re: [pypy-dev] cppyy: C++ bindings for PyPy

2012-04-23 Thread wlavrijsen
Hi Alexander, An important question from userland - would it be benefitial to switch from SWIG to the new interface? When can that be done? there are no many major differences between SWIG and this on the Python side (nothing that can't be captured in a compatibility layer). I'm thinking of su

Re: [pypy-dev] cppyy: C++ bindings for PyPy

2012-04-23 Thread wlavrijsen
Leonard, Addendum: apparently, clang even provides python bindings. http://eli.thegreenplace.net/2011/07/03/parsing-c-in-python-with-clang/ yes, but AFAIK it's C only and in any case, those are bindings to CLang, rather than bindings to the code parsed from CLang. You'll run into the same prob

Re: [pypy-dev] cppyy: C++ bindings for PyPy

2012-04-23 Thread Alex Pyattaev
Well, I have never been able to isolate it, and the project where it is triggered is rather close-sourced. long story short - make up a SWIG object inside a function, pass it as a pointer to the swig-wrapped function, then call gc.collect(). After that swig calls object's destructor and if the

Re: [pypy-dev] cppyy: C++ bindings for PyPy

2012-04-23 Thread Leonard Ritter
Addendum: apparently, clang even provides python bindings. http://eli.thegreenplace.net/2011/07/03/parsing-c-in-python-with-clang/ On Mon, Apr 23, 2012 at 11:17 AM, Leonard Ritter wrote: > (sorry, that was also supposed to go to the ML) > > Awesome work, keep it up! > > But: I showed the reflex

Re: [pypy-dev] cppyy: C++ bindings for PyPy

2012-04-23 Thread Leonard Ritter
(sorry, that was also supposed to go to the ML) Awesome work, keep it up! But: I showed the reflex library you're using to friends and they both suggested clang to parse C++ headers instead. What do you think about that? Cheers, Leonard On Mon, Apr 23, 2012 at 7:08 AM, wrote: > Hi, > > as det

Re: [pypy-dev] cppyy: C++ bindings for PyPy

2012-04-23 Thread Amaury Forgeot d'Arc
2012/4/23 Alexander Pyattaev > Right now the main problem with SWIG is the object ownership, i.e. with > pypy one has to set thisown=False for all objects to avoid crashes related > to GC code. The problem occurs only for long-living objects though. Do you have a sample code for this issue? --

Re: [pypy-dev] cppyy: C++ bindings for PyPy

2012-04-23 Thread Alexander Pyattaev
An important question from userland - would it be benefitial to switch from SWIG to the new interface? When can that be done? Right now the main problem with SWIG is the object ownership, i.e. with pypy one has to set thisown=False for all objects to avoid crashes related to GC code. The proble