From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 50E3FBBAF for ; Sat, 3 Jul 2010 20:43:29 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: As4EAA4iL0xQW+UMgWdsb2JhbACTMYwzFQEBFiIivVWFJQSIOg X-IronPort-AV: E=Sophos;i="4.53,531,1272837600"; d="scan'208";a="54436120" Received: from lo.gmane.org ([80.91.229.12]) by mail2-smtp-roc.national.inria.fr with ESMTP; 03 Jul 2010 20:43:28 +0200 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OV7gU-0000sZ-Pj for caml-list@inria.fr; Sat, 03 Jul 2010 20:43:26 +0200 Received: from bas3-toronto02-1279545582.dsl.bell.ca ([76.68.80.238]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 03 Jul 2010 20:43:26 +0200 Received: from michael by bas3-toronto02-1279545582.dsl.bell.ca with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 03 Jul 2010 20:43:26 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: Michael Ekstrand Subject: Re: adding a scripting language to an ocaml program Date: Sat, 03 Jul 2010 14:43:19 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: bas3-toronto02-1279545582.dsl.bell.ca User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100423 Lightning/1.0b1 Thunderbird/3.0.4 In-Reply-To: X-Enigmail-Version: 1.0.1 X-Spam: no; 0.00; ocaml:01 ocaml:01 doable:01 c--:01 high-level:01 type-safe:01 bindings:01 javascript:98 wrote:01 ideally:01 implemented:02 api:02 authors:03 seems:03 embedding:03 On 07/03/2010 02:34 PM, Martin DeMello wrote: > Has much work been done on adding a scripting language to an OCaml > program? I googled about a bit, but no one seems to be even talking > about this - for example, if I wanted to do something emacslike with a > core in OCaml and (ideally) some sort of scheme as a scripting engine > in place of elisp, would that be easily doable? The authors of C-- have implemented a Lua engine in OCaml, with a good, high-level, type-safe interface for embedding it. Look for 'lua-ml'. There is also an OCaml implementation of Scheme called 'ocs'; I do not have experience with it, so I cannot speak to its API style. Finally, there are OCaml bindings to the SpiderMonkey JavaScript engine. So, it has been done, and ocs is probably closest to what you're looking for. - Michael