Search code examples
user-interfacegraphicslua

Is there a way to create a GUI in Lua?


I am working on a Genetic Algorithm solution to TSP in Lua, and have reached a point where I need a better method of troubleshooting and checking results. The best way to do this would be with a GUI, but I can't seem to find anything about GUIs in Lua.

I've done some searching around Google, and haven't found anything built in to the language. I have found Toolkits such as the one found here:

http://lua-users.org/wiki/GraphicalUserInterfaceToolkits

However, I am new enough to Lua that I do not know how to properly use these. Any help on the matter would be greatly appreciated.


Solution

  • If you are still shaky in Lua, I suggest to stick to the console for a while. GUI, whatever the language, is usually messy and unsatisfying for beginners.

    If you already know some HTML and Javascript, consider using Lua with a web framework, and using the browser to control your program through a REST API:

    Apart from that, I have yet to find a GUI framework that feels right for Lua. Almost everything is a thin wrapper around a C or C++ API and handles exactly like that. On the other hand, with the web and Electron on the rise there seems little need for it.