As the title says... Chat on...

User avatar
By GeoNomad
#4557 I found an implementation of the bit library written in Lua

http://files.luaforge.net/releases/bit/bit/luabitv0.4

Haven't tried it, but it will be a good start to save some programming, I suspect.

If not, there are other links to check out here:

http://lua-users.org/wiki/BitwiseOperators

Peter
User avatar
By zeroday
#4561 I have test a bitwise module. it cost about 400bytes ram.
the total ram remain will be below 20k.
worth it? :idea:
User avatar
By ThomasW
#4564
zeroday wrote:I have test a bitwise module. it cost about 400bytes ram.
the total ram remain will be below 20k.
worth it? :idea:

Would it be possible to build this (and other parts of the api) as 'unloadable' functions? Looking at the globals in the interpreter:

Code: Select allmodule:function: 3fff6cb8
require:function: 3fff6d08
pairs:function: 3fff6650
newproxy:function: 3fff6728
package:table: 3fff6858
_G:table: 3fff6020
__index:lightfunction: 40228cc4
ipairs:function: 3fff6598

I can set unneeded ones to nil - gaining some memory.
Would be great if we could do this with api modules too - choose from i2c,pwm,adc,ow,bit....

Thomas