[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] True 1.0 - Smallest Lua module ever
- From: Derek Bailey <dbaileychess@...>
- Date: Tue, 21 Feb 2017 12:23:32 -0800
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. (http://stackoverflow.com/questions/3618820/how-many-bytes-per-inodes)
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.