caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Yaron Minsky <yminsky@gmail.com>
To: Jon Harrop <jon@jdh30.plus.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] OCaml expression evaluated in a OCaml program
Date: Mon, 7 Feb 2005 12:08:00 -0500	[thread overview]
Message-ID: <891bd33905020709081e4fc18a@mail.gmail.com> (raw)
In-Reply-To: <200502071647.29407.jon@jdh30.plus.com>

There's also Lua-ML, which is used by the C-- project as an embedded
scripting language.

http://www.cminusminus.org/code.html#luaml


On Mon, 7 Feb 2005 16:47:29 +0000, Jon Harrop <jon@jdh30.plus.com> wrote:
> On Monday 07 February 2005 16:13, Nicolas Dufour wrote:
> > sejourne_kevin wrote:
> > > Nicolas Dufour a écrit :
> > >> I try to know if I can evaluate OCaml expressions in a OCaml program
> > >> during runtime ??
> > >
> > > This is not possible. But you can try something with the toplevel:
> > > http://caml.inria.fr/archives/200404/msg00282.html
> >
> > damned .. not possible .....
> > I hope it exists scriptic languages embedded in ocaml ... or i will have
> > to create one ... oh boy ....
> 
> I've done exactly this though, by spitting out an ocaml program, compiling it
> with ocamlopt (linked against the running program) and invoking it using
> marshalling to shuffle data back and forth. This is quite easy to implement
> and is the simplest way to write a JIT compiler in ocaml.
> 
> If you don't really want to execute ocaml code but, rather, simple expressions
> then you can write your own interpreter quite easily. Many tutorials cover
> this. If you want to provide access to a few calls in your interpreter then
> you can simply implement them in your own little language. There are many
> tutorials on ocaml which describe simple interpreters.
> 
> --
> Dr Jon D Harrop, Flying Frog Consultancy Ltd.
> 
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>


  reply	other threads:[~2005-02-07 17:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-07 13:42 Nicolas Dufour
2005-02-07 16:17 ` [Caml-list] " sejourne_kevin
2005-02-07 16:13   ` Nicolas Dufour
2005-02-07 16:47     ` Jon Harrop
2005-02-07 17:08       ` Yaron Minsky [this message]
2005-02-07 17:21       ` Vincenzo Ciancia
2005-02-07 20:31       ` [Caml-list] " Robert Roessler
2005-02-07 20:42     ` Brock

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=891bd33905020709081e4fc18a@mail.gmail.com \
    --to=yminsky@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=jon@jdh30.plus.com \
    --cc=yminsky@cs.cornell.edu \
    /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;
as well as URLs for NNTP newsgroup(s).