From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id WAA06200; Wed, 7 Apr 2004 22:49:44 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id WAA06146 for ; Wed, 7 Apr 2004 22:49:42 +0200 (MET DST) Received: from mg.ihep.su (mg.ihep.su [194.190.161.38]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i37KnfYM019201 for ; Wed, 7 Apr 2004 22:49:41 +0200 Received: by mg.ihep.su (Postfix, from userid 65436) id 3D362C4961; Thu, 8 Apr 2004 00:49:40 +0400 (MSD) Received: from mg.ihep.su (localhost [127.0.0.1]) by mg.ihep.su (Postfix) with SMTP id D247CC4969; Thu, 8 Apr 2004 00:49:39 +0400 (MSD) X-Mailbox-Line: From vsl@ontil.ihep.su Thu Apr 8 00:49:39 2004 Received: from ontil.ihep.su (ontil.ihep.su [194.190.161.63]) by mg.ihep.su (Postfix) with ESMTP id E0100C4961; Thu, 8 Apr 2004 00:49:00 +0400 (MSD) Received: by ontil.ihep.su (Postfix, from userid 1001) id 4D20510FAB; Thu, 8 Apr 2004 01:47:57 +0400 (MSD) Received: from localhost (localhost [127.0.0.1]) by ontil.ihep.su (Postfix) with ESMTP id 4C27310FA6; Thu, 8 Apr 2004 01:47:57 +0400 (MSD) Date: Thu, 8 Apr 2004 01:47:57 +0400 (MSD) From: Vitaly Lugovsky To: John Goerzen Cc: caml-list@inria.fr Subject: Re: [Caml-list] Dynamically evaluating OCaml code In-Reply-To: <20040407203938.GC26323@excelhustler.com> Message-ID: References: <20040407203938.GC26323@excelhustler.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Status: No, hits=2.8 required=5.0 tests=IN_REP_TO,QL_SENT_FROM_MY_DOMAINS version=2.20 X-Spam-Level: ** X-Miltered: at concorde by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; vitaly:01 lugovsky:01 ontil:01 ihep:01 caml-list:01 dynamically:01 obsoleted:01 powerfull:01 usr:01 imitate:01 runtime:01 bin:01 compiler:01 compiler:01 ocaml:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk X-Status: X-Keywords: X-UID: 113 On Wed, 7 Apr 2004, John Goerzen wrote: > > OCaml is a compiler, not interpreter. But, you'll find that this > > feature is obsoleted by the partial application - it's a much > > more powerfull device then lispish eval, and it can be even a > > replacement for a macros. > > I don't think that will help me here; I'm looking at being > able to let > people insert OCaml expressions directly into otherwise > plain-text config files. You really need OCaml with all its power as a DSL for a configuration, or, may be, you'd like to implement a small DSL, may be even Caml subset? > And while I understand your general point about OCaml being a > compiler, > I think you'd have to admit that this line is at least blurred > by the > interactive toplevel *interpreter* /usr/bin/ocaml :-) It is a > subset of > that program's functionality that I seek to imitate. Ok. If you're happy with a performance of the bytecode interpreter - you can use such a feature (the easiest way is to just create a custom runtime, see the documentation on how to do it). But this is absolutely impossible for a native compilation. ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners