[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Proposal: Virtualization of Filesystem Operations for Lua 5.2.
- From: Louis Mamakos <louie@...>
- Date: Wed, 2 Nov 2011 16:52:26 -0400
On Nov 2, 2011, at 3:53 PM, Georg Lehner wrote:
> I propose to include a virtualization layer for filesystem operations in Lua 5.2.
> Problems with the current approach to filesystem operations are:
> - incomplete functionality (e.g. directory operations)
> - their behaviour depends on the platform where Lua is built
> - in some environments (deeply embedded..) the current functionality might be
> meaningless (and must be stripped out when porting)
> Advantages of virtualization, besides releaving the problems, are (see also )
> - improved portability both for the Lua interpreter and for Lua scripts
> - extensibility, generalization and reusability: Write portable Lua scripts
> for anything what can be made to look like a filesystem.
> Tcl/Tk features a successful filesystem virtualization layer.
One of the useful bits of the Tcl I/O interfaces is exposing a set of
operations common across different I/O objects and operations, including
communication interfaces (e.g., serial ports, network connections, etc.) One
aspect of that was also having a generalized interface for asynchronous
notifications (in Tcl, the "fileevent" mechanism which would enable in a
generalized way asynchronous I/O and a common event loop mechanism within
Tcl that other extensions could hook into.
It would be really great if these aspects might be considered as part of the
file system virtualization that you propose. I've often wondered if simply
porting the Tcl I/O channel architecture to Lua might be an interesting