Site News :: DSL v4.3



florian wrote:
Quote
Ok, I will also give a shot at compiling the LuaSockets extension
(either from murgaLua distro or directly from there: http://www.tecgraf.puc-rio.br/~diego/professional/luasocket/).

I went ahead and compiled sockets and have it working using the latest luasocket v2.0.2 and working with your standard lua binary. Tested with sample tests and gettime.lua.

Looking forward to your update on the murga bindings so that menus will work. Then it is time to adopt this into core and thereby regain much needed speed.



Hi! I have just updated the tarball
(http://florian.cauvin.free.fr/tmp/lua_fltk-2.tar.gz)

Here are the main changes:

* Further optimized the binaries (incl. libraries) for smaller size. Recompiled C++ code with '-no-exceptions -no-rtti' in addition to -Os flag for some extra reduction in binary size. All C code is -Os. All executables are stripped and also sstripped (sstrip utility is included in compile/bin). All shared libraries are stripped with 'strip --strip-unneeded'.

* Extracted the previously-missing bindings for FTLK menus and events from MurgaLua 0.6.8 (see new file share/lua/5.1/fltk.lua). With this setup, I have also hidden the akward loadlib'ing, so that you can just use a require("fltk") from your scripts. This is a more "standard" way to load the extension.

* Added Lua Socket 2.0.2 extension. http://www.tecgraf.puc-rio.br/~diego....ce.html (Robert, I have just seen that you have also compiled this extension too. But since I have stripped those, maybe this version is smaller)

* Compiled Lua-Sqlite3 (http://luaforge.net/projects/luasqlite/) and the extension is fairly small once optimized (27k). This is in a separate dir, because very unfortunately the extension fails to load as some functions that are not found from the libsqlite3.so shipped with DSL (most probably because sqlite in DSL is too old). What do you think: Will/do we need database access in Lua? Should sqlite be upgraded?

* Updated examples of apps and scripts. Maybe some of those are worthy of inclusion in DSL?

* Recompiled lua without libhistory.so. The linkage worked ok without the library, but I actually wonder why the Lua makefile attempts to link to it. Hopefully libhistory really isn't required.

Just a little Lua tip I've just found: the -l flag allows to specify require'd lua modules directly from the command line. So in order to verify that the DSL scripts are still working well with the new lua system, we can do something like this:
$ lua -lsocket /usr/local/bin/gettime.lua
$ lua -lfltk /usr/local/bin/iconView.lua

Also, -l could be used also inside the first line of a script. So a script can start like this:
#!/bin/lua -lfltk
instead of explicitely using a require("fltk") statement

Thanks for this. It is very much needed. I am going to incorporate it into the next version of DSL v4.4. To recap some of the benefits this provides:

1. Stand a lone Lua scripting runs much faster as only the Lua interpreter is loaded.
2. Using Lua for web scripting also benefits as above.
3. Lua Fltk runs much faster as many other libraries in the current static build are not loaded.  
4. We gain a separate fltk library for C/C++ programmers.
5. Any other Lua libraries can be used in a typical way, i.e, load (require) only when needed,

Thanks to florian, with our new open lua fltk, I was easily able to add the latest lua filesystem library (v0.3). I found two lua scripts that rely heavily on lfs.

lfs is very small and provides some nice features, so I have included it in DSL. I now an alpha cut of DSL v4.4 and the overall speed improvement is very noticeable. All lua and lua fltk scripts are running fine. Expect a release candidate within a few days...

Next Page...
original here.