lua-users home
lua-l archive

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

On Thu, Jun 6, 2013 at 2:19 PM, Jorge <> wrote:
> A system that would allow me to "mark" any table as persistent, would be
> extremely interesting. Persistent table in Lua could be what file
> descriptors are in C. Just as UNIX is a provider of file descriptors to C,
> this system could be the foundation of a "true Lua OS".

I see here two different goals:

- make any table persistent:  the user doesn't care about how the data
is stores, as long as it preserves as much as possible of the table.
using databases or key/value stores would be great both for speed,
flexibility and ease of management.

- tables as file descriptors, "LuaOS": the table becomes an
abstraction of the filesystem.  many features of tables might not be
persisted, or maybe used to express/manipulate filesystem
capabilities: maybe a "__attrs" field in a metatable could store
file/dir attributes, etc.

of course, the minimal expression of both are quite similar; but the
path from there to anything else diverges quickly.

the "persistent tables" side is the one most often thought about, and
most of the suggestions are on this side; but the "tables as
filesystem abstraction" is more innovative IMHO.