Plans for Luabridge 0.3

Add comment November 23rd, 2007 09:58pm reedbeta

I’ve been asked what’s in the works for Luabridge 0.3, so here’s a brief description of what I’m currently planning. (As always, things are subject to change.)

Luabridge 0.3 will involve a fairly significant refactoring of the module/class system. The existing module type will be renamed scope, since that’s a better description of what it actually represents. Scopes will be able to have subscopes, which will let you create structures in Lua that are akin to C++ namespaces. Furthermore, classes will be a specialized kind of scope. This means classes will automatically inherit all the capabilities of scopes, which will mean a good deal less work for me, since I won’t have to implement each new feature twice—for both generic scopes and classes. Also, classes will be able to contain subscopes and even nested classes, as a convenient side effect.

I also hope to implement creation of classes in Lua that inherit from C++ classes. This will involve some decisions about how to deal with the distinction between classes and objects in Lua. Lua does not have any such distinction built-in; in fact, it doesn’t even have object-oriented features built in, only metatables, which are sufficiently powerful to model pretty much any form of object orientation you’d like. Given this freedom, I’m not sure whether to make Luabridge generate an object model that is prototype-based (no classes; each Lua object inherits from some C++ object) or class-based (classes are Lua objects; they can inherit from a C++ class and they can be instantiated, produce new Lua objects and corresponding new C++ objects in pairs). So, there may be an experimental object model of some kind in Luabridge 0.3, but it also may change significantly in future releases.

Finally, I would like to implement some support for STL container classes. Lists, vectors, sets, and maps all have more-or-less natural analogues in Lua tables of different forms, and it would be nice to have the conversion be automatic. I might not implement translations for all four of these STL containers in Luabridge 0.3; some of them might be left for 0.4.

Another feature I have been thinking somewhat about is value types. It would be nice to allow small structs and objects to be defined that are okay to copy and don’t need to be referred to by shared_ptrs. Probably nothing like this will happen in Luabridge 0.3, but I’m keeping it in the back of my mind.

Of course, whenever a new release is discussed everyone wants to know the timeline. I am currently hoping to have Luabridge 0.3 out by the end of December. Of course, this is a hobby software project, so it is doubly subject to Hofstadter’s Law. Don’t hold your breath!

Luabridge 0.2 released

2 comments July 29th, 2007 10:56am reedbeta

The second alpha release of Luabridge is now tagged, released, and available from the sourceforge.net download page. This represents a major update over the previously released version of Luabridge.

  • Added support for registering static methods of classes
  • Added support for const methods of classes, with enforced const-correctness in Lua
  • Added support for properties of classes
  • Increase default number of allowed function arguments to 8 (was 5)
  • Cleaned up Makefile dependency generation and remove elements specific to my configuration
  • Added LUA_NAME option to Makefile to allow for varying names of Lua library
  • Now includes both VC7.1 and VC8 project files
  • Updated Makefile and VC projects to work with Lua 5.1.2 project files from Luabinaries
  • Convert test project to actual unit-testing

Lua 5.1.2 and other news

Add comment May 27th, 2007 10:48am reedbeta

Lua 5.1.2 was recently released, and the next release of Luabridge will be written against it. There don’t seem to be any actual changes needed to Luabridge, as 5.1.2 was a bug-fix release.

I’ve also updated the Luabridge MSVC project files to work against the Lua project files available from luabinaries. This is the closest thing to standard project files, since the Lua official releases don’t include them. The luabinaries project files have a small bug, though (or maybe it’s a bug in Lua itself): luac doesn’t compile out-of-the-box; you have to export a couple of internal symbols before it’ll work.

In other news, I’m working on adding support for more of the basic C++ features to Luabridge. Expect static functions and const functions in the next release, which should be coming sometime this summer. (Sorry I can’t work faster, but I’ve got a day job.) Maybe properties too.

The next release will also have project files for both MSVC 7.1 (VS 2003) and MSVC 8 (VS 2005).

luabridge v0.1 released

Add comment March 2nd, 2007 10:33pm reedbeta

I’ve tagged and released version 0.1 of luabridge. You can now get it from the sourceforge.net download page.

luabridge now on sourceforge.net

4 comments March 2nd, 2007 05:28pm reedbeta

luabridge is a project I’ve been developing in my spare time for the last couple of months. Now I’ve decided to go public with it, and have registered it here at sourceforge.net!