[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua 5.3 work1 Considering math.isinteger or type()
- From: Sean Conner <sean@...>
- Date: Thu, 25 Jul 2013 03:43:18 -0400
It was thus said that the Great Petite Abeille once stated:
> Out of curiosity… as the 46 (and counting) messages in this thread haven't
> made it very clear, at least to me… why do we even care if a number is an
> integer, float, real, double, whatnot? Isn't the purpose of that int vs.
> float dichotomy to be purely an implementation detail? Wholly transparent?
> And a number stays a number? Irrespectively of internal representation?
As a side project, I'm playing around with bindings to ptrace(). ptrace()
is a function that deals primarily with addresses . On a 32-bit system
there is no real issues  but on a 64-bit system it really is an issue
. But I'm willing to conceed that what I'm working on might be a bit out
-spc (But other than that, yes, I haven't really had an issue with Lua
numbers ... )
 In another process no less!
 Well, addresses are technically 32 bit unsigned quantities but
lua_Integer is a signed quantity. I am trying to be very careful on
how I write the interface to ptrace(), but it's still mostly
untested code at this point.
 I did do a "proof-of-concept" 64-bit version of the code, but
uint32_t addr = SOMEVALUE;
uint64_t addr = SOMEVALUE;
with some other minor tweaks to the Lua side of things. It works,
but I'm not fully happy with it.