Re: [Caml-list] The new OCaml book (Objective Caml Programming Language by Tim Rentsch)

2009-03-04 Thread Stefano Zacchiroli
[ Disclaimer: IANAL, but I've been within Debian on several copyright / licensing issues like this one. What I contribute below descends only from that---potentially limited---experience. ] On Tue, Mar 03, 2009 at 10:59:12PM -0800, Tim Rentsch wrote: If Jason's current manuscript

[Caml-list] Multiple copies

2009-03-04 Thread Matthieu Wipliez
Hello, I've been receiving several copies of each message sent to the list for a couple of days now. Am I the only one? Cheers, Matthieu ___ Caml-list mailing list. Subscription management:

[Caml-list] Final Call for Workshop Proposals: ATVA 2009

2009-03-04 Thread Wang Xu
The deadline is in **10 days** (i.e. 15th March) ... * * 7th International Symposium * on * Automated Technology for Verification and Analysis * *

[Caml-list] recursive records with weak hashtbl

2009-03-04 Thread Vsevolod Fedorov
Hello! I want to define two records referencing each other. First record (A) has direct reference to second (B) and second (B) has weak hash table to list records A, which have reference to it. For example (pseudo code): type a { id : int ; mutable field1 : string; mutable b : B; } type b

Re: [Caml-list] recursive records with weak hashtbl

2009-03-04 Thread Florent Ouchet
Vsevolod Fedorov a e'crit : snip Is it possible at all? Yes, you have to use type .. and .. ;; statements for instance: type a = { id : int ; mutable field_1 : string; mutable field_b : b; } and b = { id : int; mutable field_2 : string; field_a_list : a array; (* they referenced me *) };;

Re: [Caml-list] The new OCaml book (Objective Caml Programming Language by Tim Rentsch)

2009-03-04 Thread Ed Keith
Something seems to be wrong with the list, this is the 18th copy of this one message I have received! I am receiving 2 to 4 copies of most messages. -EdK Ed Keith e_...@yahoo.com Blog: edkeith.blogspot.com --- On Mon, 3/2/09, Jon Harrop j...@ffconsultancy.com wrote: From: Jon Harrop

Re: [Caml-list] recursive records with weak hashtbl

2009-03-04 Thread Virgile Prevosto
Hello, Le mer. 04 mars 2009 16:31:02 CET, Vsevolod Fedorov sevaatw...@mail.ru a écrit : type a { id : int ; mutable field1 : string; mutable b : B; } type b { id : int; mutable field2 : string; a_list : Weak-Hashtbl(a); (* they referenced me *) } Is it possible

Re: [Caml-list] recursive records with weak hashtbl

2009-03-04 Thread Martin Jambon
Vsevolod Fedorov wrote: Hello! I want to define two records referencing each other. First record (A) has direct reference to second (B) and second (B) has weak hash table to list records A, which have reference to it. For example (pseudo code): type a { id : int ; mutable field1 :

Re: [Caml-list] stl?

2009-03-04 Thread Christophe TROESTLER
On Wed, 4 Mar 2009 01:11:18 -0500, Brian Hurt wrote: Try this. Let's reimplement Haskell's Fractional class, in Ocaml, and then do Newton's method using this new Fractional class. [...] module type Fractional = sig type t val ( +. ) : t - t - t val ( -. ) : t - t - t

Re: [Caml-list] recursive records with weak hashtbl

2009-03-04 Thread Christophe TROESTLER
On Wed, 4 Mar 2009 16:31:02 +0300, Vsevolod Fedorov wrote: I want to define two records referencing each other. First record (A) has direct reference to second (B) and second (B) has weak hash table to list records A, which have reference to it. For example (pseudo code): type a { id :

Re: [Caml-list] stl?

2009-03-04 Thread Peng Zang
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wednesday 04 March 2009 01:11:18 am Brian Hurt wrote: This is another large factor. The three reasons functors aren't used very much are because: 1) They're a big, scary name, 2) They're slightly less efficient, 3) There are no good tutorials

Re: [Caml-list] stl?

2009-03-04 Thread Kuba Ober
i'm just trying to get my head around what it might look like, and if/how it might be useful. (it just bugs me that somebody can claim that C++ is the /only/ language that could do it -- maybe the real quote implied mainstream or something. apparently Ada wasn't up to snuff

Re: [Caml-list] stl?

2009-03-04 Thread Kuba Ober
I've worked a little bit with C++ using unboxed objects, that is without introducing pointers (similar to boxing) in templates, like listfigure instead of listfigure*, and passing them as value in parameters, or returning them, and it was far less efficient because there was lots of copy, and you

Re: [Caml-list] stl?

2009-03-04 Thread Brian Hurt
On Wed, 4 Mar 2009, Peng Zang wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wednesday 04 March 2009 01:11:18 am Brian Hurt wrote: This is another large factor. The three reasons functors aren't used very much are because: 1) They're a big, scary name, 2) They're slightly less

Re: [Caml-list] Odd performance result with HLVM

2009-03-04 Thread Mikkel Fahnøe Jørgensen
When looking at the benchmark game and other benchmarks I have seen, I noticed that Haskell is almost as fast as OCaml and sometimes faster. Some Lisp implementations are also pretty fast. However, when you look at memory consumption OCaml uses considerably less memory, except for languages in

Re: [Caml-list] Odd performance result with HLVM

2009-03-04 Thread Kuba Ober
On Mar 4, 2009, at 11:17 AM, Mikkel Fahnøe Jørgensen wrote: When looking at the benchmark game and other benchmarks I have seen, I noticed that Haskell is almost as fast as OCaml and sometimes faster. Some Lisp implementations are also pretty fast. However, when you look at memory consumption

Re: [Caml-list] stl?

2009-03-04 Thread Andreas Rossberg
On Mar 4, 2009, at 17.14 h, Brian Hurt wrote: So then you start throwing out the standard instances, among others, you do one for string: instance Sexpable String where toSexp s = Atom s fromSexp (Atom s) = Just s fromSexp _ = Nothing

Re: [Caml-list] stl?

2009-03-04 Thread Mikkel Fahnøe Jørgensen
2009/3/3 Raoul Duke rao...@gmail.com: hi, the caml archives show discussion around C++ polymorphism wrt STL (since Stepanov iirc said that C++ was the only language which supported what he needed to let him implement his generic programming) but i didn't yet see anywhere a concrete

Re: [Caml-list] stl?

2009-03-04 Thread Peng Zang
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wednesday 04 March 2009 11:14:50 am Brian Hurt wrote: Yeah. I think of this as one of the advantages of Functors. Here are two real problems I've hit with type classes, in only a few weeks banging around in Haskell. For example, you can't

Re: [Caml-list] stl?

2009-03-04 Thread Yoann Padioleau
Mikkel Fahnøe Jørgensen mik...@dvide.com writes: 2009/3/3 Raoul Duke rao...@gmail.com: hi, the caml archives show discussion around C++ polymorphism wrt STL (since Stepanov iirc said that C++ was the only language which supported what he needed to let him implement his generic programming)

[Caml-list] ASP-competition Call for Participation

2009-03-04 Thread Stephen Bond
The Second Answer Set Programming Competition Call For Participation K.U.Leuven, Belgium, spring 2009

Re: [Caml-list] Odd performance result with HLVM

2009-03-04 Thread Mikkel Fahnøe Jørgensen
oh, and another thing: I'd like the VM to be small enough to link into an executable like the OCaml runtime so you don't have some version and dispatch nightmare. Mikkel ___ Caml-list mailing list. Subscription management:

Re: [Caml-list] Odd performance result with HLVM

2009-03-04 Thread Jon Harrop
On Wednesday 04 March 2009 18:15:50 Mikkel Fahnøe Jørgensen wrote: oh, and another thing: I'd like the VM to be small enough to link into an executable like the OCaml runtime so you don't have some version and dispatch nightmare. You can generate executables but it takes 10s to compile HLVM

Re: [Caml-list] stl?

2009-03-04 Thread Jon Harrop
On Wednesday 04 March 2009 06:11:18 Brian Hurt wrote: On Wed, 4 Mar 2009, Jon Harrop wrote: Efficiency is only important in the context of functors when abstracting very fast and common functions like arithmetic without defunctorizing your code. I don't think that is why people avoid

Re: [Caml-list] stl?

2009-03-04 Thread Jon Harrop
On Wednesday 04 March 2009 16:48:18 Yoann Padioleau wrote: I don't think so. I've read the last history of C++ by Stroustrup in HOPL-III, who discusses quite a lot about the STL and Stepanov, and from what I remember unboxing was a big issue and having generic (which is slightly different from

Re: [Caml-list] stl?

2009-03-04 Thread Yoann Padioleau
Jon Harrop j...@ffconsultancy.com writes: On Wednesday 04 March 2009 16:48:18 Yoann Padioleau wrote: I don't think so. I've read the last history of C++ by Stroustrup in HOPL-III, who discusses quite a lot about the STL and Stepanov, and from what I remember unboxing was a big issue and

Re: [Caml-list] stl?

2009-03-04 Thread Andreas Rossberg
On Mar 4, 2009, at 21.49 h, Yoann Padioleau wrote: But haven't they added generics in Java because Java programmers wanted some of the capabilities of C++ templates ? They even use its syntax, and recent Java has added some ugly extensions with some star-stuff around it that I don't understand.

Re: [Caml-list] stl?

2009-03-04 Thread Nicolas Pouillard
Excerpts from Brian Hurt's message of Wed Mar 04 17:14:50 +0100 2009: On Wed, 4 Mar 2009, Peng Zang wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wednesday 04 March 2009 01:11:18 am Brian Hurt wrote: [...] But I'll add one more reason. With functors you have extra

Re: [Caml-list] stl?

2009-03-04 Thread Jon Harrop
On Wednesday 04 March 2009 20:49:14 Yoann Padioleau wrote: Jon Harrop j...@ffconsultancy.com writes: On Wednesday 04 March 2009 16:48:18 Yoann Padioleau wrote: I don't think so. I've read the last history of C++ by Stroustrup in HOPL-III, who discusses quite a lot about the STL and

Re: [Caml-list] stl?

2009-03-04 Thread Jon Harrop
On Wednesday 04 March 2009 23:18:21 Pal-Kristian Engstad wrote: Jon Harrop wrote: C++'s job market share has fallen 50% in 4 years here in the UK: http://www.itjobswatch.co.uk/jobs/uk/c++.do Sure -- those are probably not jobs that require performance, nor have resource constraints. I

Re: [Caml-list] stl?

2009-03-04 Thread Pal-Kristian Engstad
Jon Harrop wrote: On Wednesday 04 March 2009 23:18:21 Pal-Kristian Engstad wrote: Sure -- those are probably not jobs that require performance, nor have resource constraints. I do not believe that C++ is significantly faster or better at handling resources than higher-level

Re: [Caml-list] The new OCaml book (Objective Caml Programming Language by Tim Rentsch)

2009-03-04 Thread Jason Hickey
To the OCaml community, I apologize for my silence. I have very strong feelings for this community. I have benefited quite profoundly from Caml (starting when I first wrote Metaprl in caml-light), and I wish to continue my role as an advocate, supporter, and instructor. Before I can say

Re: [Caml-list] stl?

2009-03-04 Thread Jon Harrop
On Thursday 05 March 2009 02:15:20 Pal-Kristian Engstad wrote: Jon Harrop wrote: On Wednesday 04 March 2009 23:18:21 Pal-Kristian Engstad wrote: Sure -- those are probably not jobs that require performance, nor have resource constraints. I do not believe that C++ is significantly faster

Re: [Caml-list] stl?

2009-03-04 Thread yoann padioleau
On Thursday 05 March 2009 02:15:20 Pal-Kristian Engstad wrote: Jon Harrop wrote: On Wednesday 04 March 2009 23:18:21 Pal-Kristian Engstad wrote: Sure -- those are probably not jobs that require performance, nor have resource constraints. I do not believe that C++ is significantly