Bitwise operators
#10
(08-19-2016, 11:16 PM)xoft Wrote: There is no built-in support in Cuberite so far. However, it should be fairly straightforward to implement some simple bitwise logic directly in lua, using regular math operations. It will not be as performant as C/C++, but it might be more performant than actually exporting an API for that (anyone care to bench-test this hypothesis? Smile

I had to work with individual byte mechanics here to get plugin messages handled in a sane manner. Note: that is one of the first things I ever programmed, and I *know* it was extremely broken at some point (to the point of screwing up every single non-string value) and I somewhat doubt I ever got around to fixing it (the associated plugin only used the string method). So while the theory may be valid, the implementation is likely... flawed to say the least. I'd do a complete rewrite of that entire repository before I recommended it to anyone, but the math at least worked.
Reply
Thanks given by:


Messages In This Thread
Bitwise operators - by PureTryOut - 08-19-2016, 08:31 PM
RE: Bitwise operators - by Seadragon91 - 08-19-2016, 09:26 PM
RE: Bitwise operators - by NiLSPACE - 08-19-2016, 10:09 PM
RE: Bitwise operators - by xoft - 08-19-2016, 11:16 PM
RE: Bitwise operators - by NiLSPACE - 08-19-2016, 11:41 PM
RE: Bitwise operators - by PureTryOut - 08-20-2016, 01:44 AM
RE: Bitwise operators - by xoft - 08-20-2016, 05:09 AM
RE: Bitwise operators - by PureTryOut - 08-20-2016, 07:04 AM
RE: Bitwise operators - by tigerw - 08-20-2016, 08:05 AM
RE: Bitwise operators - by Zee1234 - 08-24-2016, 11:08 AM
RE: Bitwise operators - by PureTryOut - 09-08-2016, 08:48 PM
RE: Bitwise operators - by NiLSPACE - 09-08-2016, 08:50 PM
RE: Bitwise operators - by xoft - 09-08-2016, 10:39 PM
RE: Bitwise operators - by PureTryOut - 09-10-2016, 04:07 AM



Users browsing this thread: 1 Guest(s)