Re: Scripting in Gnome

--- jamie <jamiemcc blueyonder co uk> wrote:

> Let me give you an example:
> Suppose we have a script engine as a bonobo
> component which is used by
> Gnumeric to enable users to write macros. SUppose
> johnny writes his
> macros in Gnumeric using python and chris writes his
> macros in Ruby.
> What happens when chris sends his gnumeric
> spreadsheet file with
> embedded Ruby macros to johnny, who does not have a
> Ruby interpreter
> installed? 
> Of course he cant execute those macros if he does
> not have the Ruby
> interpreter installed. This problem is therefore
> magnified many times if
> you consider what happens with a generic script
> interface - you would
> need every possible interpreter installed on your
> system to guarantee
> you could execute any macro.   

One of GNOME's goals throughout the years has been
language neutrality.  It's choice of C as its base
language was based partially on the reasoning that C
was the easiest glue languages for all sorts of other
languages out there.  Bonobo/ORBit was conceived for
exactly the same reason: all sorts of languages could
interact on a neutral basis, with an ORB as the
mediator.  Miguel is now convinced that Microsoft's
.Net provides a better way to accomplish the same
goal.  Accordingly, you're facing an audience that has
historically believed that many languages should be
able to interact on the same level.  Further, you'll
find that there is no consensus of what the preferred
"scripting language" for GNOME should be, even if
everyone should decide that there can be only one. 
Python has been the favorite for the last year or so,
but language fads come and go.  (A few years ago, Perl
or Guile would probably have won the nod).

So, it seems that you have two basic ways to go, given
your scenario: you need some sort of IDL or a virtual
machine to unify scripts from different languages and
be reused without loading every scripting engine. 
ORBit, which GNOME has put a great deal of work and
polish into, accomplishes just what you're asking: so
long as your langage has ORBit bindings, you feed it
your scripts, and other languages can consume those
scripts (C and Python have full bindings, and C++ and
Perl have partial bindings, I believe).  MONO tries to
accomplish the same feat through a virtual machine.

For a unified plug-in architecture, you may want to
look at GNOME Office, which is in the very initial
stages of building such a framework.  Whether Abiword,
Gnumeric, etc. buy into that framework has not been
decided, though.

<more snip>.


dissertus scribendo latine videri volo.

Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!

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