Hello
Here is the latest Caml Weekly News, for the week of June 14 to 21, 2011.
Archive: https://sympa-roc.inria.fr/wws/arc/caml-list/2011-06/msg00072.html
Damien Doligez announced:Dear OCaml users, The release of OCaml version 3.12.1 is imminent. We have created a release candidate for your testing pleasure. Please download the sources, compile, install, and test your favourite software with it. Then let me know what happened, one way or the other. We want to know about any show-stopping bugs, especially in the compilation and installation phases. This release candidate is available as source code at this address: http://caml.inria.fr/pub/distrib/ocaml-3.12/ Happy hacking, -- Damien Doligez for the OCaml team. Objective Caml 3.12.1: ---------------------- Bug fixes: - PR#4345, PR#4767: problems with camlp4 printing of float values - PR#4380: ocamlbuild should not use tput on windows - PR#4487, PR#5164: multiple 'module type of' are incompatible - PR#4552: ocamlbuild does not create symlinks when using '.itarget' file - PR#4673, PR#5144: camlp4 fails on object copy syntax - PR#4702: system threads: cleanup tick thread at exit - PR#4732: camlp4 rejects polymorphic variants using keywords from macros - PR#4778: Win32/MSVC port: rare syntax error in generated MASM assembly file - PR#4794, PR#4959: call annotations not generated by ocamlopt - PR#4820: revised syntax pretty printer crashes with 'Stack_overflow' - PR#4928: wrong printing of classes and class types by camlp4 - PR#4939: camlp4 rejects patterns of the '?x:_' form - PR#4967: ocamlbuild passes wrong switches to ocamldep through menhir - PR#4972: mkcamlp4 does not include 'dynlink.cma' - PR#5039: ocamlbuild should use '-linkpkg' only when linking programs - PR#5066: ocamldoc: add -charset option used in html generator - PR#5069: fcntl() in caml_sys_open may block, do it within blocking section - PR#5071, PR#5129, PR#5134: inconsistencies between camlp4 and camlp4* binaries - PR#5080, PR#5104: regression in type constructor handling by camlp4 - PR#5090: bad interaction between toplevel and camlp4 - PR#5095: ocamlbuild ignores some tags when building bytecode objects - PR#5100: ocamlbuild always rebuilds a 'cmxs' file - PR#5103: build and install objinfo when building with ocamlbuild - PR#5109: crash when a parser calls a lexer that calls another parser - PR#5110: invalid module name when using optional argument - PR#5115: bytecode executables produced by msvc64 port crash on 32-bit versions - PR#5117: bigarray: wrong function name without HAS_MMAP; missing include - PR#5118: Camlp4o and integer literals - PR#5122: camlp4 rejects lowercase identifiers for module types - PR#5123: shift_right_big_int returns a wrong zero - PR#5124: substitution inside a signature leads to odd printing - PR#5128: typo in 'Camlp4ListComprehension' syntax extension - PR#5136: obsolete function used in emacs mode - PR#5145: ocamldoc: missing html escapes - PR#5146: problem with spaces in multi-line string constants - PR#5149: (partial) various documentation problems - PR#5156: rare compiler crash with objects - PR#5165: ocamlbuild does not pass '-thread' option to ocamlfind - PR#5167: camlp4r loops when printing package type - PR#5172: camlp4 support for 'module type of' construct - PR#5175: in bigarray accesses, make sure bigarray expr is evaluated only once - PR#5177: Gc.compact implies Gc.full_major - PR#5182: use bytecode version of ocamldoc to generate man pages - PR#5184: under Windows, alignment issue with bigarrays mapped from files - PR#5188: double-free corruption in bytecode system threads - PR#5192: mismatch between words and bytes in interpreting max_young_wosize - PR#5202: error in documentation of atan2 - PR#5209: natdynlink incorrectly detected on BSD systems - PR#5213: ocamlbuild should pass '-rectypes' to ocamldoc when needed - PR#5217: ocamlfind plugin should add '-linkpkg' for toplevel - PR#5228: document the exceptions raised by functions in 'Filename' - PR#5229: typo in build script ('TAG_LINE' vs 'TAGLINE') - PR#5230: error in documentation of Scanf.Scanning.open_in - PR#5234: option -shared reverses order of -cclib options - PR#5237: incorrect .size directives generated for x86-32 and x86-64 - PR#5244: String.compare uses polymorphic compare_val (regression of PR#4194) - PR#5248: regression introduced while fixing PR#5118 - PR#5252: typo in docs - PR#5258: win32unix: unix fd leak under windows - PR#5269: (tentative fix) Wrong ext_ref entries in .annot files - PR#5272: caml.el doesn't recognize downto as a keyword - PR#5276: issue with ocamlc -pack and recursively-packed modules - PR#5280: alignment constraints incorrectly autodetected on MIPS 32 - PR#5281: typo in error message - camlp4 revised syntax printing bug in the toplevel (reported on caml-list) - configure: do not define _WIN32 under cygwin - Hardened generic comparison in the case where two custom blocks are compared and have different sets of custom operations. - Hardened comparison between bigarrays in the case where the two bigarrays have different kinds. - Fixed wrong autodetection of expm1() and log1p(). - don't add .exe suffix when installing the ocamlmktop shell script - ocamldoc: minor fixes related to the display of ocamldoc options - fixed bug with huge values in OCAMLRUNPARAM - mismatch between declaration and definition of caml_major_collection_slice Feature wishes: - PR#4992: added '-ml-synonym' and '-mli-synonym' options to ocamldep - PR#5065: added '-ocamldoc' option to ocamlbuild - PR#5139: added possibility to add options to ocamlbuild - PR#5158: added access to current camlp4 parsers and printers - PR#5180: improved instruction selection for float operations on amd64 - stdlib: added a 'usage_string' function to Arg - allow with constraints to add a type equation to a datatype definition - ocamldoc: allow to merge '@before' tags like other ones - ocamlbuild: allow dependency on file "_oasis" Other changes: - Changed default minor heap size from 32k to 256k words. - Added new operation 'compare_ext' to custom blocks, called when comparing a custom block value with an unboxed integer.
Archive: https://sympa-roc.inria.fr/wws/arc/caml-list/2011-06/msg00073.html
Damien Doligez announced (patches may be found at the link):OCaml 3.12.1 Compatibility Report I have compiled the following software with the latest release candidate of OCaml (3.12.1+rc1). See below for a list of what I had to patch to get these to compile. The packages I had to patch are marked here with a * * advi-1.9.0.tar.gz alt-ergo-0.93.tar.gz bin_prot-1.3.1.tar.gz * boomerang-0.2-source.tar.gz * cameleon-1.9.21.tar.gz * camlimages-4.0.0.tar.bz2 camomile-0.8.2.tar.bz2 camlp5-6.02.2.tgz * camlzip-1.04.tar.gz config-file-1.0.tar.gz coq-8.3pl2.tar.gz core-0.7.0.tar.gz core_extended-0.7.0.tar.gz cryptokit-1.4.tar.gz extlib-1.5.1.tar.gz fieldslib-0.1.2.tar.gz findlib-1.2.7.tar.gz frama-c-Carbon-20110201.tar.gz * hevea-1.10.tar.gz lablgtk-2.14.2.tar.gz * lablgtkextras-1.0.tar.gz lwt-2.3.0.tar.gz menhir-20110201.tar.gz * oasis-0.2.0.tar.gz * obrowser-1.1.tar.gz * ocaml-data-notation-0.0.3.tar.gz ocaml-expect-0.0.2.tar.gz * ocaml-fileutils-0.4.2.tar.gz ocaml-mysql-1.0.4.tar.gz ocaml-sqlite3-release-1.6.1.tar.gz ocaml-ssl-0.4.5.tar.gz ocaml-text-0.4.tar.gz ocamlgraph-1.7.tar.gz ocamlify-0.0.1.tar.gz ocamlnet-3.2.1.tar.gz ocgi-0.5.tar.gz ocsigen-1.3.4.tar.gz * omake-0.9.8.6-0.rc1.tar.gz ounit-1.1.0.tar.gz pcre-ocaml-release-6.2.2.tar.gz react-0.9.2.tbz res-release-3.2.0.tar.gz sexplib-5.2.1.tar.gz sks-1.1.1.tgz type-conv-2.3.0.tar.gz unison-2.40.63.tar.gz * vsyml-2010-04-06.tar.gz * xml-light-2.2.zip zen_2.3.2.tar.gz ----------------------------------------------------------- This is what I had to patch because of problems unrelated to 3.12.1: advi: 2 lines Change Makefile to link with graphics and lablgtk boomerang: 1 line Change Makefile to remove "doc" from subdirs cameleon: 5 lines Change ed_main.ml to remove call to GtkThread.set_do_jobs_delay Change checkocaml.ml: detection of lablgtkextras depends on xml-light configuration camlimages: 15 lines Add oPng.mli and oJpeg.mli Change META file to add archives camlimages.cma and .cmxa (neeed for advi) camlzip: 10 lines Change Makefile to configure the location of libz.a Add a META file for findlib hevea: 2 lines Change hevea.ml to remove target file in case of error Change Makefile to pass LIBDIR and LATEXLIBDIR to install script lablgtkextras: 40 lines Change checkocaml.ml and Makefiles to detect where is xml-light installed (see xml-light below) oasis: 8 lines Change setup.ml to handle OCaml version numbers with a + suffix obrowser-1.1: 13 lines Change in Makefile to add .PHONY annotation to AXO (my filesystem is case-insensitive, so AXO interferes with axo). Update pervasives.ml and pervasives.mli to reflect OCaml changes since 3.11.1 ocaml-data-notation: 3 lines Change in Makefile to follow name change of "type-conv.syntax" to "type-conv" Changes in pa_odn.ml to remove extraneous occurrences "_loc" ocaml-fileutils: 2 lines Changes in Makefile to remove use of non-portable "install -t" omake: 1 line Change in OMakefiles to remove "-warn-error A" Note: DO NOT use "-warn-error A" in released code. vsyml: 4 lines Changes in Makefile to remove non-portable "echo -n" xml-light: 3 lines Changes in Makefile to install in a subdirectory of .../lib/ocaml This is needed because xml-light exports xml.cmi and ocsigen has a file xML.mli. These conflict because my filesystem is case-insensitive.Sylvain Le Gall replied:
> oasis: 8 lines > Change setup.ml to handle OCaml version numbers with a + suffix > Fixed in oasis 0.2.1~alpha1 > ocaml-data-notation: 3 lines > Change in Makefile to follow name change of "type-conv.syntax" to "type-c= > onv" Fixed in ocaml-data-notation 0.0.5 > Changes in pa_odn.ml to remove extraneous occurrences "_loc" Probably fixed in 0.0.5 > > ocaml-fileutils: 2 lines > Changes in Makefile to remove use of non-portable "install -t" > Fixed in ocaml-fileutils 0.4.3Stéphane Glondu replied:
Very nice! As far as Debian is concerned, basically all packages currently in unstable (with type-conv and its reverse dependencies taken from testing) compile with no changes. The resulting binary packages are available at: http://ocaml.debian.net/debian/ocaml-3.12.1%2Brc1/
Archive: https://sympa-roc.inria.fr/wws/arc/caml-list/2011-06/msg00081.html
Kaustuv Chaudhuri announced:The Parsifal research team at INRIA Saclay and the Ecole Polytechnique has an open call for one junior engineer position (2 years). The main task of the recruited engineer will be to work on the integration and further development of a number of computational logic systems designed and built by the team members in recent years. Some tasks involved are: - Designing and implementing a common formal framework for communication between the Abella proof assistant, the Bedwyr symbolic model checker, and the Tac inductive theorem prover. - Using the Teyjus implementation of the Lambda Prolog programming language to represent and animate logical specifications of deductive and computational systems. - Investigating a number of application domains including the formal meta-theory of computational systems (programming languages, process calculi, etc.), and the use of formal proofs as certificates (eg. proof-carrying code, marketplace of proofs). Candidates should have a bachelor's degree in computer science, be familiar with the OCaml programming language (or similar high-level programming languages), and have a background in logic, formal methods, and symbolic computing. As this engineer will work with a team of international researchers, the candidate should be fluent in English. Knowledge of French is desirable but not mandatory. The position should begin in October 2011. Interested candidates are encouraged to contact the following people: Dale Miller <dale.miller AT inria.fr>. Kaustuv Chaudhuri <kaustuv.chaudhuri AT inria.fr> Some links: Official announcements: http://www.lix.polytechnique.fr/parsifal/dokuwiki/doku.php?id=engineer http://en.inria.fr/institute/recruitment/offers/young-graduate-engineers Parsifal team web page: http://www.lix.polytechnique.fr/parsifal/ System descriptions: Bedwyr http://slimmer.gforge.inria.fr/bedwyr/ Abella http://abella.cs.umn.edu/ Tac http://slimmer.gforge.inria.fr/tac/ Teyjus http://teyjus.cs.umn.edu/
Archive: https://sympa-roc.inria.fr/wws/arc/caml-list/2011-06/msg00084.html
Dmitry Grebeniuk asked and Jacques Garrigue replied:> I need to create two functions that share common state, and I want to > create this common state once per program run, and I want to make each > function call very cheap. When I'm doing it naively, I get "value > restriction": > > $ ocaml > # #use "topfind";; > # #camlp4r;; > # type func 'a 'r = string -> ('a -> 'r) -> 'r; > type func 'a 'b = string -> ('a -> 'b) -> 'b > # value mkpair1 from_string = > (* some common values here *) > ( fun s f -> try f (from_string s) with [e -> failwith "mkpair1"] > , fun s f -> try f (Some (from_string s)) with [e -> f None] > ); > value mkpair1 : > ('a -> 'b) -> ('a -> ('b -> 'c) -> 'c * 'a -> (option 'b -> 'd) -> 'd) = > <fun> > # value identity x = x; > value identity : 'a -> 'a = <fun> > # value (id11, id12) = mkpair1 identity; > value id11 : '_a -> ('_a -> '_b) -> '_b = <fun> > value id12 : '_a -> (option '_a -> '_b) -> '_b = <fun> > > But I've found a trick that uses rank-2 polymorphism of record fields: > > # type pair 'a 'b = > { notnull : !'r . func 'a 'r > ; nullable : !'r . func (option 'a) 'r > }; > type pair 'a 'b = > { notnull : !'c. func 'a 'c; nullable : !'d. func (option 'a) 'd } > # value mkpair2 from_string = > (* some common values here *) > { notnull = fun s f -> try f (from_string s) with [e -> failwith "mkpair2"] > ; nullable = fun s f -> try f (Some (from_string s)) with [e -> f None] > }; > value mkpair2 : (string -> 'a) -> pair 'a 'b = <fun> > # value { notnull = id21 ; nullable = id22 } = mkpair2 identity; > value id21 : func string 'a = <fun> > value id22 : func (option string) 'a = <fun> > # > > And everything seems to work: the record is created once, then > it is "decomposed" to id21 and id22 functions (either right after its > creation or on each call, it should be cheap anyway). But I don't > know whether this solution is correct and will it remain correct in > future versions of OCaml -- can you help me here? I'm not sure I understand the details of all you are trying do, but there is no plan to remove polymorphic record fields from the language, so you can use this feature safely. (Strictly speaking, this is a language extension, so there may be some changes in the future, but there is nothing planned) Since 3.12, an alternative approach which should be just as cheap is to use a first class module. This is a bit more verbose. module type Pair = sig type t val notnull : (t,'r) func val nullable : (t option, 'r) func end let mkpair (type a) from_string = (module struct type t = a let notnull s f = try f (from_string s) with e -> failwith "mkpair" let nullable s f = try f (Some (from_string s)) with e -> f None end : Pair with type t = a) module M = (val (mkpair (fun x -> x)) : Pair with type t = string) let id31 = M.notnull let id32 = M.nullable
Thanks to Alp Mestan, we now include in the Caml Weekly News the links to the recent posts from the ocamlcore planet blog at http://planet.ocamlcore.org/. Turning dynamic web programming on it's head: declarative dynamic html with heist: http://blog.dbpatterson.com/post/6736312764 mleternal 0.2 released: https://forge.ocamlcore.org/forum/forum.php?forum_id=796 Back From IFIP SEC 2011: http://seb.mondet.org/blog/post/ifip-sec-2011.html Constructive gem: an injection from Baire space to natural numbers: http://math.andrej.com/2011/06/15/constructive-gem-an-injection-from-baire-space-to-natural-numbers/
If you happen to miss a CWN, you can send me a message and I'll mail it to you, or go take a look at the archive or the RSS feed of the archives.
If you also wish to receive it every week by mail, you may subscribe online.