Re: [Caml-list] ocamlbuild deps
Nicolas told me that the actual order for static dependencies in that example would also be that one : (((B1 || B2); B) || ((C1 || C2); C)); A However he points out that there's still a difference between static and dynamic dependencies : static dependencies can control the way rules are selected. If two rules can build a target but the first rule has a static dependency that cannot be built then the second rule will be tried. Dynamic dependencies cannot do that since once a rule is invoked it is considered to be definitively selected. Best, Daniel ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs
Re: [Caml-list] Odd performance result with HLVM
Jon Harrop a écrit : There are really two major advantages over the current ocamlopt design and both stem from the use of JIT compilation: . Run-time types allow per-type functions like generic pretty printers and comparison. . Monomorphisation during JIT compilation completely removes the performance cost of polymorphism, e.g. floats, tuples and records are never boxed. Do you mean that each polymorphic function is compiled into a different native piece of code each time it is called with different parameter types? How does the JIT'ed code size compare to ocamlopt'ed code size? - Florent ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs
Re: [Caml-list] Odd performance result with HLVM
On Monday 02 March 2009 14:28:23 Florent Ouchet wrote: Jon Harrop a écrit : There are really two major advantages over the current ocamlopt design and both stem from the use of JIT compilation: . Run-time types allow per-type functions like generic pretty printers and comparison. . Monomorphisation during JIT compilation completely removes the performance cost of polymorphism, e.g. floats, tuples and records are never boxed. Do you mean that each polymorphic function is compiled into a different native piece of code each time it is called with different parameter types? Yes. How does the JIT'ed code size compare to ocamlopt'ed code size? No idea. Without a front end I have only compiled the smallest pieces of test code so far, just to make sure that the functionality works. .NET does the same thing and it offers substantial performance improvements over OCaml for polymorphic code. Note that there is no reason to distinguish between reference types for they can all be treated equivalently with respect to instantiating polymorphic code. My type system is as follows: type t = [ `Unit | `Bool | `Int | `Float | `Struct of t list | `Array of t | `Function of t list * t | `Reference ] -- Dr Jon Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/?e ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs
Re: [Caml-list] The new OCaml book (Objective Caml Programming Language by Tim Rentsch)
Caml-list readers, I've now had an opportunity to catch up on the caml-list emails over the last month or so, and review those relating to my book The Objective Caml Programming Language. I see there's been a lot a speculation about what happened. To help clear things up, I've written a more detailed version of the history between Jason and myself, and our working together, and some related items that have happened since then. I may also reply later to specific emails on an individual basis, but for right now it seems best to send out just the history, and let the facts speak for themselves. I first met Jason Hickey in January 2004. Jason was teaching a class I was interested in; I introduced myself as a Caltech alum and asked if it would be okay if I sat in on his class. One of the course materials was Jason's Introduction to OCaml course notes, which I expect many or most of you have seen. A little bit later that year -- I think it was March, but it could have been February or possibly April -- I approached Jason and asked if he was interested in turning the course notes into a book and would he like my help with the publishing process. He said yes to both questions, and we started working together soon after that, continuing until early January 2007. Originally I was expecting to do some light (sentence level) editing, various mundane tasks related to finding a publisher, working with their production people, etc., and perhaps have a few discussions about organization of later chapters in the book. Over time that changed significantly, going on to include: developing outlines, keeping manuscript to-do lists, discussions about reorganization, original writing, paragraph-level editing, discussions about appropriate coding style, researching some of the more obscure corners of OCaml, paragraph- and section-level rewriting, developing exercises, writing answers to exercises, writing example OCaml code, and numerous small tasks related to text preparation. Between March 2004 and January 2007 I did all of these things as part of working with Jason to get a manuscript ready; I edited, wrote, or re-wrote, every part of the text, in most cases not once but several times. In the second half of 2006 Jason and I talked about publishers and we set out to find a suitable publisher. I know we discussed several, maybe four or five, but the only ones I definitely remember talking to were Springer and Cambridge University Press. I did most of the contact phoning/emailing with the Springer people, and Jason did most of the contact with the CUP people (of course Jason and I usually would send or forward copies of these emails to each other). In both sets of conversations I was identified as a co-author. In about mid-January 2007, as part of our trying to sign a publishing agreement with CUP, it became clear that there was a misunderstanding about what we thought had been communicated between us about what our internal arrangement would be (the we/us here being Jason and myself); although we had talked about what our arrangement would be a couple of times over the years, we'd never decided on any specific arrangement, not even informally. At that point we suspended working on the manuscript while we tried to find a way to reach a mutually acceptable agreement. Those negotiations continued for some time, as I recall about eight or ten weeks, but ultimately were not successful. After that, Jason decided to pursue an independent arrangement with Cambridge University Press on his own. Subsequently I decided to proceed with a book based on our unpublished joint work, or I might say starting with, because there was still a lot to be done before TOCPL was ready to be published. Jason was contacted by mail to ask about arrangements for him to receive half of any royalty payments, which he's entitled to since TOCPL is based on a joint work by the two of us. Jason wrote back and said he did not wish to be financially involved with my book. He also declined to be named as a co-author. He did ask for an acknowledgment, which is given right at the end of the Preface in TOCPL. Since our working together stopped in January 2007, I haven't looked at any writing on OCaml that Jason has done since then, including the online document that I have now seen referenced and is supposed to be under submission to Cambridge University Press. ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs
Re: [Caml-list] The new OCaml book (Objective Caml Programming Language by Tim Rentsch)
Tim -- thanks for clarification. I've bought the book at once when I saw it announced here, but now have second thoughts. From what you describe, it's clear to me that Jason is the originator of the book and you did the auxiliary tasks. Noe amount of calling up publishers can substitute for teaching a class at Caltech and distilling a teachable text out of it. Jason is known for OCaml software co-developed with his students, and I only found a few messages from you on this list. IMHO, if you didn't come to an arrangement, too bad for you; but it doesn't mean you can come up with other alternatives excluding Jason. I can imagine lots of folks working for publishers doing lots of technical assistance, but not asking for their name to be on a book. If there was a disagreement, you could have excluded any material based on Jason's notes, and started from scratch; but not at 2/3 of the book. As a friend of mine likes to say: I'm afraid you have to go see Dr. Toughshitsky about this. The era of self-publishing also shows that Amazon doesn't replace a publisher -- they don't check the rights and pedigrees of books as publishers used to. But they do have reviews where folks can say what they think of this situation. The pre-emptive self-publishing can't replace years of teaching and authorship -- the US legal system is good enough to sort this out and deliver justice, alas often after much agony and expense for all parties. I believe it's best for Tim to retract his book ASAP; otherwise it might be done by Jason and CUP via legal means. All of this is not helping OCaml. Overall, I can't help seeing that any author who isn't known on this list ends up with a questionable book -- first Smith and now Rentsch. Perhaps the elders should form a book vetting committee? As a heuristics, since the community is still rather small and coherent, the rule works -- if you can't grep much on the author in this list, ask questions! Cheers, Alexy ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs
Re: [Caml-list] The new OCaml book (Objective Caml Programming Language by Tim Rentsch)
Overall, I can't help seeing that any author who isn't known on this list ends up with a questionable book -- first Smith and now Rentsch. Perhaps the elders should form a book vetting committee? Well, the power to decide is in the hands of publishers (initially) and customers (later). But I can assure you that reputable publishing houses like Springer, Cambridge University Press or MIT Press do sollicit opinions from academics like me and take them into account. Their area editors attend major conferences like Principles of Programming Languages and it's always a pleasure to chat with them. But there isn't much that can be done with less reputable publishers and self-publishing, as Alexy remarked. Coming back to the Hickey/Rentsch book(s), I feel deeply sad about the mess that is unfolding on this list. I proofread a draft of Jason Hickey's book, at his request, and found it very good and just what the OCaml community is still missing: a well-written, English-language book on Caml appropriate both as a reference and as teaching material. (I'm not criticizing the other books in english on OCaml -- thanks God they exist! -- just noting that they don't quite fit this exact purpose.) What we now have is lawsuit material... I sincerely hope some kind of agreement can still be found at this point. - Xavier Leroy ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs
Re: [Caml-list] Odd performance result with HLVM
Jon Harrop a écrit : There are really two major advantages over the current ocamlopt design and both stem from the use of JIT compilation: . Run-time types allow per-type functions like generic pretty printers and comparison. . Monomorphisation during JIT compilation completely removes the performance cost of polymorphism, e.g. floats, tuples and records are never boxed. Do you mean that each polymorphic function is compiled into a different native piece of code each time it is called with different parameter types? How does the JIT'ed code size compare to ocamlopt'ed code size? Having done it, although not in a JIT but in your plain-old whole- project compiler, for my use cases the code size actually shrinks. The functions usually end up inlined and sometimes reduce to a few machine instructions. Most of the runtime library is written using polymorphic functions. Case in point: all sorts of string- processing functions which can take as arguments either strings stored in RAM or stored in ROM, and those data types are very much orthogonal on my platform. An invocation of a tail- recursive strlen reduces to about as many bytes of code than it'd take to push the arguments on the stack and call a non-polymorphic version of itself. That's how I initially got a statically typed LISP to compile for tiny 8 bit microcontrollers without using all of the whopping 1kb of RAM and 16kb of program flash on a Z8F162x device. Right now I'm hacking away to get rid of last traces of LISPiness and to get the project fully working in OCaml, using ML-like syntax for user code. I like it much better than LISP's. I have also found that by doing whole-project compilation with aggressive constant propagation and compile-time execution of functions that depend only on known constants, I could get rid of about 85% of LISP macros in my code. The other macros ended up being rewritten to just invoke ct_eval: string - function, which is a compile-time eval function. It's just like LISP macros, but since in ML family code isn't data, it was easier to just generate strings and feed them into compiler, rather than expose all of the AST machinery to userland. Cheers, Kuba ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs
Re: [Caml-list] The new OCaml book (Objective Caml Programming Language by Tim Rentsch)
On Monday 02 March 2009 18:37:41 Xavier Leroy wrote: Overall, I can't help seeing that any author who isn't known on this list ends up with a questionable book -- first Smith and now Rentsch. Perhaps the elders should form a book vetting committee? Well, the power to decide is in the hands of publishers (initially) and customers (later). But I can assure you that reputable publishing houses like Springer, Cambridge University Press or MIT Press do sollicit opinions from academics like me and take them into account. Their area editors attend major conferences like Principles of Programming Languages and it's always a pleasure to chat with them. But there isn't much that can be done with less reputable publishers and self-publishing, as Alexy remarked. I would advise against getting conventional publishers involved at all and would, instead, strongly advocate self-publishing because of the freedom and efficiency that it offers. Indeed, the only reason Jason Hickey's book has not been published is because CUP were challenged with the task. On a related note, why was the English translation of the book Developing applications with Objective Caml not published by O'Reilly? Coming back to the Hickey/Rentsch book(s), I feel deeply sad about the mess that is unfolding on this list. I proofread a draft of Jason Hickey's book, at his request, and found it very good and just what the OCaml community is still missing: a well-written, English-language book on Caml appropriate both as a reference and as teaching material. (I'm not criticizing the other books in english on OCaml -- thanks God they exist! -- just noting that they don't quite fit this exact purpose.) What we now have is lawsuit material... I sincerely hope some kind of agreement can still be found at this point. I see no reason for a lawsuit. Jason Hickey simply needs to remove Tim Rentsch's contributions, remove him from the acknowledgements and publish what's left. Given the size of the book, that will only take about a month. If he already signed copyright over to CUP then he also needs to make minimal changes to evade copyright infringement (which they will not attempt to enforce in the absence of any profits from sales anyway) and publish it elsewhere. Either way I see no reason why the OCaml community cannot benefit from yet another great book on OCaml in the near future. I agree that this text would also fill a valuable place in the spectrum of OCaml books. The contents are clearly ideal for students but would also give computer science graduates an extensive theoretical understanding of OCaml. -- Dr Jon Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/?e ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs