caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "François Bobot" <francois.bobot@cea.fr>
To: caml-list@inria.fr
Subject: Re: [Caml-list] [Question] Loading .ml in memory to interact with them.
Date: Thu, 23 Mar 2017 16:09:47 +0100	[thread overview]
Message-ID: <b5b419b6-6015-3d80-0a4d-cd417d09ee24@cea.fr> (raw)
In-Reply-To: <1590236478.9253508.1490261850094.JavaMail.zimbra@edu.univ-fcomte.fr>

Le 23/03/2017 à 10:37, paul.lachat@edu.univ-fcomte.fr a écrit :
> I need to find a way to put Ocaml program in memory so I could interact with the program
> (call function, get result, find information about the variables, ...) without always reading the file.
>
> That what append when we use the directive #use "file.ml";; in the interactive shell (the toplevel,
> when you type the command ocaml in a shell).
>
> The instruction need to come from a Matlab function. So, I was thinking to create a process who run
> the ocaml command,
> redirect his standard input in a named pipe, redirect his standard output in another named pipe, so
> I could send instructions and received responses.

You can also try to embed the ocaml interpreter inside the Matlab process directly. The ocaml 
compilers libs gives an easy way to control the interpreter: call function, get result, find 
information about the variables, ... . I imagine you could connect it t matlab with a C-binding.

Best,

-- 
François

  parent reply	other threads:[~2017-03-23 15:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-23  9:37 paul.lachat
2017-03-23 13:02 ` Sébastien Hinderer
2017-03-23 13:26   ` paul.lachat
2017-03-23 13:41     ` Sébastien Hinderer
2017-03-23 13:57       ` paul.lachat
2017-03-23 14:24 ` Evgeny Roubinchtein
2017-03-23 15:09 ` François Bobot [this message]
     [not found]   ` <CAGYXaSbcqNWcXe1MLm_YyS28N7ji3td=L_jFVv35=50oSxaUDQ@mail.gmail.com>
2017-03-23 15:50     ` François Bobot
2017-03-24  9:04 ` Kim Nguyễn
2017-03-24 14:43 Oleg

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=b5b419b6-6015-3d80-0a4d-cd417d09ee24@cea.fr \
    --to=francois.bobot@cea.fr \
    --cc=caml-list@inria.fr \
    /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).