[NTG-context] final thoughts on experiments with lua

luigi scarso luigi.scarso at gmail.com
Thu Jan 10 10:50:08 CET 2019

On Thu, Jan 10, 2019 at 10:27 AM Schmitz Thomas A. <
thomas.schmitz at uni-bonn.de> wrote:

> > On 10. Jan 2019, at 01:08, Hans Hagen <j.hagen at xs4all.nl> wrote:
> >
> > it all depends on use ... if you can be more specific ...
> Hans, Luigi,
> thanks for your hints on list sorting - they are appreciated, but I’ve
> been there many many times: it’s impossible to be more specific because
> numbering can be unexpectedly weird. Combinations of Greek and Roman
> letters, sometimes (for historic reasons) even lines that are out of
> numeric sequence. I’ve tried to catch these exceptions in sort functions,
> only to have to add even more ifs and buts when I was processing the next
> author. And I’m pretty sure that the solution is not in sorting a table
> index: the correct sequence is already in the source, it just has to be
> preserved. What I do now, in a nutshell: I have tables such as
> sections = { “1”, “2”, “2a” }
> words = { [“1”] = { “a”, “b” },
>           [“2a”] = { “c”, “d” } }
> so I can iterate through ipairs(sections) in sequence and pick up the word
> lists for each section. In the greater scheme of things, as Hraban pointed
> out: if there were an “ordered table” structure in Lua, this is precisely
> what it would do behind the scenes; it would just make it easier for the
> user.

the point is that I believe that is also doable in lua...
maybe could be helpful to have a significative example in python, ton see
if we can mimic it in lua  ?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20190110/b6666640/attachment.html>

More information about the ntg-context mailing list