[Kde-bindings] Lisp + Smoke
tm at php-qt.org
Wed Apr 2 15:35:48 UTC 2008
On Apr 2, 2008, at 5:13 PM, Jonathan Gardner wrote:
> 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
>>> 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
> 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
>> based on the name of the method and the types of the arguments. The
>> 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.
> I'm still new at Lisp, but this is a good opportunity for me to learn
> CLOS thoroughly.
Would it also work with Scheme? I guess Chicken and Bigloo have their
own object systems.
> Kde-bindings mailing list
> Kde-bindings at kde.org
More information about the Kde-bindings