lua-users home
lua-l archive

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


Thanks Joonas !

The subject for me was "extending Lua with C++" and so loading the final module seemed on topic but my brain tends to go off tracks these days... (I wrote Dub just because I don't want to learn swig).

And while we are _not_ on the subject, I'd like to post some Lua love. The setup with rubyk (http://rubyk.org) works in such a way that the lua scripts are automagically reloaded when I press save (by periodically checking the file's modification time). This means that I just play with lua (generating music or images) and when I press save, everything instantly updates without a glitch. This enabled me to create my latest exhibition that uses live video and OpenGL in a very short period of time (http://gaspardbuma.org/en/project853.html) something that has saved me tons of developer-cycles compared to compiled code.

I first thought that I would have to use C/C++ to draw the bezier splines or to handle image analysis but as I was short on time, I just wrote everything with Lua and ... it worked so good on the 3 years old mini mac that I just let it run.

Many thanks to the authors of Lua, and LuaGL ! Axé

Gaspard


On Fri, Mar 12, 2010 at 9:16 PM, M Joonas Pihlaja <jpihlaja@cc.helsinki.fi> wrote:

On Fri, 12 Mar 2010, Gaspard Bucher wrote:

> Since we are on the subject, is there a way to have multiple values for
> lua's cpath like $PATH (/usr/local/lib:.:~/classes) ?

Not that we're on the subject, but anyway... :)

The separator is a semicolon and not a colon, and the entries aren't
really paths, but rather patterns where the character ? is replaced
with the name of the module being required.

For instance, on my system package.cpath looks like this:

$ lua -e 'print(package.cpath)'
./?.so;/usr/local/lib/lua/5.1/?.so;/usr/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so

Cheers,

Joonas