caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* OCaml and Matlab
@ 2008-07-24  8:47 crueger
  2008-07-24  9:23 ` [Caml-list] " Nicolas Pouillard
  2008-08-01 14:39 ` Maurice Bremond
  0 siblings, 2 replies; 5+ messages in thread
From: crueger @ 2008-07-24  8:47 UTC (permalink / raw)
  To: caml-list

Hi,

I am currently trying to get OCaml and Matlab to work together. I found
OCamlMex on the Caml-Hump
(http://caml.inria.fr/cgi-bin/hump.en.cgi?contrib=400).
However when I try to compile it, I get an error:

ocamlc.opt -c -pp "camlp4r " -I /usr/lib64/ocaml/camlp4 mex.mli
File "mex.mli", line 235, characters 15-17:
Unbound type parameter 'a
make[2]: *** [mex.cmi] Fehler 2
make[2]: Leaving directory `/home/till/ocamlmex-2.0.1/src'
make[1]: *** [byte-code-library] Fehler 2
make[1]: Leaving directory `/home/till/ocamlmex-2.0.1/src'
make: *** [all] Fehler 2

The line mentioned in the error looks like this:

type mxArray = 'a;
(** The basic type for all the external data inside Matlab : a mxArray
    can be a numeric array, a cell array, a struct array, or other kind of
    data see mxClassID *)

So I am not at all surprised, that it won't work, because the 'a actually
is unbound. Was this maybe possible with older versions of the compiler,
or are there some workarounds, to get it working again?

Do you know of any other ways to get OCaml and Matlab to communicate?
Another way I can think of is to use the OCaml <-> Java interface and the
Matlab <-> Java interface, but this would get nasty, and I'd have to write
the wrappers myself.

So if you know anything on this topic, please let me know.

Thanks,
  Till


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Caml-list] OCaml and Matlab
  2008-07-24  8:47 OCaml and Matlab crueger
@ 2008-07-24  9:23 ` Nicolas Pouillard
  2008-07-24 20:40   ` Till Crueger
  2008-08-01 14:39 ` Maurice Bremond
  1 sibling, 1 reply; 5+ messages in thread
From: Nicolas Pouillard @ 2008-07-24  9:23 UTC (permalink / raw)
  To: Till Crueger; +Cc: caml-list

[-- Attachment #1: Type: text/plain, Size: 1296 bytes --]

Excerpts from Till Crueger's message of Thu Jul 24 10:47:51 +0200 2008:
> Hi,
> 
> I am currently trying to get OCaml and Matlab to work together. I found
> OCamlMex on the Caml-Hump
> (http://caml.inria.fr/cgi-bin/hump.en.cgi?contrib=400).
> However when I try to compile it, I get an error:
> 
> ocamlc.opt -c -pp "camlp4r " -I /usr/lib64/ocaml/camlp4 mex.mli
> File "mex.mli", line 235, characters 15-17:
> Unbound type parameter 'a
> make[2]: *** [mex.cmi] Fehler 2
> make[2]: Leaving directory `/home/till/ocamlmex-2.0.1/src'
> make[1]: *** [byte-code-library] Fehler 2
> make[1]: Leaving directory `/home/till/ocamlmex-2.0.1/src'
> make: *** [all] Fehler 2
> 
> The line mentioned in the error looks like this:
> 
> type mxArray = 'a;
> (** The basic type for all the external data inside Matlab : a mxArray
>     can be a numeric array, a cell array, a struct array, or other kind of
>     data see mxClassID *)
> 
> So I am not at all surprised, that it won't work, because the 'a actually
> is unbound. Was this maybe possible with older versions of the compiler,
> or are there some workarounds, to get it working again?

That's a syntactic over the revised syntax of abstract types, now abstract
types are like in the original syntax:

  type mxArray;

-- 
Nicolas Pouillard aka Ertai

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Caml-list] OCaml and Matlab
  2008-07-24  9:23 ` [Caml-list] " Nicolas Pouillard
@ 2008-07-24 20:40   ` Till Crueger
  2008-07-25  8:01     ` Nicolas Pouillard
  0 siblings, 1 reply; 5+ messages in thread
From: Till Crueger @ 2008-07-24 20:40 UTC (permalink / raw)
  To: caml-list@yquem.inria.fr

On Thu, 24 Jul 2008 11:23:27 +0200, Nicolas Pouillard  
<nicolas.pouillard@gmail.com> wrote:

>> So I am not at all surprised, that it won't work, because the 'a  
>> actually
>> is unbound. Was this maybe possible with older versions of the compiler,
>> or are there some workarounds, to get it working again?
>
> That's a syntactic over the revised syntax of abstract types, now  
> abstract
> types are like in the original syntax:
>
>   type mxArray;

Ok, that was also my first guess, that occured to me afterwards. So I  
changed it to normal abstract types and fixed the .mli file. However, the  
problem still remains, because the types are the same way in the actuall  
implementation file. So it seems like there is more at work here, because  
abstract types are not possible in .ml files, or are they?

-- 
Wenn du den Fnord nicht siehst, kann er dich auch nicht essen.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Caml-list] OCaml and Matlab
  2008-07-24 20:40   ` Till Crueger
@ 2008-07-25  8:01     ` Nicolas Pouillard
  0 siblings, 0 replies; 5+ messages in thread
From: Nicolas Pouillard @ 2008-07-25  8:01 UTC (permalink / raw)
  To: Till Crueger; +Cc: caml-list

[-- Attachment #1: Type: text/plain, Size: 968 bytes --]

Excerpts from Till Crueger's message of Thu Jul 24 22:40:59 +0200 2008:
> On Thu, 24 Jul 2008 11:23:27 +0200, Nicolas Pouillard  
> <nicolas.pouillard@gmail.com> wrote:
> 
> >> So I am not at all surprised, that it won't work, because the 'a  
> >> actually
> >> is unbound. Was this maybe possible with older versions of the compiler,
> >> or are there some workarounds, to get it working again?
> >
> > That's a syntactic over the revised syntax of abstract types, now  
> > abstract
> > types are like in the original syntax:
> >
> >   type mxArray;
> 
> Ok, that was also my first guess, that occured to me afterwards. So I  
> changed it to normal abstract types and fixed the .mli file. However, the  
> problem still remains, because the types are the same way in the actuall  
> implementation file. So it seems like there is more at work here, because  
> abstract types are not possible in .ml files, or are they?

They are.

-- 
Nicolas Pouillard aka Ertai

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Caml-list] OCaml and Matlab
  2008-07-24  8:47 OCaml and Matlab crueger
  2008-07-24  9:23 ` [Caml-list] " Nicolas Pouillard
@ 2008-08-01 14:39 ` Maurice Bremond
  1 sibling, 0 replies; 5+ messages in thread
From: Maurice Bremond @ 2008-08-01 14:39 UTC (permalink / raw)
  To: crueger; +Cc: caml-list


>However when I try to compile it, I get an error:

Here is an updated version for ocaml >= 3.10 with *Camlp5* :

http://gforge.inria.fr/frs/download.php/4062/ocamlmex-2.1.0.tar.gz

(from http://ocamlmex.gforge.inria.fr/)

It has been tested with Matlab 2007b, 2008a and Octave on a Ubuntu Hardy

(Ocaml 3.10.1, Camlp5 5.04 (transitional mode), Octave 3.0)

For any trouble with this, please mail me directly.
 

Maurice Bremond


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-08-01 14:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-24  8:47 OCaml and Matlab crueger
2008-07-24  9:23 ` [Caml-list] " Nicolas Pouillard
2008-07-24 20:40   ` Till Crueger
2008-07-25  8:01     ` Nicolas Pouillard
2008-08-01 14:39 ` Maurice Bremond

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).