lua-users home
lua-l archive

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


Etan Reisner wrote:
[...]
> On a separate pidgin note, I started working on a lua plugin loader for
> gaim back before the name change and got it to the point where it was
> starting to be useful before I needed to put it down.

A while back I did a prototype Gaim plugin for the Citadel IM protocol.
It turned out to be *easier* to hack together some Lua bindings and do
the logic in Lua than it was to do the logic in C --- the protocol was
very stateful, and by wrapping each connection in a Lua coroutine I got
to write the code naturally rather than having to build monster state
machines. It helped enormously.

The stuff I did with libpurple was from the other perspective, of course
(a IM client rather than a protocol plugin), but it was equally useful
there, too. The libpurple protocol is a *little* cryptic and
considerably undocumented but it was pretty straightforward to get going
with Lua. Oddly enough I initially started using toLua, but it ended up
being easier to roll my own --- the libpurple APIs don't make a good
conceptual match to the Lua ones.

-- 
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│ "I have always wished for my computer to be as easy to use as my
│ telephone; my wish has come true because I can no longer figure out
│ how to use my telephone." --- Bjarne Stroustrup

Attachment: signature.asc
Description: OpenPGP digital signature