lua-users home
lua-l archive

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



Am 27.12.16 um 16:05 schrieb steve donovan:
> On Tue, Dec 27, 2016 at 4:54 PM, Marc Balmer <marc@msys.ch> wrote:
>> Thanks for the pointer!
> 
> Steal away ;)  Picasso once said, "Good artists copy and great artists
> steal".  I _think_ he meant that a great artist sees the basic
> underlying principle of an artwork, and takes that, but it's hard to
> tell with Picasso.
> 

heh ;)

So playing with Lua in Java got as easy as:

LuaState L = new LuaState()
L.openlibs()
L.loadstring("print('hello from Lua')")
L.pcall(0, 0)
L.close()

(The last part is annoying, I don't know yet how to hook that to the
Java garbage collector, Java lacks metamethods...)