Thanks. That's why I'm asking - I've seen the docs state that the Clownfish is good for dynamically typed languages. But I would want to write bindings for the statically typed one - namely, Go. Is it worth the effort to mess with the Clownfish backend and bindings for the statically typed language? I certainly will ask more questions after I've acquainted myself with you links.
On Sun, Feb 23, 2014 at 2:48 AM, Nick Wellnhofer <[email protected]>wrote: > On Feb 22, 2014, at 16:12 , Open Nota <[email protected]> wrote: > > > If one wants to develop lucy bindings for a new language, what should he > > know and do? Can someone explain in general the process of creation of > lucy > > bindings, step by step? Should one make use of the clownfish (why?) or is > > it sometimes desirable dispense with it? Is there a C library, that can > be > > linked against? Are there useful links and documentation? Anything you > can > > spare will be gratefully appreciated. > > If you want to write bindings for a dynamic programming language like > Perl, Python, or Ruby, you're encouraged to build upon the Clownfish object > system. It is designed to integrate very tightly with the host language and > we expect the resulting bindings to be highly idiomatic and user-friendly. > If you want to extend Clownfish, you'll also get lots of support from the > Lucy community. For Python and Ruby, people have already started working on > Clownfish support but we're still at an early stage. > > User documentation for Clownfish can be found here: > > > https://git-wip-us.apache.org/repos/asf?p=lucy-clownfish.git;a=blob;f=runtime/perl/lib/Clownfish.pod > > To implement support for a language, you'll have to write a backend and > bindings for the Clownfish compiler (CFC) and some glue code for the > Clownfish runtime and the build system of the host language. The code for > the Perl bindings should give you an idea what needs to be implemented: > > CFCPerl* files in compiler/src (CFC backend) to autogenerate the code for > the bindings: > > > https://git-wip-us.apache.org/repos/asf?p=lucy-clownfish.git;a=tree;f=compiler/src > > CFC Perl bindings: > > > https://git-wip-us.apache.org/repos/asf?p=lucy-clownfish.git;a=tree;f=compiler/perl > > Perl code for Clownfish runtime (especially the code in the xs > subdirectory): > > > https://git-wip-us.apache.org/repos/asf?p=lucy-clownfish.git;a=tree;f=runtime/perl > > We also have an as-yet-unreleased C library which you can find in the 'c' > directory of the Lucy Git repository. It depends on the Clownfish C library > and tools. > > Feel free to ask more questions on this mailing list or on IRC (#lucy_dev > on irc.freenode.net). > > Nick > >
