I have started using Python in a real-time application (serial communication with to gps modules at once), but have found out recently about Lua. Which language would be more suited to the application?
My definition of real-time in this context is the fastest possible time to receive, process and output the data. (Feedback system)
Both are fine languages. Neither should take you years to learn. An easy way to make the decision is to look at what modules are out there already.
For example, you mentioned that your application is related to GPS. Take a look at what libraries are already written to hook Python and Lua into your particular GPS hardware. Maybe someone's already done most of the hard work for you. If not, then go down a step. If you're talking to your GPS over an I2C link, look at I2C libraries in both languages. See which ones are more popular and better maintained.
That said, garbage collected languages have historically had problems with meeting real time requirements. Depending on yours, you may need to go with a lower level language. You should also ensure that whatever system you're running on will support your programming environment. I've worked with systems where Python would have been great but it doesn't fit in 5K of code space.
Take a look at eLua and see if it meets your needs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With