Re: [Caml-list] thousands of CPU cores

2008-09-21 Thread Michaël Grünewald
Richard Jones wrote: If you also follow the rest of that thread, there's a message passing OCaml version by Gerd Stolpmann which also scales properly. To be honest, matrix multiplication interests me not at all since no one is hand coding their own matrix multiplication when there are perfectly

[Caml-list] camlp4 module dependencies

2008-09-21 Thread Harrison, John R
I'm trying once again to make some code work under the new camlp4. I don't want to make any real syntax modifications, but just enable quotations performing a simple string transformation on the body of the quotation, e.g. turning hello /\ world into default_parser hello /\\ world About a

[Caml-list] More problems with simple quotation parser

2008-09-21 Thread Harrison, John R
I've hit another problem with the simple string transformation quotation parser (see my previous message). For the sake of this example, here is a somewhat simplified variant, which I turn into Quotexpander.cma: open Camlp4.PreCast;; module Caml = Camlp4OCamlParser.Make

Re: [Caml-list] Portable PNG exporter

2008-09-21 Thread Janne Hellsten
Few things that hurt the eye: Int32.of_string [number] is unnecessary, OCaml(not sure which version this was introduced in though) can read various specific size ints natively: # 0n, 0l, 0L;; - : nativeint * int32 * int64 = (0n, 0l, 0L) Thanks, I didn't know about this. I'm glad to learn

Re: [Caml-list] thousands of CPU cores

2008-09-21 Thread Jon Harrop
On Sunday 21 September 2008 20:05:15 Michaël Grünewald wrote: This is true while your are concerned with matrix over the real or complex numbers, but if you want to use arbitrary precision arithmetic, finite fields, quaternions or any ring you like, then you are stuck. Linear algebra is useful

[Caml-list] Ocaml type with constraints?

2008-09-21 Thread Angela Zhu
Hi, I want to define an OCaml type with constraints. For example: type item = Item of int * float;; If here this float type is for price of some item, and I want to make sure it is positive. In other words, if x = (xi, xf) of type item, I want to enforce, xf must = 0. Is there a way to define

Re: [Caml-list] Ocaml type with constraints?

2008-09-21 Thread Andrej Bauer
Angela Zhu wrote: Hi, I want to define an OCaml type with constraints. For example: type item = Item of int * float;; If here this float type is for price of some item, and I want to make sure it is positive. In other words, if x = (xi, xf) of type item, I want to enforce, xf must =

[Caml-list] Measures

2008-09-21 Thread Jon Harrop
This latest post about statically typing constraints beyond mere floating-point values reminds me that the F# programming language just got another new feature called measures that lets you add phantom types representing units of measure and even handles arithmetic over them for you. I have

Re: [Caml-list] Ocaml type with constraints?

2008-09-21 Thread Gordon Henriksen
On Sep 21, 2008, at 18:01, Angela Zhu wrote: I want to define an OCaml type with constraints. For example: type item = Item of int * float;; If here this float type is for price of some item, and I want to make sure it is positive. In other words, if x = (xi, xf) of type item, I want to

Re: [Caml-list] Measures

2008-09-21 Thread Hezekiah M. Carty
On Sun, Sep 21, 2008 at 7:30 PM, Jon Harrop [EMAIL PROTECTED] wrote: This latest post about statically typing constraints beyond mere floating-point values reminds me that the F# programming language just got another new feature called measures that lets you add phantom types representing

Re: [Caml-list] Ocaml type with constraints?

2008-09-21 Thread Martin Jambon
On Mon, 22 Sep 2008, Andrej Bauer wrote: Angela Zhu wrote: Hi, I want to define an OCaml type with constraints. For example: type item = Item of int * float;; If here this float type is for price of some item, and I want to make sure it is positive. In other words, if x = (xi, xf) of type

Re: [Caml-list] Ocaml type with constraints?

2008-09-21 Thread Jacques Garrigue
From: Angela Zhu [EMAIL PROTECTED] I want to define an OCaml type with constraints. For example: type item = Item of int * float;; If here this float type is for price of some item, and I want to make sure it is positive. In other words, if x = (xi, xf) of type item, I want to enforce,

[Caml-list] Re: Extending .annot files

2008-09-21 Thread Jun Furuse
Hi, I'm really happy to hear that you're open to including some of this stuff. I think there are actually only a few data that one wants to have in .annot files (and that the compiler can reasonably provide). For any identifier it would be good to know: 1. Its inferred type 2. Its

[Caml-list] What's the purpose of the static library?

2008-09-21 Thread bill yan
Hi, I noticed there are some static libraries(.a) installed with ocaml, for example, /usr/lib/ocaml/bigarray.a. What's the purpose of those static libraries? Thanks a lot. Regards, Bill ___ Caml-list mailing list. Subscription management: