From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 8B015BBAF for ; Sat, 4 Oct 2008 00:23:34 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhUDAOc35kjCpx6wiGdsb2JhbACTYQEBARUiqCOBaA X-IronPort-AV: E=Sophos;i="4.33,358,1220220000"; d="scan'208";a="15646124" Received: from smtpmin.univ-orleans.fr (HELO min.univ-orleans.fr) ([194.167.30.176]) by mail2-smtp-roc.national.inria.fr with ESMTP; 04 Oct 2008 00:23:34 +0200 Received: from smtps.univ-orleans.fr (localhost [127.0.0.1]) by min.univ-orleans.fr (Postfix) with ESMTP id 20B0812B4B2; Sat, 4 Oct 2008 00:23:34 +0200 (CEST) Received: from [192.168.0.12] (ras75-4-82-235-58-110.fbx.proxad.net [82.235.58.110]) by smtps.univ-orleans.fr (Postfix) with ESMTP id 9D31936E60; Sat, 4 Oct 2008 00:23:38 +0200 (CEST) Subject: Re: [Caml-list] 'Compiler' module (was: embedding ocaml into a windows app: need gcc?) From: David Teller To: Dawid Toton Cc: caml-list@yquem.inria.fr In-Reply-To: <48E68FD7.7040605@wp.pl> References: <1253374D-FC84-4394-99E5-46C02D26C54C@gmail.com> <48E68FD7.7040605@wp.pl> Content-Type: text/plain Date: Sat, 04 Oct 2008 00:23:37 +0200 Message-Id: <1223072617.6282.16.camel@Blefuscu> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; ocaml:01 gcc:01 univ-orleans:01 cheers:01 0100,:01 ocaml:01 compiler:01 sig:01 val:01 val:01 python's:01 compiler:01 univ-orleans:01 lifo:01 envy:98 Have you looked at the CDK's DynEval? Other than that, it's the kind of thing we'd like to put in Batteries, so if you write/find a better solution, please make it public. Cheers, David On Fri, 2008-10-03 at 22:34 +0100, Dawid Toton wrote: > > I would like an OCaml support library that can compile and execute > > similar to JaveScript engines, but we don't have that in any practical > > form. > > > > I also need this and I'm thinking about something like this: > > module type Compiler = > sig > val parse : Context.t -> string -> (Context.t * AST.t) > val get_type : Context.t -> AST.t -> Type.t; > val eval : Context.t -> AST.t -> Context.t * (Type.t * > MarshalledValueOrSomething.t) > end > > Is it really so hard to have it in OCaml? I'm envy of Python's Compiler > module. -- David Teller-Rajchenbach Security of Distributed Systems http://www.univ-orleans.fr/lifo/Members/David.Teller Angry researcher: French Universities need reforms, but the LRU act brings liquidations.