lua-users home
lua-l archive

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

On 21/02/17 01:30 AM, Derek Bailey wrote:
The 'true.lua' file still takes a non-zero and non-trivial size on disk due to the inode structure. (

Thus the following is smaller module with your same requirements:


assert(require'true' == true)

Not saying what I have cannot be smaller, but don't make absolute statements that aren't true.

And any non-empty Lua module file still takes more size on disk than true.lua.

The point is to have it as a separate file/an external module, in which case my statements are true.

My code isn't in a separate module file, it is defined directly in the source Lua file that is using the module. Thus adding the ~28 bytes to the source file is much less than the 1KB needed for a completely separate, and empty, file. Your requirements didn't state that it had to be a separate/external file, just that it is the smallest possible Lua module, which isn't true.