lua and luafilt functions that work on any platform, code.cpp from mniip (no idea why it's .cpp)