From: "Richard W.M. Jones" <rich@annexia.org>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Native dynlink and reloading modules
Date: Sat, 31 Mar 2012 19:40:03 +0100 [thread overview]
Message-ID: <20120331184003.GA15870@annexia.org> (raw)
In-Reply-To: <20120322201208.GC21740@annexia.org>
On Thu, Mar 22, 2012 at 08:12:08PM +0000, Richard W.M. Jones wrote:
> On Thu, Mar 22, 2012 at 06:14:03PM +0100, Pierre Chambart wrote:
> > On 03/22/2012 05:42 PM, Richard W.M. Jones wrote:
> > > Any ideas on how best to go about this? Note that the whenjobs jobs
> > > script is intentionally a Turing-complete OCaml program, so converting
> > > it to another format is probably not going to be practical.
> > >
> > I did not really read your code, but it seams to me that you are doing
> > the compilation in your tool.
> > So you can choose the name of the module. Isn't it possible to change
> > the name of the file each
> > time you compile/reload it ?
>
> Yes, I guess something involving -pack to pack all the files into
> a randomly-named submodule, could be the way to go.
Just to follow up on this. I implemented this by packing all my files
into a randomly-named module. ie. My files are compiled using the
-pack/-for-pack options as submodules of 'Jobs__<time>' where <time>
is the current time_t. The top (randomly named) module is then loaded.
This works fine in both bytecode and native code.
The code is here:
http://git.annexia.org/?p=whenjobs.git;a=commitdiff;h=de72662854c3db9365296dd45cade2253910be7f
Rich.
--
Richard Jones
Red Hat
prev parent reply other threads:[~2012-03-31 18:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-22 11:47 Richard W.M. Jones
2012-03-22 12:51 ` Alain Frisch
2012-03-22 16:42 ` Richard W.M. Jones
2012-03-22 17:14 ` Pierre Chambart
2012-03-22 20:12 ` Richard W.M. Jones
2012-03-31 18:40 ` Richard W.M. Jones [this message]
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=20120331184003.GA15870@annexia.org \
--to=rich@annexia.org \
--cc=caml-list@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