Re: [PATCH 2/2] BUG/MINOR: lua: Make the arrays in the list of headers 1-indexed

2019-09-30 Thread Thierry Fournier
> On 30 Sep 2019, at 05:40, Willy Tarreau wrote: > > Hi guys, > > On Thu, Sep 26, 2019 at 04:35:31PM +0200, Tim Düsterhus wrote: >> Adis, >> >> Am 26.09.19 um 16:01 schrieb Adis Nezirovic: >>> While I agree that using zero based array indexing is a mistake (wearing >>> my Lua hat), I don't t

Re: [PATCH 2/2] BUG/MINOR: lua: Make the arrays in the list of headers 1-indexed

2019-09-29 Thread Willy Tarreau
Hi guys, On Thu, Sep 26, 2019 at 04:35:31PM +0200, Tim Düsterhus wrote: > Adis, > > Am 26.09.19 um 16:01 schrieb Adis Nezirovic: > > While I agree that using zero based array indexing is a mistake (wearing > > my Lua hat), I don't think your proposal will make situation any better. > > Actually o

Re: [PATCH 2/2] BUG/MINOR: lua: Make the arrays in the list of headers 1-indexed

2019-09-26 Thread Tim Düsterhus
Adis, Am 26.09.19 um 16:01 schrieb Adis Nezirovic: > While I agree that using zero based array indexing is a mistake (wearing > my Lua hat), I don't think your proposal will make situation any better. > Actually ot might hurt existing Lua code in unforeseen ways. Yes, I understand that it breaks

Re: [PATCH 2/2] BUG/MINOR: lua: Make the arrays in the list of headers 1-indexed

2019-09-26 Thread Adis Nezirovic
On 9/26/19 3:11 PM, Tim Duesterhus wrote: Lua arrays start at the index 1 by convention: However, it is customary in Lua to start arrays with index 1. The Lua libraries adhere to this convention; so, if your arrays also start with 1, you will be able to use their functions directly. (https://w

[PATCH 2/2] BUG/MINOR: lua: Make the arrays in the list of headers 1-indexed

2019-09-26 Thread Tim Duesterhus
Lua arrays start at the index 1 by convention: > However, it is customary in Lua to start arrays with index 1. The Lua > libraries adhere to this convention; so, if your arrays also start with 1, > you will be able to use their functions directly. (https://www.lua.org/pil/11.1.html) This patch ma