luafilesystem
lunacy
luafilesystem | lunacy | |
---|---|---|
3 | 2 | |
873 | 3 | |
1.7% | - | |
4.5 | 8.4 | |
4 months ago | 2 days ago | |
C | C | |
MIT License | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
luafilesystem
-
How do you determine what goes into the standard library?
Lua: the standard library is extremely minimalist, and mostly operates within Lua's object model (i.e. not super low-level). The documentation for every standard library function, as well as the entire language fits on a single HTML page. The set of tools is very small, but they're extremely versatile, so I think it's a good example of how little you can get away with. In my opinion, the one glaring shortcoming of Lua's standard library is the lack of any filesystem support. You can read/write files, but you need to rely on third party libraries like LuaFileSystem to get basic filesystem stuff like directory traversal or listing files.
-
Building Lua on Windows
The Lua ecosystem is just fine on Windows if one is careful to use modules with both native Win32 and *NIX support. For example, the Lua File system module goes to a lot of bother to run just as well in a Windows and a *NIX environment.
- [RGO] A couple of mods for Rebel Galaxy Outlaw
lunacy
-
Building Lua on Windows
I like having a language which can quickly do a lot more than what BASH/Sed/AWK can do fit in a 116,224 byte sized Windows 32-bit binary, but I have had to do some hacking, both making my own custom compile of Lua and making a number of Lua functions to fill in the blanks while keeping things small and trivial to install on either native Windows, as a Cygwin program, or as a program in Linux or pretty much any POSIX compatible *NIX clone (including MacOS).
-
Glibc is still not Y2038 compliant by default
Now, last time I researched this, there still isn’t a “int64_t time_64bit()” style system call in the Linux API so that newly compiled 32-bit binaries can be Y2038 compliant by using “time_64bit()” instead of “time()”.
Keep in mind that we also need 64-bit versions of “strftime()”, “localtime()”, “ctime()”, “gmtime()”, “asctime()”, and “mktime()”, and so on probably with strdtime_64bit(), localtime_64bit(), and so on. In my piece of code, I could had written my own implementations of all these — note that time zone management is a really hard problem because of things like changing daylight savings time and the Indiana time mess^2 — but I decided to simply just have my Lua fork have no timestamp support beyond a simple 64-bit timestamp. There’s also the issue with stat() and the struct timespec returned for file creation/modification/access/status change timestamps^3, so I just don’t have stat() look at timestamps.
[1] https://github.com/samboy/lunacy
[2] https://en.wikipedia.org/wiki/Time_in_Indiana
[3] To ruin a classic sadistic interview question for sys admin roles, Linux these days returns both the modification time and the mostly useless “status change” timestamp. Facebook once decided to not move forward because I said that file timestamp was “modification time” and not “status change”; if Facebook is still asking that question, their knowledge is out of date.
What are some alternatives?
lua-zlib - Simple streaming interface to zlib for Lua.
tz - Time zone database and code
luawinmulti - Lua build and installation script for Windows, building multiple Lua versions in parallel, including LuaRocks.
Glide - Glide programming language
langs