Hello
Here is the latest Caml Weekly News, for the week of September 24 to October 01, 2013.
Archive: https://sympa.inria.fr/sympa/arc/caml-list/2013-09/msg00326.html
Amir Chaudhry asked:I've just put up a blog post asking for feedback on the ocaml.org redesign [1]. I'm specifically interested in getting feedback on (1) the second iteration of the OCaml Logo and (2) the new design for ocaml.org. See the blog post for more information. We're tracking feedback via issues [2] and there are some known issues already listed there. [1] http://amirchaudhry.com/ocamlorg-request-for-feedback/ [2] https://github.com/ocamllabs/sandbox-ocaml.org/issues?state=open
Archive: https://sympa.inria.fr/sympa/arc/caml-list/2013-09/msg00329.html
Hendrik Tews announced:I would like to announce The Enhanced OCaml Documentation Version 4.01 available via http://www.askra.de/software/ocaml-doc/4.01 This version of the OCaml manual enhances the original html version in the following way: - Changes (wrt version 4.00) are tagged with icons and color - an additional appendix contains all grammar rules As always, the enhanced documentation reveals some points that have not been mentioned in the official 4.01 announcement from Damien Doligez. This time, the most important such point is that the documentation approves what long-term OCaml hackers have been using for years to improve their code. You can use an infix symbol as for-loop-variable: for (+) = ... to ... do ... done will (mostly) word as (un)expected! ;-)
Archive: https://sympa.inria.fr/sympa/arc/caml-list/2013-09/msg00330.html
Daniel Bünzli announced:It's my pleasure to announce the first releases of: * Gg, a module providing basic types for computer graphics * Vg, a declarative 2D vector graphics library. More on these and their aim at the end of the message. My thanks to Edwin Török who contributed the color conversion functions in Gg and helped with color science questions. Besides, while I can trace my work on Vg to at least 2008 it would still remain unreleased without the sponsorship of both Citrix Systems R&D and OCaml Labs. Many thanks to them and to the inspiring OCaml Cambridgian atmosphere. Comments are welcome, Daniel # Note on installing Once opam 1.1 is released, the packages will be in opam's repository and can be installed with: opam install gg vg # (SVG renderer only) opam install gg uutf otfm js_of_ocaml vg # (all renderers). If you are eager to use the software and have the opam 1.1 beta installed you can get them through my unreleased software repo: opam repo add erratique-u http://erratique.ch/software/opam/unreleased opam upgrade opam install gg uutf otfm js_of_ocaml vg these packages will be removed from erratique-u once they are in the opam repository. # Gg Gg is an OCaml module providing basic types for computer graphics. It defines types and functions for floats, vectors, points, sizes, matrices, quaternions, axis-aligned boxes, colors, color spaces, and raster data. Gg is made of a single, independent, module and distributed under the BSD3 license. The aim of Gg is to provide an efficient, immutable, C friendly, type infrastructure for computer graphics programming. It's neither a general purpose linear algebra package nor a computational geometry library. I hope it can serve as a minimal common ground for other graphics libraries to exchange data without having to depend on each other. From an API point of view the library is considered mostly complete. The only thing that could still change significantly is the support for representing raster data (Gg.raster), in any case, consult the documentation which clarifies what may still change. Home page: http://erratique.ch/software/gg Documentation: http://erratique.ch/software/gg/doc/Gg github: https://github.com/dbuenzli/gg # Vg Vg is an OCaml module for declarative 2D vector graphics. In Vg, images are values that denote functions mapping points of the cartesian plane to colors. The module provides combinators to define and compose these values. Renderers for PDF, SVG and the HTML canvas are distributed with the module. An API allows to implement new renderers. Vg depends only on Gg. The SVG renderer has no dependency, the PDF renderer depends on Uutf and Otfm, the HTML canvas renderer depends on js_of_ocaml. Vg and its renderers are distributed under the BSD3 license. The aim of Vg is to provide a low-level, declarative, composable and semantically precise vector graphics abstraction that can be used with multiple rendering backends. Vg is made of pure OCaml code and is thus easy to install wherever the compiler decided to bring you. The basics section of the documentation can be read as tutorial introduction: http://erratique.ch/software/vg/doc/Vg#basics The distribution has a database of sample images that serve both as a test suite to compare the output of different rendering backends and as a learning tool to see how images are defined in Vg. Thanks to js_of_ocaml it can be browsed online here: http://erratique.ch/software/vg/demos/rhtmlc.html You can get to the definition of an image by clicking on the image's title. From an API point of view the library is not expected to change much; in any case the documentation clarifies what may still change. In the future besides general backend improvements and support for a raster image primitive, plans for the library include a pure software rasterizer backend, an OpenGL backend and other needed improvements around text rendering. Take care to consult the backends documentation to be aware of their current limitations. Do not hesitate to bug me if a particular limitation is important to you as it may help me to direct my efforts. Home page: http://erratique.ch/software/vg Documentation: http://erratique.ch/software/vg/doc/ github: https://github.com/dbuenzli/vg
Archive: https://sympa.inria.fr/sympa/arc/caml-list/2013-09/msg00335.html
Hendrik Tews announced:I updated otags to OCaml 4.01. You can find it at the usual place http://askra.de/software/otags/ under the usual license GPL v3. Otags reloaded generates tags tables for emacs and vi/vim. Because of OCaml bug #6175, otags will die on sources containing the new open! keyword. Because of this bug I highly recommend everybody to upgrade otags as soon as you start using an OCaml version that fixes #6175.
Archive: https://sympa.inria.fr/sympa/arc/caml-list/2013-09/msg00350.html
Fabrice Le Fessant announced:A short message in French, to give the program of the next OCaml-Paris meetup, on Wednesday,Octobre 9, at 19:30 at IRILL : La prochaine rencontre du Meetup OCaml-Paris (OUPS) aura lieu le mercredi 9 octobre à l'IRILL, comme d'habitude. Au programme, à partir de 19h30 : * Romain Bardou : "Procord: une librairie portable pour déléguer des calculs à d’autres processus" * Xavier Clerc : "Nouveautés dans OCamlJava" * Jane Street : "Jenga: towards a correct and scalable build system" * Adrien Nader : "Mieux comprendre et utiliser le binding LablGTK" Nous aurons cette fois deux sponsors pour le pot qui suivra, Jane Street et Lexifi ! Inscrivez-vous nombreux ! http://www.meetup.com/ocaml-paris/events/140667882/
Archive: https://sympa.inria.fr/sympa/arc/caml-list/2013-09/msg00388.html
Malcolm Matalka asked and Anil Madhavapeddy replied:> This might be a really trivial question but perusing the js_of_ocaml > website I didn't see it answered: > > Has anyone gone about embedding js_of_ocaml in an ocaml application? > Specifically, I want ship a binary that runs a small embedded webserver > and provides the GUI over that. The obvious solution is just to add > building the js_of_ocaml output in the build process then make a fake > module that just has a string with the output in it and compile that in. > Hacky but I don't see why it wouldn't work but I'm sure somebody has a > clever idea out there. 'crunch' from OPAM will do what you want: $ opam search crunch Available packages for system: crunch -- Convert a filesystem into a static OCaml module (let me know if there's anything in there that's Mirage specific and I'll fix it). I believe 'ocamlify' also does the same thing from OASIS, but I've not used it. $ opam search ocamlify Available packages for system: ocamlify 0.0.1 Include files in OCaml code
Archive: https://sympa.inria.fr/sympa/arc/caml-list/2013-09/msg00395.html
Sylvain Le Gall announced:After 1.5 month of work, I am proud to officialy release OUnit 2.0.0. This is a major rewrite of OUnit to include various features that I think was missing from OUnit1. The very good news is that the port of the OASIS test suite has proven that this new version of OUnit can drastically improve the running time of a test suite. You can download it here: http://forge.ocamlcore.org/frs/download.php/1258/ounit-2.0.0.tar.gz I have written a full blog post about this new version: http://le-gall.net/sylvain+violaine/blog/index.php?post/2013/09/29/OUnit-2.0%2C-official-release One of the best news, is that using the runner "processes" (fork process to run test), I was able to achieve a linear speedup for the test running time (4x lower when running with 4 shards).Sylvain Le Gall later added:
FTR, OPAM package is available and I forget to include a short description of what OUnit is about: OUnit is a unit test framework for OCaml. It allows one to easily create unit-tests for OCaml code. It is based on HUnit, a unit testing framework for Haskell. It is similar to JUnit, and other XUnit testing frameworks.Francois Berenger also added:
The excellent OUnit is used by qtest: http://batteries.vhugot.com/qtest/ The tool of choice to write tests as comments in your OCaml code. This is used a lot in batteries' source code.
Archive: https://sympa.inria.fr/sympa/arc/caml-list/2013-09/msg00344.html
Tom Ridge asked and Xavier Leroy replied (there was much discussion about concurrency vs parallelism in this thread):> I have a little program which creates a thread, and then sits in a loop: > > -- > > let f () = > let _ = ignore (print_endline "3") in > let _ = ignore (print_endline "hello") in > let _ = ignore (print_endline "4") in > () > > let main () = > let _ = ignore (print_endline "1") in > let t = Thread.create f () in > (* let _ = Thread.join t in *) > let _ = ignore (print_endline "2") in > while true do > flush stdout; > done > > let _ = main () > > -- > > I compile the program with the following Makefile clause: > > test.byte: test.ml FORCE > ocamlc -o $@ -thread unix.cma threads.cma $< > > When I run the program I get the output: > > 1 > 2 > > and the program then sits in the loop. On my machine (OCaml 4.01.0, Ubuntu 12.04 LTS), I sometimes see what you see, and sometimes I see the expected output: 1 2 3 hello 4 It all depends on the whim of the OS scheduler. OCaml has no control over it. And you shoudn't expect any kind of fairness from the OS scheduler, esp. Linux's, which gladly jettisons any pretense of fairness in the hope of getting better throughput. > Would it be fair to say that OCaml does not currently support > pre-emptively scheduled threads? This would be inexact. OCaml's threads yield the runtime lock, giving other threads a chance to grab it and run, in the following cases: 1- when performing an I/O operation that may block or take a long time ("flush" in your example) 2- when the program calls Thread.yield (duh) 3- when a timer interrupt is detected at certain program points: 3a- for native-code compilation: minor heap allocations 3b- for bytecode compilation: function calls + beginning of every loop iteration. What happens after yielding is the business of the OS scheduler, though. > I should be using a message passing interface written in some other > language, with bindings to OCaml. You have plenty of options depending on what you really need in the end: - For parallelism (getting speedups from a sequential program), consider the Parmap and Functory libraries. - For concurrency with message passing and possible distribution, consider JoCaml. - If you want to write your own message-passing library and want to control every bit of the scheduling, LWT (lightweight cooperative threads) is probably best. - You can also use system threads, but only if you give up on any hope of fairness and write in a style that is resistant against whatever awful scheduling the OS will do for you.
Archive: https://sympa.inria.fr/sympa/arc/caml-list/2013-09/msg00422.html
Amandine Roy announced:Esterel Technologies is looking for a software developer with experience in physical system modeling language or tool like Simulink/stateflow, Modelica, Simplorer, FMI, etc. A background on differential equations system solvers, ODEs and DAEs, will be highly appreciated. The position belongs to the Esterel team in charge of developing safety critical qualified compilers and development tools. The development uses mainly Objective Caml. Don't hesitate to send me your resume: Amandine ROY - HR Manager scade-jobs@esterel-technologies.com Link to our web site: http://www.esterel-technologies.com/about-us/careers/jobs/rd-ingenieur-compilation-simulation/
Archive: https://sympa.inria.fr/sympa/arc/caml-list/2013-09/msg00376.html
Deep in this thread, Gabriel Scherer said:This thread may be a good opportunity to advertize for some work on static program verification that has been applied to OCaml (sadly, it is actually quite rare to see program verification efforts for functional programming languages, in large part because funding bodies and reviewers appreciate applications to mainstream language with larger codebases). I am aware of the following, feel free to add more suggestions: - MoCHi http://www-kb.is.s.u-tokyo.ac.jp/~ryosuke/mochi/ Based on foundational work on model-checking of higher-order programs by Ong, Kobayashi and others (see the citations of the papers on the webpage), MoCHi can work with a subset of OCaml. It is not ready to handle real-world programs, both in term of verification time and the ocaml feature it understands, but going in the right direction -- and the underlying tools are rapidly improving, see e.g. the recent work on C-SHORe - Hybrid Contract Checking for OCaml, by Dana Xu http://gallium.inria.fr/~naxu/research/hcc.html (I previosuly mentioned on this list the available prototype that extends OCaml with dynamic contract checking) Another brand of work making good progress is the "Liquid Types" project in San Diego ( http://goto.ucsd.edu/~rjhala/liquid/haskell/blog/about/ ), which are working on applications to Haskell. Note that those tools are generally aimed at checking that programs respect some safety condition (eg. "does not end in an assertion failure"), not general specifications or general equivalence checking. You may consider encoding general equivalence checking in these term (traverse the input space and assert that the output of both functions are equivalent), but I don't know if the tools can handle the encoding efficiently. If you want full functional correctness for higher-order programs, rather than automated safety checkers, I would probably rather look at proof-assistant frameworks (eg. Ynot http://ynot.cs.harvard.edu/ or CFML http://www.chargueraud.org/softs/cfml/ ).
Archive: https://sympa.inria.fr/sympa/arc/caml-list/2013-10/msg00006.html
Jacques Garrigue announced:With a small ICFP induced delay, here comes LablGtk 2.18.0, the latest release of the OCaml interface to the Gtk+ GUI library and friends (gtkglarea, glade, rsvg, gnomecanvas, gnomedruid, panel, gtkspell and gtksourceview2.) It includes a number of API additions and bug fixes. You can find it at: http://lablgtk.forge.ocamlcore.org/ A binary release for windows is included, using OCaml 4.01. Many people contributed to this release, see the commit log for all their names. Together comes LablGL 1.05, the well-typed interface to OpenGL. It can be used in combination with either LablTk (using Togl), LablGtk (using gtkglarea), and Glut. It also comes with windows binaries. Note that this is only a bug fix and compatibility release. More ambitious development was committed to the multitex branch by Didier Cassirame, and you can access it through the git repository. http://www.math.nagoya-u.ac.jp/~garrigue/soft/olabl/lablgl.html https://forge.ocamlcore.org/projects/lablgl/ Changes since LablGtk 2.16.0: ----------------------------- 2013.10.01 [Jacques] * prepare release * update applications for 4.01 * various fixes in windows port 2013.9.17 [Jacques] * add some GTK enumerations and update stock icon list * add properties GtkTreeView.enable_{tree,grid}_lines * add properties GtkEntry.{primary,secondary}_icon_{stock,name,pixbuf}, see examples/entry2.ml for usage 2013.7.29 [Pierre-Marie] * add tags in GtkMovementStep 2013.2.19 [Jacques] * fix compatibility with ocaml 4.01 (?lab for non-optional arguments) 2012.08.26 [Pierre-Marie] * add handling of new modifiers 2012.08.26 [Jacques] * detect findlib during configuration * support DESTDIR with findlib-install 2012.08.26 [Jacques] * indicate that only old-install supports DESTDIR * have old-install copy the META file too * cleanup the two phases of findlib-install Changes since LablGL 1.05: -------------------------- 2013-09-20: * make it work with the OCaml 4.01 windows installer (both lablglut and togl) 2013-09-11: * add configuration file for Ubuntu 2012-10-18: * allow building with make -j 2012-06-05: * switch to Togl 1.7, doesn't need Tk internals anymore 2012-03-06: * add `bgr and `bgra to Gl.format and GlTex.format (reported by Vu Ngoc San) 2010-06-16: * fix Glut.special_of_int to raise no exception (reported by malc) 2010-03-11: * merge glShader support by Florent Monnier
Archive: https://sympa.inria.fr/sympa/arc/caml-list/2013-10/msg00010.html
Daniel Bünzli announced:Unicode 6.3.0 having been released yesterday it's my pleasure to announce that the following modules have been updated to support the latest version of the standard: # Uucd 1.0.0, Unicode character database decoder for OCaml. This is a major release as new cases where introduced in some of the database's enumerants. Home page: http://erratique.ch/software/uucd Release notes: https://github.com/dbuenzli/uucd/blob/master/CHANGES.md # Uunf 0.9.2, Unicode text normalization for OCaml Minor release, updates the internal data structures to support the new characters introduced in Unicode 6.3.0 Home page: http://erratique.ch/software/uunf Release notes: https://github.com/dbuenzli/uunf/blob/master/CHANGES.md They will be available in opam as soon as opam 1.1 is out.
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.ocaml.org/. OUnit 2.0, official release: http://le-gall.net/sylvain+violaine/blog/index.php?post/2013/09/29/OUnit-2.0%2C-official-release Test your OCaml packages in minutes using Travis CI: http://anil.recoil.org/2013/09/30/travis-and-ocaml.html CCSS 1.4 released: https://forge.ocamlcore.org/forum/forum.php?forum_id=886 OCaml tutorial videos now available: http://ocaml-book.com/blog/2013/9/27/ocaml-tutorial-videos-now-available OUnit 2.0 progress, September 2013: http://le-gall.net/sylvain+violaine/blog/index.php?post/2013/09/25/OUnit-2.0-progress%2C-September-2013 Gg 0.8.0 and Vg 0.8.0: http://erratique.ch/software Feedback requested on the OCaml.org redesign: http://amirchaudhry.com/ocamlorg-request-for-feedback
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.