On Wed, Aug 21, 2013 at 4:13 PM, Mathieu Stumpf <
psychoslave(a)culture-libre.org> wrote:
But no, it doesn't, I still generate a randomly
ordered wiki table. So,
what did I missed?
Two things:
1. table.sort() only sorts the sequence part of the table. So only the
elements 1-9 in your table, not 0 or A-E.
2. pairs() doesn't process the elements in any particular order; you can
see this by printing out the keys as you iterate through using pairs().
You'd need to use ipairs instead (which again only does the sequence part
of the table).
--
Brad Jorsch (Anomie)
Software Engineer
Wikimedia Foundation