lua-users home
lua-l archive

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


erik@hougaard.com (Erik Hougaard) writes:

> ----- Original Message -----
> > executable using the usual Unix trick.  Please change the Lua
> > interpreter so that it strips the first line in a file if it begins
> > with sharp sign no matter if it is a Lua program as text, or the
> > result of bytecode compilation.
> 
> Please dont change the the interpreter, this is a unix thing. The byte code
> should be platform independent. 

How would the change I suggest make the byte code platform dependent?
The idea is that all platforms would know how to treat lines that
begin with sharp sign as a comment.  The byte code with the comment
would run on Windows just as it does on Unix.

> If you want to do this, create a special
> version of  lua.c that handles your unix requirements both on the compiling
> and on the interpreter side.
> 
> It will also make the interpreter much more difficult since it looks at the
> few bytes to dertermine the file type. And the header in the bytecode file
> is fixed in length.

Much more difficult?  Are you serious?  This patch is trivial to
implement.  What is your real motivation for opposing this?  None of
the arguments you present make much sense to me.

> 
> /Erik

John