[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Request for 5.4: adding [] as table creation syntax for Lua 6.0
- From: Andrew Starks <andrew@...>
- Date: Thu, 14 Jul 2016 15:31:06 -0500
On Thu, Jul 14, 2016 at 2:39 PM, Patrick Donnelly <batrick@batbytes.com> wrote:
> On Thu, Jul 14, 2016 at 3:00 PM, Soni L. <fakedme@gmail.com> wrote:
>> On 14/07/16 03:53 PM, Patrick Donnelly wrote:
>>>
>>> On Thu, Jul 14, 2016 at 11:45 AM, Soni L. <fakedme@gmail.com> wrote:
>>>>
>>>>
>>>> On 14/07/16 12:37 PM, Patrick Donnelly wrote:
>>>>>
>>>>> On Thu, Jul 14, 2016 at 11:14 AM, Soni L. <fakedme@gmail.com> wrote:
>>>>>>
>>>>>> That's only true for PUC Lua. That is,
>>>>>>
>>>>>> local function array(...)
>>>>>> local function arrayco(...)
>>>>>> while true do coroutine.yield(...) end
>>>>>> end
>>>>>> local co = coroutine.wrap(arrayco)
>>>>>> co(...)
>>>>>> return co
>>>>>> end
>>>>>>
>>>>>> is usable in sane Lua implementations. Stop using the PUC Lua
>>>>>> interpreter
>>>>>> and you won't have any more complaints about this stuff.
>>>>>
>>>>> Uh, are you suggesting that the above array function is O(1) in "sane
>>>>> Lua implementations" (are you implying LuaJIT???). I'd love to see
>>>>> the Lua interpreter that "optimizes" lua_xmove across coroutines to
>>>>> O(1).
>>>>>
>>>> Amazingly, linked lists are O(1).
>>>
>>> Okay, let me be more clear*: Bullshit. Link to your "sane Lua
>>> implementation". Come on, let's see it. To my knowledge, no Lua
>>> implementation uses linked lists for the function stack (not call
>>> stack) and, even if they did, it wouldn't be useful anyway when
>>> copying groups of values between coroutines.
>>>
>>> * You know, your snide remarks don't help you at all here. There are
>>> smart people on this list and if someone doesn't understand, it's
>>> probably not because they're stupid. Maybe you just need to do a
>>> better communicating what you know/think.
>>>
>>
>> You say that like I haven't explained the whole process behind a linked
>> list-based vararg implementation before.
>
> Assuming you have, that still doesn't address the problem. While you
> may make the call to coroutine.yield O(1) (in your array example),
> that doesn't help when yield needs to pass those values to the calling
> thread (via lua_xmove).
>
> You really shouldn't say things like "That's only true for PUC Lua."
> or "is usable in sane Lua implementations" if there is no such
> implementation. You're spreading misinformation (that PUC Lua is
> inferior).
>
> --
> Patrick Donnelly
>
Apart from the technical reasons that you've noted, it would be
cowardly of me not to say that assertions that there is a derth of
sanity to be found in PUC Lua serve to unfairly denigrate the work of
the people that all of us hold in high esteem. The injury is much the
worse for being false.
I'm not the morality police, but since there is none, I'll assert that
this list values polite behavior and when that is lacking, all are
justified when they point it.
--
Andrew Starks
- References:
- Request for 5.4: adding [] as table creation syntax for Lua 6.0, Reed Weichler
- Re: Request for 5.4: adding [] as table creation syntax for Lua 6.0, Luiz Henrique de Figueiredo
- Re: Request for 5.4: adding [] as table creation syntax for Lua 6.0, Rena
- Re: Request for 5.4: adding [] as table creation syntax for Lua 6.0, Egor Skriptunoff
- Re: Request for 5.4: adding [] as table creation syntax for Lua 6.0, Daurnimator
- Re: Request for 5.4: adding [] as table creation syntax for Lua 6.0, Egor Skriptunoff
- Re: Request for 5.4: adding [] as table creation syntax for Lua 6.0, Philipp Janda
- Re: Request for 5.4: adding [] as table creation syntax for Lua 6.0, Egor Skriptunoff
- Re: Request for 5.4: adding [] as table creation syntax for Lua 6.0, Soni L.
- Re: Request for 5.4: adding [] as table creation syntax for Lua 6.0, Patrick Donnelly
- Re: Request for 5.4: adding [] as table creation syntax for Lua 6.0, Soni L.
- Re: Request for 5.4: adding [] as table creation syntax for Lua 6.0, Patrick Donnelly
- Re: Request for 5.4: adding [] as table creation syntax for Lua 6.0, Soni L.
- Re: Request for 5.4: adding [] as table creation syntax for Lua 6.0, Patrick Donnelly