lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi!

I've been thinking about doing something similar for a while, but for the purpose of comparing table's out in tests (and listing their differences).

I did a quick perusal in the code. Does ltdiff support tables-in-keys? I would test myself but I am on my mobile and will be for a while.

On Oct 11, 2014 2:30 PM, "Martin Felis" <martin@fysx.org> wrote:
ltdiff (Lua Table Diff) is a Lua snippet that allows to create diffs
recursively between two Lua tables. This diff can then again be applied
to the original unmodified table to reconstruct the modified table.

This could be used to reduce the amount of data needed to be transmitted
in order to synchronize two tables. Beware that there is some overhead
especially for nested tables with only few entries.

Also when doing version control of data stored in Lua files this can be
handy to see what has changed.

It is published under the MIT license and a rock can be found at
  https://rocks.moonscript.org/modules/fysx/ltdiff

Homepage:
  https://github.com/martinfelis/luatablediff

Cheers,
Martin