Re: Scripting in Gnome



On Mon, 2004-02-02 at 11:11, jamie wrote:
> On Mon, 2004-02-02 at 15:08, Sean Middleditch wrote:
> > On Fri, 2004-01-30 at 11:15, Jamie McCracken wrote:
> > > > We already have that -- python and perl
> > > I mean like VBA and javascript (ie mini-script typeless languages
> which
> > > dont require huge libraries like perl and python) as these
> > > can be easily embedded in apps. Things like the GnomePanel could
> have
> > 
> > Er, Python/Perl are perfectly capable of this.
> 
> Yeah but they are overkill - small fast and integrated into core Gnome
> without dependencies on perl and python would be a lot better, faster
> and leaner on memory usage. We don't need a full blown language to do
> that.

Perl and python are both highly optimized, small and fast cores.  A
custom language would not be and would have far less functionality. 
Most everything in Perl and Python are implemented as libraries which do
not need to be loaded if they are not used.

> > 
> > > extensions to allow customisation via scripts - E.G an OnMouseOver
> > > event on a panel button could be made avialable to scripts to say
> > > allow the button to be highlighted in a different way or the Gnome
> menu
> > > to be opened without clicking etc
> > 
> > That's crack.  That last thing we need is to let people make brain
> dead
> > broken UI changes like this... ;-)
> 
> No it allows some of us to extend functionality rather than it being
> fixed and static. Theres nothing wrong in allowing for further
> customisation (like sawfish allowed lisp to be used to script in
> extensions)

I agree that if someone wants to break their own UI let them but sawfish
became the opposite of what it originally was intended for.  It was
supposed to be a fast light WM but because of the extensibility it
quickly became bloated and slow.  Metacity was really just an example of
how WM's should be built and the community fell it love with its
simplicity and made it the default.

> > 
> > > 
> > > >XML is a description language rather than a scripting language.
> > > XML can contain embedded scripts like HTML does with javascript. 
> > > Mozilla's XUL is a good example of the future of scripted apps.
> > 
> > Mozilla's XUL is a good example of a web technology, not anything that
> > should be used in a dedicated local desktop.
> Not really mozilla's XUL is used for its desktop apps.The XPCOM it uses
> is similar to bonobo. It allows u to create powerful scripted apps
> really fast. Its a really neat technology that Gnome should adopt.

Gnome already has Bonobo which does allow scripting similar to
XPCOM/Javascript bridge it is just that developers never much bought
into Bonobo.  Mozilla itself is moving away from extensive use of XUL,
favoring native widgets where possible (look at firebird).  XUL is also
the reason Mozilla took 3 years to come out.  Have you ever used Venkman
the JavaScript debugger?  It is slow as sin.    

> > 
> > > GDesklets is another example all though it is rather limited. What
> > > we need is a standard way of scripting in Gnome apps with the
> ability
> > > to create apps using just XML with embedded scripting as well as
> allowing
> > > existing apps to be extended or controlled.
> > 
> > There was a project called Entity iirc that did the XML thing.  Never
> > took off.  Might be indicative of something.
> 
> >  
> If it were incorporated into core Gnome rather than being a little heard
> of add on then it would get used.

That is the chicken before the egg problem.  Rarely are things just
accepted into the Gnome core.  They have to prove their worth first. 
Personaly I think Gnome is taking the right path with the language
binding releases.  Plus technology's like DBUS will make it simpler to
communicated with non-bound object.  What you might be happy with is the
Mono project which may become part of the Gnome core at some point but
it has a lot of hurdles before that happens.  Basically with Mono only
one set of bindings need to be produced and any language that can target
.Net can use them.  This includes VB if you are so inclined.    

> > 
> > > 
> > > MS has an Active/X scripting control which provides Jscript and 
> > > VbScript to apps so something along those lines wood be good.
> > > It should be open so that new script languages can be specified
> > > and used (hence a language definition XML format that I suggested) 
> > 
> > You don't need XML to open things to new languages.  In fact, if you
> > need any sort of XML at all to use multiple languages, then you have a
> > broken design.
> 
>  Why? HTML allows various scripting languages to be incorporated. An XML
> language spec would be a hell of a lot quicker for using your preferred
> language than writing new languages or bindings.

And maintainability suffers because of it.  Code in HTML just sucks
IMHO.  Code should reside separately with the XML only being a
template.  Model/View rocks.

> >   The API should simply be generic/extensible from the
> > start (as we *already have* with Bonobo/D-BUS/ORBit/etc.) and thus
> > automatically usable from any language with bindings.  One just needs
> to
> > get apps to embrace this.  I guess the GNOME Office framework has some
> > code to make this easy and consistent.
> 
> Stuff the bindings - they just create extra work every time a library
> changes. Say I wanna use VBA - so what ur telling me is that I have to
> create a whole new interpreter for VBA complete with all the necessary
> language bindings - thats crack.

Any language that has bindings for Bonobo/D-BUS/ORBit can communicate
with objects using those technologies without binding it.  The
application need to use the technologies.  Hell if the binding knows
GObjects it should be able to use GObject introspection to do something
useful.  Bindings tend to be easier to use and better integrated into
the particular language.  So basically the bulk of the work with
bindings happens on the binding developers side and not on the scripters
side.  BTW making Python bindings can be mostly automated.  I just
started learning them and most of it is just calling scripts on header
files and slightly editing boilerplate code.

>  A simple generic scripting interface
> with syntax defined by XML is a quick and easy way to getting integrated
> scripting into Gnome with the least overhead. The only objects that the
> scriptiong language should use are bonobo and/or glade.

So your talking about the same thing that orbit does except that ORBit
uses IDL's instead of an XML interface.  As I said scriptability really
falls on the applications to construct interfaces on which one can call
on.  I think DBUS will really be the unifying force here across desktops
and on through all the lower layers.  No need for yet another arbitrary
language. 

--
J5



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