Previous week Up Next week

Hello

Here is the latest OCaml Weekly News, for the week of January 16 to 23, 2018.

  1. Using Lwt_log library for sending messages to a Syslog server
  2. Sequence 1.0
  3. OCaml 4.06.1+rc1
  4. containers 2.0+alpha1
  5. Ocaml Github Pull Requests
  6. Other OCaml News

Using Lwt_log library for sending messages to a Syslog server

Archive: https://discuss.ocaml.org/t/using-lwt-log-library-for-sending-messages-to-a-syslog-server/1432/2

Deep in this thread, Hannes Mehnert said:
since you mention my logs-syslog package here, let me answer you . ;)

- Lwt_logs now moved to a separate repository (see
https://github.com/ocsigen/lwt/issues/468 and
https://github.com/ocsigen/lwt/pull/484). NB: I never used Lwt_logs and can't
answer your initial question about syslog support.
- logs-syslog "depends on lot of external libraries": my perception is
different, it requires `ocamlfind`, `ocamlbuild`, and `topkg` for building, plus
`logs`, `ptime`, and `syslog-message` (which itself depends additionally on
`astring`) at runtime.
The [logs library](http://erratique.ch/software/logs/doc/Logs.html#basics) is
very convenient to use IMHO, and has builtin support for both terminal, but also
browser console (when cross-compiling to JS). I wrote logs-syslog to solve the
exact problem - exfiltrating log messages via syslog - once logs was adopted
more widely (at least by the MirageOS community, see
https://mirage.io/blog/announcing-mirage-30-release#Logs-Where-You-Want-Them).
Others (at Docker) wrote reporters for both [Apply system
log](https://github.com/mirage/ocaml-asl) and [Windows event
log](https://github.com/djs55/ocaml-win-eventlog).
The syslog-message library does not yet support structured syslog ([RFC
5424](https://tools.ietf.org/html/rfc5424)), apart from that the logs-syslog
library supports three transports, UDP, TCP, TLS (including client
authentication) - and 3 backends: Unix (OCaml stdlib), Lwt, MirageOS. Please let
me know if you have a specific use case not covered by logs-syslog. Further
reading about the MirageOS syslog integration is available at
https://hannes.nqsb.io/Posts/Syslog
      

Sequence 1.0

Archive: https://discuss.ocaml.org/t/ann-sequence-1-0/1441/1

Simon Cruanes announced:
I have the pleasure to announce that
[sequence](https://github.com/c-cube/sequence) has reached its version 1.0.
Sequence is a lightweight, high-performance library of iterators that is
compatible with existing `iter` functions. Sequence 1.0 is a breaking release
that comes with some simplification of the API and a bump of the minimum
supported OCaml version to 4.02 that comes from jbuilder.

[Short tutorial to see what Sequence is
about](https://github.com/c-cube/sequence#short-tutorial)
Online doc at https://c-cube.github.io/sequence/
Repo at https://github.com/c-cube/sequence
      
Hezekiah Carty then asked:
This is great, thank you!

Is there a writeup somewhere on how to pick between sequence and
[gen](https://github.com/c-cube/gen)? Both seem similar in intent. Is one
generally a better choice than the other?
      
Simon Cruanes replied:
I just wrote a basic explanation here:
https://github.com/c-cube/sequence#comparison-with-a-href-https-github-com-c-cube-gen-gen-a
. I'll try to expand it if it's not clear enough.
      

OCaml 4.06.1+rc1

Archive: https://sympa.inria.fr/sympa/arc/caml-list/2018-01/msg00045.html

Damien Doligez announced:
The release of OCaml version 4.06.1 is imminent.  We have
created a release candidate for your testing pleasure.  Please
try it and let me know whether it works for you.

We want to know about any show-stopping bugs, especially in the
compilation and installation phases.

This release candidate is available as an opam switch:
  opam switch 4.06.1+rc1

Happy hacking,

-- Damien Doligez for the OCaml team.


4.06.1
------

### Bug fixes

- MPR#7661, GPR#1459: fix faulty compilation of patterns
  using extensible variants constructors
  (Luc Maranget, review by Thomas Refis and Gabriel Scherer, report
  by Abdelraouf Ouadjaout and Thibault Suzanne)

- MPR#7702, GPR#1553: refresh raise counts when inlining a function
  (Vincent Laviron, Xavier Clerc, report by Cheng Sun)

- MPR#7704, GPR#1559: Soundness issue with private rows and pattern-matching
  (Jacques Garrigue, report by Jeremy Yallop, review by Thomas Refis)

- MPR#7705, GPR#1558: add missing bounds check in Bigarray.Genarray.nth_dim.
  (Nicolás Ojeda Bär, report by Jeremy Yallop, review by Gabriel Scherer)

- GPR#1470: Don't commute negation with float comparison
  (Leo White, review by Xavier Leroy)

- GPR#1538: Make pattern matching compilation more robust to ill-typed columns
  (Gabriel Scherer and Thomas Refis, review by Luc Maranget)
      

containers 2.0+alpha1

Archive: https://discuss.ocaml.org/t/ann-containers-2-0-alpha1/1454/1

Simon Cruanes announced:
I have  the pleasure  to announce that containers 2.0+alpha1 is being released.

[containers](https://github.com/c-cube/ocaml-containers) is a modular,
ightweight, and performant extension of the standard library. Version 2.0
introduces a monomorphic mode (thanks to @jpdeplaix) that is designed to prevent
errors caused by the polymorphic "magic" operators such as `(=)`. This breaking
release is also the occasion to switch to dune, and to fix some inconsistencies
in the API (mostly printers).

If you use containers, please give a try to 2.0+alpha1 and report any issue on
the bucktracker!

tag: https://github.com/c-cube/ocaml-containers/releases/tag/2.0%2Balpha1
changelog: https://github.com/c-cube/ocaml-containers/blob/2.0%2Balpha1/CHANGELOG.adoc
      

Ocaml Github Pull Requests

Gabriel Scherer and the editor compiled this list:
Here is a sneak peek at some potential future features of the Ocaml
compiler, discussed by their implementers in these Github Pull Requests.

- stdlib: add Pervasives.int_size
  https://github.com/ocaml/ocaml/pull/1572
- MPR#7710: ocamldep -sort: treat cyclic dependencies as an error
  https://github.com/ocaml/ocaml/pull/1578
      

Other OCaml News

From the ocamlcore planet blog:
Here are links from many OCaml blogs aggregated at OCaml Planet,
http://ocaml.org/community/planet/.

Full Time: Compiler Engineer at Jane Street in New York & London
 http://jobs.github.com/positions/9e8ba450-e72e-11e7-926f-6ce07b7015c8

Full Time: Software Developer (Functional Programming) at Jane Street in New York, NY; London, UK; Hong Kong
 http://jobs.github.com/positions/0a9333c4-71da-11e0-9ac7-692793c00b45
      

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