Re: Re: Boost::Ruby

Alan Gutierrez <[email protected]>
Newsgroups gmane.comp.lib.boost.langbinding
Message-ID <[email protected]>
* Rene Rivera <[email protected]> [2005-10-12 23:04]:
> David Abrahams wrote:
> >Alan Gutierrez <[email protected]> writes:
> >
> >>Hello. Responding to Rene's message on the boost mailing list to
> >>   post here regarding a Ruby langbinding.
> >>
> >>   I've checked out a lot of languaged bindings for reference, as I
> >>   noted, these are the ones that looked relevant...
> >>
> >>   http://engrm.com/wiki/Refresh#Ruby.2FC.2B.2B_Bindings
> >>
> >>   The Java bindings are a better reference for me than Python
> >>   bindings, since I have no Python experience.
> >
> >However, the design of that particular binding facility may not map
> >very well onto langbinding, FWIW.  We do have a rough strategy for
> >Java, but IIUC it will have to be a bit different from the others,
> >because the langbinding library will have to generate JNI code that is
> >eventually compiled.

> For a while I entertained the idea of writing a special loader that 
> would inject symbol bindings dynamically.

    Rene

    You're talking about a special java.lang.ClassLoader, right?

    The Objectweb ASM library is very popular in Java land these
    days. It's a petite library (50K core) and it has a clean API
    for bytecode manipulation. There's a lot of bytecode abuse out
    there, but I don't know of anyone using ASM (or BCEL, or the
    like) to make a better JNI.
    
    I was playing around with SWIG for a few minutes yesterday, and
    it did appear that the Java component was larger and more
    complex that other components. Scripting langauges like Perl,
    Python, and Ruby consider binding to C at the outset, it seems,
    while Java has always adhered to it's notion of a world of Pure Java.

    I didn't think that you or David were considering doing much
    development in the bridged language, whatever it may be. Though
    with this as an example, I can see how it could be much easier
    in the case of a recalcitrant language, to implement a facade in
    the language to a well behaved, well defined C++ interface.

    The ClassLoader could be configured on teh Java side to load a
    Langbinding library, and map the contents to whatever package
    suits the Java application.

    You've probably done much of this research yourself, I'm only
    dumping what I know. Cheers. 

--
Alan Gutierrez - [email protected] - http://engrm.com/blogometer/


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.