Browse thread
OCaml expression evaluated in a 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: | 2005-02-07 (17:08) |
From: | Yaron Minsky <yminsky@g...> |
Subject: | Re: [Caml-list] OCaml expression evaluated in a OCaml program |
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 >