Sam Tregar wrote: > > On Sat, 19 May 2001, Brian Ingerson wrote: > > > As far as I know, nobody is working on either of those fronts. I know > > nothing of either of those languages. Aren't they related? > > Ah, yes - sorry for the confusion. The language is Scheme, the > implementation is Guile. Guile is the GNU embedded Scheme interpreter. > It's available as a shared library with a fairly convenient C API for > embedding, much like TCL. > > > Anyway, Inline::Tcl was created by copying Inline::Python, and then just > > changing the C glue code. That's where I'd start. > > I've started out on a somewhat different tack - I'm creating a module > called Guile.pm that supports a low-level binding between Perl and Guile. > Once that's done it should be a fairly simple matter to add an > Inline::Guile layer on top... Inline::Guile itself probably won't need an > C at all. Also, I won't have to do any of the hard stuff with directories > and caching that the existing Inline modules do since Guile isn't a > compiled language. Base Inline does most of that for you. Inline::* modules are just subclasses of Inline. Obviously Python and Tcl are interpreted as well. Inline supports Compiled and Interpreted languages in the exact same way by abstracting the concepts of "Object", "Build" and "Load". Source code gets "built" once (unless it changes)into an "object", and the "object" gets "loaded" every time. Each Inline::* module is free to define it's own implementation of these 3 concepts. Python and Tcl pre-interpret the code during "build" time, save the symbol table into an "object" file, and then provide their own "load" mechanism to bind those symbols to Perl. Inline C and C++ use Dynaloader for "loading" of course. There's a great degree of freedom under this abstraction. It also gives a similar usage "look and feel" across all languages. So the learning curve of Inline::Guile might be less than Guile.pm. > > I've got a working prototype of Guile.pm but I've still got a lot of > design work to do. Finding a workable mapping between Guile data-types > and Perl data-types is not easy. I'd like to know what you come up with. The concept of Guile-Denter (similar to my Data-Denter) is of interest for this new YAML project I'm working on. See http://www.yaml.org Cheers, Brian -- perl -le 'use Inline C=>q{SV*JAxH(char*x){return newSVpvf ("Just Another %s Hacker",x);}};print JAxH+Perl'
