lua-users home
lua-l archive

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

On Mon, Oct 31, 2011 at 12:46 PM, Axel Kittenberger <> wrote:
> Since lua-jit only supports source code, why use byte code at all?

Let me explain the principle once more.

Script S is run on machine A until it calls freeze().
It is then serialized into a Pluto image (or an image made by a future
library that is even better than Pluto).
The image is sent to machine B - which may or may not "trust" machine
A, it doesn't matter much.
There, it is deserialized and script S continues to compute. (Safely,
because of sandboxing.)
Later, the script may travel somewhere else again, of course.

Pluto requires saving and loading bytecode, so we need that ability
for this to work.

> In case of speed: I suppose the state of affairs is that bytecode is
> only loaded faster if not checked. Any speedadvantage to parsing is
> eaten up by through untrusted bytecode checking. In case of size: how
> much smaller is bytecode compared to source code that is say
> precompile-stripped of comments etc. and gzipped if at all?

Neither speed nor size are particularly important at this point.
Important, right now, is to get the system working and see Lua scripts