Hi Shivam

As you can probably appreciate, this project represents a pretty major
effort and will require both a deep and broad understanding of the
ASCEND APIs in C, as well as the requirements of the current PyGTK GUI.
I think that the work should probably start with Pallav Tinna's branch
of the repository, which already migrates the GUI from GTK2 to GTK3
toolkit. The goal would be to eliminate the C++ and STL code as far as
possible, and aim for faster and lighter Python bindings, while also
aiming at a clean and maintainable approach. I believe that SWIG is
quite capable as a tool for doing this, and I myself am very comfortable
with SWIG, but if you can see a strong case for adopting another tool
then we can consider that. One aspect of SWIG that is a appealing is
that in principle it can be used to target several different scripting
languages. Of interest for scientific work would be R, Octave, Scilab
and possibly a couple of others. This is not a priority for us, but is a
mild reason to stick with the SWIG approach, as I see it.

For some inspiration on bindings from Python to C, I suggest you look at
the code of FPROPS [1]. That wrapper builds object-oriented Python
classes based around C structs and associated methods. I think that an
early start on the proposed project could be made by attempting to
reproduce this approach for the 'instance' data structures in the ASCEND
C API. You can take a look at how this is done currently at [2-4]. There
is probably benefit in also wrapping some of the generic types in
ASCEND, such as gl_list [5], which are used extensively if not quite
universally, in the ASCEND C code.

Hopefully that provides some starting points for you. Take a look and
let me know how you go.

Cheers
JP

[1]
http://code.ascend4.org/ascend/trunk/models/johnpye/fprops/python/fprops.i?revision=2774&view=markup
[2] http://code.ascend4.org/ascend/trunk/ascxx/instance.cpp?view=markup
[3] http://code.ascend4.org/ascend/trunk/ascxx/instance.h?view=log
[4] http://code.ascend4.org/ascend/trunk/ascxx/ascpy.i?view=markup
[5] http://code.ascend4.org/ascend/trunk/ascend/general/list.h?view=markup

On 05/03/15 06:31, Shivam Chaturvedi wrote:
> Hello ASCEND Devs,
> I am Shivam Chaturvedi. I had a look at one of your projects that I
> became keenly interested on. It was the "Python Bindings Rewrite"
> project, which understandably requires the knowledge of Python, C++
> and knowledge of concerned programming paradigms such as interfaces,
> etc. I'm fluent in both the languages at a decent level and have
> previously worked a bit in both (Even taught Python to undergrad
> students!).
> I have downloaded ASCEND on my linux machine (and started to fiddle
> with it!) to see how I would think the software must've been put up,
> in addition to (trying) to read the source (mainly examples for now).
> I wish to contribute in all ways possible to this project.
> Might be needless, but to state, I'm a student at IIIT-Delhi, India,
> and would love to work with you guys.
> Please let me know what more I can do to help out.
>
> Thanks!
> Shivam Chaturvedi
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website, sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for all
> things parallel software development, from weekly thought leadership blogs to
> news, videos, case studies, tutorials and more. Take a look and join the 
> conversation now. http://goparallel.sourceforge.net/
>
>
> _______________________________________________
> Ascend-sim-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ascend-sim-users

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Ascend-sim-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ascend-sim-users

Reply via email to