of     1   

cntkillme
#141105193Monday, July 21, 2014 11:01 PM GMT

Since Lua has no official support for these types of operations (or at least Lua 5.1) and I can't implement them C-sided since, well, I don't own Roblox (and I plan on making a GUI-based game on Roblox). Anyways, to the point: How are some efficient ways to implement the OR and AND operations (bit-shifting was easy since all I needed was powers and division) without string manipulation?
cntkillme
#141106629Monday, July 21, 2014 11:16 PM GMT

Bump
InternetGuy
#141106913Monday, July 21, 2014 11:19 PM GMT

If I'm not mistaken, Lua 5.2 allows you to do this, correct?
cntkillme
#141107047Monday, July 21, 2014 11:21 PM GMT

Yeah I believe there is a "bit32" table IIRC
InternetGuy
#141107141Monday, July 21, 2014 11:21 PM GMT

I thought so. I wonder why ROBLOX won't implement Lua 5.2.
InternetGuy
#141107201Monday, July 21, 2014 11:22 PM GMT

From the Lua.org website: Lua 5.2 was released on 16 Dec 2011. Its main new features are yieldable pcall and metamethods, new lexical scheme for globals, ephemeron tables, new library for bitwise operations, light C functions, emergency garbage collector, goto statement, and finalizers for tables.
cntkillme
#141107317Monday, July 21, 2014 11:23 PM GMT

I assume their sandboxing includes functions not available in Lua 5.2 (setfenv, getfenv, newproxy, etc.) and they don't want to make it compatible and they don't want to make some scripts break.
InternetGuy
#141107389Monday, July 21, 2014 11:24 PM GMT

They could just re-implement the built-in ROBLOX functions into Lua 5.2
cntkillme
#141107537Monday, July 21, 2014 11:26 PM GMT

Lua 5.3 yay http://www.lua.org/work/doc/
InternetGuy
#141107620Monday, July 21, 2014 11:27 PM GMT

What will Lua 5.3 include?
cntkillme
#141107910Monday, July 21, 2014 11:30 PM GMT

support for integers (64-bit by default) better support for small architectures ("Small Lua" with 32-bit numbers) bitwise operators basic utf-8 library utf-8 escapes in literal strings functions for packing/unpacking numbers userdata can have any Lua value as uservalue strip option in lua_dump/string.dump BITWISE operators is the only thing I'm looking forward to (and if integers are actually 64-bit, can the bit operators be used on them O_o it's like something JavaScript hasn't done yet)
swmaniac
#141109019Monday, July 21, 2014 11:42 PM GMT

I picked up this model a while ago: http://www.roblox.com/Bitwise-Operations-item?id=55099988 I haven't found any particular use for it; I'd be interested to hear what you're doing that requires bitwise operations.
cntkillme
#141109808Monday, July 21, 2014 11:51 PM GMT

I'll take a look at it, thanks in advanced. Also, it's just for a poker hand analyzer (as opposed to an older brute-force search that was terribly inefficient).
cntkillme
#141109908Monday, July 21, 2014 11:52 PM GMT

in advance* and I'm just remaking one I made a long time ago that required a gigantic lookup table.
cntkillme
#141110230Monday, July 21, 2014 11:56 PM GMT

That source seems to use string manipulation which is not really what I am aiming for. If last comes to last I guess I'll do it that way.
cntkillme
#141150221Tuesday, July 22, 2014 8:40 AM GMT

Bump
cntkillme
#141156629Tuesday, July 22, 2014 11:48 AM GMT

Bump
cntkillme
#141343802Thursday, July 24, 2014 3:08 AM GMT

Bump
MHebes
#141361333Thursday, July 24, 2014 5:55 AM GMT

I know nothing about bitwise operators and should probably look them up, but here's a script that blocco made that maybe/probably won't be helpful: http://www.roblox.com/Edge-Specific-Outlines-item?id=126404193 I only post it because it has some functions that look nifty.
cntkillme
#141361597Thursday, July 24, 2014 5:58 AM GMT

I'll take a look at it, also they're not complicated and anyone can learn them in probably 10 minutes or less
cntkillme
#141363774Thursday, July 24, 2014 6:23 AM GMT

Oo thanks

    of     1