caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Alan Schmitt <>
To: "lwn" <>, "cwn"  <>,
Subject: [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
Date: Tue, 22 Feb 2022 13:43:14 +0100	[thread overview]
Message-ID: <> (raw)

[-- Attachment #1: Type: text/plain, Size: 21864 bytes --]


Here is the latest OCaml Weekly News, for the week of February 15 to 22,

Table of Contents

OCAML goes Quantum computing
Layout Parsing and Nicely Formatted Error Messages
ptime 1.0.0 and mtime 1.4.0
Timedesc 0.6.0
OCaml from the Very Beginning now free in PDF and HTML formats
Dune 3.0.0
Blog Post "2021 at OCamlPro"
Packstream 0.1
OCaml 4.14.0, first beta release

OCAML goes Quantum computing


Florian said

  It seems that silently OCAML is now entering the Quantum world.  It
  looks that the Interpreter for "Twist" [New programming language for
  Quantum computing] is made with OCAML: [GitHub for Twist]

[New programming language for Quantum computing]

[GitHub for Twist] <>

Anton Kochkov then added

  Haskell has a nice package for quantum computing - Quipper. I
  recommend to take a look to it for inspiration as well:
  • <>
  • <>
  • <>
  • <> (a new language that reuses
    linear types in the Haskell to represent quantum specifics during
    the Quipper type check)

Layout Parsing and Nicely Formatted Error Messages


Hbr announced

  In a previous [post] I have described my way from LALR parsing to
  combinator parsing. Now I am more and more convinced that combinator
  parsing is really a good and flexible way to write parsers. The new
  release 0.5.0 of `Fmlib` focuses on layout parsing and nicely
  formatted error messages by using combinator parsing.

  The library can be installed via opam by `opam install fmlib'. There
  is a [github repository] hosting the source code. The [API] can be
  found online. See also a [tutorial] on combinator parsing.


[github repository] <>

[API] <>

[tutorial] <>

Layout Parsing

  Most programming languages express hierarchical structures by some
  kind of parentheses. Algol like languages use `begin' `end', C like
  languages use curly braces `{', `}' to enclose blocks of code. Since
  blocks can be nested inside blocks, the hierarchical or tree structure
  is well expressed by the syntax.

  For the human reader blocks are usually indented to make the
  hierarchical structure graphically visible. Programming languages like
  *Haskell* and *Python* ommit the parentheses and express the
  hierarchical structure by indentation. I.e. the indentation is part of
  the grammar. This is pleasing to the eye, because many parentheses can
  be ommitted.

  The hierarchical structure in the following schematical source file is
  immediately visible without the need of parentheses.

  │ xxxxxxxxxxx
  │     xxx
  │     xxx
  │         xxxxxxx
  │ xxxxxxxx
  │     xxx

  Lower level blocks are indented with respect to their parent block and
  siblings at the same level are vertically aligned.

  Because of this good readability configuration languages like yaml
  have become very popular.

  Unfortunately there are not many parsers available which support
  indentation sensitivity. The library [Fmlib] has support to parse
  languages whose grammar uses indentation to structure blocks

  There are only 3 combinators needed to introduce layout parsing in
  combinator parsing. Suppose that `p' is a combinator parsing a certain
  contruct. Then we have

  • `indent 4 p': Parse the construct described by `p' indented at least
    4 columns relative to its environment

  • `align p': Parse the construct desribed by `p' aligned vertically
    with its siblings

  • `detach p': Parse the construct described by `p' without any
    indentation or alignment restrictions

  In order to parse a list of ~p~s vertically aligned and indented
  relative to its environment by at least one column we just write

  │ one_or_more (align p) |> indent 1

  and parse a structure with the schematic layout

  │ xxxxxxxx
  │     pppppppp
  │     pppppp
  │     pppp
  │ xxxxx


User Frienly Error Messages

  It is important to for a parser writer to make syntax error messages
  user friendly. [Fmlib] has some support to write friendly error
  messages. There is the operator `<?>' copied from the Haskell library
  `parsec' which helps to equip combinators with descriptive error
  message in case they fail to parse the construct successfully.

  At the end of a failed parsing, the syntax (or semantic) errors have
  to be presented to the user. Suppose there is a combinator parser for
  a yaml like structure. The library writes by default for you error
  messages in the form

  │ 1 |
  │ 2 | names:
  │ 3 |      - Alice
  │ 3 |      - Bob
  │ 4 |
  │ 5 |   category: encryption
  │       ^
  │ I have encountered something unexpected. I was
  │ expecting one of
  │     - at 3 columns after
  │         - sequence element: "- <yaml value>"
  │     - at 2 columns before
  │         - key value pair: "<key>: <yaml value>"
  │     - end of input

  The raw information (line and column numbers, individual expectations,
  failed indentation or alignment expectation) is available as well so
  that you can present the error messages to the user in any different

  There is also a component [Fmlib_pretty] in the library for pretty
  printing any ascii text.



ptime 1.0.0 and mtime 1.4.0


Daniel Bünzli announced

  It's my pleasure to announce new releases of ptime and mtime. Ptime
  and mtime provide types and clocks for POSIX and monotonic time.

  These releases change the JavaScript support strategy for clocks by
  implementing the primitives in pure JavaScript and linking them via

  This means that both the `ptime.clock.jsoo' and `mtime.clock.jsoo'
  libraries no longer exist[^1]. Instead simply use the `ptime.clock.os'
  or `mtime.clock.os' libraries like you would do for your regular

  By side effect, the packages also no longer depend on any of
  `js_of_ocaml''s packages.

  Thanks to Hugo Heuzard (@hhugo) for suggesting and implementing these
  changes. Thanks also to Jonah Beckford for his Windows build patches.

  Other changes are described in the release notes for [`ptime'] and

  Home pages: [ptime], [mtime]

  Docs & manuals: [ptime], [mtime] or `odig doc ptime mtime'

  Install: `opam install ptime mtime'

  [^1]: I had intended to only deprecate these libraries by `warning' in
  the `META' files and requiring the replacement library but it seems
  the warning won't show up in many contexts including `dune' builds. So
  a breaking change it is.



[ptime] <>

[mtime] <>

[ptime] <>

[mtime] <>

Timedesc 0.6.0

  Archive: <>

Darren announced

  I am pleased to announce the release of [Timedesc] 0.6.0.

  Timedesc is a very comprehensive date time handling library with good
  support of time zone.

[Timedesc] <>


  • Timestamp and date time handling with platform independent time zone
    • Subset of the IANA time zone database is built into this library
  • Supports Gregorian calendar date, ISO week date, and ISO ordinal
  • Supports nanosecond precision
  • ISO8601 parsing and RFC3339 printing


  This release adds a fair number of quality of life improvements and
  additional features. Many thanks to @glennsl for the suggestions and

  The most important sections of the changelog are as follows:

  • Main breaking changes:
    • Changes in ISO week date functions (shorting label for arguments,
      quality of life changes)
    • Removed `_date' suffix in names of `Date.Ymd_date' and
  • Added "partial date" modules with ISO8601 parsing and printing
    • `ISO_week'
    • `Ym'
  • Added additional ISO8601 printing facilities for all three calendar
    • `Date.Ymd.pp/to_iso8601' (these are just aliases to the RFC3339
    • `Date.ISO_week_date.pp/to_iso8601'
    • `Date.ISO_ord.pp/to_iso8601'
  • Added additional ISO8601 parsing facilities for all three calendar
    • `Date.Ymd.of_iso8601[_exn]'
    • `Date.ISO_week_date.of_iso8601[_exn]'
    • `Date.ISO_ord.of_iso8601[_exn]'
  • Added additional comparison functions to `Date'
    • `lt', `le', `gt', `ge', `compare'
  • Added arithemtic functions to `Date'
  • Added `pp/to_iso8601' functions as aliases to the rfc3339 functions
    to `Timedesc'
  • Patched ISO8601 parsers and RFC3339/ISO8601 printers to handle
    second level time zone offset
    • Rare occurrence in tzdb but picked up by some new tests

OCaml from the Very Beginning now free in PDF and HTML formats


John Whitington announced

  Thanks to a grant from the [OCaml Software Foundation], I am able to
  release my book [OCaml from the Very Beginning] at no cost in its
  existing PDF format, and in a new HTML format too.

  You can find it here:

  The paperback and Kindle versions continue to be available from Amazon
  as before.

  The book has recently been updated to make it ready for OCaml 4.14
  which involved only minor changes to error handling and warnings. I
  have also opened the [source].

[OCaml Software Foundation] <>

[OCaml from the Very Beginning] <>


[source] <>

Dune 3.0.0

  Archive: <>

Rudi Grinberg announced

  On behalf of the dune team, I’m delighted to announce the availability
  of dune 3.0.

  The team has been working on this release for over 6 months, and
  there’s a bunch of new work to report. I’ll only highlight the some of
  the interesting new developments:

  • The watch mode has been rewritten from scratch to be faster and more
    scalable. We also no longer rely on any 3rd party tools such as
    fswatch. If any of you still have a dune workspace dune is still
    struggling with, we cannot wait to hear from you.

  • The watch mode now also starts an RPC server in the background. This
    RPC protocol is going to be the basis for other tools to interact
    with dune. Watch out for announcement on the LSP side to see how
    we’ll be making use of it to improve the editing experience.

  • The dune cache has been rewritten as well. It is now simpler and
    more reliable. There are still some components missing, such as
    distribution of the artifacts on the network. Nevertheless, we
    welcome you all to experiment with this feature and give us

  • We’ve addressed one of our oldest feature requests: high level rules
    for ctypes projects. This feature is still experimental, so we need
    feedback from real world projects before declaring it as mature.

  Of course, there are many other fixes, enhancements, and only a few
  breaking changes in this release. We hope you have an easy time

  Happy Hacking.

  /Editor’s note: for the full changelog, please follow the archive link

Blog Post "2021 at OCamlPro"


Fabrice Le Fessant announced

  We just published a review of what OCamlPro did in 2021:


  A lot of OCaml, but also some Rust, Cobol, Solidity, and a lot of
  Formal Verification! OCamlPro is always looking for skilled OCaml
  developers to hire, so if you are interested, contact us at

Packstream 0.1

  Archive: <>

Tomasz Barański announced

  I have a pleasure to announce the release of [Packstream] 0.1.

  Packstream is a library to parse/serialize [Packstream binary format].

  This is the initial release. It is functional but very very limited in
  scope. It allows parsing a binary stream into a Packstream datatype
  and serializing the datatype into a binary stream.

[Packstream] <>

[Packstream binary format]

OCaml 4.14.0, first beta release


octachron announced

  The release of OCaml 4.14.0 is close.

  The set of new features has been stabilized, and most opam packages
  already work with this release. After two alpha releases, we have
  created a first beta version to help you update your softwares and
  libraries ahead of the release.

  If you find any bugs, please report them at:


  The full release of OCaml 4.14.0 is currently expected for the middle
  of March.

  Compared to the last alpha, we have a last minute correction for one
  of the new function in the Seq module, some documentation
  improvements, few configuration and internal tweaks.

Installation instructions

  The base compiler can be installed as an opam switch with the
  following commands

  │ opam update
  │ opam switch create 4.14.0~beta1 --repositories=default,beta=git+
  With opam 2.1, the previous command line can be simplified to
  │ opam update
  │ opam switch create 4.14.0~beta1
  If you want to tweak the configuration of the compiler, you can switch
  to the option variant with:

  │ opam update
  │ opam switch create <switch_name> --packages=ocaml-variants.4.14.0~beta1+options,<option_list>
  │ --repositories=default,beta=git+
  or with opam 2.1:
  │ opam update
  │ opam switch create <switch_name> ocaml-variants.4.14.0~beta1+options <option_list>

  where `<option_list>' is a comma separated list of `ocaml-option-*'
  packages. For instance, for a flambda and no-flat-float-array switch:
  │ opam switch create 4.14.0~beta1+flambda+nffa ocaml-variants.4.14.0~beta1+options ocaml-option-flambda
  │ ocaml-option-no-flat-float-array
  All available options can be listed with `opam search ocaml-option'.

  The source code for the beta is also available at these addresses:

  • <>
  • <>

Changes compared to the last alpha

  The full list of changes for OCaml 4.14 is available at

Standard library

  • *additional fixes* [10583], +[10998]: Add over 40 new functions in
     Seq. (François Pottier and Simon Cruanes, review by Nicolás Ojeda
     Bär, Daniel Bünzli, Naëla Courant, Craig Ferguson, Wiktor Kuchta,
     Xavier Leroy, Guillaume Munch-Maccagnoni, Raphaël Proust, Gabriel
     Scherer and Thierry Martinez)

[10583] <>

[10998] <>


  • [10397]: Document exceptions raised by Unix module functions on
    Windows (Martin Jambon, review by Daniel Bünzli, David Alsopp,
    Damien Doligez, Xavier Leroy, and Florian Angeletti)

  • [10794]: Clarify warning 57 (Ambiguous or-pattern variables under
    guard) (Wiktor Kuchta, review by Gabriel Scherer)

[10397] <>

[10794] <>

Build system

  • [10828] Build native-code compilers on OpenBSD/aarch64 (Christopher

  • [10835] Disable DT_TEXTREL warnings on x86 32 bit architecture by
    passing -Wl,-z,notext in mksharedlib and mkmaindll. Fixes relocation
    issues, reported in [9800], making local patches in Debian, Alpine,
    and FreeBSD superfluous. (Hannes Mehnert with Kate Deplaix and
    Stéphane Glondu, review by Xavier Leroy)

[10828] <>

[10835] <>

[9800] <>

Code generation

  • [10719]: Ensure that build_apply respects Lambda.max_arity (Stephen
    Dolan, review by Xavier Leroy)

[10719] <>


  • *additional fixes* [10718], +[11012]: Add "Shape" information to the
     cmt files. Shapes are an abstraction of modules that can be used by
     external tooling to perform definition-aware operations. (Ulysse
     Gérard, Thomas Refis and Leo White, review by Florian Angeletti)

[10718] <>

[11012] <>


  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

  If you also wish to receive it every week by mail, you may subscribe

  [Alan Schmitt]

[send me a message] <>

[the archive] <>

[RSS feed of the archives] <>

[online] <>

[Alan Schmitt] <>

[-- Attachment #2: Type: text/html, Size: 35952 bytes --]

             reply	other threads:[~2022-02-22 12:43 UTC|newest]

Thread overview: 112+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-22 12:43 Alan Schmitt [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-07-26 17:54 Alan Schmitt
2022-07-19  8:58 Alan Schmitt
2022-07-12  7:59 Alan Schmitt
2022-07-05  7:42 Alan Schmitt
2022-06-28  7:37 Alan Schmitt
2022-06-21  8:06 Alan Schmitt
2022-06-14  9:29 Alan Schmitt
2022-06-07 10:15 Alan Schmitt
2022-05-31 12:29 Alan Schmitt
2022-05-24  8:04 Alan Schmitt
2022-05-17  7:12 Alan Schmitt
2022-05-10 12:30 Alan Schmitt
2022-05-03  9:11 Alan Schmitt
2022-04-26  6:44 Alan Schmitt
2022-04-19  5:34 Alan Schmitt
2022-04-12  8:10 Alan Schmitt
2022-04-05 11:50 Alan Schmitt
2022-03-29  7:42 Alan Schmitt
2022-03-22 13:01 Alan Schmitt
2022-03-15  9:59 Alan Schmitt
2022-03-01 13:54 Alan Schmitt
2022-02-08 13:16 Alan Schmitt
2022-02-01 13:00 Alan Schmitt
2022-01-25 12:44 Alan Schmitt
2022-01-11  8:20 Alan Schmitt
2022-01-04  7:56 Alan Schmitt
2021-12-28  8:59 Alan Schmitt
2021-12-21  9:11 Alan Schmitt
2021-12-14 11:02 Alan Schmitt
2021-11-30 10:51 Alan Schmitt
2021-11-16  8:41 Alan Schmitt
2021-11-09 10:08 Alan Schmitt
2021-11-02  8:50 Alan Schmitt
2021-10-19  8:23 Alan Schmitt
2021-09-28  6:37 Alan Schmitt
2021-09-21  9:09 Alan Schmitt
2021-09-07 13:23 Alan Schmitt
2021-08-24 13:44 Alan Schmitt
2021-08-17  6:24 Alan Schmitt
2021-08-10 16:47 Alan Schmitt
2021-07-27  8:54 Alan Schmitt
2021-07-20 12:58 Alan Schmitt
2021-07-06 12:33 Alan Schmitt
2021-06-29 12:24 Alan Schmitt
2021-06-22  9:04 Alan Schmitt
2021-06-01  9:23 Alan Schmitt
2021-05-25  7:30 Alan Schmitt
2021-05-11 14:47 Alan Schmitt
2021-05-04  8:57 Alan Schmitt
2021-04-27 14:26 Alan Schmitt
2021-04-20  9:07 Alan Schmitt
2021-04-06  9:42 Alan Schmitt
2021-03-30 14:55 Alan Schmitt
2021-03-23  9:05 Alan Schmitt
2021-03-16 10:31 Alan Schmitt
2021-03-09 10:58 Alan Schmitt
2021-02-23  9:51 Alan Schmitt
2021-02-16 13:53 Alan Schmitt
2021-02-02 13:56 Alan Schmitt
2021-01-26 13:25 Alan Schmitt
2021-01-19 14:28 Alan Schmitt
2021-01-12  9:47 Alan Schmitt
2021-01-05 11:22 Alan Schmitt
2020-12-29  9:59 Alan Schmitt
2020-12-22  8:48 Alan Schmitt
2020-12-15  9:51 Alan Schmitt
2020-12-01  8:54 Alan Schmitt
2020-11-03 15:15 Alan Schmitt
2020-10-27  8:43 Alan Schmitt
2020-10-20  8:15 Alan Schmitt
2020-10-06  7:22 Alan Schmitt
2020-09-29  7:02 Alan Schmitt
2020-09-22  7:27 Alan Schmitt
2020-09-08 13:11 Alan Schmitt
2020-09-01  7:55 Alan Schmitt
2020-08-18  7:25 Alan Schmitt
2020-07-28 16:57 Alan Schmitt
2020-07-21 14:42 Alan Schmitt
2020-07-14  9:54 Alan Schmitt
2020-07-07 10:04 Alan Schmitt
2020-06-30  7:00 Alan Schmitt
2020-06-16  8:36 Alan Schmitt
2020-06-09  8:28 Alan Schmitt
2020-05-19  9:52 Alan Schmitt
2020-05-12  7:45 Alan Schmitt
2020-05-05  7:45 Alan Schmitt
2020-04-28 12:44 Alan Schmitt
2020-04-21  8:58 Alan Schmitt
2020-04-14  7:28 Alan Schmitt
2020-04-07  7:51 Alan Schmitt
2020-03-31  9:54 Alan Schmitt
2020-03-24  9:31 Alan Schmitt
2020-03-17 11:04 Alan Schmitt
2020-03-10 14:28 Alan Schmitt
2020-03-03  8:00 Alan Schmitt
2020-02-25  8:51 Alan Schmitt
2020-02-18  8:18 Alan Schmitt
2020-02-04  8:47 Alan Schmitt
2020-01-28 10:53 Alan Schmitt
2020-01-21 14:08 Alan Schmitt
2020-01-14 14:16 Alan Schmitt
2020-01-07 13:43 Alan Schmitt
2019-12-31  9:18 Alan Schmitt
2019-12-17  8:52 Alan Schmitt
2019-12-10  8:21 Alan Schmitt
2019-12-03 15:42 Alan Schmitt
2019-11-26  8:33 Alan Schmitt
2019-11-12 13:21 Alan Schmitt
2019-11-05  6:55 Alan Schmitt
2019-10-15  7:28 Alan Schmitt
2019-09-03  7:35 Alan Schmitt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).