Re: [Caml-list] [ANN] Js_of_ocaml version 1.0
Jerome, Thank you, this sounds fantastic! One small question: could you expand on your last comment: On Dec 13, 2010, at 8:06 AM, Jerome Vouillon wrote: snip Ocamljs optimizes tail recursion, but this comes at a large performance cost. Do you mean all tail-calls come a large cost, or only those outside of plain tail-recursion? Either way, could you give us some more intuition as to why this happens, and why js_of_ocaml doesn't suffer from the same problem (assuming it applies to tail-recursion)? Thanks, Yitzhak - Yitzhak Mandelbaum ___ 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] Define parser and printer consistently
PADS/ML can do that for you, and more. You can find information about the PADS languages and tools here: http://www.padsproj.org including papers and a manual. The website doesn't have the most recent release of PADS/ML -- i plan to put it up on Github shortly -- but if you're interested, i'm happy to send you a tarball. The basic idea is that you specify your grammar as a type-like declaration. Then, pads/ml generates an AST, parser, printer and some more stuff for you. The generated parser is like a PEG parser, but with support context-sensitive parsing. That is, it is deterministic, with ordered choice; and, it is scannerless. So, the grammars-writing style has some significant differences from ocamllex and ocamlyacc. PADS/ML has an Eclipse license. Cheers, Yitzhak On Dec 8, 2010, at 11:47 PM, Dawid Toton wrote: I'm going to define a parser and a printer for a simple grammar. Is there a way to define both of them in a single construct using some existing OCaml tool? For example, I have a keyword function. The usual parser would contain a mapping like: function - `Function and the straightforward printer would do: `Function - function What is the best way to combine these definitions, so that duplication would be minimized? To be precise, avoiding duplication is not exactly what I need. I'm looking for something that would prevent making inconsistent changes to the parser and the printer. Dawid ___ 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 - Yitzhak Mandelbaum ___ 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] free, open-source version of OCaml grammar?
Basil, I agree that my reading might well be too restrictive. Indeed, if anyone who understands these matters well can clarify, I'd appreciate it. Regarding the issue of syntax -- true in principle, but the fact of the matter is that I started with the yacc grammar, not the reference manual. As an earlier thread on this list discussed [1], the manual is more of a guideline, then a specification. :-) Cheers, Yitzhak [1] http://caml.inria.fr/pub/ml-archives/caml-list/2008/06/b8d8bf2988e32db0cdb365037297996c.en.html On Feb 15, 2010, at 2:52 PM, Basile STARYNKEVITCH wrote: Yitzhak Mandelbaum wrote: Hi, I'd like to port the OCaml grammar to another parser generator. However, the grammar is covered under the Q Public License, and the terms of the license seem to require that the ported version only be distributed as a patch to the current YACC grammar. Given that I'm porting the grammar to serve as an example for a new parser generator, distributing it as an unreadable patch is quite impractical. I am not sure that the licence requires you to make it a patch, if the syntax of your grammar is sufficiently different. (for instance, to port it to ANTLR/PCCTS). But I am not a lawyer. If you intend to make a free software of your parser, perhaps the easiest way would be to ask kindly the Ocaml team? My feeling is that your understanding of Ocaml's licence is too restrictive, especially if you play the free software game. But I am not a lawyer! And a language syntax is not described by a yacc grammar, but by a human readable document. AFAIK, the Ocaml reference manual is not covered by QPL. Regards. -- Basile STARYNKEVITCH http://starynkevitch.net/Basile/ email: basileatstarynkevitchdotnet mobile: +33 6 8501 2359 8, rue de la Faiencerie, 92340 Bourg La Reine, France *** opinions {are only mines, sont seulement les miennes} *** - Yitzhak Mandelbaum ___ 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
[Caml-list] iPhone development
Hi, Back in May there was a brief discussion about developing for the iPhone in OCaml. Does anyone from that discussion, or anyone else, have any updates on the process/experience? Some specific questions: 1. Does anyone know of any open-source code that helps to interface OCaml with Cocoa? 2. In May, Jeff Scofield posted a patch to 3.10.2 for cross compiling to the arm processor. What about 3.11.x? Thanks in advance, Yitzhak - Yitzhak Mandelbaum ___ 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
[Caml-list] float array/record unboxing
hi, Does anyone know whether float arrays/records are unboxed if float is used to instantiate a type parameter? E.g. module F (R:sig type t end) = struct type foo = { a1 : R.t; b1 : R.t; } end module M = F(struct type t = float end) Is M.foo an unboxed array of floats (as per Chapter 18.3.2 in the manual) or not? Empirical evidence suggests that the floats *are* boxed. If this is the case, can anyone point me to where this feature is documented? Thanks, Yitzhak - Yitzhak Mandelbaum ___ 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
[Caml-list] batteries, godi and OS X leopard
Hi all, I'm having a compilation problem with batteries under godi, running OS X Leopard. Has anyone else encountered this? Any workarounds? I've tried manually compiling compilers.mli (works), but then when I rerun make it deletes all of the build directories as a first step, so I'm out of luck. Thanks, Yitzhak Here's the log from godi_console: + ocamlfind ocamlc -c -g -package findlib -I src/libs/compilers -I src -I src/main -I src/libs -I src/core -I src/libs/sexplib -I src/libs/ ocamlnet -I src/libs/findlib -I src/libs/common -I src/libs/camlzip -I src/core/extlib_threads -I src/core/extlib -I src/core/baselib_threads -I src/core/baselib -I buil d/optcomp -o src/libs/compilers/ compilers.cmo src/libs/compilers/compilers.ml File src/libs/compilers/compilers.ml, line 1, characters 0-1: Could not find the .cmi file for interface src/libs/compilers/ compilers.mli. Command exited with code 2. make[7]: *** [byte] Error 10 Error: Exec error: File /Users/yitzhakm/sw/godi/build/godi/godi- batteries/./. ./../mk/bsd.pkg.mk, line 1039: Command returned with non-zero exit code Error: Exec error: File /Users/yitzhakm/sw/godi/build/godi/godi- batteries/./. ./../mk/bsd.pkg.mk, line 1378: Command returned with non-zero exit code ### Error: Command fails with code 1: godi_console - Yitzhak Mandelbaum ___ 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] Re: Tim Rentsch The Abscissa Book
have posted. I encourage reviewers of _both_ books to report all the facts available to them, and for anyone who would recommend Jason's book to consider whether they want to be associated with the kind of intellectual dishonesty he has displayed in his postings here. ___ 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 - Yitzhak Mandelbaum ___ 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
[Caml-list] Boehm-Demers-Weiser and ocaml
Hi, Has anyone tried to interface ocaml code with C libraries which depend on the BDW garbage collector? If so, are there any pitfalls to be aware of? Note that I have a fair amount of experience interfacing with ordinary C code, I've just never tried to do so in the presence of the BDW gc. Thanks, Yitzhak - Yitzhak Mandelbaum ___ 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] What does Jane Street use/want for an IDE? What about you?
On Oct 20, 2008, at 11:56 AM, David Teller wrote: Just for the sake of bibliography, this reminds me of efuns [1] and Chamo [2]. [1] http://pauillac.inria.fr/cdrom/prog/unix/efuns/eng.htm [2] http://home.gna.org/cameleon/ Cheers, David Does anyone know the status of either of these projects? Are they still actively maintained? Yitzhak - Yitzhak Mandelbaum ___ 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] [camlp4] expr_of_string, string_of_expr functions exist?
I don't know about the new camlp4, but in the old one the code looked something like this (where my AST is a list of str_item-s): open Pcaml let ast_to_strings ast = List.map (function str_item - string_of pr_str_item str_item) ast --Yitzhak On Aug 5, 2008, at 12:04 PM, Richard Jones wrote: Maybe a simple question, but does camlp4 have functions to turn expr and patt AST structures to and from strings? Rich. -- Richard Jones Red Hat ___ 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 - Yitzhak Mandelbaum ___ 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