lua-users home
lua-l archive

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


On Wed, Jul 10, 2013, at 01:07 PM, Jay Carlson wrote:
> On Jul 10, 2013 12:47 PM, "Todd Coram" <todd@maplefish.com[mailto:todd@maplefish.com]> wrote:
>
> IMHO, Int64 is a very big deal (for Lua). The 53 bits of mantissa is
> sufficient for a lot of applications, but I feel dirty every time I deal
> with a protocol format that specifies a 64 bit field and I shove it into
> a Lua (5.1/5.2) number: One day, someone will have a reason for using
> all 64 bits in that field and my Lua app will munge that value.
> 
> Yeah. But for many protocols the only things which get that large are lengths, and x86_64 implementations can't address that much memory. 64-bit ARM has that architected tag mode, so they hit the address space wall at ~2^55.
> 

Not to be pedantic, but when protocol specifies 64 bit ints, it is
expected to handle 64 bit ints. If someone decides to pack extra
meta-information into the upper bits of a 64 bit numbers, my Lua code
shouldn't munge it.

A few months ago I released a BSON parser in pure Lua and was questioned
by the BSON folk whether I truly supported int64 ... well I don't :-(

/todd