[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: how best to get started?
- From: Doug Rogers <rogers@...>
- Date: Fri, 2 Apr 2004 16:34:08 -0500
On Friday 02 April 2004 15:01, Stewart, Joseph wrote:
> On behalf of the rest of the Lua list, apologies to you Richard. ...
> This list is usually a friendly and helpful place.
Seconds from me.
My first use of Lua was to take the lua.c that comes with the distribution and
copy it into the main file of one of my C test programs. I had previously
implemented my own command set. I looked at the sample code (this was before
the Lua Book) in order to write an interface to one of my objects. I turned
on readline and history, which I had also coded separately because I was
using it in a bootloader that lacked most higher-level libraries. I was
tickled pink when it worked almost immediately. (For those unfamiliar with
the term, 'tickled pink' means 'happy in a surprising way'.)
I found that I no longer needed most of the old commands I had written because
I could write their functionality just as easily directly at the commandline.
Anything that was more complex I put into a script file to be loaded when
needed. That allowed me to see and to modify those scripts without having to
recompile the program, then go through the process of reloading my test
state.
That's how I started using Lua. If you plan to use it for interfacing to other
code - as an extension language - then it makes sense to start in some
similar way, by building up interfaces to the code objects with which you are
concerned.
Good luck!
Doug Rogers