Re: [Caml-list] Tips to find the cause of a seg fault

2010-12-01 Thread Philippe Veber
Actually I was not confident I could extract a small program reproducing the issue until ... you had me try ! I could get a very tiny example that behaves exactly the same, which does not involve opengl at all, only sdl. Here it is : [main.ml] let init () = Sdl.init [`VIDEO ]; ignore (Sdlvideo

Re: [Caml-list] Tips to find the cause of a seg fault

2010-12-01 Thread oliver
Hi, On Wed, Dec 01, 2010 at 09:32:16AM +0100, Philippe Veber wrote: > Actually I was not confident I could extract a small program reproducing the > issue until ... you had me try ! I could get a very tiny example that > behaves exactly the same, which does not involve opengl at all, only sdl. >

Re: [Caml-list] Tips to find the cause of a seg fault

2010-12-01 Thread Philippe Veber
2010/12/1 > Hi, > > > On Wed, Dec 01, 2010 at 09:32:16AM +0100, Philippe Veber wrote: > > Actually I was not confident I could extract a small program reproducing > the > > issue until ... you had me try ! I could get a very tiny example that > > behaves exactly the same, which does not involve o

Re: [Caml-list] Tips to find the cause of a seg fault

2010-12-01 Thread oliver
On Wed, Dec 01, 2010 at 11:26:19AM +0100, Philippe Veber wrote: > 2010/12/1 > > > Hi, > > > > > > On Wed, Dec 01, 2010 at 09:32:16AM +0100, Philippe Veber wrote: > > > Actually I was not confident I could extract a small program reproducing > > the > > > issue until ... you had me try ! I could g

Re: [Caml-list] Desktop GUI toolkits - current state of the art?

2010-12-01 Thread Alain Frisch
On 11/24/2010 10:47 AM, Martin DeMello wrote: On Wed, Nov 24, 2010 at 5:02 AM, Alain Frisch wrote: We have a few local extensions to the OCaml compiler that makes it easier to build nice APIs for GUI toolkits, with a functional flavor: implicit subtyping and generalized recursion. Hopefully, I'

RE: [Caml-list] OCamlJIT2 vs. OCamlJIT

2010-12-01 Thread Jon Harrop
Erik wrote: > Jon wrote: > > LLVM is also much better documented than ocamlopt's internals. > > LLVM has well over 20 full time programmers working on it. The > Ocaml compiler has how many? Another reason why LLVM deserves its hype. Cheers, Jon. ___

Re: [Caml-list] OCamlJIT2 vs. OCamlJIT

2010-12-01 Thread ivan chollet
20 full time programmers, but if each of them has 1/40 of the skills of X. Leroy, LLVM will get only 50% of the caml native compiler performance. I'm not sure hype is correlated with value as you seem to imply but i might be wrong. This was the troll of the day. On Wed, Dec 1, 2010 at 11:58 PM, J

RE: [Caml-list] OCamlJIT2 vs. OCamlJIT

2010-12-01 Thread Jon Harrop
Benedikt wrote: > This has nothing to do with LLVM, but is simply due to the fact that > your code does not box the float parameters/results. Exactly, yes. > The following peace of C code is most probably even faster than your > code, so what? > > double fib(double x) { if (x < 1.5) return x else

Re: [Caml-list] zero-arity constructor

2010-12-01 Thread Damien Doligez
On 2010-11-28, at 12:13, Alain Frisch wrote: > As I've been designated as the primary responsible for that uninspired change > (I plead guilty), I guess it is my responsibility to state here that frankly, > I don't give a damn. That said, enabling the warning by default sounds better > to me t

Re: [Caml-list] zero-arity constructor

2010-12-01 Thread Damien Doligez
On 2010-11-27, at 11:21, David Allsopp wrote: > and set Warning 28 to be on by default for [Foo _] - that would simply mean > that 3.11/3.12 code using that syntax would emit warnings in "3.13" rather > than actually breaking (unless you've including -warn-error - but that's > always seemed to

Re: [Caml-list] OCamlJIT2 vs. OCamlJIT

2010-12-01 Thread Benedikt Meurer
On Dec 1, 2010, at 15:11 , Jon Harrop wrote: > If you're asking what the advantages of using LLVM over generating C code > are, I'd say functionality like more numeric types, tail calls and JIT > compilation come top but also the fact that LLVM bundles nice OCaml bindings > and makes it easy to g

Re: [Caml-list] Tips to find the cause of a seg fault

2010-12-01 Thread Philippe Veber
2010/12/1 > On Wed, Dec 01, 2010 at 11:26:19AM +0100, Philippe Veber wrote: > > 2010/12/1 > > > > > Hi, > > > > > > > > > On Wed, Dec 01, 2010 at 09:32:16AM +0100, Philippe Veber wrote: > > > > Actually I was not confident I could extract a small program > reproducing > > > the > > > > issue unt

Re: [Caml-list] Tips to find the cause of a seg fault

2010-12-01 Thread Philippe Veber
2010/12/1 Romain Beauxis > Hi, > > Le mardi 30 novembre 2010 17:08:12, Philippe Veber a écrit : > > The seg fault occurs during the call to this function with the button > event > > retrieved by ocamlsdl. What's really weird is that if I comment the third > > case of the pattern matching, the seg

Re: [Caml-list] Tips to find the cause of a seg fault

2010-12-01 Thread Philippe Veber
2010/12/1 Ilya Seleznev > On Wed, Dec 1, 2010 at 5:08 AM, Philippe Veber > wrote: > > Short story (details below): I'm currently writing a program relying on > > react, lablgl and ocamlsdl. This program segfaults on my laptop under two > > linux distributions (ubuntu and gentoo) but doesn't on a

Re: [Caml-list] Tips to find the cause of a seg fault

2010-12-01 Thread oliver
On Wed, Dec 01, 2010 at 04:17:15PM +0100, Philippe Veber wrote: [...] > Many thanks for the clarification. Maybe I could (partially) "unplug" the GC > by setting space_overhead to 100 ? That could give an indication on the > moment the problem occurs ? > ph. [...] There are also verbosity-Options

Re: [Caml-list] Tips to find the cause of a seg fault

2010-12-01 Thread Romain Beauxis
Le mercredi 1 décembre 2010 09:17:15, Philippe Veber a écrit : > > The function that triggers the segfault may be confusing, in particular > > in case of a memory corruption, which I suspect here. > > The pattern matching can cause a crash because it is using a value that > > is already corrupted a

RE: [Caml-list] OCamlJIT2 vs. OCamlJIT

2010-12-01 Thread Jon Harrop
Benedikt wrote: > On Dec 1, 2010, at 15:11 , Jon Harrop wrote: > > If you're asking what the advantages of using LLVM over generating C > code > > are, I'd say functionality like more numeric types, tail calls and > JIT > > compilation come top but also the fact that LLVM bundles nice OCaml > bindi

Re: [Caml-list] OCamlJIT2 vs. OCamlJIT

2010-12-01 Thread Eray Ozkural
On Thu, Dec 2, 2010 at 12:03 AM, Jon Harrop < jonathandeanhar...@googlemail.com> wrote: > > > > > As does assembler, so even more reasons to emit assembler? > > LLVM makes it a *lot* easier to generate efficient code, of course. Just like the way gcc is using a hierarchy of program representation