lua-users home
lua-l archive

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


Hi,

  I'm the author of SLB, and I have to confess that the worst thing
about SLB is documentation, I'm very lazy to do the proper
documentation, mostly because English, but SLB greatest features are:
It just compiles without boost, or any other dependency, it can be
compiled inside any project just as lua, and there are enough examples
of how use almost any part of SLB.

Recently I've been working on SLB to improve how it works thanks to
some people working at total immersion which had some great
suggestions, so I'm open to more suggestion, patches, or whatever. For
example, SLB supports several sorts of SmartPointers, from classes
with ref counters, to std::tr1::shared_ptr, as demonstration of the
later:

http://code.google.com/p/slb/source/browse/tests/src/unit_007.hpp?r=c4466902fa641a54334d9e62cfdbfc984e5e9971
http://code.google.com/p/slb/source/browse/tests/src/unit_007.cpp?r=c4466902fa641a54334d9e62cfdbfc984e5e9971

When registering a class in SLB you can provide the a class-handler
that will control how objects are used inside lua, how they are send
to lua, and how they are recovered from lua, giving you the maximum
possible control over you objects and classes.

If you give SLB a try, and don't find how to do something just drop me
a line, I'm more than willing to help. At the moment, the best option
to try SLB is using the current testing branch which is the one that
will be as stable in a few days.

And by the way, I'm already working on supporting lua 5.2.

Regards,
   JL



On Wed, Dec 15, 2010 at 8:05 AM, Johnson Lin <arch.jslin@gmail.com> wrote:
> On Wed, Dec 15, 2010 at 12:16 PM, Tim Mensch <tim-lua-l@bitgems.com> wrote:
>> Hey all,
>>
>> I'm starting to realize why there are always a stream of "don't use
>> automatic bindings" messages every time someone asks what automatic
>> bindings are decent. There seem to be serious downsides to all of them. :(
>>
>> I finally dug into several that seemed appropriate for the project I'm
>> working on, and found serious problems with each one. If anyone is
>> interested in my findings, I posted them in a blog entry [1].
>>
>> I also linked to that entry from [2], so that my analysis might be
>> useful to someone in the future who's trying to make a similar decision.
>>
>> I think the right answer for a light, general purpose Lua binding would
>> be close to tolua++ in design, but with a cleaner parser and support for
>> a few things that tolua++ is missing (like smart pointers, which I
>> mentioned in another message). Oh, and any kind of support would be nice
>> as well -- I barely got a response when asking about tolua++ here, and
>> the contact email on the tolua++ page bounces :(.
>>
>> Tim
>>
>> [1] http://realmensch.org/blog/fun-lua-bindings
>> [2] http://lua-users.org/wiki/BindingCodeToLua
>>
>>
>
> Greetings,
>
> I currently am searching for the solution on this topic too, since My
> friends and I had a game project written in relatively complex C++
> usages (heavy template uses, boost and tr1 libraries, and most
> importantly, a object pool which totally based on boost::object_pool
> and shared_ptr.)
> and now we're trying to figure out how to make bidirectional
> communication between our C++ codebase with lua scripts.
>
> I skipped luabind and lqt's generator part for being too heavy, and
> still trying to figure out what's with oolua, luabridge, SLB and
> mluabind (I know luabridge has been dormant for some time, however it
> says it was designed with smart pointers in mind and the interface
> looked simple..);
> but just as what you said in your post, all of them come with its own
> pros and cons.
>
> Oh, and I've been following GameKit/OgreKit too, they use SWIG for the
> one way communication wrap, and GameKit don't use smart pointers (just
> in-house reference counting) so it seems that SWIG is working pretty
> well in that environment. But to switch to GameKit environment, a
> large portion of our codebase must be written, and probably without a
> working bidirectional communication.
>
> I must say I'm pretty stucked too. Or if one is going to add scripting
> ability, maybe he needs to consider everything from the very
> beginning... like don't use smart pointers at all or something.
>
> I figured our project is in a position which is pretty the same with
> yours. Full smart pointer integration is a must, not just the
> reference counting part. I've followed your post on oolua list and
> your blog post in the last few days, ... so do you yet to figure out a
> way which can make smart pointers effectively working in bidirectional
> lua bindings? Roll our own? Use different binding methods for
> different needs at the same time? (Is it possible to support full
> smart pointer semantics if I do it myself? I didn't give it much
> thought, but now all roads lead to this way, I just have to make sure
> that whether anyone has already done it and found out it's just not
> viable.)
>
> Thanks in advance...
>
>



-- 
  Jose L. Hidalgo Valiño (PpluX)
  ---- http://www.pplux.com ----