mkottman/AndroLua — pull request #5 by stevedonovan (2012-08-06 07:00:08+00:00)
Title: Interactive REPL

Here's a refactored version where the server sends back results from commands. As an example, there's an `interp.lua` using LuaSocket which demonstrates the protocol. I've also slightly improved the print logic so that it tries to call toString() on Java objects.

Otherwise, I've added import.lua to the assets - this allows a convenient way to bring in classes and invoke their constructors, based on [LuaJavaUtils](http://penlight.luaforge.net/project-pages/penlight/packages/LuaJavaUtils/)

I've added some extra permissions so one can do some interesting things with an actual phone.

Auto-criticisism

- the server protocol is rather clumsy - it's line-based and so has to escape internal '\n' characters. I'd like to do a protocol where we send the total size first, and then grab that number of bytes.
- import.lua does pollute the global namespace, which is probably ok for interactive work.