Re: Ocaml scripting

This is a discussion on Re: Ocaml scripting within the ml forums in Programming Languages category; > Now, a wholly interpreted language like Lisp or Python comes with an > "eval" function *Pedantry* Lisp is usually compiled, but of course it does have an eval function. I think it is possible to use the OCaml bytecode interpreter from within an application, although it's not as easy as using eval in Python or Lisp. The Efuns project seems to do this: http://pauillac.inria.fr/para/cdrom/.../efuns/eng.htm Alex Simon H. wrote: > Okay. I'm building a text-adventure engine in Ocaml, and basically, I > want certain features to be scriptable. Like, the game-writer can > write a function to trigger an event ...

Go Back   Application Development Forum > Programming Languages > ml

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 07-07-2003, 03:49 PM
Alex Drummond
Guest
 
Default Re: Ocaml scripting

> Now, a wholly interpreted language like Lisp or Python comes with an
> "eval" function


*Pedantry* Lisp is usually compiled, but of course it does have an eval
function.

I think it is possible to use the OCaml bytecode interpreter from within an
application, although it's not as easy as using eval in Python or Lisp. The
Efuns project seems to do this:
http://pauillac.inria.fr/para/cdrom/.../efuns/eng.htm

Alex

Simon H. wrote:

> Okay. I'm building a text-adventure engine in Ocaml, and basically, I
> want certain features to be scriptable. Like, the game-writer can
> write a function to trigger an event when certain criteria are met.
> This, of course, means that it has to be able to load and /evaluate/
> text files, returning an Ocaml function. Of course I could write my
> own interpreter and mini-scripting language, but that seems a little
> like overkill since it's gonna have a total of maybe two dozen
> functions.
>
> Now, a wholly interpreted language like Lisp or Python comes with an
> "eval" function, which would do exactly what I want, but OCaml is
> compiled and doesn't have an equivilant, as far as I can find. The
> closest thing I can think of would be ocamlmktop, and using that would
> just make things rather more complicated than I would like to deal
> with, what with having to hack the new toplevel into acting like a
> game engine instead of a toplevel.
>
> So is there some nice easy way to do this, or shall I start writing an
> interpreter?



Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 03:39 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.