[Caml-list] Possible ocamlmpi finalization error?

2010-09-07 Thread Eray Ozkural
I'm recently getting errors that are past MPI_Finalize. Since both init/final and communicator allocation is managed by ocamlmpi, is it possible this is a bug with the library? Have you ever seen something like this? Using openmpi on OS X. Here is the log message: *** An error occurred in MPI_Com

Re: [Caml-list] C binding and GC interaction: storing values outside the heap

2010-09-07 Thread Romain Beauxis
Hi, Le mardi 7 septembre 2010 15:58:04, Paolo Donadeo a écrit : > Any ideas or suggestions? I'm sorry if I missed something obvious, but why don't you simply require the callback in the CAMLprim function's arguments and then wrap it in the ML code? Something like: .ml: type handler

[Caml-list] patterns for 3.12.0

2010-09-07 Thread Jake Donham
Hi list, If you are interested in using Jeremy Yallop's patterns extension on OCaml 3.12.0, I have fixed it up here: http://github.com/jaked/patterns I haven't tried anything serious with it but the tests pass. Also I added a little extension for "alist patterns": a pattern alist [ "foo", x

Re: [Caml-list] C binding and GC interaction: storing values outside the heap

2010-09-07 Thread Damien Doligez
On 2010-09-07, at 22:58, Paolo Donadeo wrote: > The problem is that, for several good reasons, I need a copy, or a reference, > to the OCaml value representing the lua_State (v_L in the code above) inside > the Lua state (I mean the C data structure). That creates a cross-heap reference loop a

Re: [Caml-list] C binding and GC interaction: storing values outside the heap

2010-09-07 Thread Stéphane Glondu
Le 07/09/2010 23:23, Paolo Donadeo a écrit : >> Why don't you call caml_register_global_root on &(data->state_value) as well? > > This was a solution I tried, but with the additional global root the > finalization function was never called by the GC, so it solved the > segfault with a memory leak

Re: [Caml-list] C binding and GC interaction: storing values outside the heap

2010-09-07 Thread Paolo Donadeo
On Tue, Sep 7, 2010 at 23:12, Stéphane Glondu wrote: > Why don't you call caml_register_global_root on &(data->state_value) as well? This was a solution I tried, but with the additional global root the finalization function was never called by the GC, so it solved the segfault with a memory leak :

Re: [Caml-list] C binding and GC interaction: storing values outside the heap

2010-09-07 Thread Stéphane Glondu
Le 07/09/2010 22:58, Paolo Donadeo a écrit : > I'm writing a Lua API binding > [...] > typedef struct ocaml_data > { > value state_value; > value panic_callback; > } ocaml_data; > [...] >/* alloc space for the register entry */ >ocaml_data *data = (ocaml_data*)caml_stat_alloc(sizeof(ocaml

[Caml-list] C binding and GC interaction: storing values outside the heap

2010-09-07 Thread Paolo Donadeo
I'm writing a Lua API binding and I have a problem regarding the interaction with the garbage collector. The situation is rather canonical: a particular C data type, the Lua state, is used as argument in al

[Caml-list] [ANN] camera-rescue v0.0.1: Recover JPEG files from a crashed SD/MMC/CF camera memory card

2010-09-07 Thread Sylvain Le Gall
This program searches for JPEG files into a dump of a memory card (a RAW file). Once found, each files is saved in a different JPEG file. This tool scans for JPEG markers inside the RAW. When a SOI (Start of Image) marker is found, the tool scan the content to find a consistent EOI (End of Image)

Re: [Caml-list] functor substitution gives error

2010-09-07 Thread Jacques Garrigue
On Mon, Sep 6, 2010 at 6:39 PM, Daniel Bünzli wrote: > I think I just hit the same kind problem. > > This doesn't compile : > > module A : sig > type m > module M : sig >type t = m > end > end = struct > module M = struct >module S = String >module Smap = Map.Make(S) >type

[Caml-list] Re: Caml-list Digest, Vol 63, Issue 12

2010-09-07 Thread Jeff Rubard
THANK U ROBIN MILNER - Ed. ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://cam

[Caml-list] [ANN] ocaml-expect v0.0.1: Expect-like framework

2010-09-07 Thread Sylvain Le Gall
This is a simple implementation of `expect` to help building unitary testing of interactive program. It helps to receive question and send answers from an interactive process. You can match the question using a regular expression (Str). You can also use a timeout to ensure that the process answer

Re: [Caml-list] ANN: ocamljs 0.3

2010-09-07 Thread Jake Donham
On Sun, Sep 5, 2010 at 6:05 AM, Christophe Papazian wrote: > I was playing with ocamljs. It's very nice to use ocaml to > produce javascript ! I have a question : in ocamljs, there is a support > for style objects. However, I do not see how to use them usefully because > there don't seem to have s

Re: [Caml-list] functor substitution gives error

2010-09-07 Thread Daniel Bünzli
> The solution is easy enough: name all modules. In my example all modules are named. Can you maybe provide an explanation of what's happening ? Best, Daniel ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/li

[Caml-list] Re: interfacing Ocaml with Mathematica

2010-09-07 Thread Elnatan Reisner
On Sep 7, 2010, at 6:00 AM, caml-list-requ...@yquem.inria.fr wrote: Date: Tue, 7 Sep 2010 06:36:35 +0200 From: Basile Starynkevitch Subject: Re: [Caml-list] interfacing Ocaml with Mathematica To: zaid al-zobaidi Cc: caml-list@yquem.inria.fr Message-ID: <20100907063635.f2e4de47.bas...@starynkev

Re: [Caml-list] functor substitution gives error

2010-09-07 Thread Hendrik Tews
Jacques Garrigue writes: On 2010/09/06, at 18:12, Hendrik Tews wrote: > I have a strange compilation problem, which I suspect to be a > compiler bug. Consider the following nested functor application The reason is that the typing of modules is not closed under substitution. I am re

[Caml-list] TLDI 2011: 2nd Call For Papers

2010-09-07 Thread Stephanie Weirich
TLDI 2011 2nd CALL FOR PAPERS The Sixth ACM SIGPLAN Workshop on Types in Language Design and Implementation Austin, Texas, USA Tuesday, January 25, 2011 (C

Re: [Caml-list] functor substitution gives error

2010-09-07 Thread Jacques Garrigue
On 2010/09/06, at 18:12, Hendrik Tews wrote: > Hi, > > I have a strange compilation problem, which I suspect to be a > compiler bug. Consider the following nested functor application > > > module A(FreshGram : functor(Unit : sig end) -> Camlp4Syntax) : Camlp4Syntax = > FreshGram(struct end) >

Re: [Caml-list] interfacing Ocaml with Mathematica

2010-09-07 Thread Florent Ouchet
Hello, You might be interested in the evaluation core of VSyml [1], which is not Mathematica-based. The module DesignEval rewrites and evaluates function trees whose types are defined in the module DesignTypes. However, this project aims at symbolically simulate VHDL code, (by mixing imme