Given the way that tables work, the concept of a 'length' is a fuzzy one. However, the '#' operator will give you the last index of a table, which for tables used as arrays is pretty much what you want. There's also the '__len' metamethod, which is what's invoked if it's present if you use the '#' operator. The operator's been in the language since at least 5.1.
It's a bad idea to think of Lua tables as arrays. They're maps/dictionaries with some extra semantics to allow them to be used similarly to arrays.
A student of mine had an assignment to write a game using SFML, they wrote a FlappyBird clone and it was like a few hundred lines of code. It's not a very complex program to write. To be honest, I think 4k is too much :)
game.c is 800 odd lines. There are some optimizations you could do here and there (e.g load digit sprites in an array to avoid the switch case 1/2/3... stuff).
The bulk of the 3000 is fluff that you need because this is C on Android, not SFML.
If you are talking about C++, it’s nice when RAII works. But if it does work, then in some sense your problem was easy. Async code and concurrent code require different solutions
Smart camera. Attach a microphone and speaker with the camera. Any movement at odd times and you get a WhatsApp video call on your cell phone. You can watch the other person and can talk to him, "Hay! what are you doing at my home?"
I was wondering if that's already available or not.