LUCE: a lua GUI tk based on JUCE

Hi,

We've just published luce, a new project, on github (https://github.com/peersuasive/luce).

It's a wrapper to JUCE for Lua.

It's at very early stage (less than a week old...), so only a few components are available at the moment, yet it works and we thought some of you might be interested in.

 

Thanks to Jules and all the community for this great library you're offering us !

 

Enjoy !

Very cool project.

I have to say i wish you did that 2 years ago i wouldn't have to do the same job with lubaind/boost.

How do you deal with registering templated classes in JUCE, i found no way to use templates in Lua or making them accesible, i had to register a class with a specific template (i used float types for Rectangle though int should be there too, there is a lot more like that).

Do you have some way to debug a code like that, get a stack trace or set breakpoints within your project ?

Very cool! I'll add a link from the ecosystem page..

 

How do you deal with registering templated classes in JUCE, i found no way to use templates in Lua or making them accesible, i had to register a class with a specific template (i used float types for Rectangle though int should be there too, there is a lot more like that).

I know no other way, unfortunately...

Do you have some way to debug a code like that, get a stack trace or set breakpoints within your project ?

Not exactly the simplest, but not really that hard either: pretty much like you would when debugging a library, except you have to load the lua executable and your lua script as a loader. For instance, I start gdb like this:

gdb -ex "set breakpoint pending on" -ex "break luaopen_luce" -ex run --args lua my_script.lua

luaopen_luce being the entry point for the library/module here.

For long debug sessions, I'd use CodeLite, but any good IDE would do, of course.

To debug a lua script alone or a callback, I'd use ZeroBrane Studio, which has a really good integrated lua debugger.

 

Thanks smiley

 

I wanted to ask about debugging in the ready product.

My app makes Lua available in it's release build, so users of the product can write their own scripts, i was wondering if it's possible to allow debugging of those user-made scripts, some kind of call-stack display and maybe a simple break-point system. I report errors sure, but that's not always enough. I was wondering if it's possible to do in Lua at all, or maybe your framework has something extra that could help. I can't force my users to use 3rd party IDEs (i can suggest it sure), but i'd like to have that option in the app. A stack trace of an error would be very cool.

I see. Sorry for the misunderstanding.

Having breakpoints is over the goal I've fixed for luce at the moment, but I'm dumping a small stacktrace when a callback fails, though -- it's not pushed yet (will be by Friday) but it's based on lua_Debug and lua_getstack/lua_getinfo (there's a short example here http://www.lua.org/manual/5.1/manual.html#lua_getinfo).