lua-users home
lua-l archive

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


On Thu, Aug 7, 2008 at 10:48 PM, Hartmut Henkel <hartmut_henkel@gmx.de> wrote:
> Hi,
>
> it is so practical to store data in a transparent way within data files
> by Lua tables like
>
> keytable{
> words = 625000,
> wordsize = 32,
> randmax = 4294967296,
> key = {
> 3608578767,
> 1693861772,
> [ ... 624997 values omitted ... ]
> 3780027093,
> }}
>
> and reading them in by dofile() (cf. PiL, 12.1 Data Files), but the
> above one gives a "lua: constant table overflow" error. 625000 values
> isn't that much nowadays. It would be very nice if Lua could be made to
> "think big" in these cases.
>
> Is there some trick to circumvent this limitation (while keeping such a
> structure)?

Split table initialization to multiple functions:

http://lua-users.org/lists/lua-l/2008-02/msg00257.html

HTH,
Alexander.