Luabind adapted to Lua 5.2

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Luabind adapted to Lua 5.2

Peter Colberg-3
Hi,

Lua version 5.2.0 has been released a week ago, and since I am
curious to test it, I adapted the Luabind library to Lua 5.2.

There has been a prior effort by Teto [1] to port Luabind to a Lua
5.2 release candidate, adopted in a git branch by Ryan Pavlik [2].
To keep changes minimal, however, and learn about the differences
between Lua 5.1 and 5.2, I started from scratch following the
Lua 5.2 manual [3].

[1] http://article.gmane.org/gmane.comp.lang.lua.luabind/2898
[2] http://article.gmane.org/gmane.comp.lang.lua.luabind/2899
[3] http://www.lua.org/manual/5.2/manual.html#8


My adaptation of Luabind to Lua 5.2 is available at:

http://git.colberg.org/luabind.git
https://git.colberg.org/luabind.git
git://git.colberg.org/luabind.git

A tarball snapshot of the repository may be found at:

http://sourceforge.net/projects/halmd/files/libs/luabind/

The Luabind test suite passes both with Lua 5.2 and 5.1.


The repository is based on Luabind upstream commit 3044a90, and
contains minimal changes for compatibility with Lua 5.2, as well
as the cast graph cache bug fix [4].

[4] http://article.gmane.org/gmane.comp.lang.lua.luabind/2924

I invite everyone to give it a try, and merge/cherry-pick into your
personal Luabind branches. As mentioned above, I made sure to keep
the changes minimal. Further, the code is *backwards compatible*
with Lua 5.1. The macros for Lua 5.1 compatibility are written
thus that the corresponding lines may simply be deleted to get
rid of Lua 5.1 compatibility in the far future.

Regards,
Peter

------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user
Reply | Threaded
Open this post in threaded view
|

Re: Luabind adapted to Lua 5.2

Teto
that's great news !
Do you intend to keep on improving luabind ? Don't know if you noticed
but I tried to use C++11 templates instead of boost macros. That was
for fun but if a guy is serious about luabind dev, that might improve
perf.

Kudos to Ryan Pavlik too for maintaining his branch.

On Thu, Dec 22, 2011 at 10:51 PM, Peter Colberg <[hidden email]> wrote:

> Hi,
>
> Lua version 5.2.0 has been released a week ago, and since I am
> curious to test it, I adapted the Luabind library to Lua 5.2.
>
> There has been a prior effort by Teto [1] to port Luabind to a Lua
> 5.2 release candidate, adopted in a git branch by Ryan Pavlik [2].
> To keep changes minimal, however, and learn about the differences
> between Lua 5.1 and 5.2, I started from scratch following the
> Lua 5.2 manual [3].
>
> [1] http://article.gmane.org/gmane.comp.lang.lua.luabind/2898
> [2] http://article.gmane.org/gmane.comp.lang.lua.luabind/2899
> [3] http://www.lua.org/manual/5.2/manual.html#8
>
>
> My adaptation of Luabind to Lua 5.2 is available at:
>
> http://git.colberg.org/luabind.git
> https://git.colberg.org/luabind.git
> git://git.colberg.org/luabind.git
>
> A tarball snapshot of the repository may be found at:
>
> http://sourceforge.net/projects/halmd/files/libs/luabind/
>
> The Luabind test suite passes both with Lua 5.2 and 5.1.
>
>
> The repository is based on Luabind upstream commit 3044a90, and
> contains minimal changes for compatibility with Lua 5.2, as well
> as the cast graph cache bug fix [4].
>
> [4] http://article.gmane.org/gmane.comp.lang.lua.luabind/2924
>
> I invite everyone to give it a try, and merge/cherry-pick into your
> personal Luabind branches. As mentioned above, I made sure to keep
> the changes minimal. Further, the code is *backwards compatible*
> with Lua 5.1. The macros for Lua 5.1 compatibility are written
> thus that the corresponding lines may simply be deleted to get
> rid of Lua 5.1 compatibility in the far future.
>
> Regards,
> Peter
>
> ------------------------------------------------------------------------------
> Write once. Port to many.
> Get the SDK and tools to simplify cross-platform app development. Create
> new or port existing apps to sell to consumers worldwide. Explore the
> Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
> http://p.sf.net/sfu/intel-appdev
> _______________________________________________
> luabind-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/luabind-user

------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user
Reply | Threaded
Open this post in threaded view
|

Re: Luabind adapted to Lua 5.2

Peter Colberg-3
On Fri, Dec 23, 2011 at 10:39:26AM +0100, Teto wrote:
> that's great news !
> Do you intend to keep on improving luabind ?

For now I intend keep my involvement at a minimum, i.e. not deviate
from upstream too much. So far I have not given up hope yet that the
maintainer of Luabind will resume development at some point. The
latest upstream commit adds initial C++11 support.

> Don't know if you noticed
> but I tried to use C++11 templates instead of boost macros. That was
> for fun but if a guy is serious about luabind dev, that might improve
> perf.

Where can I find this? Which compiler are you developing with?

Peter

------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user
Reply | Threaded
Open this post in threaded view
|

Re: Luabind adapted to Lua 5.2

Ryan Pavlik-4


On Fri, Dec 23, 2011 at 9:15 AM, Peter Colberg <[hidden email]> wrote:
On Fri, Dec 23, 2011 at 10:39:26AM +0100, Teto wrote:
> that's great news !
> Do you intend to keep on improving luabind ?

For now I intend keep my involvement at a minimum, i.e. not deviate
from upstream too much. So far I have not given up hope yet that the
maintainer of Luabind will resume development at some point. The
latest upstream commit adds initial C++11 support.

> Don't know if you noticed
> but I tried to use C++11 templates instead of boost macros. That was
> for fun but if a guy is serious about luabind dev, that might improve
> perf.

Where can I find this? Which compiler are you developing with?

Peter

Most of the variations you can find on GitHub by looking at the network members list: https://github.com/rpavlik/luabind/network/members 

--
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

[hidden email]
http://academic.cleardefinition.com

------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user
Reply | Threaded
Open this post in threaded view
|

Re: Luabind adapted to Lua 5.2

Jason McKesson
On Dec 24, 2011 9:13 AM, Ryan Pavlik wrote:


On Fri, Dec 23, 2011 at 9:15 AM, Peter Colberg <[hidden email]> wrote:
On Fri, Dec 23, 2011 at 10:39:26AM +0100, Teto wrote:
> that's great news !
> Do you intend to keep on improving luabind ?

For now I intend keep my involvement at a minimum, i.e. not deviate
from upstream too much. So far I have not given up hope yet that the
maintainer of Luabind will resume development at some point. The
latest upstream commit adds initial C++11 support.

> Don't know if you noticed
> but I tried to use C++11 templates instead of boost macros. That was
> for fun but if a guy is serious about luabind dev, that might improve
> perf.

Where can I find this? Which compiler are you developing with?

Peter

Most of the variations you can find on GitHub by looking at the network members list: https://github.com/rpavlik/luabind/network/members 

--
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

[hidden email]
http://academic.cleardefinition.com


------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev


_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user
It's interesting to see all of these diverging and interconnecting paths in Luabind's development. But is there ever going to be an actual *release*? You know, something you download, something that somebody stands behind and say, "This is the thing that's supposed to function." Is anyone looking into doing something like that?

------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user
Reply | Threaded
Open this post in threaded view
|

C++ function called twice!!

Kristoffer Danielsson
In reply to this post by Teto
Luabind 0.9 (090216), Lua 5.1.3, VC++ 2010 SP1, debug mode.
 
I have a complex script with a function. Let's call it "foo". I call "foo" using call_function<>. "foo" then calls C++ function "bar". You get the idea :P
 
function foo(blah a)
     a:bar(x)
end
 
I have debugged this thoroughly and I'm convinced that "bar" is called twice. Putting debug printouts around it and catching breakpoints in my C++ code proves this. There is only one call to "bar" from Lua, yet it seems to call it twice. My parameters are pushed to the Lua stack ONCE.
 
Has anyone of you guys encountered this weird behavior? Is it a known bug? My guess is that this is a bug inside LUA!
 
Please advise!

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user
Reply | Threaded
Open this post in threaded view
|

Re: C++ function called twice!!

Ryan Pavlik-4
It's hard to know with such generic dummy code - can you make a minimal test case that shows the issue?  I'm doubting it's a Lua bug - it may be a Luabind bug, or it may be a bug in your code, but I've never seen this happen before.

Ryan

On Tue, Jan 31, 2012 at 4:12 PM, Kristoffer Danielsson <[hidden email]> wrote:
Luabind 0.9 (090216), Lua 5.1.3, VC++ 2010 SP1, debug mode.
 
I have a complex script with a function. Let's call it "foo". I call "foo" using call_function<>. "foo" then calls C++ function "bar". You get the idea :P
 
function foo(blah a)
     a:bar(x)
end
 
I have debugged this thoroughly and I'm convinced that "bar" is called twice. Putting debug printouts around it and catching breakpoints in my C++ code proves this. There is only one call to "bar" from Lua, yet it seems to call it twice. My parameters are pushed to the Lua stack ONCE.
 
Has anyone of you guys encountered this weird behavior? Is it a known bug? My guess is that this is a bug inside LUA!
 
Please advise!

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user




--
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

[hidden email]
http://academic.cleardefinition.com

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user
Reply | Threaded
Open this post in threaded view
|

Re: C++ function called twice!!

Kristoffer Danielsson
Hi again.
 
You were right. I'm a noob :P
It was a bug in my code... sorry!
 

Date: Tue, 31 Jan 2012 17:21:22 -0600
From: [hidden email]
To: [hidden email]
Subject: Re: [luabind] C++ function called twice!!

It's hard to know with such generic dummy code - can you make a minimal test case that shows the issue?  I'm doubting it's a Lua bug - it may be a Luabind bug, or it may be a bug in your code, but I've never seen this happen before.

Ryan

On Tue, Jan 31, 2012 at 4:12 PM, Kristoffer Danielsson <[hidden email]> wrote:
Luabind 0.9 (090216), Lua 5.1.3, VC++ 2010 SP1, debug mode.
 
I have a complex script with a function. Let's call it "foo". I call "foo" using call_function<>. "foo" then calls C++ function "bar". You get the idea :P
 
function foo(blah a)
     a:bar(x)
end
 
I have debugged this thoroughly and I'm convinced that "bar" is called twice. Putting debug printouts around it and catching breakpoints in my C++ code proves this. There is only one call to "bar" from Lua, yet it seems to call it twice. My parameters are pushed to the Lua stack ONCE.
 
Has anyone of you guys encountered this weird behavior? Is it a known bug? My guess is that this is a bug inside LUA!
 
Please advise!

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user




--
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

[hidden email]
http://academic.cleardefinition.com

------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________ luabind-user mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/luabind-user

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user