[cwn] Attn: Development Editor, Latest OCaml Weekly News

Alan Schmitt alan.schmitt at polytechnique.org
Mon Jun 11 23:48:02 PDT 2018


Hello,

Here is the latest OCaml Weekly News, for the week of June 05 to 12, 2018.

1) XPath implementation or equivalent
2) Uucd, Uucp, Uunf and Uuseg for Unicode 11.0.0
3) Tools for logic programming in OCaml
4) Ocaml under the hood
5) Other OCaml News

========================================================================
1) XPath implementation or equivalent
Archive: <https://sympa.inria.fr/sympa/arc/caml-list/2018-06/msg00007.html>
------------------------------------------------------------------------
** Julien Tesson asked and Alain Frisch replied:

> Is anyone aware of an Ocaml implementation of Xpath or any similar tool to
> query an XML document ?
> I found XML parsers via Opam, like pxp, but they don't seem to come with a
> querying library.

You might have a look at <http://alain.frisch.fr/soft#xpath> , which implements a
naive XPath evaluator (written 18 years ago, and never used for anything
serious).

<https://www.orcaware.com/pipermail/ocaml-pxp-users/2009-September/000099.html>
also refers to an XPath evaluator in PXP.
      
** Richard Jones also replied:

Yes we use libxml2 extensively in virt-v2v through some very simple
bindings (not packaged separately, but they are rather trivial).

Example usage:

<https://github.com/libguestfs/libguestfs/blob/a4d5548a4560ba4c548e64bf4a161f1003760e34/v2v/parse_libvirt_xml.ml#L77>

Bindings:

<https://github.com/libguestfs/libguestfs/tree/master/common/mlxml>

I would relicense these as LGPLv2+ if you wanted that (but to save
time don't bother asking me to relicense them as MIT or whatever so
you can steal the work from the commons).
      
** Richard Jones later added:

> <https://github.com/libguestfs/libguestfs/tree/master/common/mlxml>

Oops, missed out the Xpath_helpers module which is in a
different directory:

<https://github.com/libguestfs/libguestfs/blob/master/common/mltools/xpath_helpers.mli>
<https://github.com/libguestfs/libguestfs/blob/master/common/mltools/xpath_helpers.ml>
      
========================================================================
2) Uucd, Uucp, Uunf and Uuseg for Unicode 11.0.0
Archive: <https://sympa.inria.fr/sympa/arc/caml-list/2018-06/msg00010.html>
------------------------------------------------------------------------
** Daniel Bünzli announced:

Unicode 11.0.0 was released yesterday. It adds 684 new characters to
the standard including the COPYLEFT SYMBOL (U+1F12F) character. See
[here][0] for details about the additions.

Accordingly the libraries mentioned at the end of this message had to
be updated, consult the individual release notes for details. Both
Uucd and Uucp are incompatible releases sinces new script and block
enumerants had to be added.

If Unicode still puzzles you, have a look at Uucp?s absolute minimal
Unicode [introduction][1] and a few [biased tips][2] to handle Unicode
in OCaml.

Best and happy copylefting,

Daniel


# Uucd 11.0.0 Unicode character database decoder for OCaml.
<http://erratique.ch/software/uucd>

# Uucp 11.0.0 Unicode character properties for OCaml.
<http://erratique.ch/software/uucp>

# Uunf 11.0.0 Unicode text normalization for OCaml.
<http://erratique.ch/software/uunf>

# Uuseg 11.0.0 Unicode text segmentation for OCaml.
<http://erratique.ch/software/uuseg>

[0]: <http://blog.unicode.org/2018/06/announcing-unicode-standard-version-110.html>
[1]: <http://erratique.ch/software/uucp/doc/Uucp.html#uminimal>
[2]: <http://erratique.ch/software/uucp/doc/Uucp.html#tips>
      
========================================================================
3) Tools for logic programming in OCaml
Archive: <https://discuss.ocaml.org/t/tools-for-logic-programming-in-ocaml/2126/1>
------------------------------------------------------------------------
** Volodymyr Melnyk asked and Darius replied:

> I have no experience with logic programming (LP) and I have no time and reason
> to learn Prolog or other language that are canonical in the area of LP. By the
> way I'm very interested in the topic of LP and related paradigms. Could you
> please mention some OCaml libraries for logic programming and related things?

Check out <https://github.com/c-cube/choice>. It's based on the LogicT
library/paper (worth a read), which is closely related to miniKanren. The ideas
are similar in that you construct nondeterministic programs by manipulating
streams of solutions.
      
========================================================================
4) Ocaml under the hood
Archive: <https://discuss.ocaml.org/t/ocaml-under-the-hood/2127/1>
------------------------------------------------------------------------
** Slavik Loginov asked and Ivan Gotovchits replied:

> Where I can find some information on memory representation of objects in OCaml?

This [blog post][1] is rather thorough and an interesting reading. I do remember
there was some other good source also, but can't remember where.

[1]: <http://ambassadortothecomputers.blogspot.com/2010/03/inside-ocaml-objects.html>
      
========================================================================
5) Other OCaml News
------------------------------------------------------------------------
** From the ocamlcore planet blog:

Here are links from many OCaml blogs aggregated at OCaml Planet,
<http://ocaml.org/community/planet/>.

Bucket Sort
 <http://blog.shaynefletcher.org/2018/06/bucket-sort.html>
      
========================================================================
Old cwn
------------------------------------------------------------------------

If you happen to miss a CWN, you can send me a message
(alan.schmitt at polytechnique.org) and I'll mail it to you, or go take a look at
the archive (<http://alan.petitepomme.net/cwn/>) or the RSS feed of the
archives (<http://alan.petitepomme.net/cwn/cwn.rss>). If you also wish
to receive it every week by mail, you may subscribe online at
<http://lists.idyll.org/listinfo/caml-news-weekly/> .

========================================================================

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Monthly Athmospheric CO₂, Mauna Loa Obs. 2018-05: 411.25, 2017-05: 409.65
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 528 bytes
Desc: not available
URL: <http://lists.idyll.org/pipermail/caml-news-weekly/attachments/20180612/d3f6a4ce/attachment.pgp>


More information about the caml-news-weekly mailing list