Hi Shivam
Sounds like you are on the right path. Have a go at the SWIG bindings
for Instance following the pattern of FPROPS. Give it a try, let me know
when you have something.
Thanks for the clarification about the wiki info. I will try to get that
updated ASAP.
Cheers
JP
On 10/03/15 02:50, Shivam Chaturvedi wrote:
> Hello John,
> I've had a look at the ascxx interface file and I saw how the Instance
> file is defined as a list of the prototypes instead of a single header
> file as the other classes have been defined. I believe the task right
> now is to convert this list of prototypes to a similar header file
> that can directly be included in the interface file. I've studies the
> involved source codes. I'm continuing to understand the system by
> looking at the FPROPS module as you told me to.
> I believe it would be good for me to develop the SWIG interface file
> for the Instance class so that you could see if I have developed
> enough understanding of the rewriting process.
>
> Would love to hear from you on further steps.
>
> *PS* I looked at the Building ASCEND wiki page, and the svn checkout
> link is incorrectly stated as
> ' svn co svn://ascend4.org/ <http://ascend4.org/>code/trunk
> ascend ' which seems to refuse connections.
> instead of
> ' svn co http://svn.ascend4.org/trunk/ascend ' which works fine.
>
>
> Thank you!
>
> On Thu, Mar 5, 2015 at 3:30 PM Shivam Chaturvedi <[email protected]
> <mailto:[email protected]>> wrote:
>
> Thank you for such a detailed response. I looked at SWIG before I
> found this project interesting and I agree that it would make our
> lives quite easier if we followed SWIG and later came up with
> binding for R, Octave etc. (which was also something I thought of
> when I looked at SWIG as a project, but yeah, later developments).
> I'll look into the suggested readings and get back to you with my
> ideas.
>
> Thanks,
> Shivam
>
> On Thu, Mar 5, 2015 at 6:59 AM John Pye <[email protected]
> <mailto:[email protected]>> wrote:
>
> 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]
>> <mailto:[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