FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Pyd & dmd v2.012 or v1.028 on WinXP

 
Post new topic   Reply to topic     Forum Index -> PyD
View previous topic :: View next topic  
Author Message
mbaas



Joined: 16 Mar 2008
Posts: 3

PostPosted: Sun Mar 16, 2008 3:55 pm    Post subject: Pyd & dmd v2.012 or v1.028 on WinXP Reply with quote

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
View user's profile Send private message
jcc7



Joined: 22 Feb 2004
Posts: 657
Location: Muskogee, OK, USA

PostPosted: Mon Mar 17, 2008 9:19 am    Post subject: Re: Pyd & dmd v2.012 or v1.028 on WinXP Reply with quote

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
View user's profile Send private message AIM Address
mbaas



Joined: 16 Mar 2008
Posts: 3

PostPosted: Mon Mar 17, 2008 2:57 pm    Post subject: Reply with quote

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
View user's profile Send private message
jcc7



Joined: 22 Feb 2004
Posts: 657
Location: Muskogee, OK, USA

PostPosted: Wed Mar 19, 2008 6:58 am    Post subject: Reply with quote

mbaas wrote:
But maybe this is because I'm essentially using RC1 of Pyd with only 2 files replaced from the svn repository.
That could very well be the problem, but I haven't tried to compile pyd yet, so it could be that the code in the SVN is just wrong.

mbaas wrote:
I didn't see an example how to check out the entire code from svn. What is the repository url?
If you have SVN installed, you should be able to follow the directions on this page: http://www.dsource.org/site/svnclient
(and checkout something like: http://svn.dsource.org/projects/pyd/trunk)

If you don't have SVN installed, you can do follow this URL to get a .zip of the latest trunk:
http://www.dsource.org/projects/pyd/changeset/head/trunk?old_path=%2F&format=zip
Back to top
View user's profile Send private message AIM Address
mbaas



Joined: 16 Mar 2008
Posts: 3

PostPosted: Wed Mar 19, 2008 2:49 pm    Post subject: Reply with quote

jcc7 wrote:

(and checkout something like: http://svn.dsource.org/projects/pyd/trunk)


Ah, excellent! I grabbed and installed the entire sources and now it's working even with the latest version of dmd 1. Smile
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... Wink

- Matthias -
Back to top
View user's profile Send private message
jcc7



Joined: 22 Feb 2004
Posts: 657
Location: Muskogee, OK, USA

PostPosted: Thu Mar 20, 2008 11:28 am    Post subject: Reply with quote

mbaas wrote:
jcc7 wrote:

(and checkout something like: http://svn.dsource.org/projects/pyd/trunk)


Ah, excellent! I grabbed and installed the entire sources and now it's working even with the latest version of dmd 1. Smile
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
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> PyD All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group