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

Pyd status

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



Joined: 22 Jun 2006
Posts: 23

PostPosted: Sat Jul 22, 2006 5:07 pm    Post subject: Pyd status Reply with quote

The latest SVN revision of Pyd is 29. It supports the following features:

  • Integration with Python's Distutils. This makes building Python extensions written in D so very much easier. Thanks to David Rushby's CeleriD project.
  • Type conversion. D types can be automatically converted to PyObjects, and PyObjects can be manually converted to a given D type. (Or they can be wrapped with the DPyObject class.) If a conversion fails, an exception is thrown. It is worth pointing out that delegates are a convertable type: delegates (and function pointers) will be wrapped with a Python callable when returned into Python, and Python callables can be wrapped with a delegate (but not a function pointer) when sent into D.
  • Function wrapping. Any function whose arguments and return type are convertable types, and which accepts 10 arguments or less, can be easily wrapped and called from Python. Default arguments are even supported.
  • Class wrapping. D classes, and their methods, properties, and constructors, can be wrapped and be seamlessly used as Python classes. You can even subclass your D classes with Python classes. The same rules that apply to wrapping functions apply to wrapping methods and constructors. (Constructors have some additional limitations I hope to get rid of eventually.) Once a class is wrapped, it becomes a convertable type, and may be used as an argument or return type of a wrapped function or method.

The following features are in the works:

  • Linux support. GDC now supports building shared libraries in Linux. Adding Linux support to Pyd means adding GDC support to CeleriD, which is more tedious than difficult.
  • Automatic operator overload wrapping. I have already added this support for most-to-all of the simple arithmetic operators. However, opIndex (and its friends), opApply, and opCall still need to be wrapped. (In other words, the difficult ones.) The opApply operator in particular is annoying, as Python's iteration protocol is based around generators rather than callbacks. The only real way to wrap opApply with Python's iteration protocol is with threads, and there are any number of drawbacks to this. It is possible I will have to simply expose a literal "opApply" method that takes a callback. This means wrapped classes won't (automatically) get the benefit of Python's iteration protocol.
  • Documentation! A tutorial! I will be writing these things once I've worked out the Linux situation.
Back to top
View user's profile Send private message
KirkMcDonald



Joined: 22 Jun 2006
Posts: 23

PostPosted: Tue Aug 08, 2006 3:30 pm    Post subject: Reply with quote

Revision 30 adds support for GDC on Linux to CeleriD. Unfortunately, GDC cannot yet compile Pyd, due to some issues with templates in the D front-end. (See the recent thread "Pyd on Linux building woes" in digitalmars.D for details. I'd link to it, but the news archives are still down.)

Edit: The precise bug that is preventing GDC compilation of Pyd has been submitted as bug #311.


Last edited by KirkMcDonald on Sun Aug 27, 2006 4:24 pm; edited 1 time in total
Back to top
View user's profile Send private message
jcc7



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

PostPosted: Wed Aug 09, 2006 7:05 am    Post subject: Reply with quote

It's not the official web interface, but here's a link to "Pyd on Linux building woes".

(I hope the web interface is online again soon because not everyone has access to the newsgroups from every computer that they use.)
Back to top
View user's profile Send private message AIM Address
KirkMcDonald



Joined: 22 Jun 2006
Posts: 23

PostPosted: Wed Aug 16, 2006 11:05 am    Post subject: Reply with quote

As of revision 38, Pyd now wraps opApply. Thanks go to Mikola Lysenko's StackThreads package.

Additionally, the main Pyd docs are now located at http://pyd.dsource.org.
Back to top
View user's profile Send private message
KirkMcDonald



Joined: 22 Jun 2006
Posts: 23

PostPosted: Mon Nov 20, 2006 12:39 pm    Post subject: Reply with quote

Revision 45 updates Pyd for DMD 0.174 as well as Python 2.5. It has been re-written to use D's new tuples, and the code is vastly easier to understand as a result.

Pyd also uses Don Clugston's Nameof to simplify its interface. (Consult the docs.) Additionally, most of D's operator overloads are now wrapped.
Back to top
View user's profile Send private message
KirkMcDonald



Joined: 22 Jun 2006
Posts: 23

PostPosted: Wed Feb 21, 2007 7:11 pm    Post subject: Reply with quote

This thread has been replaced by my blog: http://kirkmcdonald.blogspot.com
Back to top
View user's profile Send private message
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