lua-users home
lua-l archive

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


On 27 April 2015 at 10:54, Egor Skriptunoff <egor.skriptunoff@gmail.com> wrote:
> On Mon, Apr 27, 2015 at 3:50 PM, Coda Highland <chighland@gmail.com> wrote:
>>
>>
>> local a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
>> local a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
>> local a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
>> local a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
>> local a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
>> local a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
>> local a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
>> local a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
>> local a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
>> local a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
>>
>> a={{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
>>
>> This will make LuaJIT throw the same error.
>>
>> /s/ Adam
>>
>
> 200 local variables is the limit, so use one less and LuaJIT will NOT throw
> the error.

Yes, because of what Coda said and you made the point of snipping from
the quote:

> LuaJIT just has higher limits.

What's your point? Using one less than the limit in Lua will also NOT
throw the error. (Nice use of capitals for dramatic emphasis there, by
the way.)

> Is Lua really suitable only for short human-written code?

Strawman Argument. There's a gazillion ways to write long
machine-generated code that Lua runs just fine, and there's a ton of
such examples out there.

The simplest solution to your problem is: store your automatically
generated data in a table, not in locals.

-- Hisham