[Kde-bindings] Lisp + Smoke

Jonathan Gardner jgardner at jonathangardner.net
Wed Apr 2 15:13:04 UTC 2008


Richard Dale wrote:
> 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 
> read.
>   
Thanks for that tip. I didn't think about that. I've actually had to 
implement a Python C module using the Ruby C module as a prototype and 
it was a wonderful experience. Ruby has a clean C interface that is 
pretty easy to pick up.
> 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 
> using.
>
> There are also callbacks for overriding C++ virtual methods, and for when the 
> C++ instance is destructed.
>   
I'm still new at Lisp, but this is a good opportunity for me to learn 
CLOS thoroughly.



More information about the Kde-bindings mailing list