Re: [Caml-list] OCaml is broken

2010-01-01 Thread Florian Weimer
* Erik Rigtorp: However OCaml is broken! It does not provide any support for multicore architectures, which by now is considered a bug! The run-time library is sufficiently small so that you can run multiple processes in parallel. They will even share the code and constant data. It doesn't

[Caml-list] ocaml, llvm and generating code at runtime

2010-01-01 Thread Joel Reymont
Does anybody have example code that shows how to generate OCaml bindings at runtime with LLVM? My goal is to compile an AST into code that uses OCaml functions within the same binary that's doing the compiling. I don't think it can be done with OCaml since it requires a standalone assembler,

Re: [Caml-list] ocaml, llvm and generating code at runtime

2010-01-01 Thread Basile STARYNKEVITCH
Joel Reymont wrote: Does anybody have example code that shows how to generate OCaml bindings at runtime with LLVM? My goal is to compile an AST into code that uses OCaml functions within the same binary that's doing the compiling. I don't think it can be done with OCaml since it requires a

Re: [Caml-list] ocaml, llvm and generating code at runtime

2010-01-01 Thread Jon Harrop
On Friday 01 January 2010 17:39:15 Basile STARYNKEVITCH wrote: LLVM is rumored to be a bit faster, but is also rumored to be slow as a pure JIT (just in time) code generated (w.r.t. to other non Ocaml implementations - eg SBCL or CLISP common lisp). Are you saying that LLVM's JIT is slow to

Re: [Caml-list] ocaml, llvm and generating code at runtime

2010-01-01 Thread Jon Harrop
On Friday 01 January 2010 16:45:34 Joel Reymont wrote: Does anybody have example code that shows how to generate OCaml bindings at runtime with LLVM? The OCaml Journal article Calling C code from OCaml (10th July 2008) described an OCaml program that invoked a C function both via a stub

Re: [Caml-list] ocaml, llvm and generating code at runtime

2010-01-01 Thread Basile STARYNKEVITCH
Jon Harrop wrote: On Friday 01 January 2010 17:39:15 Basile STARYNKEVITCH wrote: LLVM is rumored to be a bit faster, but is also rumored to be slow as a pure JIT (just in time) code generated (w.r.t. to other non Ocaml implementations - eg SBCL or CLISP common lisp). Are you saying that

Re: [Caml-list] ocaml, llvm and generating code at runtime

2010-01-01 Thread Jon Harrop
On Friday 01 January 2010 20:23:35 Basile STARYNKEVITCH wrote: I heard that LLVM code generation time is significantly higher (i.e. slower) than other JIT technologies. So machine code generation time is apparently significant which might be an issue inside a web server) but performance of the

Re: [Caml-list] ocaml, llvm and generating code at runtime

2010-01-01 Thread Yoann Padioleau
On Jan 1, 2010, at 2:29 PM, Jon Harrop wrote: I think it was a big mistake for the Go developers at Google and the Mono developers at Novell to not build upon LLVM. My main concern about other JITs is maturity: AFAIK LLVM has orders of magnitude more users that all of the others combined.

Re: [Caml-list] ocaml, llvm and generating code at runtime

2010-01-01 Thread Jon Harrop
On Friday 01 January 2010 22:33:42 Yoann Padioleau wrote: On Jan 1, 2010, at 2:29 PM, Jon Harrop wrote: I think it was a big mistake for the Go developers at Google and the Mono developers at Novell to not build upon LLVM. My main concern about other JITs is maturity: AFAIK LLVM has

[Caml-list] value restriction

2010-01-01 Thread Jacques Le Normand
Hello caml-list, with respect to the value restriction, what exactly constitutes a value? the textbook definition doesn't seem to hold, since the following generalizes: let f = let x = 1 in fun g h x - g (h x);; while this won't: let f () = let x = (fun x - x) (fun x - x) in fun g h x - g (h