lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Announcing my new "bitfield" type library.

https://github.com/JohnHind/Lua_Bitfield

This is developed from some discussions here a few weeks ago. It is
essentially a different approach to the bit32 library. It implements a new
type based on userdata which represents a mutable vector of between 1 and
256 bits. Rather than having multi-bit logical operations, indexing accesses
individual bits as Lua booleans which can be operated on using the ordinary
boolean operators. There are some neat bells and whistles aimed at
comfortably representing bit-mapped registers and packed communications
protocols.

At the moment it is beta quality source code, but compile instructions are
provided for Windows and Linux and I have tested on both. If anyone can
provide compile instructions and test confirmation for OSX, I'd be grateful.

Comments/improvements/bug reports welcomed.