[Kde-bindings] KDE/kdebindings

Richard Dale rdale at foton.es
Fri May 9 10:07:05 UTC 2008


On Thursday 08 May 2008 23:57:05 Sebastian Sauer wrote:
> Richard Dale wrote:
> > On Tuesday 06 May 2008 13:22:43 Arno Rehn wrote:
> >> Am Dienstag 06 Mai 2008 11:39:23 schrieb Richard Dale:
> >> > SVN commit 804509 by rdale:
> >> >
> >> > * The Plasma ScriptEngine interface is now mandatory for the Applet
> >> > and DataEngine apis with non-C++ languages. These Plasma Ruby bindings
> >> > were not designed to be used with the ScriptEngine, so terminate the
> >> > project.
> >>
> >> I wouldn't have deleted it completely. We can implement the ScriptEngine
> >> interface AND keep the plasma bindings. You can do more with ruby and
> >> plasma than just scripting applets, and maybe you want to access some
> >> API that isn't exposed by the ScriptEngine interface..
> >
> > Aaron's intention is that the only thing you can do with Ruby in Plasma
> > is script applets, and that's what the ScriptEngine interface enforces.
>
> oh, interesting view here. From my pov the advantage of the ScriptEngine
> and the way how scripting was integrated in Plasma, is that it was/is(?)
> possible to attach a script to each applet/panel/desktop/etc. even to those
> written in C/C++. The separation allows to extend existing
> applets/panels/desktops/etc. with just any kind of scripting a ScriptEngine
> does exist for what is imho a clever design to earn on the one side a clean
> separation between them (as in a C++ applet doesn't need to know anything
> about optional scripts and by using null-applets/-containments probably
> even the other way around) and on the other does try to provide some common
> interface to integrate and manage (GHNS, upload, configuration, etc.)
> scripts.
>
> > I've had an exchange of emails with him and we think about bindings for
> > non C++ languages in very different ways, and in fact can't communicate
> > too well. I don't think he is wrong, but he is aiming at a different
> > group of people perhaps, and is convinced there are all sorts of
> > advantages by going through the ScriptEngine api.
>
> I even would agree there that there are sorts of advantages but for sure
> also disadvantages like going an own way rather then using the common
> kplugin way or like a fixed package-format (ok, those one got addressed
> already :) and probably even more things.
>
> > I think it is best to wait until KDE 4.2 and see exactly what we are
> > 'allowed' to do, by seeing what the QtScript bindings do a as reference
> > implementation. My idea has always been that languages like Ruby and C#
> > should be 'first class citizens' on the same level as C++, and shouldn't
> > need 'managing' or simplifying. If I want a simpler Ruby api, I can write
> > it in terms of the full C++ based Ruby api. I always been free to do what
> > I like with KDE bindings before, and this is the first time that this
> > kind of policy has been imposed.
>
> uh? afaik there are no policies and never where cause it would be the dead
> of any kind of foss-project. guess it's not a matter of 'allowed' (as in
> somebody needs to ok something) but more of 'whats possible' (as in how
> could such a kplugin-based binding be integrated without the need to add
> dirty hacks to plasma itself (what in turn would need such a 'ok' :-) ).
Well Aaron says that he can't see any point in writing KDE programs in any 
other language than C++, as the only advantage he can see is that you don't 
need to compile. Obviously I completely disagree with that, otherwise there 
wouldn't be any point in the QtRuby/Korundum projects. I sometimes have to 
take a ruby app, and code it in C++ instead to see whether some bug in 
ruby-specific. When I do that it just seems so painful compared with doing it 
in Ruby. I routinely use irb to try little things out when I'm coding 
something in Ruby - the whole way of going about writing an app 'feels' very 
different to me.

My plasma stuff didn't need any hacks to plasma because it couldn't tell it 
was running Ruby. I agree that following the standard Plasma packaging 
convention for non-C++ languages is certainly a good idea, and probably using 
the ScriptEngine api will have advantages in the future. I'll try and get a 
ScriptEngine/Korundum based binding done in the playground, rather than in 
kdebindings itself - I've thought about it a bit and it will be possible to 
get pretty much the same api as I had before with a bit of work.

> > The KDE community doesn't actually have any beginner ruby programmers,
> > only intermediate and advanced, and so while a dead simple interface is
> > good for JavaScript or BASIC, it isn't needed for Ruby.
>
> to sum it up: What is advanced in JavaScript is pre-beginners in Ruby, hehe
> :) Sorry, failed to resist.
Yes, maybe ruby programmers are a bunch of snobs.

Actually I think JavaScript is an interesting language, and there are some 
libraries like Prototype, Dojo and JQuery that actually give you a very nice 
programming environment. So there are certainly many advanced JavaScript 
programmers, but there are so many more JavaScript programmers that on 
average they are beginners.

-- Richard



More information about the Kde-bindings mailing list