From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id AA276BC57 for ; Mon, 5 Jul 2010 15:33:41 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlsCACd8MUyYToALaGdsb2JhbACfdRUNCgkHEwUdvW6FJQSIOoIs X-IronPort-AV: E=Sophos;i="4.53,539,1272837600"; d="scan'208";a="53645295" Received: from mailgate6.iss.soton.ac.uk ([152.78.128.11]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 05 Jul 2010 15:33:41 +0200 Received: from mailgate6.iss.soton.ac.uk (localhost.localdomain [127.0.0.1]) by mailgate6.iss.soton.ac.uk (8.13.8/8.13.4) with ESMTP id o65DVBB7006526; Mon, 5 Jul 2010 14:31:11 +0100 Received: from UOS-MSG00012-SI.soton.ac.uk (uos-msg00012-si.soton.ac.uk [152.78.119.35]) by mailgate6.iss.soton.ac.uk (mailgate6.iss.soton.ac.uk [152.78.128.11]) envelope-from with ESMTP id m64EVB1040936207Ax ret-id none; Mon, 05 Jul 2010 14:31:11 +0100 Received: from [152.78.97.220] (152.78.97.220) by smtp.soton.ac.uk (152.78.119.35) with Microsoft SMTP Server (TLS) id 8.2.213.0; Mon, 5 Jul 2010 14:14:37 +0100 Message-ID: <4C31DABD.3060107@soton.ac.uk> Date: Mon, 5 Jul 2010 14:14:37 +0100 From: Thomas Fischbacher User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706) MIME-Version: 1.0 To: Martin DeMello Cc: OCaml List Subject: Re: [Caml-list] adding a scripting language to an ocaml program References: In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-smtpf-Report: sid=m64EV1104093620700; tid=m64EVB1040936207Ax; client=relay,white,ipv6; mail=; rcpt=; nrcpt=2:0; fails=0 X-UOS-MailScanner-Information: Please contact Serviceline@soton.ac.uk for more information X-UOS-MailScanner-ID: o65DVBB7006526 X-UOS-MailScanner: Found to be clean X-UOS-MailScanner-From: t.fischbacher@soton.ac.uk X-Spam: no; 0.00; ocaml:01 ocaml:01 doable:01 allocating:01 callbacks:01 steam:98 destroying:98 ideally:01 caml-list:01 python:03 python:03 seems:03 bugs:03 debian:04 dev:04 Martin DeMello asked: > 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? We (the nmag/nsim dev team - http://nmag.soton.ac.uk) kind-of had the opposite problem, i.e. we had to extend a scripting language that is easy to learn with something that has a bit more steam. We decided to use Python+OCaml. There's a semi-abandoned debian package, pycaml, that does this, but that's broken - it has memory management bugs both oh the Python and OCaml side. Here is a fixed version that also supports a few nice extensions: http://nmag.soton.ac.uk/tf/pycaml/ I should say that being able to extend Python with fast code without having to worry about allocating/destroying things and having the convenience of simple callbacks both ways is a very nice thing. -- best regards, Thomas Fischbacher t.fischbacher@soton.ac.uk