Browse thread
Binding the Lua library [was: adding a scripting language to an ocaml program]
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2010-07-07 (21:11) |
From: | Paolo Donadeo <p.donadeo@g...> |
Subject: | Re: [Caml-list] Binding the Lua library [was: adding a scripting language to an ocaml program] |
> How about translating a program in lua (or lua bytecode) to OCaml > sourcecode automatically? Would that be possible? I see two problems with an approach like this: 1) it's complicated: consider that Lua was designed in the first place to be extremely simple to be embedded in a C program, and also simple to exchange data to and from the host program. The *only* problem I found was the interaction with the OCaml GC which of course is not a problem in C; 2) can the Lua program, statically translated into OCaml, be loaded and reloaded at run time? I need a scripting language to give a user a configuration/simple plugin language to be loaded and executed at runtime, and Lua is ideal because it's trivial to sandbox it. -- Paolo â â µ