Works fine with LuaJIT but not with standard
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Works fine with LuaJIT but not with standard
-
Last edited by Bicentric on Tue Jun 19, 2018 7:25 pm, edited 1 time in total.
Re: Works fine with LuaJIT but not with standard
The library you have chosen does not have pure-Lua bitwise functions.
You can try my hash.lua that implements some hashes. It also requires my utils.lua and bit.lua for the pure-Lua functions.
Code: Select all
-- TODO: implement bit ops in Lua
Shallow indentations.
- Roland_Yonaba
- Inner party member
- Posts: 1563
- Joined: Tue Jun 21, 2011 6:08 pm
- Location: Ouagadougou (Burkina Faso)
- Contact:
Re: Works fine with LuaJIT but not with standard
Hi,
The standard version of Löve uses Lua5.1, which does not have a bit library.
LoveJIT uses LuaJIT, which already implements a bitOp module (written in C and provinding functions such as bit.band, bit.bor, bit.ror, ...).
In case you need to run the same code with standard Love, you will have to implement a bitwise op library in a file named bit.lua, so that it'll be called by LuaCrypt. Hopefully, pure Lua implementations of bitwise operations is available. Checkout David Manura's.
EDIT: Ninja'ed by BoolSheet.
The standard version of Löve uses Lua5.1, which does not have a bit library.
LoveJIT uses LuaJIT, which already implements a bitOp module (written in C and provinding functions such as bit.band, bit.bor, bit.ror, ...).
In case you need to run the same code with standard Love, you will have to implement a bitwise op library in a file named bit.lua, so that it'll be called by LuaCrypt. Hopefully, pure Lua implementations of bitwise operations is available. Checkout David Manura's.
EDIT: Ninja'ed by BoolSheet.
Who is online
Users browsing this forum: No registered users and 20 guests