help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SWIG for Octave: Octave-SWIG.


From: Muthiah Annamalai
Subject: SWIG for Octave: Octave-SWIG.
Date: Fri, 3 Jun 2005 20:31:32 -0700 (PDT)

Hello there!
Ive been thinking, and tried [lazily]
to port SWIG [www.swig.org] to Octave.

SWIG:
=====
SWIG is a Simple-Wrapper-Interface-Generator
for C/C++ code to {Python,Ruby,OCaml,C#,Java,Perl,..}.

Basically it generates 'Language' bindings, with
developer assistance.

What for Octave?:
=================
What this means for the Octave developer community
is that we could easily port the Libraries in C/C++
for access from Octave.

This otherwise would need people {Hauberg -
Octave-FANN, your truly - GD-Octave}
and such to spend LOTS of time "building" the
bindings.

Then comes "testing" before you[assuming youre a bit
decent ;-)] can let others sweat using your code.

USE CASE:
========
With SWIG, "building" binding is easy like this.

1: Write a library.i file for that 'library' you need
to port.
   emacs library.i /usr/include/library/* &

2: Run SWIG on it.
   swig -octave library.i

3: Compile it to a library.oct file.
   mkoctfile library.cc

4: Presto! use it in Octave.
   octave -q test_library.m


Then "testing" is your only stuff for developers to
do. Write lots of ".m" files and test the
"library.oct"
binding.

Current Process
===============
Useful. You will agree. Better than the current
process
of writing bindings.

1: Hand code. *OR* 2: Code Generate HACKed. OR ?[AFAIK
only 2 ways]

So I propose:
               Octave community must look at writing 
a filter/module for SWIG, to generate Octave binding
code.

Cheers
Muthu.



                
__________________________________ 
Do you Yahoo!? 
Read only the mail you want - Yahoo! Mail SpamGuard. 
http://promotions.yahoo.com/new_mail 



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]