From: "Török Edwin" <edwintorok@gmail.com>
To: OCaml List <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] Binding the Lua library [was: adding a scripting language to an ocaml program]
Date: Wed, 7 Jul 2010 23:48:06 +0300 [thread overview]
Message-ID: <20100707234806.17b77e82@debian> (raw)
In-Reply-To: <AANLkTinWHwrOXGN-6tENMpq6E4Rge892-TzDzLu-m9oq@mail.gmail.com>
On Wed, 7 Jul 2010 22:36:28 +0200
Paolo Donadeo <p.donadeo@gmail.com> wrote:
> On Tue, Jul 6, 2010 at 23:28, Guillaume Yziquel
> <guillaume.yziquel@citycable.ch> wrote:
> >> And, of course, any ideas or help on the garbage collector(s)
> >> issue are welcome.
> > I do not know much about Lua's GC. My experience (for R, Python and
> > Java) is that it's doable.
>
> The GC implemented in Lua [1] is an incremental mark-and-sweep
> collector. Since Lua type system is simple (nil, boolean, number,
> string, function, userdata, thread, for coroutines, and tables) it
> automatically collects everything without problems. The strategy for
> basic types is to copy values from the C (or OCaml) side to the Lua
> stack: this copy decouples the two GC and sets them free to deallocate
> values.
>
> Problems arise when one tries to share userdata or closures between
> OCaml and Lua. In this case it's not clear (at least to me) how to
> approch the problem.
>
>
>
> [1] http://www.lua.org/manual/5.1/manual.html#2.10
How about translating a program in lua (or lua bytecode) to OCaml
sourcecode automatically?
Would that be possible?
Best regards,
--Edwin
next prev parent reply other threads:[~2010-07-07 20:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-05 22:32 Paolo Donadeo
2010-07-06 21:28 ` [Caml-list] " Guillaume Yziquel
2010-07-07 13:50 ` Sylvain Le Gall
2010-07-07 16:30 ` [Caml-list] " Martin DeMello
2010-07-07 21:01 ` Paolo Donadeo
2010-07-07 22:03 ` Paolo Donadeo
2010-07-07 20:36 ` [Caml-list] " Paolo Donadeo
2010-07-07 20:48 ` Török Edwin [this message]
2010-07-07 21:11 ` Paolo Donadeo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100707234806.17b77e82@debian \
--to=edwintorok@gmail.com \
--cc=caml-list@yquem.inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox