[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: /usr/bin/env and the Lua bytecode format
- From: erik@... (Erik Hougaard)
- Date: Thu, 2 Aug 2001 18:37:45 +0200
----- Original Message -----
> Aw, it's not a big deal. On SPARC Solaris, using gcc in the bloaty -fpic
> mode, it adds all of 112 bytes to the text segment. Just a mod to
> ldo.c:parse_file(). IMO this is the right place for # special-casing: in
> file handling, not in the definition of chunk.
This is a great solution if you are using lua as standalone, but in embedded
use this is just plain overhead. The only right place to add this, if you
want to preserve lua's primary target (embedding), is to make the
modification in LUA.C Please read the readme in src\lua (note that this is
not even part of the primary source directory).
"This is lua, a sample Lua interpreter.
It can be used as a batch interpreter and also interactively."
Look at the word 'sample'. If you want your standalone Lua to do something
platform specific please make the corrects in the right spot.
One of the qualities of Lua that got me (and my company) to use Lua as a
embedded langauge was the portability (ANSI-C) of the library. Now you want
to make changes in the general library to support a unix scripting function
p.s. Example: Why should my robot need a #! / thing in its binary files -
everything is compiled since there is no room in the flash for the parser.
The robot does not even run a OS it just some parts of lua compiled directly
to a hardware platform (Motorola Coldfire)