lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 9/20/12 3:41 PM, Luke Gorrie wrote:
> Hoi!
>
> I need to solve a problem that I'm sure has been solved a thousand times before.
>
> I have a Lua application and I want to be able to remotely execute
> arbitrary scripts in it. For example, by opening a socket and sending
> a script and reading back the output. Simple is good e.g. if telnet
> and netcat can be used as clients that would be simply dandy.
>
> Does this already exist as a library? if so where can I find it? if
> not anything to consider before writing it "the obvious way" using
> luasocket?
>
> Thanks!
> -Luke
>
I don't know if my library fits your use case 100%, but this is kind of
why I wrote lua-repl:

http://github.com/hoelzro/lua-repl

It's a generic REPL library for being embedded in other Lua programs. 
It currently only supports a synchronous REPL (so you would need a
dedicated thread),
but adding an asynchronous REPL should be pretty easy.

-Rob