www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - pyd still usable?

reply mpt <mpt iki.fi> writes:
Which versions of tango+gdc+pyd do I need to get stuff to work? I'd like
to use D+Python on 32 or 64 bit Linux. I've tried a number of tango/gdc
bundles and pyd rc/trunk, but there are always compiler and linker errors.

How do you build Tango to a library that can be linked to a dynamic
library, such as a Python extension?
Apr 27 2009
parent reply Jarrett Billingsley <jarrett.billingsley gmail.com> writes:
On Mon, Apr 27, 2009 at 11:18 AM, mpt <mpt iki.fi> wrote:
 Which versions of tango+gdc+pyd do I need to get stuff to work? I'd like
 to use D+Python on 32 or 64 bit Linux. I've tried a number of tango/gdc
 bundles and pyd rc/trunk, but there are always compiler and linker errors.

 How do you build Tango to a library that can be linked to a dynamic
 library, such as a Python extension?
Unless Kirk has updated it recently, Pyd is still Phobos-only, but the library-dependent code as far as I know is limited to one module and something like four functions.
Apr 27 2009
parent reply Simen Haugen <simen norstat.no> writes:
Jarrett Billingsley wrote:
 On Mon, Apr 27, 2009 at 11:18 AM, mpt <mpt iki.fi> wrote:
 Which versions of tango+gdc+pyd do I need to get stuff to work? I'd like
 to use D+Python on 32 or 64 bit Linux. I've tried a number of tango/gdc
 bundles and pyd rc/trunk, but there are always compiler and linker errors.

 How do you build Tango to a library that can be linked to a dynamic
 library, such as a Python extension?
Unless Kirk has updated it recently, Pyd is still Phobos-only, but the library-dependent code as far as I know is limited to one module and something like four functions.
It uses templates for bindings, and if I remember correctly, dmd hits the limit for max variable name length when using templates. I hit the limit somewhere around 8 functions I think. Might work on linux, but I haven't tried.
Apr 28 2009
parent Jarrett Billingsley <jarrett.billingsley gmail.com> writes:
On Tue, Apr 28, 2009 at 4:05 AM, Simen Haugen <simen norstat.no> wrote:
 It uses templates for bindings, and if I remember correctly, dmd hits the
 limit for max variable name length when using templates.
 I hit the limit somewhere around 8 functions I think.
Actually the name limit hasn't been a problem for several months now. DMD Win now MD5-hashes long symbol names so it's now impossible (?) to crash OPTLINK by having long symbol names. However, this has simply fixed one problem to reveal another: OPTLINK will die if there are too many fixups in a single object. Just a hard crash. This happens a lot in Pyd-like code with several classes and methods wrapped.
 Might work on linux, but I haven't tried.
It does. The only weak link is OPTLINK, which is only used by DMD Win.
Apr 28 2009