[Kde-bindings] Lisp + Smoke
rdale at foton.es
Wed Apr 2 09:26:03 UTC 2008
On Wednesday 02 April 2008 04:50:44 Jonathan Gardner wrote:
> I am interested in seeing KDE/Qt in Lisp. I think Smoke is the ideal
> candidate for this.
> Questions: How does smoke work?
> I am playing with PerlQt right now. Even though I am an extremely
> experienced perl hacker (I get paid to do it) I still have a hard time
> reading perl code, especially XS. Any pointers would be appreciated.
The QtRuby bindings are based on the PerlQt code, but they are much easier to
The heart of the smoke approach for dynamic languages is to trap methods calls
for methods which aren't there. In perl that is via autoload, in ruby it is
method_missing(), or in smalltalk it would be #doesNotUnderstand:. Then once
the call has been trapped, the C++ method is looked up in the smoke library
based on the name of the method and the types of the arguments. The arguments
are marshalled from the bindings language and the C++ method is called. So
you would need to find a way of doing that in lisp for the object model it is
There are also callbacks for overriding C++ virtual methods, and for when the
C++ instance is destructed.
More information about the Kde-bindings