Hi,
From what I understand (I may be wrong here) Lua relies on the application program (ie Mach4) to take care of error handling, and Mach4 hasn't done a great job.
Lua has very basic error handling where it has any at all, you get a stack dump and thats about it.
Lua is a scripting language, it takes your Lua instructions and generates what amounts to C code. As you know C is very good, but it has to be in every
way perfect to run, all the data types must match exactly, any and all data structures must match perfectly and so on. Lua is a great way to generate
simple but useful code BUT DOES NOT require the level of perfection and expertise that C code demands.
Amongst the things that simplify Lua is being essentially type free....however it is also one of the areas that cause the most grief. If you feel that simplification comes
at too greater cost then write your code in C.
All Lua code should be written and tested in a sandbox. It must be compiled on its own and then tested by single stepping through it with Zero Brane. Only once its
written, tested and de-bugged should you commit it to being combined with all the other code and compiled into the Screen Script. If you write code and introduce it
into the screen script without de-bugging it first you are asking for trouble.
Mach4 is a CNC software, it primary purpose is a Gcode interpreter and trajectory planner. It has a GUI to assist and a scripting program to assist users
to generate their own code.......but its not a software development environment. If you expect all the bells and whistles of an IDE like MSStudio you'll be disappointed.
Your wife is right, have you noticed they always are, you need to start making chips. Mach4 is largely complete and does not require any additions in order for you to
make parts.
When I started with Mach4 I too wrote a suite of additional code......almost all of it has since been deleted....I just don't need it, I thought I did but practical machining
showed me that I did not. I have maybe four macros that I use day in and day out and could not work/make a living without them....all the rest is just time
wasting.
Craig