lua-users home
lua-l archive

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


Hi,

We're just starting to use lua in a lab control context, and I have a few questions.
I apologize if these are in a FAQ.

Say I want to just have a simple command

> turniton			or even
> pwd

I see how to define functions like

> turniton()
> pwd()
> turnon 'the_lights'

but can I extend things a little bit to leave out the parens for certain key words? I could certainly preprocess the strings in the interpreter before they get handed to the lua parser (which I gather is luaL_loadbuffer()?), but would I be re-inventing
the wheel.

Also, in a shell window, you can typically scroll through previously typed input lines by using the up-and-down arrow keys. This too could easily be written, but is it
already in some small add-on?

We're in Mac OSX, and are impressed with the ease of pulling in external C libraries
with tolua and swig.  But we have a lot to learn...

rob