lua-users home
lua-l archive

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


On Thu, Jul 23, 2009 at 11:24:49AM +0100, David Given wrote:
> Etan Reisner wrote:
> [...]
>> I would be more than happy to help work on a lua wrapper for libpurple,
>> however that is currently a far from trivial task. I had started work on a
>> lua plugin loader for libpurple though a while back (before the libpurple
>> name change) but ran out of spare time for it and it has since sat and
>> bit-rot. At this point I don't like the idea I had for how to handle it
>> anyway, so I would want to start again on a new one were I to have time to
>> pick it up again.
>
> Ditto; I have a Gaim plugin for the Citadel IM protocol written in Lua.
> Citadel's protocol is so stateful that it was actually *easier* to bind Lua
> to Gaim and write the protocol code in a Lua coroutine than it would have
> been to do with a traditional state machine! (I can package up the code if
> anyone's interested.)

I would be very interested in this, people have often asked if they can
write protocol plugins in non-C languages and the official answer is "not
currently".

The un-official answer has always been "nothing stops you from writing
your protocol code in a non-C language and wrapping it for libpurple
usage". So an example of that would certainly be interesting to see.

> [...]
>> There is currently SoC and associated work under way to GObject-ify many
>> of the core objects in libpurple, when this work finally lands in
>> libpurple a lua binding will likely be much easier to accomplish (using
>> the same set of tools used for the lgob bindings).
>
> Sounds good; this should allow dynamic creation of bindings via GObject
> introspection, right?

That's my hope, yes. At least for as many parts as have been migrated. The
less manual work needed the better.

    -Etan