[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: 10 LOC program is too complex to be compiled
- From: Francisco Olarte <folarte@...>
- Date: Tue, 28 Apr 2015 12:35:41 +0200
On Mon, Apr 27, 2015 at 8:04 PM, Marc Balmer <marc@msys.ch> wrote:
> Am 27.04.15 um 14:18 schrieb Egor Skriptunoff:
>> I have defined 150 local variables and created an array,
>> in which 50-th element is a nested array of length 50.
>> ---------------------------------------------------------
>> local a,a,a,a,a,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,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,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,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,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,a,a,a,a
>> a = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
>> 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
>> {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
>> 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2}}
>> ---------------------------------------------------------
>> Both Lua 5.2 and Lua 5.3 have failed to compile it:
>> test.lua:10: function or expression too complex near '2'
>>
>> Why such short code is considered to be "too complex"?
>> I'd like to write much more complex programs than this one.
> This program is not complex. It is - kind of - idiotic.
That is probably why the OP asked WHY lua qualified it as too complex.
> If you were a prgrammer in my company, you would be fired by now.
> I hope you will write more meaningful programs than this one.
The OP seems to have taken his time to simplify his original problem
to s simplified test case which exhibits the error. This is a
refreshing change from the too frequent attitude of pasting incomplete
contextless chunks.
I do not know if you are trying to be sarcastic ( doesn't seem like it
to me ) or if you believe that is real code ( which would worry me ) (
it doesn't matter whether it is real or not, just whether you believe
it ). I would like to know ( for context on reading future messages or
any other potential interaction with you ).
Regards.
Francisco Olarte.