[ZeroBrane Studio] Re: ZeroBrane Studio now includes Lua5.2, swithes to LuaJIT, and upgrades LuaSocket to 3.0.

  • From: Paul K <paul@xxxxxxxxxxxxx>
  • To: zerobrane@xxxxxxxxxxxxx
  • Date: Fri, 30 Aug 2013 09:06:15 -0700

Hi Rob,

> This is really not a ZBS question ... In the local console, when I type 
> '=bit32' I get the bit32 > library from Lua 5.2 ... but I don't see any notes 
> about that in the LuaJIT notes... how does
> that work then?!?! :-D

It is actually a ZBS question as LuaJIT only provides "bit" and not
"bit32". The reason you see both is that wxlua (which is a wrapper
around wxwidgets) is loaded as well and it includes "bit" and "bit32"
library (the latter is bit32 from Lua 5.2 backported to Lua 5.1).
That's why you are going to see both.

This is only relevant for the local console; the scripts you run are
executed as separate processes, so they get whatever environment is
provided by the Lua engine. Local console shares the environment with
the IDE, which is by design as it allows to control some of the IDE
aspects from the console.

Paul.

On Thu, Aug 29, 2013 at 10:51 PM, Rob Probin <rob.probin@xxxxxxxxx> wrote:
> This is really not a ZBS question ... In the local console, when I type
> '=bit32' I get the bit32 library from Lua 5.2 ... but I don't see any notes
> about that in the LuaJIT notes... how does that work then?!?! :-D
>
> Regards,
> Rob.

Other related posts: