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.

2 Answers

1
dualed On Best Solutions

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.

1
Brian On

A few ideas:

But first, what platform are you on?

Are you constrained by platform? If not, I've done very exciting things directly on an iPad, in Codea. Pure Lua, built on OpenGL, so built-in API for graphics support.

Beyond that, you could probably use Love2d. It's meant for game dev, but you could probably adapt it to your needs. It's a Lua API, has graphics support, and is cross-platform. I don't know much about it (yet), so others could pipe in with their thoughts/opinions.