[Caml-list] New release 2.21 of htmlc

2009-09-24 Thread pierre . weis
[Version française ci-dessous] Htmlc, a general purpose text file generator with a programmatic approach in the spirit of functional programming. (http://htmlc.inria.fr/) I am pleased to announce the 2.21 version of Htmlc, a convenient tool to generate and manage text files of any kind, in

[Caml-list] React.E.switch issue.

2009-09-24 Thread Guillaume Yziquel
Hello. Here is a piece of code that I am having issue. I'm trying to use React to parse reactively a server output. I have the following event definition: let event_starting_at str = React.E.fold begin fun accu chunk - accu^chunk end str received_event in let to_be_parsed_event_of_event,

RE: [Caml-list] Generation of Java code from OCaml

2009-09-24 Thread David Allsopp
Mykola Stryebkov wrote: Hi, Richard. On 23 Вер 2009, at 22:57, Richard Jones wrote: snip I'm going to use stringing bits of text together. But text generating is not an issue here. The issue is how to make this stringing driven by description of ocaml records. camlp4 would be the

[Caml-list] Re: React.E.switch issue.

2009-09-24 Thread Guillaume Yziquel
Guillaume Yziquel a écrit : Hello. Hi again. Here is a piece of code that I am having issue. I'm trying to use React to parse reactively a server output. I have the following event definition: let event_starting_at str = React.E.fold begin fun accu chunk - accu^chunk end str

Re: [Caml-list] Generation of Java code from OCaml

2009-09-24 Thread blue storm
In case it helps, below is a basic patch against json-static (SVN trunk, 3.10 version). On your example it produces the following code : let javadef_of_create_order_response = public class Create_order_response {\n\tprivate int order_id;\n\tprivate String order_code;\n\tprivate int

Re: [Caml-list] OC4MC : OCaml for Multicore architectures

2009-09-24 Thread rixed
Wow! 2.6x faster on 2 cores is good. ;-) Isn't that impossible? Or is the multicore GC better than the single threaded one? (Sorry if this is a stupid or obvious question) There are so many factors that makes the running time unpredictable that nothing is surprising any more. Haven't you

Re: [Caml-list] OC4MC : OCaml for Multicore architectures

2009-09-24 Thread kcheung
On Thursday 24 September 2009 01:01:58 you wrote: No problem. I'll be happy to get anything working! Following your advice, it seems to work perfectly now: I'm not too familiar with concurrency in ocaml. How does OC4MC compare with JoCaml? $ ./matmul.th 500 1 Temp de calcul: utime

Re: [Caml-list] OC4MC : OCaml for Multicore architectures

2009-09-24 Thread Florian Hars
Richard Jones schrieb: On Thu, Sep 24, 2009 at 02:47:17AM +0100, Jon Harrop wrote: Wow! 2.6x faster on 2 cores is good. ;-) Isn't that impossible? Or is the multicore GC better than the single threaded one? (Sorry if this is a stupid or obvious question) It might just happen that the size

Re: [Caml-list] Generation of Java code from OCaml

2009-09-24 Thread Martin Jambon
blue storm wrote: In case it helps, below is a basic patch against json-static (SVN trunk, 3.10 version). On your example it produces the following code : [...] Yes, patching the original code of json-static would work but it's not ideal. Maybe Deriving is a better choice

Re: [Caml-list] OC4MC : OCaml for Multicore architectures

2009-09-24 Thread Jon Harrop
On Thursday 24 September 2009 10:49:43 Richard Jones wrote: On Thu, Sep 24, 2009 at 02:47:17AM +0100, Jon Harrop wrote: Wow! 2.6x faster on 2 cores is good. ;-) Isn't that impossible? Or is the multicore GC better than the single threaded one? (Sorry if this is a stupid or obvious

Re: [Caml-list] OC4MC : OCaml for Multicore architectures

2009-09-24 Thread Jon Harrop
On Thursday 24 September 2009 11:00:57 kche...@math.carleton.ca wrote: On Thursday 24 September 2009 01:01:58 you wrote: No problem. I'll be happy to get anything working! Following your advice, it seems to work perfectly now: I'm not too familiar with concurrency in ocaml. How does

Re: [Caml-list] OC4MC : OCaml for Multicore architectures

2009-09-24 Thread Rakotomandimby Mihamina
09/24/2009 02:52 PM, Jon Harrop: The next steps are to get oc4mc into the apt repositories Amen! ;-) -- Architecte Informatique chez Blueline/Gulfsat: Administration Systeme, Recherche Developpement +261 34 29 155 34

Re: [Caml-list] OC4MC : OCaml for Multicore architectures

2009-09-24 Thread rixed
Until now, OCaml sucked at parallelism. (...) OCaml programmers can write OCaml programs that use multicore machines efficiently for the first time. Subtle and strongly argumented, as expected. ___ Caml-list mailing list. Subscription management:

Re: [Caml-list] OC4MC : OCaml for Multicore architectures

2009-09-24 Thread Philippe Wang
On Thu, Sep 24, 2009 at 3:47 AM, Jon Harrop j...@ffconsultancy.com wrote: Following your advice, it seems to work perfectly now: :-) Wow! 2.6x faster on 2 cores is good. ;-) your machine is more generous than ours (which is Intel, not AMD) :-) That's a really fantastic piece of work. I'll

Re: [Caml-list] Generation of Java code from OCaml

2009-09-24 Thread Martin Jambon
blue storm wrote: On Thu, Sep 24, 2009 at 1:18 PM, Martin Jambon martin.jam...@ens-lyon.org wrote: Yes, patching the original code of json-static would work but it's not ideal. From the example given, it seems that the original poster already uses json-static. In that case, I think that

Re: [Caml-list] OC4MC : OCaml for Multicore architectures

2009-09-24 Thread Stefano Zacchiroli
On Thu, Sep 24, 2009 at 12:52:24PM +0100, Jon Harrop wrote: The next steps are to get oc4mc into the apt repositories and build Uhm, I'm curious: how do you plan to achieve that? AFAICT the patch is only against 3.10.2, and in Debian we're at 3.11.1. Thus far, we have never had support for more

Re: [Caml-list] OC4MC : OCaml for Multicore architectures

2009-09-24 Thread Jon Harrop
On Thursday 24 September 2009 13:39:40 Stefano Zacchiroli wrote: On Thu, Sep 24, 2009 at 12:52:24PM +0100, Jon Harrop wrote: The next steps are to get oc4mc into the apt repositories and build Uhm, I'm curious: how do you plan to achieve that? Good question. I have no idea, of course. :-)

Re: [Caml-list] OC4MC : OCaml for Multicore architectures

2009-09-24 Thread Jon Harrop
On Thursday 24 September 2009 13:14:35 Philippe Wang wrote: On Thu, Sep 24, 2009 at 3:47 AM, Jon Harrop j...@ffconsultancy.com wrote: Following your advice, it seems to work perfectly now: :-) : Wow! 2.6x faster on 2 cores is good. ;-) your machine is more generous than ours (which is

Re: [Caml-list] Cache algorithms: implementation or library available?

2009-09-24 Thread Hugo Ferreira
Hello, I would like to thank Mattias Engdegård, Dario Teixeira, Gerd Stolpmann and Martin Jambon for their suggestions. I going through the code and article. Regards, Hugo F. Mattias Engdegård wrote: The Weak module is never the right tool for implementing a cache. I'm not disputing this,

Re: [Caml-list] OC4MC : OCaml for Multicore architectures

2009-09-24 Thread Rakotomandimby Mihamina
09/24/2009 03:39 PM, Stefano Zacchiroli: So, the real question is: is OC4MC going to be ported to mainline OCaml and support in the future or not? I dont write so much programs that would really require multiple cores. But I think this is such a good feature that should be inclided in the main

[Caml-list] Re: React.E.switch issue.

2009-09-24 Thread Daniel Bünzli
My issue is that the 'reinitialise_with' function is called in a function 'phi' which is used in the following way: let message_event = React.E.map phi to_be_parsed_event. Cannot really make sense out of your snippets of code. However this phi functions seems to invoke a primitive event

Re: [Caml-list] OC4MC : OCaml for Multicore architectures

2009-09-24 Thread Mike Lin
On Thu, Sep 24, 2009 at 8:39 AM, Stefano Zacchiroli z...@debian.org wrote: So, the real question is: is OC4MC going to be ported to mainline OCaml and support in the future or not? Recalling how mainline had us waiting like 5 years for native exception backtraces, and then another like 3

Re: [Caml-list] OC4MC : OCaml for Multicore architectures

2009-09-24 Thread Dario Teixeira
Hi, Cheers for the work you guys put into this project! And I'd like to join the crowd that has questions, if I may: a) If I understand correctly, part of prerequisites for implementing the new GC was cleaning up the excessive use of imperative constructs in the compiler's tree. Will the

[Caml-list] Re: React.E.switch issue.

2009-09-24 Thread Guillaume Yziquel
Daniel Bünzli a écrit : My issue is that the 'reinitialise_with' function is called in a function 'phi' which is used in the following way: let message_event = React.E.map phi to_be_parsed_event. Cannot really make sense out of your snippets of code. What I want to do is the following: The

Re: [Caml-list] OC4MC : OCaml for Multicore architectures

2009-09-24 Thread Philippe Wang
On Thu, Sep 24, 2009 at 3:40 PM, Rakotomandimby Mihamina miham...@gulfsat.mg wrote: 09/24/2009 03:39 PM, Stefano Zacchiroli: So, the real question is: is OC4MC going to be ported to mainline OCaml and support in the future or not? I dont write so much programs that would really require

[Caml-list] problem in installation

2009-09-24 Thread nitin choubey
i am trying to install caml in red hat enterprise editon 5 in intel xeon system, but after performing make clean then make world it is not working. the following result are displayed: cd runtime; make CC=gcc OPTS=-fno-defer-pop -D__FAVOR_BSD LIBS= all make[1]: Entering directory

Re: [Caml-list] OC4MC : OCaml for Multicore architectures

2009-09-24 Thread Stefano Zacchiroli
On Thu, Sep 24, 2009 at 04:40:53PM +0300, Rakotomandimby Mihamina wrote: I dont write so much programs that would really require multiple cores. But I think this is such a good feature that should be inclided in the main distribution... I think you miss what does that would mean in terms of

Re: [Caml-list] OC4MC : OCaml for Multicore architectures

2009-09-24 Thread Stefano Zacchiroli
On Thu, Sep 24, 2009 at 09:55:53AM -0400, Mike Lin wrote: On Thu, Sep 24, 2009 at 8:39 AM, Stefano Zacchiroli z...@debian.org wrote: So, the real question is: is OC4MC going to be ported to mainline OCaml and support in the future or not? Recalling how mainline had us waiting like 5 years

Re: [Caml-list] OC4MC : OCaml for Multicore architectures

2009-09-24 Thread Philippe Wang
On Thu, Sep 24, 2009 at 3:11 PM, Jon Harrop j...@ffconsultancy.com wrote: Are values such as float arrays copied in their entirety or are they allocated outside the shared heap and only a pointer to them is copied? They should be in a heap (page or shared). We don't allocate many things outside

Re: [Caml-list] OC4MC : OCaml for Multicore architectures

2009-09-24 Thread Philippe Wang
I've seen a question about 3.11 and I think I didn't answer, so I'm answering here : We have tried to make OC4MC work with OCaml 3.11 (I don't remember the subsubversion number). Currently, it does not work properly (it's still too easy to write a program that crashes or deadlocks). Cheers,

Re: [Caml-list] OC4MC : OCaml for Multicore architectures

2009-09-24 Thread Dario Teixeira
Hi, Very few programs that are not written with multicore in mind would not be penalized. I mean our GC is much much dumber than INRIA OCaml's one. Our goal was to show it was possible to have good performance with multicores for OCaml. Maybe someday we'll find some time to optimize the GC,

Re: [Caml-list] OC4MC : OCaml for Multicore architectures

2009-09-24 Thread Jon Harrop
On Thursday 24 September 2009 13:11:24 ri...@happyleptic.org wrote: Until now, OCaml sucked at parallelism. (...) OCaml programmers can write OCaml programs that use multicore machines efficiently for the first time. Subtle and strongly argumented, as expected. I forgot to mention that

Re: [Caml-list] OC4MC : OCaml for Multicore architectures

2009-09-24 Thread Pascal Cuoq
On Sep 24, 2009, at 5:47 PM, Philippe Wang wrote: Is the copy operation parallelized? Nope. When the world is stopped for the collection, everything is done sequentially until the world is resumed. I don't think it's relevant to parallelize the copy operation (hell to implementdebug, then I

Re: [Caml-list] OC4MC : OCaml for Multicore architectures

2009-09-24 Thread Philippe Wang
On Sep 24, 2009, at 18:02 GMT+02:00, Pascal Cuoq wrote: On Sep 24, 2009, at 5:47 PM, Philippe Wang wrote: Is the copy operation parallelized? Nope. When the world is stopped for the collection, everything is done sequentially until the world is resumed. I don't think it's relevant to

Re: [Caml-list] OC4MC : OCaml for Multicore architectures

2009-09-24 Thread Richard Jones
On Thu, Sep 24, 2009 at 02:09:56PM +0100, Jon Harrop wrote: Fair enough. I think this is the single most important development OCaml has seen since its inception so I would personally drop OCaml in favor of oc4mc even if it meant reverting to 3.10.2. I think 'personally' is the key word

Re: [Caml-list] OC4MC : OCaml for Multicore architectures

2009-09-24 Thread Philippe Wang
On Sep 24, 2009, at 18:49 GMT+02:00, Richard Jones wrote: On Thu, Sep 24, 2009 at 02:09:56PM +0100, Jon Harrop wrote: Fair enough. I think this is the single most important development OCaml has seen since its inception so I would personally drop OCaml in favor of oc4mc even if it meant

Re: [Caml-list] OC4MC : OCaml for Multicore architectures

2009-09-24 Thread David Teller
Well, let me join the chorus and congratulate. I'll need to test this as soon as possible. Cheers, David On Tue, 2009-09-22 at 23:30 +0200, Philippe Wang wrote: This is some additional noise about OCaml for Multicore architectures (or Ok with parallel threads GC).

Re: [Caml-list] OC4MC : OCaml for Multicore architectures

2009-09-24 Thread Jon Harrop
On Thursday 24 September 2009 17:49:33 Richard Jones wrote: On Thu, Sep 24, 2009 at 02:09:56PM +0100, Jon Harrop wrote: Fair enough. I think this is the single most important development OCaml has seen since its inception so I would personally drop OCaml in favor of oc4mc even if it meant

Re: [Caml-list] OC4MC : OCaml for Multicore architectures

2009-09-24 Thread rixed
Visual Basic has been a *lot* faster than OCaml for several years now, not (...) Even Python (...) Java and C#. They are far more popular than OCaml for many reasons but parallel threads to make efficient multicore programming easy is a big one. In general you sounds like a reasonable

Re: [Caml-list] OC4MC : OCaml for Multicore architectures

2009-09-24 Thread Jon Harrop
On Thursday 24 September 2009 15:38:06 Philippe Wang wrote: Very few programs that are not written with multicore in mind would not be penalized. I mean our GC is much much dumber than INRIA OCaml's one. Our goal was to show it was possible to have good performance with multicores for OCaml.

Re: [Caml-list] OC4MC : OCaml for Multicore architectures

2009-09-24 Thread Philippe Wang
On Sep 25, 2009, at 1:28 AM, Jon Harrop wrote: On Thursday 24 September 2009 15:38:06 Philippe Wang wrote: Very few programs that are not written with multicore in mind would not be penalized. I mean our GC is much much dumber than INRIA OCaml's one. Our goal was to show it was possible to

Re: [Caml-list] OC4MC : OCaml for Multicore architectures

2009-09-24 Thread Jacques Garrigue
First, like everybody else, I'd like very much to try this out. Is there any chance it could compile on Snow Leopard :-) (I suppose it's near impossible, but still ask...) From: Jon Harrop j...@ffconsultancy.com Visual Basic has been a *lot* faster than OCaml for several years now, not least