lua-users home
lua-l archive

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

> Thanks!  However, it would be ideal if I didn't have to (re)compile
> anything, as the code that uses the function needs to be portable, and some
> of the target platforms don't have compilers available.  Is there a way to
> implement it in "pure" Lua?

How do you get Lua on the machines without a compiler?

You can implement XOR in pure Lua but it's very slow. Probably the easiest 
way is to do it bit by bit, but maybe there's a clever trick to do it 
faster with whole-word arithmetic.

-- | irrevocable, a.  expensive; see also lawyer