Previous week Up Next week

Hello

Here is the latest Caml Weekly News, for the week of August 14 to 21, 2012.

  1. OCaml-Java 2.0 preview: call for testers
  2. Companies using OCaml
  3. Other Caml News

OCaml-Java 2.0 preview: call for testers

Archive: https://sympa.inria.fr/sympa/arc/caml-list/2012-08/msg00095.html

Continuing this previous thread, Xavier Clerc said:
> Tried this out on Windows under cygwin and had a couple of problems.
> CCing caml-list in case anybody else has run into similar.
> 
> 1) There's some special code in bin/common to check for cygwin and use
> cygpath to convert JAVA_HOME to a UNIX-style path. That works...
> except in the case that there's a space in the path (which there
> almost certainly is on Windows). Each of the scripts (bin/ocaml
> bin/ocamljava, etc.) should use "$OCJ_JAVA" instead of $OCJ_JAVA (that
> is: quote the variable so that spaces aren't interpreted as separate
> tokens). With this change, the scripts call Java correctly.
> 
> 1a) It might be appropriate to see if "java" is on the path and try to
> use that if JAVA_HOME is not set (as it was not on my machine). The
> batch files appear to do this already (and quote %OCJ_JAVA%, as well.)
> 
> 2) With that change, ocamljava still didn't run right away. It
> appears to be because it's trying to parse the CLASSPATH environment
> variable, but it's using UNIX rules to do so. Since I don't know
> what's going on inside, I can't say exactly why, but I can report the
> error message:
> 
> File "test.ml", line 1, characters 0-1:
> Error: Classpath error: ".;C" does not exist
> 
> (This happens with whatever input is provided to ocamljava.)
> 
> Two things here:
> 
> 2a) It's interpreting the CLASSPATH as using : as a separator, whereas
> it's actually using ; as a separator. So, it sees ".;C:\..." and
> thinks the first segment is ".;C"
> 
> 2b) Even though it's interpreting the CLASSPATH wrong, it probably
> still should not be an error for the CLASSPATH to contain paths that
> do not exist. Those should be ignored, rather than triggering an
> error.

Thanks for your detailed report. I have fixed all these issues, and
uploaded a new version of the archive. Would you be kind enough to
test if everything is fixed on your installation too?
The address is the same:
http://ocamljava.x9c.fr/ocamljava-2.0-early-access.tar.gz


> Finally, even though a stated goal is to be able to use Java's
> libraries from OCaml code, there doesn't seem to be any documentation
> on how to actually do that. I tried using external just in case, but
> if that's the mechanism I'm not sure how it's meant to be used. A
> little guidance on how to call into Java from OCaml would be
> appreciated. This would be helpful both to test that it works
> correctly and to figure out if the abstraction that's provided is
> adequate.

Well, I provided no guidance because the current build does not
include the typer extensions allowing to manipulate Java elements
from OCaml code. Such extensions are not complete yet (some tests
are missing, and arrays are not handled yet), and will be integrated
in a future build (hopefully in september).

In the meantime, here is how it works. Some "special" functions behave
as "printf", meaning that their actual type is based on a "format"
string literal. For example,
Java.make "javax.swing.JButton(java.lang.String,javax.swing.Icon)" (x, y)
will create a "javax.swing.JButton" instance. The OCaml type of the
instance is "javax'swing'JButton java_instance" where "java_instance"
is a particular type whose parameter designates a Java class name
where dots are replaced by simple quote (to fit OCaml syntax).
      

Companies using OCaml

Archive: https://sympa.inria.fr/sympa/arc/caml-list/2012-08/msg00101.html

Esther Baruk announced:
Some of you might already have heard about the OCaml Website project
started after its announcement at the last OCaml Meeting in April
2011.

There will be a page on the website where we list all companies using
the OCaml language.

We listed almost all well known companies (see the list at the end of
this mail), with a small description of the use of OCaml in the
corresponding company.

We wish to enrich this list as much as possible.

So, if you know or work in a company using OCaml and that is not in
this list, please tell us. And if you see some detailed descriptions
that need to be updated, let us know.

We also welcome new contributors to the project. You can submit pull
requests on Github (http://github.com/agarwal/ocamlweb) and also
suggest content to add, etc. We have a mailing list where you can
subscribe:
https://lists.forge.ocamlcore.org/cgi-bin/listinfo/ocamlweb-devel

Editor's note: follow the archive link for the up to date list.
      

Other Caml News

From the ocamlcore planet blog:
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/.

OCamlPro's Contributions to OCaml 4.00.0:
  http://www.ocamlpro.com/blog/2012/08/20/ocamlpro-and-4.00.0.html

Comments on Matías Giovannini's "Merge Right":
  http://gallium.inria.fr/~scherer/gagallium/comments-on-merge-right/index.html

Bolt 1.3:
  http://caml.inria.fr/cgi-bin/hump.cgi?contrib=699

Bisect 1.2:
  http://caml.inria.fr/cgi-bin/hump.cgi?contrib=650
      

Old cwn

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.


Alan Schmitt