Hi,
I have this link open whenever I'm coding:
https://www.lua.org/manual/5.2/Note that there is a later release (5.3) but Mach has the 5.2 version, there are a few differences.
The Standard Libraries, section 6, contains a list of all the included functions of Lua.
In addition there are a whole raft of libraries written in Lua, mathematical, graphic, communication you name it!
http://lua-users.org/wiki/LibrariesAndBindingsA while back I tried to import a graphical library into Mach. I did quite a bit of work on it but ultimately failed to get the
module incorporated into Mach. I'm sure it can be done but requires more skill than I have. In this particular
case I was just trying to see whether I could do it in response to a query on the forum, not that I actually required
it.
In the early days I was convinced I would have to download and incorporate a POSIX compliant string editing
module. I subsequently found that the string functions table built in to 5.2 while not POSIX compliant can do
just about everything required.
I have found that anything that I require to do on my machine has NOT demanded that I add other Lua libraries to
Mach. May I suggest exploring the extents of Lua as supplied before concerning yourself with extra libraries and/or
C++ functions.
When scripting Lua represents only a portion (small) of the effort/understanding required the remainder of the
effort/understanding is the use of the API and making intelligent use of Machs structure.
There are a couple of areas where I believe an understanding of Lua will greatly assist your efforts.
The first is to understand and be familiar with is 'functions as a first class value', that subtle but powerful idea occurs
repeatedly throughout Mach. The second area is the use of Lua's one and only data structure...the table.
When you recognize the power of the table you will also see that many of the standard libraries (math and string
for instance) are in fact just tables....tables of functions!
Craig