using swig to generate bindings: was Re: Re: freeglut and opengl bindings

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

using swig to generate bindings: was Re: Re: freeglut and opengl bindings

Brad Watson
Here's a thought: leverage the excellent work already done for the swig clisp bindings: the output produced by swig -clisp -c++ somefiletobind.i  looks like it wouldn't be too difficult to munge into gst code either with gst itself or maybe with emacs elisp ....

Brad Watson

----- Original Message ----
From: Paolo Bonzini <[hidden email]>
To: Krishna <[hidden email]>
Cc: [hidden email]
Sent: Monday, November 20, 2006 12:37:15 AM
Subject: Re: [Help-smalltalk] Re: freeglut and opengl bindings

>> I have no idea of the complexity of this task.  It seems relatively
>> similar to JNI, which SWIG supports, in terms of complexity...
>
> Oh!, I thought it is closer to the CLISP FFI (which SWIG supports too).

Might be.  As far as I could see, the biggest design choice is whether
the C function gets the argument count and an argument vector, or rather
the arguments already converted to C data types and placed into
different arguments.  Python for example is the former, Java is the latter.

Paolo


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk





 
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: using swig to generate bindings: was Re: Re: freeglut and opengl bindings

Paolo Bonzini
Brad Watson wrote:
> Here's a thought: leverage the excellent work already done for the swig clisp bindings:

The idea overall is good.  The problem is that CLISP's C binding is way
more powerful.  In particular, GNU Smalltalk has no support for enums
and variables.

Also, more work (or a wrapper layer, that SWIG is very good at emitting)
would be necessary to support things such as passing structures by value.

Paolo


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: using swig to generate bindings: was Re: Re: freeglut and opengl bindings

Brad Watson
In reply to this post by Brad Watson
Paolo,

I see this as a learning opportunity: I'll have a go at converting the swig clisp module (clisp.cxx etc) to a gst module to get a feel for the level of difficulty (c++ is foreign to me,) and see how I do. If it turns out not to be beyond me, then I'll have a go a more complete wrapper module based on pythons or whatever seems most appropriate (that is unless someone else is already working this.)

Kind regards,

Brad Watson

----- Original Message ----
From: Paolo Bonzini <[hidden email]>
To: Brad Watson <[hidden email]>
Cc: [hidden email]
Sent: Monday, November 27, 2006 7:03:35 AM
Subject: Re: using swig to generate bindings: was Re: Re:   freeglut and opengl bindings

Brad Watson wrote:
> Here's a thought: leverage the excellent work already done for the swig clisp bindings:

The idea overall is good.  The problem is that CLISP's C binding is way
more powerful.  In particular, GNU Smalltalk has no support for enums
and variables.

Also, more work (or a wrapper layer, that SWIG is very good at emitting)
would be necessary to support things such as passing structures by value.

Paolo





 
____________________________________________________________________________________
Cheap talk?
Check out Yahoo! Messenger's low PC-to-Phone call rates.
http://voice.yahoo.com


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: using swig to generate bindings: was Re: Re: freeglut and opengl bindings

Paolo Bonzini
Brad Watson wrote:
> Paolo,
>
> I see this as a learning opportunity: I'll have a go at converting the
 > swig clisp module (clisp.cxx etc)
> to a gst module to get a feel for the level of difficulty (c++ is
 > foreign to me,) and see how I do. If it turns out not to be beyond
 > me, then I'll have a go a more complete wrapper module based on
> pythons or whatever seems most appropriate (that is unless someone
 > else is already working this.)

I'd say base it on clisp and JNI.

Paolo


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: using swig to generate bindings: was Re: Re: freeglut and opengl bindings

Brad Watson
In reply to this post by Brad Watson
I'm making progress on the gst swig extension derived from the clisp extension.  The attached  file which wraps the gnu plotutils library was output from the extension in the blink of an eye as opposed to hours of writing the bindings by by hand....



----- Original Message ----
From: Paolo Bonzini <[hidden email]>
To: Brad Watson <[hidden email]>
Cc: [hidden email]
Sent: Monday, November 27, 2006 1:25:41 PM
Subject: Re: using swig to generate bindings: was Re: Re:   freeglut and opengl bindings

Brad Watson wrote:
> Paolo,
>
> I see this as a learning opportunity: I'll have a go at converting the
 > swig clisp module (clisp.cxx etc)
> to a gst module to get a feel for the level of difficulty (c++ is
 > foreign to me,) and see how I do. If it turns out not to be beyond
 > me, then I'll have a go a more complete wrapper module based on
> pythons or whatever seems most appropriate (that is unless someone
 > else is already working this.)

I'd say base it on clisp and JNI.

Paolo





 
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com
_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk

=?utf-8?q?plot.st?= (57K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Re: using swig to generate bindings: was Re: Re: freeglut and opengl bindings

kaveman
CONTENTS DELETED
The author has deleted this message.