lua-users home
lua-l archive

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


On Fri, 04 Sep 2009 17:16:34 -0300
Andre de Leiradella <aleirade@sct.microlink.com.br> wrote:

> Luiz Henrique de Figueiredo wrote:
> >> To closely follow Lua's philosophy, I think that libraries should stay 
> >> the way they were before this module thing.
> > 
> > How have they become different, except that the protocol for C libraries is
> > now that they are called via lua_call instead of calling luaopen_xxx directly?
> > (However, this is just for some libraries that need environments.)
> 
> Based on what people said about how to statically link modules, I have 
> to say things do have changed.

Static vs. dynamic linking is just a platform-specific peculiarity. I
know next to nothing about the PS3, but based on what people say, it's
a whimsical, half-assed, overpriced, environmentally hazardous thing
that few people are using. Judging from the various idiosyncrasies and
turnarounds of its manufacturer, it is probably a revenant of Perl in
Hardware.

I have to say things do have changed. I have written a small RTOS for
games and demos on the PS2 (which was a beautiful piece of hardware),
including a Lua interpreter, Lua 5.0 first, 5.1 later. 5.1 performed a
lot better. Back in the days (when there were no operating systems,
just real programmers and only the strongest prevailed), you had to
write everything yourself, memory and threads management as well as
dynamic linking. And so I replaced loadlib.c with something so crude...
well, can't say, can't say. But if I can do, you can too.

Lua shines in that environment, because the interpreter is free of
global variables and platform-specific assumptions, and concentrates on
the things I am not good in: language and virtual machine design,
garbage collection, reference counting, etc. Now thanks to the package
system Lua just scales in more ways than before. Of course it still
shines on ... exotic systems, better in fact than before it had a
package management.

- Timm

-- 
Timm S. Mueller <tmueller@schulze-mueller.de>
Schulze & Mueller GbR, Gryphiusstr. 2, 10245 Berlin,
Gesellschafter: Franciska Schulze, Timm S. Mueller,
Tel. +49 30 93624410, http://www.schulze-mueller.de/