caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Richard Jones <rich@annexia.org>
To: Martin DeMello <martindemello@gmail.com>
Cc: OCaml List <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] adding a scripting language to an ocaml program
Date: Tue, 6 Jul 2010 11:38:52 +0100	[thread overview]
Message-ID: <20100706103852.GA20439@annexia.org> (raw)
In-Reply-To: <AANLkTik2ARQc1-Tdkb7flolFrtSSQaLBnrDtKghXgBHW@mail.gmail.com>

On Sun, Jul 04, 2010 at 12:04:32AM +0530, 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?

You can embed a Perl interpreter and call out to Perl code using
perl4caml's Perl.eval function.  The API is even "type safe" in as
much as you can construct and examine the values going between the
Perl and the OCaml code, and detect errors at runtime (at compile time
too in some circumstances).

http://git.annexia.org/?p=perl4caml.git;a=blob;f=perl.mli;h=64d7904eb633bcc410f796d19e289bca49931bb5;hb=HEAD#l258

Your users might not thank you for this ...

Rich.

-- 
Richard Jones
Red Hat


  parent reply	other threads:[~2010-07-06 10:38 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-03 18:34 Martin DeMello
2010-07-03 18:43 ` Michael Ekstrand
2010-07-03 18:56   ` [Caml-list] " Martin DeMello
2010-07-03 19:06     ` Michael Ekstrand
2010-07-03 19:35     ` [Caml-list] " David Allsopp
2010-07-03 18:52 ` [Caml-list] " Lukasz Stafiniak
2010-07-03 18:53   ` Vincent Aravantinos
2010-07-03 19:05     ` Martin DeMello
2010-07-03 19:02   ` Martin DeMello
     [not found]     ` <AANLkTinIbSSrxtuWrwv16_XIo2MU2hdhjHhrIORSFUPN@mail.gmail.com>
2010-07-03 21:15       ` Martin DeMello
2010-07-03 20:42   ` malc
2010-07-03 19:16 ` David Powers
2010-07-04 19:54 ` Goswin von Brederlow
2010-07-05 12:41   ` Florent Monnier
2010-07-05 13:14 ` Thomas Fischbacher
2010-07-05 16:13   ` Mehdi Dogguy
2010-07-05 16:30     ` Thomas Fischbacher
2010-07-05 18:02       ` Mehdi Dogguy
2010-07-08 15:22         ` Thomas Fischbacher
2010-07-08 16:00           ` Mehdi Dogguy
2010-07-06 21:01       ` Guillaume Yziquel
2010-07-06 21:08         ` Guillaume Yziquel
2010-07-06 10:38 ` Richard Jones [this message]
2010-07-06 12:55   ` Martin DeMello

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100706103852.GA20439@annexia.org \
    --to=rich@annexia.org \
    --cc=caml-list@yquem.inria.fr \
    --cc=martindemello@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).