Re: [Caml-list] announce: ODT 2.0 released

2011-09-29 Thread Dmitry Bely
, any flavor will fit. And you can install any additional plugins later. BTW, if you consider Eclipse as a development platform, try also OcaIDE. Until recently (I have not tried ODT 2.0) it was more feature-rich than ODT. - Dmitry Bely -- Caml-list mailing list. Subscription management

Re: [Caml-list] Labelled parameter bug?

2011-08-26 Thread Dmitry Bely
in applications. So this is actually the intended behavior, AFAIU Indeed. Thanks for the detailed explanation. But shouldn't the compiler decide that the partial application skipping labeled parameter is suspicious and generate a warning? - Dmitry Bely -- Caml-list mailing list. Subscription

[Caml-list] Int32 vs float unboxing

2011-08-22 Thread Dmitry Bely
to (Array.length v)-1 do s := !s +. (Array.unsafe_get v i) done; !s +. 0. - Dmitry Bely -- Caml-list mailing list. Subscription management and archives: https://sympa-roc.inria.fr/wws/info/caml-list Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr

Re: [Caml-list] Int32 vs float unboxing

2011-08-22 Thread Dmitry Bely
On Mon, Aug 22, 2011 at 11:58 AM, Alain Frisch alain.fri...@lexifi.com wrote: On 08/22/2011 09:19 AM, Dmitry Bely wrote: In the code below s reference is unboxed in sum_float loop, but not in sum_int32. Why? let sum_int32 v =   let s = ref 0l in   for i=0 to (Array.length v)-1 do     s

[Caml-list] Interfacing with C: bad practice

2011-08-16 Thread Dmitry Bely
Ocaml docs should be updated to warn about pitfalls like that? - Dmitry Bely -- Caml-list mailing list. Subscription management and archives: https://sympa-roc.inria.fr/wws/info/caml-list Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs

Re: [Caml-list] Interfacing with C: bad practice

2011-08-16 Thread Dmitry Bely
2011/8/16 Török Edwin edwinto...@gmail.com: On 08/16/2011 10:37 AM, Dmitry Bely wrote: I would like to share my experience of writing bad C bindings. The following code is wrong, although no living in harmony with the garbage collector rule seems to be violated: value wrp_ml_cons (value v

Re: [Caml-list] Interfacing with C: bad practice

2011-08-16 Thread Dmitry Bely
) is not updated and holds an old address. - Dmitry Bely -- Caml-list mailing list. Subscription management and archives: https://sympa-roc.inria.fr/wws/info/caml-list Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs

[Caml-list] Re: Interfacing with C: bad practice

2011-08-16 Thread Dmitry Bely
On Tue, Aug 16, 2011 at 11:37 AM, Dmitry Bely dmitry.b...@gmail.com wrote: (...)    while (*s != NULL) {        list = wrp_ml_cons(caml_copy_string(*s), list); /* bug! */    } Ah, s increment is missing. The loop should be written as for (; *s != NULL; s++) { list = wrp_ml_cons

Re: [Caml-list] Nested callbacks?

2011-07-06 Thread Dmitry Bely
Of course I have found my own bug and nested callbacks work as expected. Sorry about the noise in the list. - Dmitry Bely -- Caml-list mailing list. Subscription management and archives: https://sympa-roc.inria.fr/wws/info/caml-list Beginner's list: http://groups.yahoo.com/group

Re: [Caml-list] Nested callbacks?

2011-07-05 Thread Dmitry Bely
On Tue, Jul 5, 2011 at 9:31 PM, Xavier Leroy xavier.le...@inria.fr wrote: On 07/05/2011 06:30 PM, Thomas Fischbacher wrote: Dmitry Bely wrote: Is it allowed to call a Caml closure from C (caml_callbackN_exn), that calls another Caml closure internally (also with caml_callbackN_exn)? I