[Caml-list] Re: thousands of CPU cores

2008-07-10 Thread Damien Guichard
And I am not sure that Ocaml has been ported to non-unix free software... Does Ocaml runs on Hurd, or Syllable, or EROS? OCaml 3.10.2 binary package for SyllableOS: http://web.syllable.org/pages/resources.html Regards. -- damien ___ Caml-list

Re: [Caml-list] Haskell vs OCaml

2008-08-14 Thread Damien Guichard
Well said Brian. Any tutorial is good enough at underlining respective language features. Haskell has lazy evaluation, Caml has strict evaluation, don't pretend it's a secret and don't ask whether good or bad. Be responsible, try it yourself if needed, then choose yourself. - damien

Re: [Caml-list] calculating a remainder of two church number on lambdacalculs with ocaml

2009-03-21 Thread Damien Guichard
in add d c,double c in let n,_ = loop a in n That is dirty untested code yet i hope you get the idea. Addition/substraction and division will be somewhat trickier however. - damien Damien Guichard 2009-03-21 En réponse au message de : Su Zhang du : 2009-03-21 18:36:11 À : caml-list

Re: [Caml-list] LLC book [was: Questions]

2009-04-02 Thread Damien Guichard
, it encourages a much more elaborated design. -- damien Damien Guichard 2009-04-02 En réponse au message de : Alp Mestan du : 2009-04-02 15:40:45 À : Jon Harrop; caml-list@yquem.inria.fr CC : Sujet : Re: [Caml-list] Re: LLC book [was: Questions] Indeed, as I said above, a book on today's OCaml

[Caml-list] Re: book Le langage Caml

2009-07-21 Thread Damien Guichard
Thanks to Dunod Éditions for this much appreciated donation. Bonjour Olivier, The book sources are already included in the Caml/examples/ directory of your Caml-Light distribution. (or at least they are in my windows distribution) - damien Damien Guichard 2009-07-21 En réponse au

Re: [Caml-list] Cartesian product

2009-07-30 Thread Damien Guichard
(f n.item) n.right) let flatten_map f = flatten_map f None It seems to me that my solution gives you the cartesian product as an ordered (balanced) binary tree set in optimal time. - damien Damien Guichard 2009-07-30 En réponse au message de : Ligia Nistor du : 2009-07-30 19:56:57 À

[Caml-list] Re: Sets and home-made ordered types

2009-09-16 Thread Damien Guichard
with None - f := Some x; x | Some y - y) | G _ - (match !g with None - g := Some x; x | Some y - y) | A - A | B - B Then top_most () gives you a function with the expected behavior. Hope it helps, - damien Damien Guichard 2009-09-17 En réponse au message de : Matthias Puech du : 2009

Re: [Caml-list] ANN: pa_polyrec: syntax for polymorphic recursion

2009-09-29 Thread Damien Guichard
hacker. Hoping i have made the matter less esoteric to OCaml beginners, Regards, - damien Damien Guichard 2009-09-29 En réponse au message de : Jeremy Yallop du : 2009-09-28 22:56:32 À : caml-l...@inria.fr CC : Sujet : [Caml-list] ANN: pa_polyrec: syntax for polymorphic recursion I'm

Re: [Caml-list] Improving OCaml's choice of type to display

2009-10-09 Thread Damien Guichard
Hi Yaron, I think you better think twice about the problem in general (rather than the particular needs of Core) before proposing some controversial type display improvement. Imagine my code is: type color = int let black : color = 0 Then, following your proposition, evaluating black

Re: [Caml-list] Improving OCaml's choice of type to display

2009-10-09 Thread Damien Guichard
'a foldable = 'a map and fold_key = key type ('a,'b) fold = (key - 'a - 'b - 'b) - 'b - 'a map - 'b type 'a set = 'a map type set_key = key type 'a set_select = 'a select ... end En réponse au message de : Yaron Minsky du : 2009-10-09 18:52:40 À : Damien Guichard CC : caml

Re: [Caml-list] Improving OCaml's choice of type to display

2009-10-10 Thread Damien Guichard
As Ocaml modules are essentially ML modules, the MLton experience is certainly one to be carefully considered. People, please don't hesitate to elaborate about how (un-)happy you are with ML/MLton alternate type naming strategies. - damien En réponse au message de : Stephen Weeks du :

Re: [Caml-list] Improving OCaml's choice of type to display

2009-10-11 Thread Damien Guichard
Hi Gilles, The type display routine uses right-associativity of the - operator as a rewriting rule. Thus ('a - 'a - float) and 'a - ('a - float) are the same type and are both displayed as 'a - 'a - float. The type 'a - ('a - float) means the application will be (f x) y which is actually the

Re: [Caml-list] Linking mutually dependent modules for fun

2009-10-16 Thread Damien Guichard
Hi Dawid, Have you ever considered recursive modules ? http://caml.inria.fr/pub/docs/manual-ocaml/manual021.html#toc75 - damien En réponse au message de : Dawid Toton du : 2009-10-16 09:51:57 À : caml-list@yquem.inria.fr CC : Sujet : [Caml-list] Linking mutually dependent modules for fun

Re: [Caml-list] type generalization of recursive calls

2010-02-17 Thread Damien Guichard
Hello, First, you really need strong tyupe checking because your definition is actually incorrect. Second, see polymorphic-recursion : http://alaska-kamtchatka.blogspot.com/2009/05/polymorphic-recursion.html Be sure to read the comments by bluestorm. There is also pa_polyrec, a syntax

Re: [Caml-list] type generalization of recursive calls

2010-02-17 Thread Damien Guichard
I have to apologize because your definition is actually correct. Sorry i have read it too fast and didn't see map burried in type casting. It seems to me your are doing structural recursion on some binary tree structure. Presumably to fast-merge binary heaps or something like that. pa_polyrec is