View previous topic :: View next topic |
Author |
Message |
mbaas
Joined: 16 Mar 2008 Posts: 3
|
Posted: Sun Mar 16, 2008 3:55 pm Post subject: Pyd & dmd v2.012 or v1.028 on WinXP |
|
|
Hi,
I wanted to give D a try and also found Pyd which would be an ideal way to play around with D. Unfortunately, I haven't managed to get it working. First, I was using the Pyd RC1 that is on the download site. But with that one I got an error in python.d. So I replaced that file with the one from svn which fixed that error. But now, using dmd v2.012 I get:
...\infrastructure\pyd\pydobject.d(179): function pyd.pydobject.PydObject.toString of type char[]() overrides but is not covariant with object.Object.toString of type invariant(char)[]()
And using dmd v1.028 I actually get an error somewhere in phobos:
...\phobos\std\bind.d(305): Error: void initializer has no value
I noticed that Pyd hasn't been modified for a couple of months now whereas those compiler versions are rather new. So is Pyd still actively developed? From what I've seen on the web site it seems to be quite a nice tool and having an alternative to C/C++ for writing Python modules would really be great.
- Matthias - |
|
Back to top |
|
|
jcc7
Joined: 22 Feb 2004 Posts: 657 Location: Muskogee, OK, USA
|
Posted: Mon Mar 17, 2008 9:19 am Post subject: Re: Pyd & dmd v2.012 or v1.028 on WinXP |
|
|
mbaas wrote: | Hi,
I wanted to give D a try and also found Pyd which would be an ideal way to play around with D. Unfortunately, I haven't managed to get it working. First, I was using the Pyd RC1 that is on the download site. But with that one I got an error in python.d. So I replaced that file with the one from svn which fixed that error. But now, using dmd v2.012 I get:
...\infrastructure\pyd\pydobject.d(179): function pyd.pydobject.PydObject.toString of type char[]() overrides but is not covariant with object.Object.toString of type invariant(char)[]()
And using dmd v1.028 I actually get an error somewhere in phobos:
...\phobos\std\bind.d(305): Error: void initializer has no value
I noticed that Pyd hasn't been modified for a couple of months now whereas those compiler versions are rather new. So is Pyd still actively developed? From what I've seen on the web site it seems to be quite a nice tool and having an alternative to C/C++ for writing Python modules would really be great.
- Matthias - |
I'm not sure version of D pyd would compile best with, but KirkMcDonald gave a hint in the comment for Changeset 121 (2007-07-29): Quote: | Since the D 2.0 series has been found lacking at the moment, Pyd once again compiles under the 1.0 series. (Specifically 1.016 or later; tested with 1.020.) | So you might see if it works with D 1.020 and go on from there. |
|
Back to top |
|
|
mbaas
Joined: 16 Mar 2008 Posts: 3
|
Posted: Mon Mar 17, 2008 2:57 pm Post subject: |
|
|
Thanks for the hint! So I downloaded dmd v1.020 and now I get the following error:
...\phobos\std\bind.d(317): alias std.bind.minNumArgs_impl!(hello_func,void(*)()).res cannot alias an expression 0
But maybe this is because I'm essentially using RC1 of Pyd with only 2 files replaced from the svn repository. I didn't see an example how to check out the entire code from svn. What is the repository url?
On the other hand, the error message points to bind.d which is part of dmd, so I would assume the error is actually in that file?
- Matthias - |
|
Back to top |
|
|
jcc7
Joined: 22 Feb 2004 Posts: 657 Location: Muskogee, OK, USA
|
|
Back to top |
|
|
mbaas
Joined: 16 Mar 2008 Posts: 3
|
Posted: Wed Mar 19, 2008 2:49 pm Post subject: |
|
|
Ah, excellent! I grabbed and installed the entire sources and now it's working even with the latest version of dmd 1.
dmd 2 still produces the above error, but as I don't know what the difference between v1 and v2 is anyway I can just as well use v1. I suppose this will still allow me to get a feel for the language.
Even though I haven't produced any code yet, I'm already amazed by D/Pyd. If I compare installing Pyd vs installing Boost.Python (and comparing the required disk space) there's a clear winner on the side of the newcomers (it's only that the RC1 download should be updated). If everything else is so smooth I could soon wave my C++ compiler good-bye...
- Matthias - |
|
Back to top |
|
|
jcc7
Joined: 22 Feb 2004 Posts: 657 Location: Muskogee, OK, USA
|
Posted: Thu Mar 20, 2008 11:28 am Post subject: |
|
|
mbaas wrote: |
Ah, excellent! I grabbed and installed the entire sources and now it's working even with the latest version of dmd 1.
dmd 2 still produces the above error, but as I don't know what the difference between v1 and v2 is anyway I can just as well use v1. I suppose this will still allow me to get a feel for the language. | Typically code is either just for D 1.x or just for D 2.x. I've read about some efforts to use tricks like version and string mixins to write code that can be compiled with both D 1.x and D 2.x, but the tricks that I've seen don't look like practical techniques for a large project. I think most D coding is still being done primarily in D 1.x anyway.
Personally, I'm keeping my distance from D 2.x for the time being. I'm not confident that the new constness stuff in D 2.x will prove useful. D 1.x is a lot more stable, too. |
|
Back to top |
|
|
|