caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2020-12-29  9:59 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2020-12-29  9:59 UTC (permalink / raw)
  To: lwn, cwn, caml-list, comp

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

Hello

Here is the latest OCaml Weekly News, for the week of December 22 to 29,
2020.

Table of Contents
─────────────────

ppx_deriving_yaml 0.1.0
A Heroku buildpack for OCaml
opam-dune-lint - keep opam and dune dependencies in sync
Scirep, a utility for literate programming
Camel Calendar for 2021
Old CWN


ppx_deriving_yaml 0.1.0
═══════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-ppx-deriving-yaml-0-1-0/7007/1>


Patrick Ferris announced
────────────────────────

  I'm proud to announce the first release (and my first release) of
  [ppx_deriving_yaml]. If you are familiar with the excellent
  [ppx_deriving_yojson] then this library should come as no surprise. In
  fact it helped me a lot in writing this ppx, so thank you to its
  creators/maintainers.


[ppx_deriving_yaml] <https://github.com/patricoferris/ppx_deriving_yaml>

[ppx_deriving_yojson] <https://github.com/ocaml-ppx/ppx_deriving_yojson>

Installation
╌╌╌╌╌╌╌╌╌╌╌╌

  ┌────
  │ $ opam update
  │ $ opam install ppx_deriving_yaml
  └────


Usage
╌╌╌╌╌

  Ppx_deriving_yaml converts your OCaml types to the "basic" [OCaml Yaml
  value type] (the one that is currently compatible with ezjsonm). So
  for example you can have:

  ┌────
  │ type t = { title: string; authors: string list } [@@deriving yaml]
  │ 
  │ let () =
  │   let v = { title = "Yaml PPX!"; authors = [ "Patrick Ferris" ] } in
  │   let yaml = to_yaml v in
  │   Yaml.pp Format.std_formatter yaml;
  │   match of_yaml yaml with
  │     | Ok t -> Format.print_string t.title
  │     | Error (`Msg m) -> failwith m
  └────

  The ppx generates two functions:

  ┌────
  │ val of_yaml : Yaml.value -> t Yaml.res
  │ val to_yaml : t -> Yaml.value
  └────

  And when built with this dune file:

  ┌────
  │ (executable
  │  (name main)
  │  (libraries yaml)
  │  (preprocess
  │   (pps ppx_deriving_yaml)))
  └────

  The following output is generated:

  ┌────
  │ title: Yaml PPX!
  │ authors:
  │ - Patrick Ferris
  │ Yaml PPX!
  └────

  The [README] contains some more information and the library is still a
  little rough around the edges, especially with error reporting, but
  I'm currently using it in a few places such as an "ocaml-ified"
  [github actions] library (ppx_deriving_yaml's [test workflow] was
  automatically generated with it :sparkles:). This is a nice example of
  how it can be used in a fairly straightforward way to generate OCaml
  versions of the many projects that use Yaml for configuration files.

  Happy yaml-ing :)


[OCaml Yaml value type]
<https://github.com/avsm/ocaml-yaml/blob/6de8fa6926d391334b945754619a64857d352e5d/lib/types.ml#L44>

[README]
<https://github.com/patricoferris/ppx_deriving_yaml#implementation-details>

[github actions] <https://github.com/patricoferris/opam-github-workflow>

[test workflow]
<https://github.com/patricoferris/ppx_deriving_yaml/blob/main/.github/workflows/test.yml>


A Heroku buildpack for OCaml
════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-a-heroku-buildpack-for-ocaml/7012/1>


roddy announced
───────────────

  I wrote [a Heroku buildpack] for OCaml web apps that use opam/dune.


[a Heroku buildpack]
<https://github.com/roddyyaga/heroku-buildpack-ocaml>


opam-dune-lint - keep opam and dune dependencies in sync
════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-opam-dune-lint-keep-opam-and-dune-dependencies-in-sync/7014/1>


Thomas Leonard announced
────────────────────────

  We're pleased to announce the first release of [opam-dune-lint]. This
  little tool checks that every ocamlfind dependency listed in your
  `dune' files has the corresponding opam package listed as a dependency
  in your `*.opam' file(s).

  e.g.

  ┌────
  │ $ cd charrua
  │ $ opam dune-lint
  │ charrua-client.opam: changes needed:
  │   "tcpip" {with-test & >= 6.0.0}           [from test/client, test/client/lwt]
  │ charrua-server.opam: changes needed:
  │   "ppx_cstruct" {with-test & >= 6.0.0}     [from (ppx), test]
  │   "tcpip" {with-test & >= 6.0.0}           [from test]
  │ charrua-unix.opam: changes needed:
  │   "cstruct-lwt" {>= 6.0.0}                 [from unix]
  │   "ipaddr" {>= 5.0.1}                      [from unix]
  │   "tcpip" {>= 6.0.0}                       [from unix]
  │ charrua.opam: OK
  │ Note: version numbers are just suggestions based on the currently installed version.
  │ Write changes? [y] y
  │ Wrote "./charrua-client.opam"
  │ Wrote "./charrua-server.opam"
  │ Wrote "./charrua-unix.opam"
  └────

  If your project generates the opam files from `dune-project', then it
  will update your `dune-project' instead.

  It can also be useful to run this in CI. It will exit with a non-zero
  exit status if anything needs to be changed. [ocaml-ci] runs this
  automatically as part of the "lint-opam" check.


[opam-dune-lint] <https://github.com/ocurrent/opam-dune-lint>

[ocaml-ci] <https://ci.ocamllabs.io/>


Scirep, a utility for literate programming
══════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/scirep-a-utility-for-literate-programming/7016/1>


Philippe announced
──────────────────

  I wrote a utility called [scirep] to render a markdown file with OCaml
  code blocks as an HTML document, which provides some support for
  graphics. Here are some examples of generated documents: [one based on
  vg], and [another using owl-plplot].

  It can also be used downstream of [mdx] as a markdown-to-html
  converter that detects pictures in the toplevel's standard output and
  renders them in the final document.

  It is really a hack, and it is poorly documented, but I'm advertising
  it in case it might be useful to others.


[scirep] <https://github.com/pveber/scirep>

[one based on vg] <http://pveber.github.io/scirep/fold.html>

[another using owl-plplot] <http://pveber.github.io/scirep/damped.html>

[mdx] <https://github.com/realworldocaml/mdx>


Camel Calendar for 2021
═══════════════════════

  Archive: <https://discuss.ocaml.org/t/camel-calendar-for-2021/7020/1>


Florent Monnier announced
─────────────────────────

  I would like to share with you a [camel calendar for 2021 in pdf] with
  the nice theme from ocaml dot org.

  It was generated from an ocaml script that you can find in this repo:
  [svg calendar generator].

  Several scripts are available, you can find some results on this [web
  page].

  At the beginning of 2020 I was searching for a free software to
  generate calendars in SVG that I could customise for my own use, but I
  was unable to install the Perl script that exists (it has a lot of
  dependencies and the error message when I try to install it didn't
  help us to find what's wrong with it).

  This explains the design of these scripts, that are made to work
  without any dependencies and without any compilation. There's code
  duplication, but every script only need the ocaml interpreter to be
  run, so most people comfortable with the command line should be able
  to use it.

  (I also tried to sell some [on Etsy] but didn't sold a single one.)

  By default 12 languages are included in every script, but you can
  generate the calendars for more than 200 languages if you use [these
  dates locales] that come from the CLDR repository.

  You can also switch monday first or sunday first.

  These generators are provided under Zlib license.

  I hope some will enjoy!


[camel calendar for 2021 in pdf]
<http://decapode314.free.fr/cal/cal-camel/cal-camel-2021-en.pdf>

[svg calendar generator] <https://github.com/fccm/ocaml-cal-svg>

[web page] <http://decapode314.free.fr/cal/>

[on Etsy] <https://www.etsy.com/fr/shop/Decapode>

[these dates locales] <https://github.com/fccm/DateLocale-ocaml>


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <http://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <http://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <http://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2022-05-17  7:12 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2022-05-17  7:12 UTC (permalink / raw)
  To: lwn, cwn, caml-list

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

Hello

Here is the latest OCaml Weekly News, for the week of May 10 to 17,
2022.

Table of Contents
─────────────────

Browsing OCaml source tree with VSCode/merlin?
release of prbnmcn-gnuplot 0.0.3
Call for Presentations for "Teaching Functional Programming in OCaml" as part of the OCaml Workshop 2022
Old CWN


Browsing OCaml source tree with VSCode/merlin?
══════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/browsing-ocaml-source-tree-with-vscode-merlin/9819/2>


Keigo Imai explained
────────────────────

  I managed to browse the OCaml source tree with VSCode with the
  following steps:

  1. Prepare `.merlin' file (attached below) referring to the all source
     directories in the tree
  2. Pin your ocaml-lsp-server at 1.8.3 by `opam pin ocaml-lsp-server
     1.8.3' (as it is the last version that support `.merlin')
  3. Clone OCaml repository and check out the same OCaml version as
     yours (e.g. `opam switch create 4.12.1; git checkout 4.12.1')
  4. Build OCaml (./configure && make world)
  5. Open the top folder of the source tree using VSCode (or restart the
     language server)
  6. Browse the code

  Cheers!

  content of `.merlin':
  ┌────
  │ S ./asmcomp/
  │ S ./boot/menhir/
  │ S ./bytecomp/
  │ S ./debugger/
  │ S ./driver/
  │ S ./file_formats/
  │ S ./lambda/
  │ S ./lex/
  │ S ./middle_end/
  │ S ./middle_end/closure/
  │ S ./middle_end/flambda/
  │ S ./middle_end/flambda/base_types/
  │ S ./ocamldoc/
  │ S ./ocamltest/
  │ S ./otherlibs/dynlink/
  │ S ./otherlibs/dynlink/byte/
  │ S ./otherlibs/dynlink/dynlink_compilerlibs/
  │ S ./otherlibs/dynlink/native/
  │ S ./otherlibs/str/
  │ S ./otherlibs/systhreads/
  │ S ./otherlibs/unix/
  │ S ./parsing/
  │ S ./stdlib/
  │ S ./tools/
  │ S ./tools/unlabel-patches/
  │ S ./toplevel/
  │ S ./toplevel/byte/
  │ S ./toplevel/native/
  │ S ./typing/
  │ S ./utils/
  │ B ./asmcomp/
  │ B ./asmcomp/debug/
  │ B ./boot/
  │ B ./bytecomp/
  │ B ./debugger/
  │ B ./driver/
  │ B ./file_formats/
  │ B ./lambda/
  │ B ./lex/
  │ B ./middle_end/
  │ B ./middle_end/closure/
  │ B ./middle_end/flambda/
  │ B ./middle_end/flambda/base_types/
  │ B ./ocamldoc/
  │ B ./ocamldoc/generators/
  │ B ./ocamltest/
  │ B ./otherlibs/bigarray/
  │ B ./otherlibs/dynlink/
  │ B ./otherlibs/dynlink/byte/
  │ B ./otherlibs/dynlink/dynlink_compilerlibs/
  │ B ./otherlibs/dynlink/native/
  │ B ./otherlibs/str/
  │ B ./otherlibs/systhreads/
  │ B ./otherlibs/unix/
  │ B ./parsing/
  │ B ./stdlib/
  │ B ./testsuite/tests/no-alias-deps/
  │ B ./tools/
  │ B ./toplevel/
  │ B ./toplevel/byte/
  │ B ./toplevel/native/
  │ B ./typing/
  │ B ./utils/
  └────


release of prbnmcn-gnuplot 0.0.3
════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-release-of-prbnmcn-gnuplot-0-0-3/9840/1>


Igarnier announced
──────────────────

  [prbnmcn-gnuplot] is a declarative wrapper on top of
  [gnuplot]. Version 0.0.3 was just released.

  The API is not entirely set in stone but it's reasonably usable, at
  least for up to moderately sized plots. It proceeds by constructing
  self-contained gnuplot scripts from declarative specifications and
  deferring to gnuplot for execution.

  Here's the [documentation].

  Happy hacking!


[prbnmcn-gnuplot] <https://github.com/igarnier/prbnmcn-gnuplot>

[gnuplot] <http://www.gnuplot.info/>

[documentation] <https://igarnier.github.io/prbnmcn-gnuplot/>


Call for Presentations for "Teaching Functional Programming in OCaml" as part of the OCaml Workshop 2022
════════════════════════════════════════════════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/call-for-presentations-for-teaching-functional-programming-in-ocaml-as-part-of-the-ocaml-workshop-2022/9847/1>


Yurug announced
───────────────

Special Session / Call for Presentations for "Teaching Functional Programming in OCaml" as part of the OCaml
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  Workshop 2022

  • Abstract Submission: 6 June 2022
  • Author Notification: 7 July 2022
  • OCaml Workshop: 9 Sept 2022

  The OCaml Workshop 2022, co-located with ICFP 2022, will take place
  the 2022-09-16 and will be held at Ljubljana, Slovenia. This year, we
  would like to organize a special session on "Teaching Functional
  Programming in OCaml".

  Hence, we would like to encourage and invite submissions for
  presentations that highlight teaching practices and innovation that
  highlight how OCaml is taught around the globe and the wide range of
  tools and strategies that have been developed to teach effectively
  functional programming using OCaml. In particular, we are interested
  in automated program evaluation / grading tools / error analysis (both
  type and syntax errors) for OCaml programs, tools that provide
  assistance in practical lessons (such as pair programming for
  example), Jupiter notebooks like solutions to interactively introduce
  programming concepts, or full-featured web platforms. We are
  particularly seeking contributions and experience reports of the
  Learn-OCaml online programming environment which has been used by the
  OCaml teaching community for online but also for regular in-person
  classes. The goal is to share experiences, exchange ideas and tools,
  and promote best practices.

  Interested researchers are invited to submit and register a
  description of the talk (about 2 pages long) at
  <https://ocaml2022.hotcrp.com/providing> a clear statement of what
  will be provided by the presentation: the problems that are addressed,
  the solutions or methods that are proposed.

  LaTeX-produced PDFs are a common and welcome submission format. For
  accessibility purposes, we ask PDF submitters to also provide the
  sources of their submission in a textual format, such as ..tex
  sources. Reviewers may read either the submitted PDF or the text
  version.

  The OCaml workshop and this special session are informal meetings with
  no formal proceedings. The presentation material will be available
  online from the workshop homepage. The presentations may be recorded
  and made available at a later date.

  The main presentation format is a workshop talk, traditionally around
  20 minutes in length, plus question time, but we also have a poster
  session during the workshop - this allows us to present more diverse
  work and gives time for discussion. The program committee for the
  OCaml Workshop will decide which presentations should be delivered as
  posters or talks.

  • Simão Melo de Sousa (University of Beira Interior)
  • Brigitte Pientka (McGill University)
  • Yann Regis-Gianas (Nomadic Labs)
  • Xujie Si (McGill University)


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2022-05-10 12:30 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2022-05-10 12:30 UTC (permalink / raw)
  To: lwn, cwn, caml-list


[-- Attachment #1.1: Type: text/plain, Size: 1803 bytes --]

Hello

Here is the latest OCaml Weekly News, for the week of May 03 to 10,
2022.

Table of Contents
─────────────────

Multicore OCaml: March 2022
Old CWN


Multicore OCaml: March 2022
═══════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/multicore-ocaml-march-2022/9692/3>


Deep in this threal, KC Sivaramakrishnan announced
──────────────────────────────────────────────────

  The benchmarks from the "Retrofitting Effect handlers to OCaml" PLDI
  2022 paper (<https://arxiv.org/abs/2104.00250>) is available here:
  <https://github.com/prismlab/retro-concurrency/tree/master/bench>. See
  sections 6.2 and 6.3 in the paper.


He later added
──────────────

  I've moved the microbenchmarks alone to a separate repo:
  <https://github.com/prismlab/retro-concurrency-bench>. This repo also
  contains instructions to run the docker container that runs the
  benchmarks from the paper with the custom compiler variants.


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


[-- Attachment #1.2: Type: text/html, Size: 10683 bytes --]

[-- Attachment #2: Type: text/plain, Size: 119 bytes --]

Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'INRIA.

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2022-05-03  9:11 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2022-05-03  9:11 UTC (permalink / raw)
  To: lwn, cwn, caml-list


[-- Attachment #1.1: Type: text/plain, Size: 15706 bytes --]

Hello

Here is the latest OCaml Weekly News, for the week of April 26 to May
03, 2022.

Table of Contents
─────────────────

ATD now supports TypeScript
pp_loc 2.0
Windows-friendly OCaml 4.12 distribution - Diskuv OCaml 0.1.0
V3.ocaml.org: we are live!
Remaking an Old Game in OCaml
Old CWN


ATD now supports TypeScript
═══════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/atd-now-supports-typescript/9735/1>


Martin Jambon announced
───────────────────────

  [ATD] is a language for specifying typed interfaces for communicating
  across programming languages. It turns concrete type definitions
  ("schema") into code for each language. This code can read and write
  JSON safely, relieving the user of worrying about the structure of the
  JSON data.

  Starting from version 2.5.0, ATD provides `atdts', a single executable
  that turns a file `foo.atd' into `foo.ts'. See the [tutorial] for an
  introduction. The programming languages targeted by ATD are now:

  • Java
  • OCaml
  • Python + mypy
  • ReScript (BuckleScript)
  • Scala
  • TypeScript

  For an expert overview of the features that are currently supported,
  check out the test data:
  • [ATD input]
  • [TypeScript output]

  See also the [announcement for atdpy] that we made a month ago.


[ATD] <https://github.com/ahrefs/atd>

[tutorial] <https://atd.readthedocs.io/en/latest/atdts.html#tutorials>

[ATD input]
<https://github.com/ahrefs/atd/blob/master/atdts/test/atd-input/everything.atd>

[TypeScript output]
<https://github.com/ahrefs/atd/blob/master/atdts/test/ts-expected/everything.ts>

[announcement for atdpy]
<https://discuss.ocaml.org/t/atdpy-derive-safe-json-interfaces-for-python/9544>


pp_loc 2.0
══════════

  Archive: <https://discuss.ocaml.org/t/ann-pp-loc-2-0/9741/1>


Armael announced
────────────────

  Do you know how OCaml now displays errors by quoting back part of the
  source, highlighting the faulty part? For instance, with a single-line
  error location:
  ┌────
  │ File "foo.ml", line 1, characters 12-14:
  │ 1 | let foo x = yy + 1;;
  │                 ^^
  └────
  or a multi-line location:
  ┌────
  │ File "bar.ml", lines 3-5, characters 10-10:
  │ 3 | ..........function
  │ 4 |   | A -> 0
  │ 5 |   | B -> 1
  └────

  Do you have your own language/configuration file/… parser or
  typechecker, that could benefit from nice, user-friendly error
  messages?

  The [pp_loc] library provides an easy-to-use implementation of the
  same source-quoting mechanism that is used in the OCaml compiler. It
  provides a single function `pp' which will display the relevant part
  of the input given the location(s) of the error.

  ┌────
  │ val pp :
  │   ?max_lines:int ->
  │   input:Input.t ->
  │   Format.formatter ->
  │   loc list ->
  │   unit
  └────
  (As one can see from the signature, `pp' also supports displaying
  several locations at once on the same source snippet, for
  multi-location errors.)

  The full [documentation is available online], and the library is
  available on opam (`opam install pp_loc').

  This new version, thanks to the contribution of @c-cube, makes the
  `loc' type more flexible. It should now be easy to create source
  locations that can be passed to `pp', however you represent them in
  your parser (be it as (line,column) pairs, offsets, or any combination
  of those…). For more details, see the [Pp_loc.Position] module.

  I am completely open to more PRs or ideas for improving the library
  further, and displaying source locations in even nicer ways!

  Happy error-message printing!


[pp_loc] <https://github.com/Armael/pp_loc>

[documentation is available online]
<https://armael.github.io/pp_loc/pp_loc/Pp_loc/index.html>

[Pp_loc.Position]
<https://armael.github.io/pp_loc/pp_loc/Pp_loc/Position/index.html>


Windows-friendly OCaml 4.12 distribution - Diskuv OCaml 0.1.0
═════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-windows-friendly-ocaml-4-12-distribution-diskuv-ocaml-0-1-0/8358/18>


jbeckford announced
───────────────────

  A single `setup-*.exe' executable is now all that is necessary to
  install the Diskuv OCaml distribution on 64-bit Windows!

  Today you can use a prerelease of v0.4.0 which is available at
  <https://github.com/diskuv/dkml-installer-ocaml/releases/download/v0.4.0-prerel11/setup-diskuv-ocaml-windows_x86_64-0.4.0.exe>

  The prerelease:
  • is for *experienced Windows users only* because the prerelease is
    not signed! You will have to fight with your browser, operating
    system and anti-virus software to run the setup executable
  • is *not reproducible*. Because many Diskuv packages have not yet
    made it into Opam, the builds need several `opam pin' of unstable
    branches.
  • has not been incorporated into the
    <https://diskuv.gitlab.io/diskuv-ocaml> documentation site. But the
    [Beyond Basics] documentation should still be accurate.

  Once those items above are addressed, a real (non-prerelease) 0.4.0
  will be announced.

        Existing Diskuv OCaml users: Your existing Opam switches
        should be unaffected by the upgrade. But please make sure
        you can recreate your Opam switches (ie. use a `.opam'
        file) if something goes wrong.

  Release notes, including details of the migration to the Apache 2.0
  license, are at available at
  [https://github.com/diskuv/dkml-installer-ocaml/releases/tag/v0.4.0-prerel11]


[Beyond Basics]
<https://diskuv.gitlab.io/diskuv-ocaml/doc/BeyondBasics.html#beyondbasics>

[https://github.com/diskuv/dkml-installer-ocaml/releases/tag/v0.4.0-prerel11]
<https://github.com/diskuv/dkml-installer-ocaml/releases/tag/v0.4.0-prerel11>


V3.ocaml.org: we are live!
══════════════════════════

  Archive: <https://discuss.ocaml.org/t/v3-ocaml-org-we-are-live/9747/1>


Thibaut Mattio announced
────────────────────────

  I am thrilled to announce that <https://ocaml.org/> now serves version
  3 of the site! Here's an overview of the major features in this new
  version:

  • [Central OCaml package documentation], which contains the
    documentation of every version of every OCaml packages.
  • [OCaml job board], which lists job opportunities from the community.
  • [A syndicated blog], which links to blog articles from the community
    and offers original blog posts.
  • [OCaml success stories] which explore how major OCaml industrial
    users solved real-world challenges using OCaml.
  • [Resources for learning OCaml], which aggregates resources and
    tutorials to learn OCaml.
  • [An interactive OCaml playground] to try OCaml code directly in the
    browser.

  Version 2 remains accessible at <https://v2.ocaml.org/>, and older
  URLs to ocaml.org will be redirected to the v2 URL from now
  on. Similarly, v3.ocaml.org URLs will continue to work.

  Community feedback was instrumental and has been driving the direction
  of the project since day one. For instance, having a centralized
  package documentation site; or facilitating the hiring of OCaml
  developers and finding OCaml jobs were major concerns that were
  highlighted in the last [OCaml Survey]. They were what prompted us to
  work on the documentation site and the job board respectively.

  We've also listened to the community feedback we received along the
  way, and in particular, here's an overview of everything we've been
  doing to address the feedback we received after our last Discuss post:
  <https://hackmd.io/IniIM_p3Qs2UB74cuKK7UQ>.

  Given how critical your input is to drive the project, I am deeply
  grateful to every one who took the time to share insights, suggestions
  and bug reports. Some of the suggestions will need more work and
  couldn't happen before launch, but we've listened to every one and
  will keep working on improving OCaml.org to address pain points of the
  community.  Thank you, and keep the feedback coming!

  We're also starting to see a lot of contributions from external
  contributors. OCaml.org is open source, and contributions from anyone
  are extremely welcome! Never hesitate to open a PR if you see
  something you'd like to improve! You can read our [Contributing Guide]
  to learn how to contribute.


[Central OCaml package documentation] <https://ocaml.org/packages>

[OCaml job board] <https://ocaml.org/opportunities>

[A syndicated blog] <https://ocaml.org/blog>

[OCaml success stories] <https://ocaml.org/success-stories>

[Resources for learning OCaml] <https://ocaml.org/learn>

[An interactive OCaml playground] <https://ocaml.org/play>

[OCaml Survey]
<https://discuss.ocaml.org/t/ann-ocaml-user-survey-2020/6624>

[Contributing Guide]
<https://github.com/ocaml/ocaml.org/blob/main/CONTRIBUTING.md>

Ecosystem Contributions
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  As the storefront of the OCaml ecosystem, we couldn't develop the next
  version of OCaml.org without contributing back! As a result, we've
  published several packages on opam that we're using for OCaml.org:

  • [dream-accept]: Accept headers parsing for Dream
  • [dream-encoding]: Encoding primitives for Dream.
  • [hilite]: Generate HTML ready for syntax-highlighting with CSS by
    parsing markdown documents.

  Other packages that are yet to be released are:

  • [code-mirror]: The code-mirror bindings
  • [js_top_worker]: An OCaml toplevel designed to run in a web worker

  We've also made contributions downstream:

  • odoc: [Support for HTML fragments in odoc]
  • river: [API changes and capability to fetch metadata from RSS post
    links]

  A huge thank you to the community for your constant effort in making
  OCaml such a great language to work with! In particular, here are some
  amazing community projects we are building upon: [Dream], [Brr] and
  [Omd] and [many more]


[dream-accept] <https://github.com/tmattio/dream-accept>

[dream-encoding] <https://github.com/tmattio/dream-encoding>

[hilite] <https://github.com/patricoferris/hilite>

[code-mirror]
<https://github.com/patricoferris/jsoo-code-mirror/tree/static>

[js_top_worker] <https://github.com/jonludlam/js_top_worker>

[Support for HTML fragments in odoc]
<https://github.com/ocaml/odoc/pull/842>

[API changes and capability to fetch metadata from RSS post links]
<https://github.com/kayceesrk/river/pull/6>

[Dream] <https://aantron.github.io/dream/>

[Brr] <https://github.com/dbuenzli/brr>

[Omd] <https://github.com/ocaml/omd>

[many more] <https://github.com/ocaml/ocaml.org/blob/main/ocamlorg.opam>


What's next?
╌╌╌╌╌╌╌╌╌╌╌╌

  Launching the website is the first step on our roadmap to improve
  OCaml’s online presence.

  As mentioned above, the immediate goal is to be ready for this OCaml
  5.00.0 release. With this in mind, we want to focus on improving the
  documentation and ensuring it includes good user pathways to learn
  about Domains, Effects, and generally how to write concurrent programs
  in OCaml.

  In addition to the documentation, some of the other projects on our
  roadmap are:

  • Toplevels for all the packages that compile to JavaScript.
  • Including OCaml Weekly News in the OCaml blog.
  • A better search through packages, documentation, and packages'
    documentation.

  This is an exciting time! Stay tuned!


Call for maintainers
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  There's a lot of ways to contribute if you'd like to help. Our
  [contributing guide] should be a good entry point to learn what you
  can do as a community contributor.

  We're also looking for maintainers. As we're completing the first
  milestone with the launch and will start working on new projects, now
  is a great time to get involved!

  If you'd like to help on the initiatives on our roadmap above (or
  others!), feel free to reach out to me by email at
  thibaut@tarides.com, or by replying to this post.


[contributing guide]
<https://github.com/ocaml/ocaml.org/blob/main/CONTRIBUTING.md>


Acknowledgements
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  This project was a huge effort that started over a year ago, and the
  result of dozens of [contributors]. We want to thank every one who
  contributed to the site.

  In particular, for the groundwork on rethinking the sitemap, user
  flows, new content, design, and frontend and package docs, we thank
  Ashish Agarwal, Kanishka Azimi, Richard Davison, Patrick Ferris, Gemma
  Gordon, Isabella Leandersson, Thibaut Mattio and Anil Madhavapeddy.

  For the work on the package site infrastructure and UI, we thank Jon
  Ludlam, Jules Aguillon and Lucas Pluvinage. And for the work on the
  designs and bringing them to life on the frontend, we thank Isabella
  Leandersson and Asaad Mahmood.

  For the work on the new content and reviewing the existing one, we
  thank Christine Rose and Isabella Leandersson.

  For the contributions on the content for Ahrefs, Jane Street and
  LexiFi respectively, we thank Louis Roché, James Somers, Nicolás Ojeda
  Bär.

  We’d also like to thank the major funders who supported the work on
  revamping the website: grants from the Tezos Foundation, Jane Street
  and Tarides facilitated the bulk of the work. Thank you, and if anyone
  else wishes to help support it on an ongoing basis then donations to
  the OCaml Software Foundation and grants to the maintenance teams
  mentioned above are always welcomed.


[contributors] <https://github.com/ocaml/ocaml.org/graphs/contributors>


Remaking an Old Game in OCaml
═════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/remaking-an-old-game-in-ocaml/9760/1>


Yotam Barnoy announced
──────────────────────

  I've starting blogging about a [side-project of mine]. Hopefully I'll
  find the time to write some further entries in the series, including
  about reverse engineering a binary with IDA.


[side-project of mine]
<https://justabluddyblog.wordpress.com/2022/05/01/remaking-an-old-game-in-ocaml/>


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


[-- Attachment #1.2: Type: text/html, Size: 26538 bytes --]

[-- Attachment #2: Type: text/plain, Size: 119 bytes --]

Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'INRIA.

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2022-04-26  6:44 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2022-04-26  6:44 UTC (permalink / raw)
  To: lwn, cwn, caml-list


[-- Attachment #1.1: Type: text/plain, Size: 9882 bytes --]

Hello

Here is the latest OCaml Weekly News, for the week of April 19 to 26,
2022.

Table of Contents
─────────────────

Multicore OCaml: March 2022
OUPS meetup may 2022 (french only)
JFLA 2022: Call for Participation (in French)
Old CWN


Multicore OCaml: March 2022
═══════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/multicore-ocaml-march-2022/9692/1>


Anil Madhavapeddy announced
───────────────────────────

  Welcome to the March 2022 [Multicore OCaml] monthly report! This
  update along with the [previous updates] have been compiled by me,
  @ctk21, @kayceesrk and @shakthimaan.

  We have continued steadily towards making a stable OCaml 5.0 release,
  as you can see from the long list of fixes later – thank you for all
  your contributions! Platform configurations that were formerly
  supported in the 4.x branches for OpenBSD, FreeBSD, and NetBSD have
  now been re-enabled. ARM64 support (for macOS, Linux and the BSDs) is
  stable in trunk, and ARM CFI integration has been merged as a
  follow-up to facilitate debugging and profiling.  Notably, this also
  includes [memory model tests for ARMv8 and Power ports]. The Windows
  mingw64 port is also working again in trunk.

  An [effects tutorial] has also been contributed to the OCaml manual;
  feedback continues to be welcome even after it's merged in.  As you
  experiment with effects, please do continue to post to this forum with
  questions or comments about your learnings.

  The Sandmark benchmark project has added bytecode analysis to address
  any performance regressions. We have also been working on obtaining
  measurements for the compilation data points. The current-bench
  pipeline production deployments has significant UI changes, and now
  has alert notifications for the benchmark runs.

  As always, the Multicore OCaml open and completed tasks are listed
  first, which are then followed by the ecosystem tooling projects. The
  Sandmark, sandmark-nightly, and current-bench project updates are
  finally presented for your reference.

  /Editor’s note: please find the full changelog following the archive
  link above./


[Multicore OCaml] <https://github.com/ocaml-multicore/ocaml-multicore>

[previous updates] <https://discuss.ocaml.org/tag/multicore-monthly>

[memory model tests for ARMv8 and Power ports]
<https://github.com/ocaml/ocaml/pull/11004>

[effects tutorial] <https://github.com/ocaml/ocaml/pull/11093>


OUPS meetup may 2022 (french only)
══════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/oups-meetup-may-2022-french-only/9715/1>


zapashcanon announced
─────────────────────

  Le prochain OUPS aura lieu le *jeudi 12 mai* 2022. Le rendez-vous est
  fixé à *19h* en *salle 15-16 101* , *4 place Jussieu* , 75005 Paris.

  *L'inscription est obligatoire* pour pouvoir accéder au meetup ! Votre
  nom complet doit être disponible.  L'inscription s'effectue sur
  [meetup].

  Toutes les informations sont disponibles sur [le site du oups].

  J'aimerais aussi signaler que les slides et vidéos des exposés passés
  [sont maintenant disponibles] ! :partying_face:

  *Programme*


[meetup] <https://www.meetup.com/fr-FR/ocaml-paris>

[le site du oups] <https://oups.frama.io>

[sont maintenant disponibles] <https://oups.frama.io/past.html>

Gospel & Ortac - Clément Pascutto
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  Gospel is a behavioural specification language for OCaml program. It
  provides developers with a non-invasive and easy-to-use syntax to
  annotate their module interfaces with formal contracts that describe
  type invariants, mutability, function pre-conditions and
  post-conditions, effects, exceptions, and [much more]!

  ortac: OCaml Runtime Assertion Checking.


[much more] <https://ocaml-gospel.github.io/gospel/>


MirageOS 4 - Romain Calascibetta
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  MirageOS 4 vient de sortir récemment et c'est l'occasion de
  (re)présenter ce projet permettant de construire des unikernels. Nous
  y présenterons les nouvelles features et possibilités et nous ferons
  une introspection de 3 ans de travail de l'équipe core.


Tezt: OCaml Tezos Test Framework - Romain Bardou
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  Tezt is a test framework for OCaml. It is well suited for unit and
  regression tests and particularly shines for integration tests,
  i.e. tests that launch external processes. It was made with a focus on
  user experience. It allows you to easily select tests from the
  command-line and provides pretty logs. It also can run tests in
  parallel, automatically split the set of tests into several
  well-balanced batches to be run in parellel CI jobs, produce JUnit
  outputs, and more. It has been in use at Nomadic for the last 2 years
  and is thus quite battle-tested.


JFLA 2022: Call for Participation (in French)
═════════════════════════════════════════════

  Archive:
  <https://sympa.inria.fr/sympa/arc/caml-list/2022-04/msg00008.html>


Timothy Bourke announced
────────────────────────

  [ This message is intentionally written in French. It is a call for
  participation for the "Francophone Days on Functional Languages" to be
  held, finally and fingers crossed, at the end of June. Some of the
  articles are written in English. They are available online:
  <https://hal.inria.fr/JFLA2022/> ]

  *Merci de faire circuler : premier appel à participation*

  JFLA'2022 (<http://jfla.inria.fr/jfla2022.html>)

  Journées Francophones des Langages Applicatifs

  Saint-Médard-d'Excideuil - du 28 juin au 1er juillet 2022

  Les inscriptions aux JFLA 2022 - en présence ! - sont désormais
  ouvertes :

  <https://www.azur-colloque.fr/DR04/inscription/preinscription/203/fr>

  Ces journées réunissent concepteurs, utilisateurs et théoriciens ;
  elles ont pour ambition de couvrir les domaines des langages
  applicatifs, de la preuve formelle, de la vérification de programmes,
  et des objets mathématiques qui sous-tendent ces outils. Ces domaines
  doivent être pris au sens large : nous souhaitons promouvoir les ponts
  entre les différentes thématiques.

  L'inscription est un forfait qui comprend notamment l'hébergement en
  pension complète sur le site des journées :
  • participant·e plein tarif, chambre simple : 660 euros
  • étudiant·e orateur·ice, en chambre double : 0 euro

  Nous espérons que vous serez nombreux à participer à ces journées.
  Inscrivez-vous dès que possible ! En particulier, les étudiant·es
  orateur·ices sont invité·es à s'inscrire, même s'ils ne paient pas
  grâce à nos sponsors.

  Vous pouvez d'ores et déjà vous inscrire au salon de discussion
  framateam afin d'échanger ensemble :
  <https://framateam.org/signup_user_complete/?id=gnbebtncubnbpe96ok9kam8t9y>

  Tout le programme est à retrouver ici :
  <http://jfla.inria.fr/jfla2022.html>


Dates importantes
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  • 17 juin 2022 : date limite d'inscription aux journées
  • 28 juin au 1er juillet 2022 : journées


Cours invités
╌╌╌╌╌╌╌╌╌╌╌╌╌

  • Delphine Demange (IRISA, Université de Rennes 1) "Si2-FIP:
    Programmation Fonctionnelle en Licence 1 avec Scala"

  • Denis Mérigoux (Inria) "Rust pour le formaliste impatient"


Exposé invité
╌╌╌╌╌╌╌╌╌╌╌╌╌

  • Matthias Puech (INA GRM) Titre à venir - avec une surprise !


Articles acceptés
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  L'ensemble des articles acceptés est disponible sous forme d'une
  collection HAL : <https://hal.inria.fr/JFLA2022>


Comité de programme
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  • Chantal Keller LMF, Université Paris-Saclay (Présidente)
  • Timothy Bourke Inria, ÉNS de Paris (Vice-président)

  • Sandrine Blazy Irisa, Université Rennes 1
  • Frédéric Bour Tarides - Inria
  • Guillaume Bury OcamlPro
  • Stefania Dumbrava Samovar, ENSIIE, Télécom Sud Paris
  • Diane Gallois-Wong Nomadic Labs
  • Adrien Guatto IRIF, Université de Paris
  • David Janin LaBRI, Université de Bordeaux
  • Marie Kerjean LIPN, Université Paris 13
  • Luc Pellissier LACL, Université Paris-Est Créteil
  • Mário Pereira NOVA-LINCS, Universidade Nova de Lisboa
  • Alix Trieu Aarhus University
  • Yannick Zakowski LIP, Inria, ÉNS de Lyon


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


[-- Attachment #1.2: Type: text/html, Size: 20509 bytes --]

[-- Attachment #2: Type: text/plain, Size: 119 bytes --]

Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'INRIA.

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2022-04-19  5:34 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2022-04-19  5:34 UTC (permalink / raw)
  To: lwn, cwn, caml-list


[-- Attachment #1.1: Type: text/plain, Size: 9483 bytes --]

Hello

Here is the latest OCaml Weekly News, for the week of April 12 to 19,
2022.

Table of Contents
─────────────────

Lwt informal user survey
pyml_bindgen: a CLI app to generate Python bindings directly from OCaml value specifications
Creating a library for use from JS with js_of_ocaml
ocaml-lsp-server 1.11.0
OCaml summer school in Spain, call for industry speakers
Dune 3.1.0
Old CWN


Lwt informal user survey
════════════════════════

  Archive: <https://discuss.ocaml.org/t/lwt-informal-user-survey/9666/1>


Raphaël Proust announced
────────────────────────

  In order to make some decisions relating to the maintenance of Lwt,
  I'd like to know a little bit more about how the library is used in
  the wild. Do not hesitate to respond to the poll and/or as a message
  in this thread, or even to contact me via other means in case discuss
  is not your jam.

  /Editor’s note: please follow the link above to reply to the survey./


pyml_bindgen: a CLI app to generate Python bindings directly from OCaml value specifications
════════════════════════════════════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-pyml-bindgen-a-cli-app-to-generate-python-bindings-directly-from-ocaml-value-specifications/8786/7>


Continuing this thread, Ryan Moore announced
────────────────────────────────────────────

  I wrote a [blog post] providing an introduction to `pyml_bindgen'.  It
  gives an intro in a slightly different style as compared to the [docs]
  and the [examples], and includes some of the latest features I've been
  working on.


[blog post]
<https://www.tenderisthebyte.com/blog/2022/04/12/ocaml-python-bindgen/>

[docs] <https://mooreryan.github.io/ocaml_python_bindgen/>

[examples]
<https://github.com/mooreryan/ocaml_python_bindgen/tree/main/examples>


Creating a library for use from JS with js_of_ocaml
═══════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/creating-a-library-for-use-from-js-with-js-of-ocaml/9523/5>


Deep in this thread, threepwood said
────────────────────────────────────

  Cautionary note for anyone reading this in the future: dynamic imports
  are asynchronous, and initializing the jsoo runtime takes some
  milliseconds, so that if you just do:
  ┌────
  │ import("ocaml/export.bc.js");
  │ var x = mylib.myfunction();
  └────
  the second line will fail as `mylib' is not defined yet (at least this
  is what I think is happening). You need to guarantee the module is
  done initializing in some way or other.


Kim Nguyễn then said
────────────────────

  `import' should return a promise of the loaded module. So you can just
  `await' for it (if your current context allows you to write `await')
  or just :
  ┌────
  │  import("ocaml/export.bc.js").then ((_) => {
  │ 
  │  mylib.myfunction();
  │ 
  │ });
  └────


ocaml-lsp-server 1.11.0
═══════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-ocaml-lsp-server-1-11-0/9677/1>


Rudi Grinberg announced
───────────────────────

  On behalf of the ocamllsp team, I'm excited to announce the
  availability of version 1.11.0. This release is an important milestone
  for the project because it introduces integration with our favorite
  build system. When you run dune in watch mode, you will now be able to
  see build errors in the diagnostics panel of your editor. It's all
  rather experimental for now, so your feedback and bug reports are
  appreciated.

  As usual, the full change log is below.

  Happy hacking.

  *1.11.0*


Features
╌╌╌╌╌╌╌╌

  • Add support for dune in watch mode. The lsp server will now display
    build errors in the diagnostics and offer promotion code actions.

  • Re-introduce ocamlformat-rpc (#599, fixes #495)


Fixes
╌╌╌╌╌

  • Fix workspace symbols that could have a wrong path in some cases
    ([#675])


[#675] <https://github.com/ocaml/ocaml-lsp/pull/671>


OCaml summer school in Spain, call for industry speakers
════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ocaml-summer-school-in-spain-call-for-industry-speakers/9685/1>


Roberto Blanco announced
────────────────────────

  Dear all, Ricardo Rodríguez and I are organizing an introductory OCaml
  course as part of the annual summer school of the University of
  Zaragoza in Spain. (This is the oldest summer university in the
  country, nearing its centennial anniversary!). The country's computing
  programs are quite excellent, although we have found them to generally
  not pay serious attention to modern functional programming. Our goal
  is to use OCaml to begin to address this dearth.

  In addition to the regular academic program we are planning a
  satellite event open to the general public. This is meant to introduce
  the OCaml ecosystem to a wider audience of students and academics, as
  well as professionals. As part of this, we would like to hold a round
  table discussion of industrial OCaml users to demonstrate the width
  and depth of practical uses of the language. There will be time for
  participants to present their work in more detail, if they wish to do
  so.

  If you may be interested in participating or have any questions, feel
  free to write to me here or send email to either of us. The course is
  currently in its planning stages; it is scheduled to take place in
  early to mid July, in all likelihood in the city of Zaragoza and in
  hybrid format. The OCaml Software Foundation is backing the initiative
  and we thank them for their generous support.

  Updated information about the course will be available on its website:
  <https://webdiis.unizar.es/evpf/>


Dune 3.1.0
══════════

  Archive: <https://discuss.ocaml.org/t/ann-dune-3-1-0/9690/1>


Rudi Grinberg announced
───────────────────────

  On behalf of the dune team, I'm pleased to announce version
  3.1.0. This release contains some small, but interesting features, and
  some important quality of life bug fixes. I encourage everyone to
  upgrade as soon as possible.

  Happy Hacking.

  *3.1.0 (15/04/2022)*

  • Add `sourcehut' as an option for defining project sources in
    dune-project files. For example, `(source (sourcehut
    user/repo))'. (#5564, @rgrinberg)

  • Add `dune coq top' command for running a Coq toplevel (#5457,
    @rlepigre)

  • Fix dune exec dumping database in wrong directory (#5544, @bobot)

  • Always output absolute paths for locations in RPC reported
    diagnostics (#5539, @rgrinberg)

  • Add `(deps <deps>)' in ctype field (#5346, @bobot)

  • Add `(include <file>)' constructor to dependency
    specifications. This can be used to introduce dynamic dependencies
    (#5442, @anmonteiro)

  • Ensure that `dune describe' computes a transitively closed set of
    libraries (#5395, @esope)

  • Add direct dependencies to $ dune describe output (#5412, @esope)

  • Show auto-detected concurrency on Windows too (#5502, @MisterDA)

  • Fix operations that remove folders with absolute path. This happens
    when using esy (#5507, @EduardoRFS)

  • Dune will not fail if some directories are non-empty when
    uninstalling.  (#5543, fixes #5542, @nojb)

  • `coqdep' now depends only on the filesystem layout of the .v files,
    and not on their contents (#5547, helps with #5100, @ejgallego)

  • The mdx stanza 0.2 can now be used with `(implicit_transitive_deps
    false)' (#5558, fixes #5499, @emillon)

  • Fix missing parenthesis in printing of corresponding terminal
    command for `(with-outputs-to )' (#5551, fixes #5546, @Alizter)


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


[-- Attachment #1.2: Type: text/html, Size: 20212 bytes --]

[-- Attachment #2: Type: text/plain, Size: 119 bytes --]

Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'INRIA.

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2022-04-12  8:10 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2022-04-12  8:10 UTC (permalink / raw)
  To: lwn, cwn, caml-list


[-- Attachment #1.1: Type: text/plain, Size: 14034 bytes --]

Hello

Here is the latest OCaml Weekly News, for the week of April 05 to 12,
2022.

Table of Contents
─────────────────

LexiFi is hiring!
Développeur principal à plein temps d'Alt-Ergo chez OCamlPro
Using an external JavaScript file in js_of_ocaml
diskuvbox: small set of cross-platform CLI tools
Old CWN


LexiFi is hiring!
═════════════════

  Archive:
  <https://discuss.ocaml.org/t/job-fulltime-internship-paris-lexifi-is-hiring/9648/1>


Alain Frisch announced
──────────────────────

  📢 [LexiFi] is hiring!

  ✔️ Software Engineer (full-time): <https://lnkd.in/evhkxTg>

  ✔️ Software Development Internship: <https://lnkd.in/gb-bdDA9>

  LexiFi is a software editor, based in Paris. We have been happily
  using OCaml 🐪 for more than 20 years in our entire software stack,
  from backend components to UI (web & native) front-end, and we
  contribute back to the OCaml community (check out our blog post :
  <https://www.lexifi.com/blog/ocaml/ocaml-open-source/>)

  Don't hesitate to contact me directly if you want to learn more about
  the positions before applying!


[LexiFi] <https://www.lexifi.com>


Développeur principal à plein temps d'Alt-Ergo chez OCamlPro
════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/job-fulltime-paris-developpeur-principal-a-plein-temps-dalt-ergo-chez-ocamlpro/9660/1>


Fabrice Le Fessant announced
────────────────────────────

  Alt-Ergo est l'un des solveurs SMT les plus efficaces pour la
  vérification formelle de code. Il est ainsi utilisé derrière des
  ateliers tels que Why3, Frama-C et Spark. Initialement développé par
  Sylvain Conchon au LRI, il est aujourd'hui maintenu par OCamlPro,
  grâce aux financements du Club Alt-Ergo (AdaCore, Trust-in-Soft,
  Thalès, MERCE, CEA List), à des contrats bilatéraux d'évolution et à
  des projets collaboratifs.

  OCamlPro souhaite aujourd'hui recruter un développeur principal à
  temps plein pour Alt-Ergo, pour compléter son équipe méthodes
  formelles et accélérer l'évolution d'Alt-Ergo.  Disposant d'une
  expérience dans les méthodes formelles, ses missions seront :

  • de découvrir le projet Alt-Ergo et tous ses composants (prouveur,
    interface graphique, etc.) et d'en comprendre le fonctionnement à
    travers l'exploration du code et la lecture d'articles
    scientifiques;
  • d'élaborer la roadmap de maintenance évolutive d'Alt-Ergo, en
    collaboration avec les membres du Club Alt-Ergo, et de proposer des
    améliorations qui pourront être financées au travers de contrats
    bilatéraux ou de projets collaboratifs;
  • de participer avec l'équipe à la maintenance corrective d'Alt-Ergo
    et de fournir du support aux membres du Club Alt-Ergo;
  • de participer à l'encadrement de stages et de thèses CIFRE autour
    d'Alt-Ergo et des solveurs SMT en général;
  • de suivre l'actualité des solveurs SMTs et des travaux scientifiques
    connexes, et de maintenir des collaborations avec les experts
    académiques du domaine;

  Intégré au sein de l'équipe Méthodes Formelles d'OCamlPro, il
  bénéficiera de leur expérience et leur fera bénéficier de son
  expertise croissante dans l'utilisation d'Alt-Ergo. Outre la
  maintenance d'Alt-Ergo, l'équipe Méthodes Formelles d'OCamlPro
  participe à diverses activités:

  • Développement d'outils open-source pour les méthodes formelles, tels
    que Dolmen, Matla, etc.
  • Expertises sur WhyML, TLA, Coq, et autres langages de spécification
    et de vérification;
  • Certification de logiciels pour les Critères Communs (EAL6 et plus)
  • Spécification et vérification formelle de smart contracts (Solidity,
    etc.)

  Les bureaux d'OCamlPro sont dans le 14ème arrondissement de Paris
  (Alésia). L'entreprise est connue pour son équipe sympathique, son
  excellence technique, sa productivité, ses valeurs et son éthique.

  Si ce poste vous intéresse, n'hésitez pas à envoyer votre CV à:

  contact@ocamlpro.com

  Pour plus d'informations sur OCamlPro:

  <https://www.ocamlpro.com/>

  Pour plus d'informations sur Alt-Ergo:

  <https://alt-ergo.ocamlpro.com/>

  Pour plus d'informations sur le Club Alt-Ergo:

  <https://www.ocamlpro.com/club-alt-ergo>


Using an external JavaScript file in js_of_ocaml
════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/using-an-external-javascript-file-in-js-of-ocaml/9661/1>


John Whitington asked
─────────────────────

  I am a beginner at both Javascript and `js_of_ocaml', so I may be
  mixing up all sorts of mistakes and misconceptions here.

  I have compiled up an existing project, my command line PDF tools,
  using `js_of_ocaml', and all is well:

  ┌────
  │ $ node cpdf.js -info hello.pdf
  │ Encryption: Not encrypted
  │ Permissions:
  │ Linearized: false
  │ Version: 1.1
  │ Pages: 1
  └────

  Like magic! But I had to comment out the parts of my code which use
  external C code of course - that is zlib and some encryption
  primitives. So now I wish to bind javascript libraries for those. I am
  experimenting with a simple library of my own, first, which is given
  on the command line to `js_of_ocaml' as `foomod.js':

  ┌────
  │ foo = 42;
  └────

  I can get to this global variable easily from OCaml:

  ┌────
  │ let foo = Js.Unsafe.global##.foo
  └────

  But now I want to do things better, and I change `foomod.js' to:

  ┌────
  │ exports.foo = 42;
  └────

  How can I get to that? Giving `foomod.js' on the `js_of_ocaml' command
  line includes the contents of `foomod.js' in some way, but does not
  contain the string `foomod', so I'm not sure how to get to the
  foomod's variables and functions. How to I access them? In the node
  REPL, I can simply do:

  ┌────
  │ > foomod = require('./foomod.js');
  │ { foo; 42 }
  │ > foomod.foo;
  │ 42
  └────

  I have read the `js_of_ocaml' help page on how to bind JS modules:

  <https://ocsigen.org/js_of_ocaml/latest/manual/bindings>

  I imagine if I could get over this hump, all the rest of the
  information I need will be there.


Nicolás Ojeda Bär replied
─────────────────────────

  Not exactly what you asked, but if you just want to provide a JS
  version of some C primitive

  ┌────
  │ external foo : unit -> int = "caml_foo"
  └────

  you can do this by writing the following in your `.js' file:

  ┌────
  │ //Provides: caml_foo
  │ function caml_foo() {
  │   return 42;
  │ }
  └────

  Then `js_of_ocaml' will automatically replace calls to the external
  function by a call to its JS implementation.

  This is the same mechanism used by `js_of_ocaml' to implement its own
  JS version of the OCaml runtime, see eg

  <https://github.com/ocsigen/js_of_ocaml/blob/3850a67b1cb00cfd2ee4399cf1e2948062884b92/runtime/bigarray.js#L328-L335>


diskuvbox: small set of cross-platform CLI tools
════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-diskuvbox-small-set-of-cross-platform-cli-tools/9663/1>


jbeckford announced
───────────────────

  *TLDR*:
  ┌────
  │ $ opam update
  │ $ opam install diskuvbox
  │ 
  │ $ diskuvbox copy-dir --mode 755 src1/ src2/ dest/
  │ $ diskuvbox copy-file --mode 400 src/a dest/b
  │ $ diskuvbox copy-file-into src1/a src2/b dest/
  │ $ diskuvbox touch-file x/y/z
  │ 
  │ $ diskuvbox find-up . _build
  │ Z:/source/_build
  │ 
  │ $ diskuvbox tree --max-depth 2 --encoding=UTF-8 .
  │ .
  │ ├── CHANGES.md
  │ ├── README.md
  │ ├── _build/
  │ │   ├── default/
  │ │   ├── install/
  │ │   └── log
  └────

  *Problem*: When writing cram tests, Dune rules and Opam build steps,
  often we default to using GNU binaries (`/usr/bin/*') available on
  Linux (ex. `/usr/bin/cp -R'). Unfortunately these commands rarely work
  on Windows, and as a consequence Windows OCaml developers are forced
  to maintain Cygwin or MSYS2 installations to get GNU tooling.

  *Solution*: Provide some of the same functionality for Windows and
  macOS that the GNU binaries in `/usr/bin/*' do in Linux.

  `diskuvbox' is a single binary that today provides an analog for a
  very small number of binaries that I have needed in the Diskuv Windows
  OCaml distribution. It is liberally licensed under Apache v2.0. *With
  your PRs it could emulate much more!*

  `diskuvbox' has CI testing for Windows, macOS and Linux. Usage and
  help are available in the diskuvbox README:
  <https://github.com/diskuv/diskuvbox#diskuv-box>

  *`diskuvbox' also has a OCaml library, but consider the API unstable
   until version 1.0.*

  Alternatives:
  • There are some shell scripting tools like [shexp] and [feather] that
    give you POSIX pipes in OCaml-friendly syntax. I feel these
    complement Diskuv Box.
  • Dune exposes `(copy)' to copy a file in Dune rules; theoretically
    more operations could be added.

  Internally `diskuvbox' is a wrapper on the excellent [bos - Basic OS
  interaction] library.


[shexp] <https://github.com/janestreet/shexp>

[feather] <https://github.com/charlesetc/feather>

[bos - Basic OS interaction]
<https://erratique.ch/software/bos/doc/Bos/index.html>

Acknowledgements
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  The first implementations of Diskuv Box were implemented with the
  assistance of the [OCaml Software Foundation (OCSF)], a sub-foundation
  of the [INRIA Foundation].

  Two OCaml libraries ([bos] and [cmdliner]) are essential to Diskuv
  Box; these libraries were created by [Daniel Bünzli] (@dbuenzli) .


[OCaml Software Foundation (OCSF)] <http://ocaml-sf.org>

[INRIA Foundation] <https://www.inria.fr>

[bos] <https://erratique.ch/software/bos>

[cmdliner] <https://erratique.ch/software/cmdliner>

[Daniel Bünzli] <https://erratique.ch/profile>


Examples
╌╌╌╌╌╌╌╌

  The following are examples that have been condensed from the
  [diskuvbox README.md] …


[diskuvbox README.md] <https://github.com/diskuv/diskuvbox#diskuv-box>

Using in Dune cram tests
┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄

  ┌────
  │ $ install -d a/b/c/d/e/f
  │ $ install -d a/b2/c2/d2/e2/f2
  │ $ install -d a/b2/c3/d3/e3/f3
  │ $ install -d a/b2/c3/d4/e4/f4
  │ $ install -d a/b2/c3/d4/e5/f5
  │ $ install -d a/b2/c3/d4/e5/f6
  │ $ touch a/b/x
  │ $ touch a/b/c/y
  │ $ touch a/b/c/d/z
  │ 
  │ $ diskuvbox tree a --max-depth 10 --encoding UTF-8
  │ a
  │ ├── b/
  │ │   ├── c/
  │ │   │   ├── d/
  │ │   │   │   ├── e/
  │ │   │   │   │   └── f/
  │ │   │   │   └── z
  │ │   │   └── y
  │ │   └── x
  │ └── b2/
  │     ├── c2/
  │     │   └── d2/
  │     │       └── e2/
  │     │           └── f2/
  │     └── c3/
  │         ├── d3/
  │         │   └── e3/
  │         │       └── f3/
  │         └── d4/
  │             ├── e4/
  │             │   └── f4/
  │             └── e5/
  │                 ├── f5/
  │                 └── f6/
  └────


Using in Opam `build' steps
┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄

  ┌────
  │ build: [
  │   ["diskuvbox" "copy-file-into" "assets/icon.png" "assets/public.gpg" "%{_:share}%"]
  │ ]
  └────


Using in Dune rules
┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄

  ┌────
  │ (rule
  │  (targets diskuvbox.corrected.ml diskuvbox.corrected.mli)
  │  (deps
  │   (:license %{project_root}/etc/license-header.txt)
  │   (:conf    %{project_root}/etc/headache.conf))
  │  (action
  │   (progn
  │    (run diskuvbox copy-file -m 644 diskuvbox.ml  diskuvbox.corrected.ml)
  │    (run diskuvbox copy-file -m 644 diskuvbox.mli diskuvbox.corrected.mli)
  │    (run headache -h %{license} -c %{conf} %{targets})
  │    (run ocamlformat --inplace --disable-conf-files --enable-outside-detected-project %{targets}))))
  └────


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


[-- Attachment #1.2: Type: text/html, Size: 25501 bytes --]

[-- Attachment #2: Type: text/plain, Size: 119 bytes --]

Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'INRIA.

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2022-04-05 11:50 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2022-04-05 11:50 UTC (permalink / raw)
  To: lwn, cwn, caml-list


[-- Attachment #1.1: Type: text/plain, Size: 20781 bytes --]

Hello

Here is the latest OCaml Weekly News, for the week of March 29 to April
05, 2022.

Table of Contents
─────────────────

v0.15 release of Jane Street packages
EmelleTV Show - 2022
Open source editor for iOS, iPadOS and macOS
The mysterious pointer in the runtime closure representation
Other OCaml News
Old CWN


v0.15 release of Jane Street packages
═════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-v0-15-release-of-jane-street-packages/9612/1>


Arseniy Alekseyev announced
───────────────────────────

  We are pleased to announce the v0.15 release of Jane Street packages!

  This release comes with 41 new packages, and a large number of fixes
  and enhancements. The documentation for the individual packages will
  soon be available on [v3.ocaml.org/packages], after some technical
  issues are fixed.

  The remainder of this e-mail highlights the main changes since the
  v0.14 release.


[v3.ocaml.org/packages] <https://v3.ocaml.org/packages>

Notable changes
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

Re-structuring of `Core'.
┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄

  The most noticeable breaking change is the re-structuring of `Core'.

  In 0.14, `Core' is somewhat bloated and includes many modules that are
  barely ever used, many of which are Unix-specific. In 0.15, many of
  those modules moved to separate libraries, most of them to
  package~core_unix~, and `core' is now much smaller and no longer
  contains unix-specific code.

  The mapping between the new libraries and the old modules can be
  summarized by the contents of `Core_compat' library v0.14:

  ┌────
  │ module Command_unix = Core.Command
  │ module Date_unix = Core.Date
  │ module Filename_unix = Core.Filename
  │ module Signal_unix = Core.Signal
  │ module Sys_unix = Core.Sys
  │ module Core_thread = Core.Thread
  │ module Time_unix = Core.Time
  │ module Time_ns_unix = Core.Time_ns
  │ module Core_unix = Core.Unix
  │ module Version_util = Core.Version_util
  │ 
  │ module Interval_lib = struct
  │   module Interval = Core.Interval
  │   module Interval_intf = Core.Interval_intf
  │ end
  │ 
  │ module Time_interface = Core.Time_common
  └────


Async: `Monitor.try_with'
┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄

  `Monitor.try_with' and related functions changed the defaults for
  their `run' and `rest' parameters.  They used to default to
  `~~run:~Schedule ~rest:~Log~', but now they default to `~~run:~Now
  ~rest:~Raise~'.


Many other changes
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  There are many changes and additions across 130+ existing packages,
  and unfortunately we don't maintain a changelog to list them all.  The
  code for all of our packages is on our [github], and if you're
  interested in the details of what changed in a particular package, you
  can inspect the diff between branches v0.14 and v0.15.


[github] <https://github.com/janestreet>


New packages
╌╌╌╌╌╌╌╌╌╌╌╌

  [`abstract_algebra']: A small library describing abstract algebra
  concepts

  A library describing abstract algebra concepts. Currently, it includes
  Commutative_group and Vector_space.

  [`async_rpc_websocket']: Library to serve and dispatch Async RPCs over
  websockets

  Library to serve and dispatch Async RPCs over websockets.

  Rpc_websocket makes it easy to serve and send Async RPCs with
  HTTP+Websocket underlying the transport. It also provides a mechanism
  to share the RPC implementations between a vanilla TCP server and a
  HTTP server.

  On the server side, the library detects when a websocket connection is
  established, and routes to an optionally provided vanilla HTTP handler
  when non-websocket traffic occurs.

  [`bigdecimal']: Arbitrary-precision decimal based on Zarith

  A high-precision representation of decimal numbers as [mantissa *
  10^exponent], where the mantissa is internally a [Bigint.t] and the
  exponent is an [int].

  [`cohttp_async_websocket']: Websocket library for use with cohttp and
  async

  Websocket library for use with cohttp and async.

  Cohttp_async_websocket is a full-featured server-side websocket
  implementation, using Async as the concurrency library, and Cohttp for
  HTTP negotiation.

  It implements a large portion of RFC6445. The library has been
  hardened with many applications using it for several year, in
  conjunction with async-js and google-chrome.

  [`cohttp_static_handler']: A library for easily creating a cohttp
  handler for static files

  Single page handlers are handlers that serve user specified JavaScript
     and css files along with a generated index page that loads those
     files.

  [`core_compat']: Compatibility for core 0.14

  Compatibility wrapper to make it possible to have code compatible with
  both Core 0.14 and 0.15.

  [`env_config']: Helper library for retrieving configuration from an
  environment variable

  The Env_config library is a helper for retrieving library and program
  configuration from an environment variable. Its goal is to make it
  easy to override a configuration that is loaded from disk, computed,
  or embedded in a library.

  [`file_path']: A library for typed manipulation of UNIX-style file
  paths

  A library for typed manipulation of UNIX-style file paths.

  [`fuzzy_match']: A library for fuzzy string matching

  A library for fuzzy string matching

  [`fzf']: A library for running the fzf command line tool

  A library for running the fzf command line fuzzy matcher

  [`hardcaml_c']: Hardcaml C Simulation Backend

  A fast C-based simulation backend for Hardcaml circuits.

  The library transparently compiles a Hardcaml Circuit to C code, which
  is in turn compiled and linked into the running executable. The
  generated simulation object can be used like any other cyclesim
  simulation.

  [`hardcaml_circuits']: Hardcaml Circuits

  A small library of useful/interesting Hardcaml circuits.

  [`hardcaml_fixed_point']: Hardcaml fixed point arithmetic

  Signed and Unsigned fixed point operations, with a full complement of
  rounding and overflow functionality.

  [`hardcaml_of_verilog']: Convert Verilog to a Hardcaml design

  The opensource synthesis tool yosys is used to convert a verilog
  design to a JSON based netlist representation. This library can load
  the JSON netlist and build a hardcaml circuit.

  Code can also be generated to wrap the conversion process using
  Hardcaml interfaces.

  [`hardcaml_step_testbench']: Hardcaml Testbench Monad

  A monad for interacting with Hardcaml.Cyclesim based simulations.

  Allows multiple control threads to interact with a simulation module,
  all of which are synchronised to the system clock.

  [`hardcaml_verify']: Hardcaml Verification Tools

  Tools for verifying properties of Hardcaml circuits.

  Combinational circuits can be converted to 'conjunctive normal form'
  for input into SAT solvers via DIMAC files. Support for a few
  opensource solvers is integrated - minisat, picosat, Z3 - just ensure
  they are in your PATH.

  Circuits can also be converted to NuSMV format for advanced bounded
  and unbounded model checking tasks.

  [`hardcaml_verilator']: Hardcaml Verilator Simulation Backend

  Very fast verilator-based simulations of Hardcaml circuits.

  This library transparently compiles a verilator-based shared library,
  and links it back to the running executable to be used as a Cyclesim
  simulation.

  [`hardcaml_xilinx']: Hardcaml wrappers for Xilinx memory primitives

  The Hardcaml_xilinx library provides wrappers for Xilinx specific RAM
  and FIFO primitive blocks. In many cases a simulation model is
  provided.

  The `Synthesis' module implements various arithmetic and logical RTL
  components with Xilinx LUT primitives.

  [`hardcaml_xilinx_components']: Hardcaml Xilinx component definitions

  A tool for reading Xilinx VHDL Unisim and XPM component definitions
  from a Vivado installation and generating Hardcaml interfaces
  automatically.

  [`hex_encode']: Hexadecimal encoding library

  This library implements hexadecimal encoding and decoding

  [`hg_lib']: A library that wraps the Mercurial command line interface

  A library that wraps the Mercurial command line interface.

  [`int_repr']: Integers of various widths

  Integers of various widths.

  [`jsonaf']: A library for parsing, manipulating, and serializing data
  structured as JSON

  A library for parsing, manipulating, and serializing data structured
  as JSON.

  [`krb']: A library for using Kerberos for both Rpc and Tcp
  communication

  Jane Street's library for Kerberizing RPC connections so that
  • the server gets an authenticated principal (i.e. username) with
    every incoming connection, and
  • RPC communication may be encrypted, if necessary.

  [`magic-trace']: Easy Intel Processor Trace Visualizer

  Magic-trace makes it easy to record and visualize Intel Processor
      Trace data for debugging tricky performance issues.

  [`ocaml-embed-file']: Files contents as module constants

  Embed-file takes some files and generates code for an OCaml module
  defining string constants containing the contents of those files.

  [`ocaml_intrinsics']: Intrinsics

  Provides functions to invoke amd64 instructions (such as
       clz,popcnt,rdtsc,rdpmc) when available, or compatible software
       implementation on other targets.

  [`ocaml-probes']: USDT probes for OCaml: command line tool

  A tool for controlling user-space statically-defined tracing probes
  for OCaml.  Experimental.

  [`ppx_css']: A ppx that takes in css strings and produces a module for
  accessing the unique names defined within

  A ppx that takes in css strings and produces a module for accessing
  the unique names defined within.

  [`ppx_disable_unused_warnings']: Expands [@disable_unused_warnings]
  into [@warning \"-20-26-32-33-34-35-36-37-38-39-60-66-67\"]

  Part of the Jane Street's PPX rewriters collection.

  [`ppx_ignore_instrumentation']: Ignore Jane Street specific
  instrumentation extensions

  Ignore Jane Street specific instrumentation extensions from internal
     PPXs or compiler features not yet upstreamed.

  [`ppx_jsonaf_conv']: [@@deriving] plugin to generate Jsonaf conversion
  functions

  Part of the Jane Street's PPX rewriters collection.

  [`ppx_typed_fields']: GADT-based field accessors and utilities

  Part of the Jane Street's PPX rewriters collection.

  [`ppx_type_directed_value']: Get [@@deriving]-style generation of
  type-directed values without writing a ppx

  `Ppx_type_directed_value' is a ppx that does `[@@deriving]'-style
  generation of type-directed values based on user-provided modules. The
  user-provided modules tell `ppx_type_directed_value' how to compose
  type-directed values (for example, combine type-directed values of the
  fields of a record to form a type-directed value for the record
  itself).

  This allows a wide variety of PPXs such as `ppx_sexp_conv',
  `ppx_compare', `ppx_enumerate', etc. to be implemented with
  `ppx_type_directed_value', but with some runtime cost.

  This PPX currently supports deriving type-directed values for records,
  ordinary & polymorphic variants and tuples. It also supports custom
  user-defined attributes on record and variant fields.

  [`profunctor']: A library providing a signature for simple profunctors
  and traversal of a record

  This is a very small library which provides a signature for profunctor
  types and operations which can be used to traverse a record with them
  based on record_builder and the `ppx_fields' syntax extension.

  [`redis-async']: Redis client for Async applications

  A client library for Redis versions 6 and higher.

  Provides a strongly-typed API with transparent (de)serialization for
  application-defined types.

  Supports client tracking and internally uses the RESP3 protocol.

  [`sexp_diff']: Code for computing the diff of two sexps

  The code behind the [diff] subcommand of the Jane Street's [sexp]
  command line tool.

  [`sexp_grammar']: Sexp grammar helpers

  Helpers for manipulating [Sexplib.Sexp_grammar] values.

  [`sexp_string_quickcheck']: Quickcheck helpers for strings parsing to
  sexps

  This library provides quickcheck generators, helpers, and shrinkers
  for quickcheck-based tests that wish to exercise the concrete syntax
  of sexps, including escape sequences and comments.

  [`tracing']: Tracing library

  Utilities for creating and parsing traces in Fuchsia Trace Format.

  [`username_kernel']: An identifier for a user

  A string representation for a user, typically a UNIX username


[`abstract_algebra'] <https://github.com/janestreet/abstract_algebra>

[`async_rpc_websocket']
<https://github.com/janestreet/async_rpc_websocket>

[`bigdecimal'] <https://github.com/janestreet/bigdecimal>

[`cohttp_async_websocket']
<https://github.com/janestreet/cohttp_async_websocket>

[`cohttp_static_handler']
<https://github.com/janestreet/cohttp_static_handler>

[`core_compat'] <https://github.com/janestreet/core_compat>

[`env_config'] <https://github.com/janestreet/env_config>

[`file_path'] <https://github.com/janestreet/file_path>

[`fuzzy_match'] <https://github.com/janestreet/fuzzy_match>

[`fzf'] <https://github.com/janestreet/fzf>

[`hardcaml_c'] <https://github.com/janestreet/hardcaml_c>

[`hardcaml_circuits'] <https://github.com/janestreet/hardcaml_circuits>

[`hardcaml_fixed_point']
<https://github.com/janestreet/hardcaml_fixed_point>

[`hardcaml_of_verilog']
<https://github.com/janestreet/hardcaml_of_verilog>

[`hardcaml_step_testbench']
<https://github.com/janestreet/hardcaml_step_testbench>

[`hardcaml_verify'] <https://github.com/janestreet/hardcaml_verify>

[`hardcaml_verilator']
<https://github.com/janestreet/hardcaml_verilator>

[`hardcaml_xilinx'] <https://github.com/janestreet/hardcaml_xilinx>

[`hardcaml_xilinx_components']
<https://github.com/janestreet/hardcaml_xilinx_components>

[`hex_encode'] <https://github.com/janestreet/hex_encode>

[`hg_lib'] <https://github.com/janestreet/hg_lib>

[`int_repr'] <https://github.com/janestreet/int_repr>

[`jsonaf'] <https://github.com/janestreet/jsonaf>

[`krb'] <https://github.com/janestreet/krb>

[`magic-trace'] <https://github.com/janestreet/magic-trace>

[`ocaml-embed-file'] <https://github.com/janestreet/ocaml-embed-file>

[`ocaml_intrinsics'] <https://github.com/janestreet/ocaml_intrinsics>

[`ocaml-probes'] <https://github.com/janestreet/ocaml-probes>

[`ppx_css'] <https://github.com/janestreet/ppx_css>

[`ppx_disable_unused_warnings']
<https://github.com/janestreet/ppx_disable_unused_warnings>

[`ppx_ignore_instrumentation']
<https://github.com/janestreet/ppx_ignore_instrumentation>

[`ppx_jsonaf_conv'] <https://github.com/janestreet/ppx_jsonaf_conv>

[`ppx_typed_fields'] <https://github.com/janestreet/ppx_typed_fields>

[`ppx_type_directed_value']
<https://github.com/janestreet/ppx_type_directed_value>

[`profunctor'] <https://github.com/janestreet/profunctor>

[`redis-async'] <https://github.com/janestreet/redis-async>

[`sexp_diff'] <https://github.com/janestreet/sexp_diff>

[`sexp_grammar'] <https://github.com/janestreet/sexp_grammar>

[`sexp_string_quickcheck']
<https://github.com/janestreet/sexp_string_quickcheck>

[`tracing'] <https://github.com/janestreet/tracing>

[`username_kernel'] <https://github.com/janestreet/username_kernel>


EmelleTV Show - 2022
════════════════════

  Archive: <https://discuss.ocaml.org/t/emelletv-show-2022/9613/1>


David Sancho announced
──────────────────────

  I'm creating a post as a header from this season of *EmelleTV* in
  2020. Will use this post to share announcements, new shows, gather
  feedback and invite you to watch and follow
  [https://www.twitch.tv/emelletv]!

  For the ones who doesn't know us, It's a streaming show that will
  happen once per month and will try to interview and talk casually
  about OCaml, Reason, ReScript and their communities. Inviting
  interesting engineers and ask silly questions about literally
  anything.

  If can't attend live, we publish the VOD in youtube under
  [https://www.youtube.com/channel/UCvVVfCa7-nzSuCdMKXnNJNQ].  You can
  re-watch some of the 2021 interviews, they were a ton of fun for me.

  It's made by myself and @fakenickels.

  Feel free to share any feedback, propose any guest or make fun of us
  ^^


[https://www.twitch.tv/emelletv] <https://www.twitch.tv/emelletv>

[https://www.youtube.com/channel/UCvVVfCa7-nzSuCdMKXnNJNQ]
<https://www.youtube.com/channel/UCvVVfCa7-nzSuCdMKXnNJNQ>


Open source editor for iOS, iPadOS and macOS
════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/open-source-editor-for-ios-ipados-and-macos/7624/21>


Nathan Fallet announced
───────────────────────

  Just released the app on the Play Store for Android: [Play Store]

  Feel free to give your feedback as well. I tried to make it like the
  iOS/macOS version. For now, the only missing feature is syntax
  highlighting, but I'm working on it (I still have a few bugs with it)


[Play Store]
<https://play.google.com/store/apps/details?id=me.nathanfallet.ocaml>


The mysterious pointer in the runtime closure representation
════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/the-mysterious-pointer-in-the-runtime-closure-representation/9560/7>


Deep in this thread, Yue Li Picasso announced
─────────────────────────────────────────────

  Thanks for your replies @silene @zozozo !  Due to project interest I
  need to understand the runtime value representation. Now I released a
  little library for displaying runtime values in textual form:
  [OInspect].


[OInspect] <https://github.com/YueLiPicasso/OInspect>


Other OCaml News
════════════════

From the ocamlcore planet blog
──────────────────────────────

  Here are links from many OCaml blogs aggregated at [OCaml Planet].

  • [MirageOS 4 Released!]
  • [PhD Position at CEA LIST - LSL]
  • [All your metrics belong to influx]
  • [Secure Virtual Messages in a Bottle with SCoP]
  • [Research internships in our Tools and Compilers group]


[OCaml Planet] <http://ocaml.org/community/planet/>

[MirageOS 4 Released!]
<https://tarides.com/blog/2022-03-29-mirageos-4-released>

[PhD Position at CEA LIST - LSL]
<http://frama-c.com/jobs/2022-03-28-machine-learning-for-improving-formal-verification-of-code.html>

[All your metrics belong to influx]
<https://hannes.nqsb.io/Posts/Monitoring>

[Secure Virtual Messages in a Bottle with SCoP]
<https://tarides.com/blog/2022-03-08-secure-virtual-messages-in-a-bottle-with-scop>

[Research internships in our Tools and Compilers group]
<https://blog.janestreet.com/research-internships-tnc/>


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


[-- Attachment #1.2: Type: text/html, Size: 33080 bytes --]

[-- Attachment #2: Type: text/plain, Size: 119 bytes --]

Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'INRIA.

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2022-03-29  7:42 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2022-03-29  7:42 UTC (permalink / raw)
  To: lwn, cwn, caml-list


[-- Attachment #1.1: Type: text/plain, Size: 25400 bytes --]

Hello

Here is the latest OCaml Weekly News, for the week of March 22 to 29,
2022.

Table of Contents
─────────────────

pyml_bindgen: a CLI app to generate Python bindings directly from OCaml value specifications
Tarides is hiring!
For Diversity and the OCaml Community: Outreachy Summer 2022
Caqti 1.8.0 and related news
First release of prbnmcn-dagger
MirageOS 4.0
OCaml 4.14.0 is released
ocaml-in-python.0.1.0: Effortless Python bindings for OCaml modules
Old CWN


pyml_bindgen: a CLI app to generate Python bindings directly from OCaml value specifications
════════════════════════════════════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-pyml-bindgen-a-cli-app-to-generate-python-bindings-directly-from-ocaml-value-specifications/8786/6>


Ryan Moore announced
────────────────────

New releases
╌╌╌╌╌╌╌╌╌╌╌╌

  Version 0.3.0 and 0.3.1 are now available on [GitHub].  0.3.0 has been
  merged into opam, and a PR for 0.3.1 has been opened.  The [change
  log] has more details about the changes.


[GitHub] <https://github.com/mooreryan/ocaml_python_bindgen/tags>

[change log]
<https://github.com/mooreryan/ocaml_python_bindgen/blob/main/CHANGELOG.md>


Binding tuples
╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  You can now bind tuples directly.  Here's a Python function that takes
  two lists of points (where each "point" is a tuple like `(x, y)') and
  adds them together

  ┌────
  │ def add(points1, points2):
  │     return [(x1 + y1, x2 + y2) for (x1, x2), (y1, y2) in zip(points1, points2)]
  └────

  And you could bind it using tuples from the OCaml side as well.

  ┌────
  │ val add : points1:(int * int) list -> points2:(int * int) list -> unit -> (int * int) list
  └────

  Note there are some restrictions regarding tuples, which you can read
  about [here], [here], or [here].


[here] <https://mooreryan.github.io/ocaml_python_bindgen/tuples/>

[here]
<https://github.com/mooreryan/ocaml_python_bindgen/blob/main/examples/README.md>

[here]
<https://github.com/mooreryan/ocaml_python_bindgen/blob/main/CHANGELOG.md#030-2022-03-18>


Attributes
╌╌╌╌╌╌╌╌╌╌

  You can use attributes on value specifications.  Currently the only
  one supported is `py_fun_name', which allows you to decouple the
  Python method name and the generated OCaml function name.

  As an example, take the following Python function, which adds to
  "things".

  ┌────
  │ def add(x, y):
  │     return x + y
  └────

  You could bind multiple OCaml functions to this single function now.

  ┌────
  │ val add_int : x:int -> y:int -> unit -> int
  │ [@@py_fun_name add]
  │ 
  │ val add_float : x:float -> y:float -> unit -> float
  │ [@@py_fun_name add]
  │ 
  │ val add_string : x:string -> y:string -> unit -> string
  │ [@@py_fun_name add]
  └────


Python magic methods
┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄

  This is also nice for binding Python [magic methods]. For example, you
  don't have to use `__init__' as the name of the OCaml function you use
  to make instances of a Python class.  You can bind it to a more
  natural name like `create' or `make'.

  ┌────
  │ val create : name:string -> age:int -> unit -> t
  │ [@@py_fun_name __init__]
  └────


[magic methods]
<https://docs.python.org/3/reference/datamodel.html#specialnames>


Using Pytypes.pyobject directly
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  Sometimes you may not want to bother converting Python types to normal
  OCaml types at all.  You can do that now in value specifications by
  using the `Pytypes.pyobject' and `Py.Object.t' types directly.


Fewer dependencies
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  `re' is now used instead of `re2', which drops the number of
  dependencies that need to be installed by about half.  Additionally,
  `core', `core_bench', and `bisect_ppx' don't need to be installed if
  you want to install `pyml_bindgen' directly from the git repository,
  which greatly cuts the required dependencies in this case.

  Thanks again to UnixJunkie for spurring many of these updates!


Tarides is hiring!
══════════════════

  Archive: <https://discuss.ocaml.org/t/tarides-is-hiring/9553/1>


Thomas Gazagnaire announced
───────────────────────────

  Following the recent announcement about Tarides (joining forces with
  [OCaml Labs] and [Segfault System]), we are now looking to expand our
  team with experienced software engineers, compassionate team leads and
  experts in software consulting services. Our ambition is to bring
  OCaml to a vast set of new developers and industries. We want to make
  developers more productive by spending less time on fixing bugs and
  more on writing new features. And we want the software industry to
  build more robust and performant systems that can last for decades.

  We are looking for:

  • Experienced [Software Engineer(s)] to take part in the development
    of Irmin. You will be part of the team that designs, builds and
    ships Irmin libraries and applications to our community and
    customers.
  • [Team Lead(s)] who cares about motivating their team members,
    supporting their growth and development and successfully delivering
    the team's objectives on time.
  • A [Head of Consulting Services] to diversify our technical teams and
    commercial services portfolio. You'll be the first hire for this
    brand new department and will have the opportunity to help us build
    our services structure from scratch, including our strategy,
    processes, tools, and team.

  We are always looking for great OCaml enthusiasts to join our team, so
  even if these job descriptions do not fit your profile precisely, you
  are welcome to send us [a spontaneous application]!


[OCaml Labs]
<https://tarides.com/blog/2022-01-27-ocaml-labs-joins-tarides>

[Segfault System]
<https://tarides.com/blog/2022-03-01-segfault-systems-joins-tarides>

[Software Engineer(s)]
<https://tarides.com/jobs/senior-software-engineer>

[Team Lead(s)] <https://tarides.com/jobs/team-lead-engineering>

[Head of Consulting Services]
<https://tarides.com/jobs/head-of-consulting-services>

[a spontaneous application]
<https://tarides.com/jobs/spontaneous-application>


For Diversity and the OCaml Community: Outreachy Summer 2022
════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/for-diversity-and-the-ocaml-community-outreachy-summer-2022/9234/6>


Deep in this thread, Aya announced
──────────────────────────────────

  @pitag and I have resubmitted the PPX derivers project for this Summer
  2022 round: *Expand OCaml's library of standard derivers*! This is the
  same project I was the intern for this past Winter 2022 round, where
  the goal is to build up a [standard derivers] library, like
  `ppx_deriving', using the updated `ppxlib' API.

  I'm excited to be supporting @pitag with mentoring, and for the
  opportunity to stay involved now that my internship has ended :smiley:


[standard derivers] <https://github.com/ocaml-ppx/standard_derivers>


Caqti 1.8.0 and related news
════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-caqti-1-8-0-and-related-news/9561/1>


"Petter A. Urkedal announced
────────────────────────────

  I am happy to announce the second release of [Caqti] this year. The
  reason for the quick succession is partly an adjustment to the [new
  API for request construction] and partly that [matchable error
  conditions] did not make it into the previous release.  You can see
  the full release notes below.

  I would also like to thank [OCaml Software Foundation] for sponsoring
  my efforts on the Caqti project this year, also including most of the
  work that went into the previous release.

  One [feature in progress] is a new driver based on the pure-OCaml
  [pgx] which should make it possible, with some additional changes to
  the way drivers are loaded, to target MirageOS. I am note sure if this
  can be done in a minor release or will require a Caqti 2 branch.


[Caqti] <https://github.com/paurkedal/ocaml-caqti>

[new API for request construction]
<https://paurkedal.github.io/ocaml-caqti/caqti/Caqti_request/Infix/index.html>

[matchable error conditions]
<https://github.com/paurkedal/ocaml-caqti/issues/72>

[OCaml Software Foundation] <https://ocaml-sf.org>

[feature in progress]
<https://github.com/paurkedal/ocaml-caqti/issues/38>

[pgx] <https://github.com/arenadotio/pgx>

Release Notes
╌╌╌╌╌╌╌╌╌╌╌╌╌

  New features:

  • A matchable representation of common causes of errors on the
    database side is now available, with limitations.  It focuses on
    conditions which seem most likely useful to handle.  At the moment
    we lack extended error codes from SQLite3 needed to make the cause
    fully precise.

  • Expose the underlying error details from database client libraries.
    This is meant to be use as a last resort, and requires directly
    linking with the relevant drivers.

  • A second set of request construction operators `->.', `->?', `->!',
    and `->*' were introduced after experience with converting existing
    code.  Given the parameter and result type they return a function
    which constructs a request directly from a query string.  Avoiding
    the need to compose with `@:-' simplifies local opens and usage with
    `List.map' etc.

  • Environment variables are now expanded in the debug log when using
    the new request constructors introduced in 1.7.0.

  • A new `?tweaks_version' connection parameter has been added to
    control when the client is ready to adapt to changes in database
    session parameters or other adjustments of the interaction with
    specific database systems. [[More details available in the
    documentation.]]

  • Enable foreign key constraint checks for SQLite3 starting at tweaks
    version 1.7.

  Fixes:

  • Fixed debug logging to pass the correct driver info to the query
    callback instead of a dummy driver info which would cause a failure
    if unsupported.

  Deprecations:

  • The `-->' operator was renamed to `-->!', with a deprecated alias,
    for consistency with the new `->!' operator.

  • The old convenience interface for creating requests has been
    deprecated in favour of the new infix operators and the new query
    template parser.

  • Documented-only deprecations of `Caqti_sql_io', `Caqti_lwt_sql_io',
    and `Caqti_async_sql_io' have been annotated.


[More details available in the documentation.]
<https://paurkedal.github.io/ocaml-caqti/caqti/tweaks.html>


First release of prbnmcn-dagger
═══════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-first-release-of-prbnmcn-dagger/9311/2>


Igarnier announced
──────────────────

  I'm proud to announce the release of version 0.0.2 of
  [prbnmcn-dagger].

  This version adds Sequential Monte-Carlo, a.k.a. [particle
  filters]-based inference to the library.

  Here's the full changelog:
  • Dependency: `prbnmcn-stats.0.0.3' -> `prbnmcn-stats.0.0.4'
  • Add beta distribution to Gsl samplers
  • Refactor Cps monad
  • Add SMC inference
  • Simplify handler type, modularize effect definitions away from
    Cps_monad
  • Fix typo: bernouilli -> bernoulli (report by @nilsbecker)

  I also wrote the following article: [Applying Sequential Monte-Carlo
  to time series forecasting] It contains some use cases for the
  library, I hope some find it fun :)

  To conclude this post, and as a partial answer to @gasche 's
  [question] in an older thread, I believe that unlike some other
  inference techniques, single-shot continuations are enough to
  implement SMC. Without getting into the details, the implementation is
  very reminiscent of that of lightweight threading libraries. I look
  forward to experiment with a fibre-based implementation!


[prbnmcn-dagger] <https://github.com/igarnier/prbnmcn-dagger>

[particle filters] <https://en.wikipedia.org/wiki/Particle_filter>

[Applying Sequential Monte-Carlo to time series forecasting]
<http://probanomicon.xyz/blog/wind_power_forecast.html>

[question]
<https://discuss.ocaml.org/t/multi-shot-continuations-gone-forever/9072/5>


MirageOS 4.0
════════════

  Archive: <https://discuss.ocaml.org/t/ann-mirageos-4-0/9598/1>


Thomas Gazagnaire announced
───────────────────────────

  *On behalf of the MirageOS team, I am delighted to announce the
  release of MirageOS 4.0.0!* I'd like to send special thanks to
  @dinosaure and @Lortex who drove that release forward for multiple
  years.

  Since the first release of 2013, MirageOS has made steady progress
  toward deploying a self-managed internet infrastructure. The project’s
  initial aim was to self-host as many services as possible aimed at
  empowering internet users to securely deploy infrastructure to own
  their data and take back control of their privacy. MirageOS can
  securely deploy [static website hosting] with “Let’s Encrypt”
  certificate provisioning and a [secure SMTPstack] with security
  extensions. MirageOS can also deploy decentralised communication
  infrastructure like [Matrix], [OpenVPN servers], and [TLS tunnels] to
  ensure data privacy or [DNS(SEC) servers] for better authentication.

  The protocol ecosystem now contains [hundreds of libraries] and
  services millions of daily users. Over these years, major commercial
  users have joined the projects. They rely on MirageOS libraries to
  keep their products secure. For instance, the MirageOS networking code
  powers [Docker Desktop’s VPNKit], which serves the traffic of millions
  of containers daily. [Citrix Hypervisor] uses MirageOS to interact
  with Xen, the hypervisor that powers most of today’s public
  cloud. [Nitrokey] is developing a new hardware security module based
  on MirageOS. [Robur] develops a unikernel orchestration system for
  fleets of MirageOS unikernels. [Tarides] uses MirageOS to improve the
  [Tezos] blockchain, and [Hyper] uses MirageOS to build sensor
  analytics and an automation platform for sustainable agriculture.

  In the coming weeks, our blog will feature in-depth technical content
  for the new features that MirageOS brings, as well as a tour of the
  existing community and commercial users of MirageOS. Please reach out
  if you’d like to tell us about your story.


[static website hosting] <https://github.com/roburio/unipi>

[secure SMTPstack] <https://github.com/mirage/ptt>

[Matrix] <https://github.com/mirage/ocaml-matrix>

[OpenVPN servers] <https://github.com/roburio/openvpn>

[TLS tunnels] <https://github.com/roburio/tlstunnel>

[DNS(SEC) servers] <https://github.com/mirage/ocaml-dns>

[hundreds of libraries] <https://github.com/mirage/>

[Docker Desktop’s VPNKit]
<https://www.docker.com/blog/how-docker-desktop-networking-works-under-the-hood/>

[Citrix Hypervisor]
<https://www.citrix.com/fr-fr/products/citrix-hypervisor/>

[Nitrokey] <https://www.nitrokey.com/products/nethsm>

[Robur] <https://robur.io/>

[Tarides] <https://tarides.com/>

[Tezos] <https://tezos.com/>

[Hyper] <https://hyper.ag/>

Install MirageOS 4
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  The easiest way to install MirageOS 4 is by using the opam version 2.1
  and `ocaml>=4.12.1`. Follow the [installation guide] for more details.

  ┌────
  │ $ opam update
  │ $ opam install 'mirage>4'
  └────

  /Note/: if you upgrade from MirageOS 3 you will need to manually clean
  the previous generated files (or call `mirage clean' before
  upgrading). You would also want to read [the full list of API
  changes].  You can see unikernel examples in [mirage/mirage-skeleton],
  [roburio/unikernels] or [tarides/unikernels].


[installation guide] <https://mirage.io/docs/install>

[the full list of API changes] <https://mirage.io/docs/breaking-changes>

[mirage/mirage-skeleton] <https://github.com/mirage/mirage-skeleton>

[roburio/unikernels] <https://github.com/roburio/unikernels>

[tarides/unikernels] <https://github.com/tarides/unikernels>


About MirageOS
╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  MirageOS is a library operating system that constructs unikernels for
  secure, high-performance, low-energy footprint applications across
  various hypervisor and embedded platforms. It is available as an
  open-source project created and maintained by the [MirageOS Core
  Team]. A unikernel can be customised based on the target architecture
  by picking the relevant MirageOS libraries and compiling them into a
  standalone operating system, which contains strictly the functionality
  necessary for the target. This minimises the unikernel’s footprint,
  increasing the security of the deployed operating system.

  The MirageOS architecture can be divided into operating system
  libraries, typed signatures, and a metaprogramming compiler. The
  operating system libraries implement various functionalities, ranging
  from low-level network card drivers, to full reimplementations of the
  TLS protocol, as well as the Git protocol to store versioned data. A
  set of typed signatures ensures that the OS libraries are consistent
  and work well in conjunction with each other. Most importantly,
  MirageOS is also a metaprogramming compiler that can input OCaml
  source code along with its dependencies, and a deployment target
  description in order to generate an executable unikernel, i.e., a
  specialised binary artefact containing only the code needed to run on
  the target platform. Overall, MirageOS focuses on providing a small,
  well-defined, typed interface with the system components of the target
  architecture.

  Read the full announcement on [mirage.io's blog].


[MirageOS Core Team] <https://github.com/orgs/mirage/teams/core/members>

[mirage.io's blog] <https://mirage.io/blog/announcing-mirage-40>


Anil Madhavapeddy then added
────────────────────────────

  For those curious about what some of the MirageOS libraries _are_,
  there is a raw Yaml list over at [mirage/mirage-repositories] listing
  most of them.  Conversion of this Yaml to HTML for the main mirage.io
  website would be a welcome contribution! :slight_smile:


[mirage/mirage-repositories]
<https://github.com/mirage/mirage-repositories/blob/main/repos.yml>


OCaml 4.14.0 is released
════════════════════════

  Archive: <https://discuss.ocaml.org/t/ocaml-4-14-0-is-released/9600/1>


octachron announced
───────────────────

  The OCaml team has the pleasure of celebrating the birthday of
  Alexander Grothendieck by announcing the release of OCaml version
  4.14.0.

  Some of the highlights in the 4.14.0 release are:

  • Integrated support for "go to definitions" in Merlin.
  • Standard library: new modules `In_channel' and `Out_channel', many
    new functions in Seq module, UTF decoding and validation support for
    strings and bytes.
  • Runtime optimisation: GC prefetching. Benchmarks show a speedup of
    around 20% in GC-heavy programs.
  • Improved error messages in particular for module-level error.
  • Deprecated functions and modules in preparation for OCaml 5.  In
    particular, the Stream and Genlex modules are now deprecated.
  • Type variables can be explicitly introduced in value and variant
    constructor declarations. For instance,
    ┌────
    │ val fold: ('acc -> 'elt -> 'acc) -> 'acc -> 'elt list -> 'acc
    │ type showable = Show: 'a * ('a -> string) -> showable
    └────
    can now be written as
    ┌────
    │ val fold: 'acc 'elt. ('acc -> 'elt -> 'acc) -> 'acc -> 'elt list -> 'acc
    │ type showable = Show: 'a. 'a * ('a -> string) -> showable
    └────
  • Tail-call with up to 64 arguments are now guaranteed to be optimized
    for all architectures.
  • Experimental tail modulo cons (TMC) transformation

  The full list of changes can be found in the changelog
  below. (/editor’s note: please follow the archive link for the full
  changelog/)

  Those releases are available as OPAM switches, and as a source
  download here:

  • <https://github.com/ocaml/ocaml/archive/4.14.0.tar.gz>
  • <https://caml.inria.fr/pub/distrib/ocaml-4.14/ocaml-4.14.0.tar.gz>


ocaml-in-python.0.1.0: Effortless Python bindings for OCaml modules
═══════════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-ocaml-in-python-0-1-0-effortless-python-bindings-for-ocaml-modules/9603/1>


Thierry Martinez announced
──────────────────────────

  I am happy to announce the first release of `ocaml-in-python': this is
  a Python package that exposes all OCaml modules as Python libraries,
  generating bindings on the fly. This can be seen as a dual of
  [`pyml_bindgen']: `pyml_bindgen' binds Python libraries in OCaml,
  while `ocaml-in-python' binds OCaml modules in Python.

  It is available from [GitHub] or *via* `opam': `opam install
  ocaml-in-python'

  Requirements: `OCaml' >= 4.13, `Python' >= 3.7.

  Once installed *via* `opam', the package should be registered in the
  Python environment:

  • either by registering the package with `pip' using the following
    command (requires Python >=3.8):
    ┌────
    │ pip install --editable "`opam var ocaml-in-python:lib`"
    └────
  • or by adding the following definition to the environment:
    ┌────
    │ export PYTHONPATH="`opam var share`/python/:$PYTHONPATH"
    └────

  Then, we can `import ocaml' in Python and use OCaml modules:
  ┌────
  │ Python 3.10.0 (default, Nov 10 2021, 19:16:14) [GCC 7.5.0] on linux
  │ Type "help", "copyright", "credits" or "license" for more information.
  │ >>> import ocaml
  │ >>> print(ocaml.List.map((lambda x : x + 1), [1, 2, 3]))
  │ [2;3;4]
  └────

  We can for instance compile an OCaml module on the fly from Python.
  ┌────
  │ >>> m = ocaml.compile('let hello x = Printf.printf "Hello, %s!\n%!" x')
  │ >>> m.hello('world')
  │ Hello, world!
  └────

  And we can require and use packages /via/ `findlib'.
  ┌────
  │ >>> ocaml.require("parmap")
  │ >>> from ocaml import Parmap
  │ >>> print(Parmap.parmap(
  │ ...   (lambda x : x + 1), Parmap.A([1, 2, 3]), ncores=2))
  │ [2;3;4]
  └────

  Details about the conversions are given in [`README.md'].

  Happy hacking!


[`pyml_bindgen']
<https://discuss.ocaml.org/t/ann-pyml-bindgen-a-cli-app-to-generate-python-bindings-directly-from-ocaml-value-specifications/8786>

[GitHub] <https://github.com/thierry-martinez/ocaml-in-python>

[`README.md']
<https://github.com/thierry-martinez/ocaml-in-python/blob/main/README.md>


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


[-- Attachment #1.2: Type: text/html, Size: 40773 bytes --]

[-- Attachment #2: Type: text/plain, Size: 119 bytes --]

Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'INRIA.

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2022-03-22 13:01 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2022-03-22 13:01 UTC (permalink / raw)
  To: lwn, cwn, caml-list

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

Hello

Here is the latest OCaml Weekly News, for the week of March 15 to 22,
2022.

Table of Contents
─────────────────

Friday 03/04 Intern presentations – open attendance!
Multicore OCaml: February 2022
OCaml 4.14.0, second release candidate
For Diversity and the OCaml Community: Outreachy Summer 2022
Understanding cancellation (in eio)
Atdpy: derive safe JSON interfaces for Python
Old CWN


Friday 03/04 Intern presentations – open attendance!
════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/friday-03-04-intern-presentations-open-attendance/9429/8>


Continuing this thread, Aya announced
─────────────────────────────────────

  [Here is the link] to the video recording of the presentations! Thanks
  again to everyone who attended :pray: :tada:


[Here is the link]
<https://watch.ocaml.org/videos/watch/f3829e4b-e2cd-443e-8502-f406e893fe5f>


Multicore OCaml: February 2022
══════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/multicore-ocaml-february-2022/9522/1>


Anil Madhavapeddy announced
───────────────────────────

  Welcome to the February 2022 [Multicore OCaml] monthly report! As with
  [previous updates], these have been compiled by me, @ctk21, @kayceesrk
  and @shakthimaan.

  Progress towards a stable OCaml 5.0.0 release have been moving forward
  at full steam, with most of the multicore OCaml work now happening
  directly within the main ocaml/ocaml repository. As a number of
  [deprecations] have happened in OCaml 5.0+trunk, it can be a little
  tricky in the immediate term to get a working development environment.
  You may find these resources helpful:
  • There is a [multicore monorepo] which is a 'fast clone and dune
    build' with a number of ecosystem libraries. (thanks @patricoferris)
  • There is an [alpha-opam-repository] which contains work-in-progress
    packages.  If a package you maintain is in there, now would be a
    good time to start releasing it to the mainline opam-repository.
    Remember that while we can propose changes, only the community
    maintainers of the relevant projects can do the actual release, so
    *your help with making OCaml 5.0-compatible releases of your
    projects would be very much appreciated*. (thanks @kit-ty-kate)

  For mainline development, the [compiler development newsletter] has an
  overview of what's been happening in the compiler.  From a multicore
  perspective:
  • the [ARM64 PR] has been merged, so your shiny Mac M1s will now work
  • we continue to work on the post-Multicore merge tasks for an
    upcoming 5.0.0+trunk release. The documentation efforts on the OCaml
    memory model, runtime system, and STW synchronization have also
    started.
  • The [eio project] is actively being developed which now includes UDP
    support with Eio's networking interface.  There has been [robust
    discussion] on several aspects of eio which is all influencing the
    next iteration of its design (thank you to everyone!). For those of
    you who do not wish to participate in public discussion, feel free
    to get in touch with me or @kayceesrk for a private discussion,
    particularly if you have a large OCaml codebase and opinions on
    concurrency. We'll summarise all these discussions as best we can
    over the coming months.
  • `Sandmark-nightly' and `Sandmark' have a custom variant support
    feature to build trunk, developer branches, or a specific commit to
    assess any performance regressions. The backend tooling with UI
    enhancements continue to drive the `current-bench' project forward.

  As always, the Multicore OCaml updates are listed first, which are
  then followed by the ecosystem tooling updates.  Finally, the
  sandmark, sandmark-nightly and current-bench project tasks are
  mentioned for your reference.

  /Editor’s note: please find the full update at the archive link
  above./


[Multicore OCaml] <https://github.com/ocaml-multicore/ocaml-multicore>

[previous updates] <https://discuss.ocaml.org/tag/multicore-monthly>

[deprecations] <https://github.com/ocaml/ocaml/blob/trunk/Changes>

[multicore monorepo]
<https://discuss.ocaml.org/t/awesome-multicore-ocaml-and-multicore-monorepo/9515>

[alpha-opam-repository]
<https://github.com/kit-ty-kate/opam-alpha-repository/tree/master/packages>

[compiler development newsletter]
<https://discuss.ocaml.org/t/ocaml-compiler-development-newsletter-issue-5-november-2021-to-february-2022/9459>

[ARM64 PR] <https://github.com/ocaml/ocaml/pulls/10972>

[eio project] <https://github.com/ocaml-multicore/eio>

[robust discussion] <https://discuss.ocaml.org/tag/effects>


OCaml 4.14.0, second release candidate
══════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ocaml-4-14-0-second-release-candidate/9528/1>


octachron announced
───────────────────

  The release of OCaml 4.14.0 is imminent.  As a last test that
  everything is in order, we are publishing a second release candidate
  for OCaml 4.14.0.

  We are directly jumping to the second release candidate due to a type
  system regression discovered during the release process of the first
  release candidate.

  Compared to the last beta, this release candidate includes a
  regression fix when typing recursive constraints, two backend fixes
  (one for the frame-pointer mode and the other one for the RISC-V
  architecture), one configuration fix for musl/arm64, and the manual
  chapter for the TMC transformation.

  If you find any bugs, please report them here:

  <https://github.com/ocaml/ocaml/issues>

  The full release of OCaml 4.14.0 is currently planned for next week.


Installation instructions
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  The base compiler can be installed as an opam switch with the
  following commands
  ┌────
  │ opam update
  │ opam switch create 4.14.0~rc2 --repositories=default,beta=git+https://github.com/ocaml/ocaml-beta-repository.git
  └────
  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~rc2+options,<option_list>
  │ --repositories=default,beta=git+https://github.com/ocaml/ocaml-beta-repository.git
  └────
  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~rc2+flambda+nffa
  │ --packages=ocaml-variants.4.14.0~rc2+options,ocaml-option-flambda,ocaml-option-no-flat-float-array
  │ --repositories=default,beta=git+https://github.com/ocaml/ocaml-beta-repository.git
  └────
  All available options can be listed with `opam search ocaml-option'.

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

  • <https://github.com/ocaml/ocaml/archive/4.14.0-rc2.tar.gz>
  • <https://caml.inria.fr/pub/distrib/ocaml-4.14/ocaml-4.14.0~rc2.tar.gz>


Changes since the last beta
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

Type system regression fix
┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄

  • [#11101], [#11109]: A recursive type constraint fails on 4.14
    (Jacques Garrigue, report and review by Florian Angeletti)


[#11101] <https://github.com/ocaml/ocaml/issues/11101>

[#11109] <https://github.com/ocaml/ocaml/issues/11109>


Backend fixes
┄┄┄┄┄┄┄┄┄┄┄┄┄

  • [#10688]: Move frame descriptor table from `rodata` to `data`
    section on RISC-V.  Improves support for building DLLs and PIEs. In
    particular, this applies to all binaries in distributions that build
    PIEs by default (eg Gentoo and Alpine). (Alex Fan, review by Gabriel
    Scherer)

  • [#11031]: Exception handlers restore the rbp register when using
    frame-pointers on amd64. (Fabrice Buoro, with help from Stephen
    Dolan, Tom Kelly and Mark Shinwell, review by Xavier Leroy)


[#10688] <https://github.com/ocaml/ocaml/issues/10688>

[#11031] <https://github.com/ocaml/ocaml/issues/11031>


Configuration fix
┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄

  • [#11025], [#11036]: Do not pass -no-pie to the C compiler on
    musl/arm64 (omni, Kate Deplaix and Antonio Nuno Monteiro, review by
    Xavier Leroy)


[#11025] <https://github.com/ocaml/ocaml/issues/11025>

[#11036] <https://github.com/ocaml/ocaml/issues/11036>


Documentation
┄┄┄┄┄┄┄┄┄┄┄┄┄

  • *updated entry* [#181], [#9760], +[#10740]: opt-in tail-modulo-cons
     (TMC) transformation
    ┌────
    │ let[@tail_mod_cons] rec map f li = ...
    └────
    (Frédéric Bour, Gabriel Scherer, Basile Clément, review by Basile
    Clément and Pierre Chambart, tested by Konstantin Romanov)


[#181] <https://github.com/ocaml/ocaml/issues/181>

[#9760] <https://github.com/ocaml/ocaml/issues/9760>

[#10740] <https://github.com/ocaml/ocaml/issues/10740>


For Diversity and the OCaml Community: Outreachy Summer 2022
════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/for-diversity-and-the-ocaml-community-outreachy-summer-2022/9234/5>


Continuing this thread, Patrick Ferris said
───────────────────────────────────────────

  Thanks for the updates @pitag! For this summer's round I'll be
  mentoring a project to [Extend ocaml-geojson to support TopoJSON]
  which will likely be a separate package.  This is part of a larger
  effort I'm embarking on to provide better [geospatial libraries and
  tools in OCaml]!

  I'd be very happy to have a co-mentor if the project (or just the idea
  of Outreachy) interests anyone. Don't hesitate to reach out to me on
  discuss publicly or privately if you are interested or have more
  questions :camel:


[Extend ocaml-geojson to support TopoJSON]
<https://www.outreachy.org/apply/project-selection/#ocaml>

[geospatial libraries and tools in OCaml] <https://github.com/geocaml>


Understanding cancellation (in eio)
═══════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/understanding-cancellation-in-eio/9369/45>


Deep in this thread, Simon Cruanes announced
────────────────────────────────────────────

  I still have reservations about the capabilities aspect of Eio, but
  the structured concurrency part looks very nice.  Just a few notes,
  for future reference to readers of this thread (if I haven't missed
  them being posted above already):

  Another interesting post about structured concurrency and
  cancellation: <https://250bpm.com/blog:71/>

  A structured concurrency library in python: [trio], which might be
  relatively similar to Eio's switches in concept (esp since @talex
  linked [this])?

  Companion post to the trio blogpost:
  <https://vorpus.org/blog/timeouts-and-cancellation-for-humans/> which
  is directly relevant to the current topic.


[trio] <https://trio.readthedocs.io/en/stable/index.html>

[this]
<https://vorpus.org/blog/notes-on-structured-concurrency-or-go-statement-considered-harmful/>


Atdpy: derive safe JSON interfaces for Python
═════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/atdpy-derive-safe-json-interfaces-for-python/9544/1>


Martin Jambon announced
───────────────────────

  On behalf of the ATD team, I'd like to announce atdpy, which is part
  of the release 2.3.x of the ATD tools. For now, the best installation
  method with via opam:

  ┌────
  │ $ opam install atdpy
  └────

  Atdpy is a new backend for [ATD]. It takes a collection of type
  definitions and derives Python classes with mypy type annotations that
  validate the JSON data.

  A [short introduction] is included in the documentation.

  Use cases:
  • Safe communication with another program that also uses an ATD
    interface. Other supported languages are OCaml (including
    Bucklescript), Java, and Scala.
  • Need for [mostly] type-safe Python methods via mypy.
  • Need for a good Python API to communicate with an OCaml executable
    or service.
  • Need for sum types (variants, algebraic data types, tagged
    unions). ATD sum types are ordinary types that include pure enums.

  Atdpy was developed as part of our work on [Semgrep] at [r2c]. Many
  thanks to @mseri for his massive help during the opam release of the 7
  ATD packages, and to the Ahrefs folks and @Khady in particular for
  supporting the project.


[ATD] <https://github.com/ahrefs/atd>

[short introduction] <https://atd.readthedocs.io/en/latest/atdpy.html>

[Semgrep] <https://semgrep.dev/>

[r2c] <https://r2c.dev/>


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2022-03-15  9:59 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2022-03-15  9:59 UTC (permalink / raw)
  To: lwn, cwn, caml-list

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

Hello

Here is the latest OCaml Weekly News, for the week of March 08 to 15,
2022.

Table of Contents
─────────────────

Robur Reproducible Builds
OCaml TeXmacs plugin
Release of ocaml-sf/learn-ocaml:0.14.0
Tutorial: Roguelike with effect handlers
Awesome Multicore OCaml and Multicore Monorepo
ppx_viewpattern initial release
Old CWN


Robur Reproducible Builds
═════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-robur-reproducible-builds/8827/6>


Continuing this thread, Hannes Mehnert announced
────────────────────────────────────────────────

  The background article by @rand is now online
  <https://r7p5.earth/blog/2022-3-7/Builder-web%20visualizations%20at%20Robur>


OCaml TeXmacs plugin
════════════════════

  Archive:
  <https://sympa.inria.fr/sympa/arc/caml-list/2022-03/msg00009.html>


Nicolas Ratier announced
────────────────────────

  I made a basic OCaml plugin for TeXmacs (<http://www.texmacs.org>) I
  would like to keep it simple, but comments and improvements are
  welcome.
  <http://forum.texmacs.cn/t/ocaml-a-basic-ocaml-plugin-for-texmacs/813>


Release of ocaml-sf/learn-ocaml:0.14.0
══════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-release-of-ocaml-sf-learn-ocaml-0-14-0/9491/1>


Yurug announced
───────────────

  We are very pleased to announce the latest stable release of
  [Learn-OCaml], version `0.14.0'.

  Many thanks to all users and developers who reported bugs, contributed
  features, or patches! Special thanks to @erikmd who made many of the
  changes included in this release.

  A (mostly) comprehensive list of the features, fixes, and enhancements
  offered by this release is available in [the Release Notes ].

  A brief and incomplete summary of the changes:

  • A long-standing bug has been fixed. This bug was triggered when the
    user opened several sessions: the auto-sync mechanism could lead to
    overwriting the student's code with an older version.

  • The release assets now include a zip file containing the contents of
    the `www` directory. This eases the usage of the distributed
    binaries.

  If need be, feel free to open issues in the [Learn-OCaml bug tracker]
  or the [learn-ocaml.el bug tracker], or post in this thread to share
  thoughts or experience-feedback.

  Happy OCaml learning and teaching!


[Learn-OCaml] <https://github.com/ocaml-sf/learn-ocaml>

[the Release Notes ]
<https://github.com/ocaml-sf/learn-ocaml/releases/tag/v0.14.0>

[Learn-OCaml bug tracker]
<https://github.com/ocaml-sf/learn-ocaml/issues>

[learn-ocaml.el bug tracker]
<https://github.com/pfitaxel/learn-ocaml.el/issues>


Tutorial: Roguelike with effect handlers
════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/tutorial-roguelike-with-effect-handlers/9422/18>


Continuing this thread, stw said
────────────────────────────────

  Sorry about the late reply, I was busy actually verifying that my
  concept works out. Thankfully it does :smile:

  The UI framework is inspired by [Concur] which means that every widget
  listens for some set of events and suspends computation until one of
  these events occurs. Once it does, it continues execution until it
  encounter the next await at which point it will suspend once
  more. Once a widget has fulfilled its purpose it terminates with some
  return value (e.g. text input is confirmed with enter -> return with a
  string).  Complex UIs are then built by composing simpler widgets. A
  more detailed explanation can be found in the link above.

  I've implemented this concept using an await function that takes a
  list of triggers and a handler for each possible event:
  ┌────
  │ effect Await : Event.t list -> Event.t
  │ let rec await triggers handler =
  │   handler (EffectHandlers.perform (Await triggers))
  │ 
  │ let rec check_box checked  =
  │   (* display check box *)
  │   ...;
  │   await [Mouse_press; Key_press] (function
  │   | Mouse_press ->
  │     print_endline "I've been (un-)checked!";
  │     check_box (not checked)
  │   | Key_press -> (* Terminate if any key is pressed *) checked)
  └────

  Every widget can then be implemented as a function which displays the
  widget and performs an `Await triggers' which is resumed by passing an
  event from `triggers', for example the check box above.

  The most complex widget I've implemented so far is a single line text
  input. It can be clicked or selected with tab.  Moving the mouse while
  holding the button down changes the selection. As an automaton:

  <https://aws1.discourse-cdn.com/standard11/uploads/ocaml/original/2X/5/574e164b6189608283de32d9f375534ca80caffa.png>

  Obviously, this is not a directed acyclic graph and therefore not a
  perfect fit for the implicit state stored in the
  continuation. Specifically, `Pressed' has an edge to one of its
  multiple parents. We can extract the `Pressed' state into its own
  function and therefore avoid this issue by 'duplicating' this
  state. Now `Pressed' no longer has multiple parents:

  <https://aws1.discourse-cdn.com/standard11/uploads/ocaml/original/2X/7/70a34d2f4bb81800a5e3b12b8e49147a0d80ece4.png>

  Some cycles remain and we can't remove them because they are essential
  to the functionality. Instead we throw an `exception Repeat' that
  returns us to a parent node (explicitly shown for Focused -> Pressed
  -> Released -> Focused).  To do that we modify `await':
  ┌────
  │ let rec await triggers handler =
  │   try handler (EffectHandlers.perform (Await triggers)) with
  │   | Repeat -> await triggers handler
  └────
  In the end this results in this main method for the text input, with
  only minor simplifications:
  ┌────
  │ method execute =
  │   (* Represent the Pressed state.
  │      We await the Mouse_release and handle Mouse_motion while we wait. *)
  │   let pressed (x,_) =
  │     selection <- Point x;
  │     await [`Mouse_release; `Mouse_motion] @@ function
  │     | `Mouse_release (_, LMB) ->
  │       ()
  │     | `Mouse_motion (x,_) ->
  │       self#select x;
  │       raise Repeat (* This restarts the await function *)
  │     | _ ->
  │       raise Repeat
  │   in
  │ 
  │   (* We start in the Unfocused state *)
  │   begin
  │     await [`Mouse_press; `Key_press] @@ function
  │     | `Mouse_press (pos, LMB) ->
  │        (* We have registered the press, but only when it is released
  │ 	  will we be focused. *)
  │        pressed pos
  │     | `Key_press Tab ->
  │       selection <- Area (0, List.length keys)
  │     | _ -> raise Repeat
  │   end;
  │ 
  │   (* We move into the Focused state *)
  │   begin
  │     await [`Codepoint; `Key_press; `Mouse_press] @@ function
  │     | `Key_press Tab | `Key_press Return ->
  │       () (* The only path without raising Repeat.
  │ 	    Therefore we only leave this await when a tab or return occurs *)
  │     | `Mouse_press (pos, LMB) ->
  │       pressed pos;
  │       raise Repeat
  │     | `Key_press c ->
  │       self#insert c;
  │       raise Repeat
  │     | _ -> raise Repeat
  │   end;
  │   (* We have reached the finished state. We can now return the entered text. *)
  │   self#text
  └────
  I think that this method captures the automaton above quite nicely and
  can be relatively easily understood (hopefully even when one is
  unfamiliar with the framework and accepts that some magic is happening
  in the background (: ).  Implementing automatons in terms of effect
  handlers seems to work quite well, at least for games and UIs. What
  these automatons have in common is that they can be thought of as
  flows, starting at some state and ending at one of multiple final
  states and only have few edges that don't fit this scheme, turning
  them into 'directed almost acyclic graphs'.

  There is obviously a lot more necessary for a UI framework
  (e.g. resizing the window/widgets, delegating the events to the
  correct widget, composing widgets, drawing on the screen etc.) and I
  plan to write about it at some point in the future. But for that I
  will first need to actually solve these problems as right now their
  implementation is quite barebones. The code can be found here for
  those interested (still very early in development!):
  <https://github.com/Willenbrink/bogue/>


[Concur]
<https://ajnsit.github.io/concur-documentation/ch02-01-anatomy-of-a-widget.html>


Awesome Multicore OCaml and Multicore Monorepo
══════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/awesome-multicore-ocaml-and-multicore-monorepo/9515/1>


Patrick Ferris announced
────────────────────────

  A short announcement of two repositories which some people may or may
  not have seen. Firstly, [Awesome Multicore OCaml], a place for
  gathering all of the rapidly changing experiments, ideas, libraries
  and resources for Multicore OCaml (including some of the discuss
  threads). If you are working on something or feel anything is missing
  please open a PR!

  Secondly, a [Multicore Monorepo] which aims to provide a very quick
  and easy way to try out effects and parallelism with quite a few
  libraries (such as Eio, Dream etc.). The breaking changes introduced
  by OCaml 5 can make it frustrating to get such a setup in place,
  although this is less and less true thanks to the [alpha
  repository]. The idea is that you should just be able to clone this
  repository, create a new `5.0.0+trunk' switch, install `dune' and
  start hacking. If that's not the case please do open an issue.


[Awesome Multicore OCaml]
<https://github.com/patricoferris/awesome-multicore-ocaml>

[Multicore Monorepo]
<https://github.com/patricoferris/ocaml-multicore-monorepo>

[alpha repository]
<https://github.com/kit-ty-kate/opam-alpha-repository>


ppx_viewpattern initial release
═══════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-ppx-viewpattern-initial-release/9516/1>


Simmo Saan announced
────────────────────

  I'm glad to announce the initial release of [ppx_viewpattern] –
  transformation for view patterns in OCaml.

  It _attempts to_ imitate [Haskell view patterns]. I wrote this ppx
  rewriter mostly out of curiosity, rather than need, but it turned out
  neat enough that others might find it interesting or even useful.


[ppx_viewpattern] <https://github.com/sim642/ppx_viewpattern>

[Haskell view patterns]
<https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/view_patterns.html>

Syntax
╌╌╌╌╌╌

  Use `[%view? pat when exp]' as a pattern to apply `exp' to whatever
  the pattern is matching and match the result of the `exp' application
  against `pat'.  This is analogous to the Haskell view pattern `exp ->
  pat'.

  The above extension node payload syntax is the best I could come up
  with to combine an expression and a pattern.  Honestly, I was even
  surprised that `when exp' is attached to a pattern in the AST (not a
  case), because normally it isn't part of the pattern itself.


Example
╌╌╌╌╌╌╌

  This allows one to write
  ┌────
  │ (* These cases are exactly like reduction rules! *)
  │ let rec reduce = function
  │   | Add (Int n1, Int n2) -> Some (Int (n1 + n2))
  │   | Add ([%view? Some p1' when reduce], p2) -> Some (Add (p1', p2))
  │   | Add (p1, [%view? Some p2' when reduce]) -> Some (Add (p1, p2'))
  │   (* ... *)
  │   | _ -> None
  └────
  instead of
  ┌────
  │ (* These nested cases are so annoying! *)
  │ let rec reduce = function
  │   | Add (Int n1, Int n2) -> Some (Int (n1 + n2))
  │   | Add (p1, p2) ->
  │     begin match reduce p1 with
  │       | Some p1' -> Some (Add (p1', p2))
  │       | None ->
  │ 	begin match reduce p2 with
  │ 	  | Some p2' -> Some (Add (p1, p2'))
  │ 	  | None -> None
  │ 	end
  │     end
  │   (* ... *)
  │   | _ -> None
  └────

  See [`examples/' on GitHub] for more.


[`examples/' on GitHub]
<https://github.com/sim642/ppx_viewpattern/tree/master/example>


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2022-03-01 13:54 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2022-03-01 13:54 UTC (permalink / raw)
  To: lwn, cwn, caml-list

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

Hello

Here is the latest OCaml Weekly News, for the week of February 22 to
March 01, 2022.

Table of Contents
─────────────────

data-encoding.0.5 release
Tutorial: Roguelike with effect handlers
For Diversity and the OCaml Community: Outreachy Summer 2022
Bogue, the OCaml GUI
Friday 03/04 Intern presentations – open attendance!
Affect: Composable concurrency primitives for OCaml 5.0
Segfault Systems Joins Tarides
OCaml User Survey 2022
Old CWN


data-encoding.0.5 release
═════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-data-encoding-0-5-release/9420/1>


Raphaël Proust announced
────────────────────────

  On behalf of [Nomadic Labs], I'm happy to announce the release of
  data-encoding version 0.5.

  This new version brings several bug fixes, some increased test
  coverage, minor improvements in the API, and a major new feature:


[Nomadic Labs] <https://www.nomadic-labs.com/>

Compact encodings: sub-byte tag sizes
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  This new version provides a new set of combinators for _compact_
  encodings. These compact encodings will handle all the verbose and
  error-prone bit-twidling process needed to combine multiple sub-byte
  discriminators into a single byte-size one.

  E.g., the encoding `let e1 = either (either bool unit) (option bool)'
  uses three bits in the shared tag and zero bytes after that; the
  encoding `let e2 = either int32 int64' uses one bit in the shared tag
  and either 4 or 8 bytes to represent the integer; the product encoding
  `let ee = tup2 e1 e2' uses four (3 + 1) bits in the shared tag and
  either 4 or 8 bytes to represent the integer of `e2'.


How to get
╌╌╌╌╌╌╌╌╌╌

  The code is available under MIT license on
  <https://gitlab.com/nomadic-labs/data-encoding>.

  It can be installed via `opam'.


Dario Teixeira asked and Raphaël Proust replied
───────────────────────────────────────────────

        Hi @raphael-proust! I have a question regarding the
        connection between `data-encoding' and
        `json-data-encoding', also developed at Nomadic Labs. The
        latter seems tied to JSON, whereas the former is more
        flexible, supporting also binary encodings. However, since
        `data-encoding' also supports JSON, doesn't it subsume
        `json-data-encoding' completely?

  The `data-encoding' library uses `json-data-encoding' for its JSON
  backend. It delegates conversion from OCaml values into and from JSON
  to the primitives provided in the interface of `json-data-encoding'.

  In a way, yes, as an end-user you don't need to use
  `json-data-encoding' directly because you can use the `Json' module of
  `data-encoding' instead. There are three possible reasons why you
  might add `json-data-encoding' as a (non-transitive) dependency to
  your project and use it directly in your code:

  • You want to keep the dependency set and the number of abstraction
    layers as small as possible. E.g., in order to reduce binary size.
  • You want some static guarantees that some encodings are only every
    used for JSON. E.g., in your logging system.
  • You need to define a JSON encoding which is rejected by
    `data-encoding' on grounds that it is invalid in binary. Note that
    • This is very specific to some combinators but basically some
      combinators will reject their inputs (raise `Invalid_argument')
      because using the serialiser would lead to undecodable data. Most
      typically, this happens if you try to concatenate two fields of
      unknown length. Decoding the result becomes a guessing game as to
      were one field stops and where the next begins. These could easily
      be represented as an array in JSON which includes all the
      delimiters you need to decode it.
    • There are other workarounds (e.g., prefixing the fields with a
      length field), but going for the JSON encoding directly is a valid
      approach if you only need JSON.


Raphaël Proust later announced
──────────────────────────────

  Version 0.5.1 of the data-encoding has just been released.

  This is a bugfix release making one of the library's internal checks
  more permissive. Without this fix (i.e., using version 0.5), some
  valid encodings are rejected (raising `Invalid_argument') by the
  library.

  You can update via opam: `opam install data-encoding.0.5.1'


Tutorial: Roguelike with effect handlers
════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/tutorial-roguelike-with-effect-handlers/9422/1>


art-w announced
───────────────

  The recent conversations about [`eio' 0.1] and [agnostic blocking]
  have made me very curious about effect handlers. The multicore team
  has done an [awesome] job with their [tutorials], [examples] and
  [talks], but the laymen have been too quiet for such an exciting
  feature! Where are all the blog posts about how "you could have
  invented algebraic effects" and "one-shot continuations are like
  spaghetti"?

  In any case, I'm hoping to tease some of you into trying them out with
  [a simple tutorial about programming a roguelike with effect handlers]
  :)

  There's nothing new here besides the fun use-case! So if you already
  have an intuitive understanding of the syntax and motivations, you may
  be more interested by [a deeper look at the scope of effect handlers]
  – and a soft introduction to some less common features of the type
  system. /(this link was previously posted deep into the `eio' thread)/

  I would be grateful if you spot any mistake! I'm also curious of other
  fun applications for effect handlers… and if you feel like sharing
  your own surprises and discoveries, I believe it could really help
  others learn faster :)


[`eio' 0.1]
<https://discuss.ocaml.org/t/eio-0-1-effects-based-direct-style-io-for-ocaml-5/9298/97>

[agnostic blocking]
<https://discuss.ocaml.org/t/how-to-block-in-an-agnostic-way/9368/51>

[awesome] <https://github.com/patricoferris/awesome-multicore-ocaml>

[tutorials] <https://github.com/ocamllabs/ocaml-effects-tutorial>

[examples] <https://github.com/ocaml-multicore/effects-examples>

[talks]
<https://watch.ocaml.org/videos/watch/74ece0a8-380f-4e2a-bef5-c6bb9092be89>

[a simple tutorial about programming a roguelike with effect handlers]
<https://hackmd.io/@yF_ntUhmRvKUt15g7m1uGw/BJBZ7TMeq>

[a deeper look at the scope of effect handlers]
<https://hackmd.io/@yF_ntUhmRvKUt15g7m1uGw/Bk-5NXh15>


Kiran Gopinathan then said
──────────────────────────

  Great blog post! That seems like a very elegant implementation!

  Funny you should make a rougelike :smiley: , I guess effect handlers +
  games might be popular for games, because I also had a blog post about
  effect handlers and their applications, in particular for games,
  although in my case it was for animations:

  <https://gopiandcode.uk/logs/log-bye-bye-monads-algebraic-effects.html>


gasche also replied
───────────────────

  Note: the "upstream" status of effect handlers is a little
  uncertain/confusing right now. Your blog post (I didn't get a chance
  to read it yet, but it sounds very nice!) uses the experimental syntax
  of multicore-4.12+effects, but that syntax was intentionally /not/
  upstreamed, and it will /not/ be part of OCaml 5.0.

  I think there is a risk of confusion because the community is aware
  that Multicore OCaml has effect handlers, and also that Multicore
  OCaml has been merged upstream. So it can be tempting to believe that
  the upcoming OCaml release (or maybe one or two releases after that,
  we said the first Multicore release would be more like a preview) will
  support effect handlers as a language feature. It will not! Effects as
  a language feature were removed from Multicore OCaml before the
  upstream merge. And /no one knows/ if/when they will be supported
  upstream.

  So: I think that your blog posts on using effect handlers could have
  somewhere a short mention that the code is using an experimental
  extension of OCaml that is not supported by the upstream
  implementation.


  The reasoning for this choice is that we want to give a chance to a
  type system for effect handlers, but that still need quite a bit more
  time than the Multicore runtime itself. We don't want to encourage the
  ecosystem to rely on untyped effects, if it means a lot of pain
  upgrading to typed effects later (or risk having to support both).

  5.0 only contains basic support for effect handlers as a /runtime
  primitive/, but dos /not/ support handlers as a /language feature/. I
  think they should be considered experimental: you can rely on them for
  their intended purpose of exposing a flexible interface for concurrent
  fibers, but uses beyond that may break in the future.

  So, in a sense, we don't want people to use them. It's of course fine
  to use experimental features from experimental forks of the OCaml
  compiler (effect handlers, modular implicits or explicits, runtime
  type representations and what not), and the people working on these
  experimental features do benefit from other people trying them and
  giving them feedback. But we don't want people to depend on it /in
  production/, whatever that means. (For example, code using it is
  likely to get stuck on 4.12 forever and never see an upgrade to
  upcoming OCaml versions, although of course people could choose to
  port the experimental branch forward.)


For Diversity and the OCaml Community: Outreachy Summer 2022
════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/for-diversity-and-the-ocaml-community-outreachy-summer-2022/9234/4>


Sonja Heinze announced
──────────────────────

  Just in case anyone is actually interested in this: the project
  submission deadline has been extended from March 4th to March 23rd. So
  the updated timeline now looks as follows:

  <https://aws1.discourse-cdn.com/standard11/uploads/ocaml/original/2X/5/534ca9a08bce10f13530e6c98eae1797fdf13e52.png>

  where 2. and 3. probably need to be done a bit in parallel.


Bogue, the OCaml GUI
════════════════════

  Archive: <https://discuss.ocaml.org/t/ann-bogue-the-ocaml-gui/9099/23>


sanette announced
─────────────────

  Hi, some new developments. I have implemented a new `Sdl_area' widget
  where one can conveniently issue any SDL function (from the SDL
  Renderer API).

  Here is (below) the new 'labelled graph' example. In this example I am
  using regular "label" widgets for creating the nodes, and I am using
  an Sdl_area for drawing the lines.

  The nice things for labels to be regular widgets is that one can click
  on them. To demonstrate this, in this example they react to a click by
  jumping to another random location (with animation).

  <https://aws1.discourse-cdn.com/standard11/uploads/ocaml/optimized/2X/f/f9575838a7e5ea4c58485b955e96f7c9bbda384f_2_1266x1000.png>

  <https://aws1.discourse-cdn.com/standard11/uploads/ocaml/original/2X/d/d6958e266f27a557c5c8d8d37099d532eacf2c1c.gif>

  ┌────
  │ open Bogue
  │ module W = Widget
  │ module L = Layout
  │ 
  │ let n = 15 (* number of discs *)
  │ let radius = 20
  │ let width = 800
  │ let height = 600
  │ 
  │ let c = Draw.find_color "#e5b92c"
  │ let cb = Draw.find_color "#7b6b35"
  │ let disc_style = Style.(
  │     create ~border:(
  │       mk_border ~radius (mk_line ~color:Draw.(opaque c) ~width:1 ~style:Solid ()))
  │       ~background:(color_bg Draw.(opaque cb)) ())
  │ 
  │ let background = L.style_bg Style.(
  │     of_bg (gradient ~angle:45. Draw.[opaque grey; opaque black]))
  │ 
  │ let fg = Draw.(opaque white)
  │ 
  │ let create_disc i (x,y) =
  │   let w = 2*radius + 1 in
  │   let bg = Box.create ~style:disc_style ~width:w ~height:w () in
  │   W.label ~fg (string_of_int i)
  │   |> L.resident ~background:(L.box_bg bg) ~x:(x-radius) ~y:(y-radius) ~w ~h:w
  │ 
  │ let move_disc (x,y) d =
  │   let (x0, y0) = L.xpos d, L.ypos d in
  │   L.animate_x d (Avar.fromto x0 x);
  │   L.animate_y d (Avar.fromto y0 y)
  │ 
  │ let random_center _ =
  │   radius + Random.int (width - 2*radius),
  │   radius + Random.int (height - 2*radius)
  │ 
  │ let area =
  │   let sdlw = W.sdl_area ~w:width ~h:height () in
  │   let sdla = W.get_sdl_area sdlw in
  │   let centers = Array.init n random_center in
  │   let color = Draw.(opaque grey) in
  │   let draw_lines renderer = let open Draw in
  │     for i = 0 to n - 2 do
  │       let x0, y0 = to_pixels centers.(i) in
  │       let x1, y1 = to_pixels centers.(i+1) in
  │       line renderer ~color ~thick:6 ~x0 ~y0 ~x1 ~y1
  │     done in
  │   Sdl_area.add sdla draw_lines;
  │   let discs = Array.mapi create_disc centers |> Array.to_list in
  │   (* move the disc when click on it *)
  │   List.iteri (fun i d ->
  │       W.on_click ~click:(fun _ ->
  │ 	  centers.(i) <- random_center 0;
  │ 	  Sdl_area.update sdla;
  │ 	  let x,y = centers.(i) in
  │ 	  move_disc (x - radius, y - radius) d) (L.widget d))
  │     discs;
  │   L.superpose ~w:width ~h:height ~background (L.resident sdlw :: discs)
  │ 
  │ let board = Bogue.make [] [area]
  │ 
  │ let () = Bogue.run board
  └────


Friday 03/04 Intern presentations – open attendance!
════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/friday-03-04-intern-presentations-open-attendance/9429/1>


Aya announced
─────────────

  This is Aya, one of the three [Outreachy] interns working on OCaml
  this winter :camel: After 3 very fast months, our internships are
  already coming to a close. We have had such a great time working on
  our projects and learning OCaml that we want to hold an event to mark
  the end of the internships, and we decided to open it up to the
  community :tada:

  As you might have seen in the [initial announcement], @pitag
  @shonfeder @gs0510 @tmattio and @pkel all volunteered to mentor us
  from December 2021 to now. Thank you all so so much for mentoring us
  and introducing us to OCaml :heart: :fire: It's been such an enjoyable
  experience!

  We are inviting anyone who is interested to attend a virtual session
  of 3 short presentations on *Friday, March 4th, 4-5pm CET* (we will
  post the link to join on Thursday). There will be time for Q&A after
  each presentation, and the whole session will be recorded and posted
  online shortly after as well.

  • @ayc9 will present on updating a standard PPX deriver (mentors:
    @pitag @shonfeder)
  • @SaySayo will present on syntax highlighting and other updates to
    the vscode extension (mentors: @tmattio @gs0510)
  • @JiaeK will present on building a basic monitoring dashboard for
    [ocaml.org] (mentors: @tmattio)

  We hope you can make it!

  -@ayc9 @SaySayo @JiaeK


[Outreachy] <https://outreachy.org/>

[initial announcement]
<https://discuss.ocaml.org/t/announcing-our-new-outreachy-interns/8932>

[ocaml.org] <http://ocaml.org/>


Affect: Composable concurrency primitives for OCaml 5.0
═══════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/affect-composable-concurrency-primitives-for-ocaml-5-0/9430/1>


Daniel Bünzli announced
───────────────────────

  I looked a bit into the kind of fiber abstraction and concurrency
  structure I would like to use with the new tools OCaml 5.0 is going to
  offer.  You can find some results in affect's [`Fiber'] module.

  This fiber abstraction supports terminating by returning values or
  abnormally (by aborting or via a spurious exception). Termination of a
  fiber is aligned on function scopes: all the fibers spawn by a fiber
  function have to terminate in order for it to terminate.

  This means that if your fiber returns a value it waits for its spawns
  to terminate (in any way) before returning the value. And if your
  fiber returns abnormally (uncaught eception or explicit abort) it
  first aborts all its non-terminated spawns before returning abnormally
  – this provides affect's notion of cancellation.

  Explicit fiber aborts raise the `Abort' exception in fibers. Combined
  with a disciplined use of `Fun.protect' and an optional `finally'
  handler specified at fiber spawn, this lets them release the
  ressources they may hold when it's time to say goodbye.

  The module also provides a generic way of blocking and unblocking
  fibers that you can use to interface with your favourite event
  loop. It does so without requiring to fiddle with effects, you just
  need to make judicious use of [`Fiber.block'] and provide a suitable
  function to `Fiber.run''s built-in scheduler to let it know about
  fibers that can be unblocked.

  A grab bag of comments:

  1. The first goal of affect is to seek a concurrency and abort
     structure that are easy to understand, use and compose with event
     loops. Right now some efficiency and implementation aspects need to
     be improved. This will likely change the exposed set of primitive
     effects which doesn't feel exactly right yet (if you want to build
     your own scheduler).

  2. I use abort rather than cancel terminology. From my non-native
     english speaker perspective, cancelling is more about not doing
     something that was planned but didn't happen yet. Aborting is more
     about stopping something that is going on. It also melds better
     with the uncaught exception case.

  3. Say no to `unit' soups! Let fibers return values.

  4. At that point I don't feel the need to add a promise/future
     abstraction to the toolbox. The whole point of direct style is to
     get rid of this async madness.

  5. There's no synchronisation structure yet. Semaphores are always
     useful for throttling so I'll certainly add that at some point or a
     more fundamental primitive like an mvar.

  6. The [`Funix'] module has a few fiber friendly `Unix' module
     functions for playing with timers and the network, see [`ping.ml']
     for an example of use. In practice you want to be able to use
     something else than `select(2)' though. There are various ways one
     could go about this, see for example point 6. in these [design
     notes].

  7. The [`mouse.ml'] has a basic example on how to interface with the
     SDL event loop which provides another example on how one goes to
     interface `Fiber' with event loops.

  I'm not fully convinced by everything yet. It will certainly need one
  or two more design rounds. If you try it, feel free to comment or make
  suggestions on the issue tracker.

  Home page: <https://erratique.ch/software/affect>

  API docs: <https://erratique.ch/software/affect/doc/> (or `odig doc
  affect')

  Install:
  ┌────
  │ opam switch create 5.0.0+trunk
  │ opam pin add https://erratique.ch/repos/affect.git
  └────


[`Fiber'] <https://erratique.ch/software/affect/doc/Fiber/index.html>

[`Fiber.block']
<https://erratique.ch/software/affect/doc/Fiber/index.html#val-block>

[`Funix'] <https://erratique.ch/software/affect/doc/Funix/index.html>

[`ping.ml']
<https://github.com/dbuenzli/affect/blob/master/test/ping.ml>

[design notes]
<https://github.com/dbuenzli/affect/blob/master/DESIGN.md>

[`mouse.ml']
<https://github.com/dbuenzli/affect/blob/master/test/mouse.ml>


Segfault Systems Joins Tarides
══════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/segfault-systems-joins-tarides/9431/1>


Thomas Gazagnaire announced
───────────────────────────

  @kayceesrk and I are delighted to announce that Segfault Systems, a
  spinout from IIT-Madras, is joining Tarides.  Tarides has worked
  closely with Segfault Systems over the last couple of years, most
  notably on the award-winning Multicore OCaml project and the
  upstreaming plans for OCaml 5.0. This alliance furthers the goals of
  Tarides, bringing the compiler and benchmarking expertise of the
  Segfault team directly into the Tarides organisation, where it can be
  commercially funded and supported.

  All of Segfault Systems’ existing responsibilities and open-source
  commitments will migrate over to Tarides, where work will continue
  towards the three main objectives in 2022:

  • Releasing OCaml 5.0 with support for domains and effect handlers
  • Supporting the ecosystem to migrate the OCaml community over to
    OCaml 5.0
  • Improving developer productivity for OCaml 5.0 by releasing the best
    platform tools

  This alliance will complement the commercial offerings of Tarides –
  already strengthened by the integration of [OCaml Labs] – and
  contribute to Tarides’ mission: empowering developers, communities,
  and organisations to adopt OCaml as their primary programming
  experience by providing training, expertise, and development services
  around the OCaml language.

  Read the full announcement [here], including details of our goals and
  the focus for 2022. This alliance brings the headcount of Tarides up
  to 60+ people, all working towards making OCaml the best language for
  any and every project. Join our team and reach out for commercial
  services at [https://tarides.com/].


[OCaml Labs] <https://discuss.ocaml.org/t/ocaml-labs-joins-tarides/9229>

[here]
<https://tarides.com/blog/2022-03-01-segfault-systems-joins-tarides>

[https://tarides.com/] <https://tarides.com/>


OCaml User Survey 2022
══════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-ocaml-user-survey-2022/9433/1>


Kim Nguyễn announced
────────────────────

  we are delighted to announce the [OCaml User Survey 2022]. With this
  survey, the OCSF is trying to get a better picture of the OCaml
  community and its needs. It would be very helpful if you could take a
  few minutes (10 to 15) to fill the survey and share it with other
  OCaml programmers.

  [https://forms.gle/oKy2Joz1cZhCPNtf6]

  The survey is run by the [OCaml Software Foundation]. It builds on
  [the previous iteration] issued in 2020. The results will be published
  here on discuss and on the [website of the OCSF]. We would like to
  particularly thank @cjr for his help as well as everyone who commented
  on the previous survey. We tried our best to take all remarks into
  account but surely missed something. Don't hesitate to give us your
  feedback (you can post here or send me a message/email).

  The survey will remain opened until March 11th 2022 (AOE).


[OCaml User Survey 2022] <https://forms.gle/oKy2Joz1cZhCPNtf6>

[https://forms.gle/oKy2Joz1cZhCPNtf6]
<https://forms.gle/oKy2Joz1cZhCPNtf6>

[OCaml Software Foundation] <https://ocaml-sf.org/>

[the previous iteration]
<https://discuss.ocaml.org/t/ann-ocaml-user-survey-2020/6624>

[website of the OCSF] <https://ocaml-sf.org/>


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2022-02-22 12:43 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2022-02-22 12:43 UTC (permalink / raw)
  To: lwn, cwn, caml-list

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

Hello

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

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
Old CWN


OCAML goes Quantum computing
════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ocaml-goes-quantum-computing/9333/1>


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]
<https://scitechdaily.com/twist-mits-new-programming-language-for-quantum-computing/>

[GitHub for Twist] <https://github.com/psg-mit/twist-popl22>


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:
  • <https://hackage.haskell.org/package/quipper-language>
  • <http://www.mathstat.dal.ca/~selinger/quipper/>
  • <https://arxiv.org/pdf/1304.3390.pdf>
  • <https://arxiv.org/pdf/2105.03522.pdf> (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
══════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-layout-parsing-and-nicely-formatted-error-messages/9343/1>


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.


[post]
<https://discuss.ocaml.org/t/my-way-from-lalr-parsing-to-combinator-parsing/7377>

[github repository] <https://github.com/hbr/fmlib>

[API] <https://hbr.github.io/fmlib/odoc/index.html>

[tutorial] <https://hbr.github.io/fmlib/odoc/fmlib_parse/parse.html>

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
  hierarchically.

  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
  └────


[Fmlib]
<https://hbr.github.io/fmlib/odoc/fmlib_parse/Fmlib_parse/index.html>


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
  form.

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


[Fmlib]
<https://hbr.github.io/fmlib/odoc/fmlib_pretty/Fmlib_pretty/index.html>

[Fmlib_pretty]
<https://hbr.github.io/fmlib/odoc/fmlib_pretty/Fmlib_pretty/index.html>


ptime 1.0.0 and mtime 1.4.0
═══════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-ptime-1-0-0-and-mtime-1-4-0/9344/1>


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
  `js_of_ocaml'.

  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
  programs.

  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
  [`mtime'].

  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']
<https://github.com/dbuenzli/ptime/blob/master/CHANGES.md#v100-2022-02-16-la-forclaz>

[`mtime']
<https://github.com/dbuenzli/mtime/blob/master/CHANGES.md#v140-2022-02-17-la-forclaz-vs>

[ptime] <https://erratique.ch/software/ptime>

[mtime] <https://erratique.ch/software/mtime>

[ptime] <https://erratique.ch/software/ptime/doc>

[mtime] <https://erratique.ch/software/mtime/doc>


Timedesc 0.6.0
══════════════

  Archive: <https://discuss.ocaml.org/t/ann-timedesc-0-6-0/9349/1>


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] <https://github.com/daypack-dev/timere>

Features:
╌╌╌╌╌╌╌╌╌

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


Changes
╌╌╌╌╌╌╌

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

  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
      `Date.ISO_ord_date'
  • Added "partial date" modules with ISO8601 parsing and printing
    facilities
    • `ISO_week'
    • `Ym'
  • Added additional ISO8601 printing facilities for all three calendar
    systems
    • `Date.Ymd.pp/to_iso8601' (these are just aliases to the RFC3339
      printers)
    • `Date.ISO_week_date.pp/to_iso8601'
    • `Date.ISO_ord.pp/to_iso8601'
  • Added additional ISO8601 parsing facilities for all three calendar
    systems
    • `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
══════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ocaml-from-the-very-beginning-now-free-in-pdf-and-html-formats/9361/1>


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:
  [https://johnwhitington.net/ocamlfromtheverybeginning/].

  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] <https://ocaml-sf.org/>

[OCaml from the Very Beginning] <https://ocaml-book.com>

[https://johnwhitington.net/ocamlfromtheverybeginning/]
<https://johnwhitington.net/ocamlfromtheverybeginning/>

[source] <https://github.com/johnwhitington/mlbook>


Dune 3.0.0
══════════

  Archive: <https://discuss.ocaml.org/t/ann-dune-3-0-0/9374/1>


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
    feedback.

  • 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
  upgrading.

  Happy Hacking.

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


Blog Post "2021 at OCamlPro"
════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/blog-post-2021-at-ocamlpro/9390/1>


Fabrice Le Fessant announced
────────────────────────────

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

  <https://www.ocamlpro.com/blog/2022_01_31_2021_at_ocamlpro>

  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
  contact@ocamlpro.com


Packstream 0.1
══════════════

  Archive: <https://discuss.ocaml.org/t/ann-packstream-0-1/9392/1>


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] <https://github.com/tomob/packstream>

[Packstream binary format]
<https://7687.org/packstream/packstream-specification-1.html>


OCaml 4.14.0, first beta release
════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ocaml-4-14-0-first-beta-release/9396/1>


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:

  <https://github.com/ocaml/ocaml/issues>

  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+https://github.com/ocaml/ocaml-beta-repository.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+https://github.com/ocaml/ocaml-beta-repository.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:

  • <https://github.com/ocaml/ocaml/archive/4.14.0-beta1.tar.gz>
  • <https://caml.inria.fr/pub/distrib/ocaml-4.14/ocaml-4.14.0~beta1.tar.gz>


Changes compared to the last alpha
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  The full list of changes for OCaml 4.14 is available at
  <https://github.com/ocaml/ocaml/blob/4.14/Changes>


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] <https://github.com/ocaml/ocaml/issues/10583>

[10998] <https://github.com/ocaml/ocaml/issues/10998>


Documentation
┄┄┄┄┄┄┄┄┄┄┄┄┄

  • [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] <https://github.com/ocaml/ocaml/issues/10397>

[10794] <https://github.com/ocaml/ocaml/issues/10794>


Build system
┄┄┄┄┄┄┄┄┄┄┄┄

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

  • [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] <https://github.com/ocaml/ocaml/issues/10828>

[10835] <https://github.com/ocaml/ocaml/issues/10835>

[9800] <https://github.com/ocaml/ocaml/issues/9800>


Code generation
┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄

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


[10719] <https://github.com/ocaml/ocaml/issues/10719>


Internal/compiler-libs
┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄

  • *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] <https://github.com/ocaml/ocaml/issues/10718>

[11012] <https://github.com/ocaml/ocaml/issues/11012>


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2022-02-08 13:16 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2022-02-08 13:16 UTC (permalink / raw)
  To: lwn, cwn, caml-list

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

Hello

Here is the latest OCaml Weekly News, for the week of February 01 to 08,
2022.

Table of Contents
─────────────────

Functori is hiring full-time engineers and Interns
Permanent position for Computer Scientist in cybersecurity verification at CEA List, France
pyml_bindgen: a CLI app to generate Python bindings directly from OCaml value specifications
Old CWN


Functori is hiring full-time engineers and Interns
══════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/functori-is-hiring-full-time-engineers-interns/9266/1>


Mohamed Iguernlala announced
────────────────────────────

  Functori, a young and dynamic company based in Paris, is hiring
  talented engineers/PhDs to expand its team. Please find more details
  in the announcement (in French):
  <https://functori.com/annonce-recrutement.pdf>

  We are also looking for interns in the fields of programming
  languages, formal methods, and blockchains (details available on
  request).

  Feel free to share with anyone who may be interested.


Permanent position for Computer Scientist in cybersecurity verification at CEA List, France
═══════════════════════════════════════════════════════════════════════════════════════════

  Archive:
  <https://sympa.inria.fr/sympa/arc/caml-list/2022-02/msg00004.html>


ANTIGNAC Thibaud announced
──────────────────────────

  We would like to share with you an exciting opportunity to join the
  Frama-C team at CEA List (a French public research institute). We are
  opening a permanent computer scientist position to work on formal
  verification of cybersecurity properties. More details about the
  position and the qualifications expected are available here:
  <https://frama-c.com/jobs/2022-02-01-permanent-computer-scientist-cyber-security-verification.html>

  Please do not hesitate to reach out or to share with potentially
  interested people!


pyml_bindgen: a CLI app to generate Python bindings directly from OCaml value specifications
════════════════════════════════════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-pyml-bindgen-a-cli-app-to-generate-python-bindings-directly-from-ocaml-value-specifications/8786/5>


Ryan Moore announced
────────────────────

New version
╌╌╌╌╌╌╌╌╌╌╌

  I wanted to announce a new version of `pyml_bindgen' has been merged
  into the opam repository, version 0.2.0.  Whenever it hits, feel free
  to try it out!

  The main addition is now you can embed Python files directly into the
  generated OCaml module and it will be evaluated at run time.  In this
  way, you don't need your users to mess with the `PYTHONPATH'
  environment variable or need them to install a particular Python
  module when using the generated OCaml code. (Another thanks to
  UnixJunkie and Thierry Martinez for their help with this!)

  There were also a few bugfixes and some nice new [examples] added to
  the GitHub repository.  One cool thing about the examples is that they
  show you how to set up your project to use Dune rules to automatically
  generate Python bindings whenever the value specification files
  change!


[examples]
<https://github.com/mooreryan/ocaml_python_bindgen/tree/main/examples>


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2022-02-01 13:00 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2022-02-01 13:00 UTC (permalink / raw)
  To: lwn, cwn, caml-list

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

Hello

Here is the latest OCaml Weekly News, for the week of January 25 to
February 01, 2022.

Table of Contents
─────────────────

ppx_seq v0.1.1
OCaml Labs Joins Tarides
For Diversity and the OCaml Community: Get Involved in Outreachy Summer 2022
Set up OCaml 2.0.0-beta13
First release of scfg
Brr 0.0.3, a toolkit for programming browsers
(anonymous?) polymorphic records
2 postdoc positions on Runtime Verification at CEA LIST, Université Paris-Saclay, France
Old CWN


ppx_seq v0.1.1
══════════════

  Archive: <https://discuss.ocaml.org/t/ann-ppx-seq-v0-1-1/9227/1>


hyphenrf announced
──────────────────

  Hello everyone, my first contribution to opam-repository has just been
  merged and is waiting to hit the caches of [opam.ocaml.org].

  [ppx_seq] is a cute un-intrusive literal syntax for `Seq'. The
  rewriter is simple and has very small surface area: just `[%seq x; y;
  z; ...]' and `[%seq.empty]'.  It tries to be maximally compatible with
  all OCaml releases from 4.07 (when `Seq' was introduced) to 4.14 and
  beyond

  The reason I created this rewriter is to make it an easier choice to
  reach first for `Seq' as a general data structure (instead of
  e.g. list). That wasn't quite attractive before because of how minimal
  the `Seq' module was, it was mostly used as an intermediate step
  between two types of collections, but now with 4.14 about to be
  released, `Seq' is becoming a first-class data structure with a very
  versatile API.

  I hope my little rewriter helps make it even more attractive to
  use. Check it out and maybe leave me some feedback.  Thanks <3


[opam.ocaml.org] <https://opam.ocaml.org>

[ppx_seq] <https://github.com/hyphenrf/ppx_seq>


OCaml Labs Joins Tarides
════════════════════════

  Archive: <https://discuss.ocaml.org/t/ocaml-labs-joins-tarides/9229/1>


Thomas Gazagnaire announced
───────────────────────────

  Gemma Gordon (@gemmag) and I are delighted to announce that OCaml
  Labs, a spinout from the University of Cambridge, is joining
  Tarides. After successfully collaborating on many OCaml projects over
  the last four years, this alliance will formally combine the expertise
  of both groups. Joining forces will accelerate OCaml development and
  its broader adoption, and enable us to continue with our shared goal
  of bringing OCaml into mainstream use. Furthermore, it will bring the
  security, portability and performance of OCaml to a large spectrum of
  use-cases: from academic endeavours such as formal methods and
  existing threats within cyber security, to real-world applications for
  climate change, sustainable agriculture, and even space exploration!

  All of OCaml Labs’ existing responsibilities and open source
  commitments will migrate over to Tarides, and thanks to how closely
  the teams already work, business will continue without interruption to
  continuity or delivery. Gemma Gordon will step up as CEO of Tarides,
  and I will lead the technological vision and strategy as CTO.

  The OCaml 5.0 release will support multicore and effects handlers,
  influencing every aspect of the language and its ecosystem. The update
  will significantly improve both performance and user experience,
  whilst maintaining existing features that the community loves. Using
  the teams’ combined experience and zest for innovation, Tarides is
  looking to the future of the OCaml language and community with
  excitement. Since Tarides’ inception we have envisioned a future where
  all OCaml applications are easily deployable as specialised, secure
  and energy-efficient MirageOS unikernels. We believe that this
  alliance is a step further in that direction.

  _This alliance will complement the commercial offerings of Tarides and
  contribute to Tarides' mission: empowering developers, communities and
  organisations to adopt OCaml as their primary programming experience
  by providing training, expertise and development services around the
  OCaml language._

  Read the full announcement [here], including details of our goals and
  the focus for 2022.  This alliance brings the headcount of Tarides up
  to 60+ people, all working towards making OCaml the best language for
  any, and every project. Join our team and reach out for commercial
  services at: [https://tarides.com/]


[here] <https://tarides.com/blog>

[https://tarides.com/] <https://tarides.com/company>


For Diversity and the OCaml Community: Get Involved in Outreachy Summer 2022
════════════════════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/for-diversity-and-the-ocaml-community-get-involved-in-outreachy-summer-2022/9234/1>


Sonja Heinze announced
──────────────────────

  As @patricoferris [has mentioned] previously, the Outreachy call for
  open-source communities and project submissions has started. As a
  reminder, [Outreachy] is an initiative that provides a framework
  through which open-source communities can offer three month
  internships directed at people from any kind of under-represented
  background in open source. With that, Outreachy helps open-source
  communities grow on several levels: diversity, experience, size, and
  popularity.

  The OCaml community participated in Outreachy in summer 2019, summer
  2020, [summer 2021], and currently in [winter 2021/22]. All our
  interns have done and are doing really amazing jobs, and summer 2022
  is just around the corner! The following timeline illustrates the
  process:

  <https://i.imgur.com/DbzeiMO.png>

  So let's start getting involved!


[has mentioned]
<https://discuss.ocaml.org/t/become-an-outreachy-mentor-support-the-growth-and-diversity-of-the-ocaml-community/8213/15?u=pitag>

[Outreachy] <https://www.outreachy.org>

[summer 2021] <https://discuss.ocaml.org/t/outreachy-summer-2021/8438>

[winter 2021/22]
<https://discuss.ocaml.org/t/announcing-our-new-outreachy-interns/8932>

Ways to Get Involved
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  Community members can take on different roles in the Outreachy effort,
  and all of them are very important! Maybe the most important (and most
  involved) role is being a mentor.


Mentoring
┄┄┄┄┄┄┄┄┄

  Mentors have two responsibilities: leading the project and guiding the
  interns/applicants.


Leading the Project
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈

  One responsability is leading the project. Concretely, that means
  outlining an internship project, submitting a project description to
  Outreachy, making sure that the context repo for that project gets
  ready for the application/"contribution" phase, and guiding the
  project throughout the internship, including reacting to changes.  All
  of that must match the Outreachy framework, which we [explained in
  detail] last round, based on the timeline structure shown above.


[explained in detail]
<https://discuss.ocaml.org/t/become-an-outreachy-mentor-support-the-growth-and-diversity-of-the-ocaml-community/8213#step-by-step-process-for-being-a-mentor-11>


Guiding the Intern and the Applicants
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈

  Their other responsibility is personal guidance. During the
  application/"contribution" period, mentors answer questions and review
  code for multiple applicants. During the internship, they also offer
  pair-programming sessions and facilitate more specific guidance, and
  general support for their interns.

  All of that is usually quite time-intensive, so it's important to have
  some support from other community members and strong support from a
  concrete co-mentor.


Co-mentoring
┄┄┄┄┄┄┄┄┄┄┄┄

  A co-mentor does the same job as described in the "Guiding the Intern
  and the Applicants" tasks above, so having a co-mentor is very
  important! Of course, if a co-mentor also wants to take part in the
  project's direction, that's great as well! This means that the line
  between co-mentoring and mentoring isn't always clear.


Volunteering (aka "Acting as a Joker :bat:")
┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄

  Mentors and co-mentors receive a lot of general questions related to
  OCaml and programming in addition to specific questions about the
  project. That's where Outreachy volunteers can be very helpful! They
  help all applicants and interns across projects with (usually)
  project-unspecific questions and give a very important technical base
  support.


Point Out Potential Project Ideas
┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄

  Apart from not having enough time, the main reason that stops folks
  from becoming a mentor is the lack of project ideas. So if you have
  potential project ideas, please point them out, even if you don't have
  time to mentor!  Generally, a self-contained, uncontroversial, and
  incremental project makes the most suitable project for Outreachy.
  It's also important for a project to be associated with a repo that
  can serve as a basis for easy contributions during the application
  phase. When in doubt, don't keep your ideas to yourself. Any idea can
  be helpful!


Prepare Your Repos
┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄

  In general, if you maintain a repo, it's really nice to be welcoming
  to new contributors. Concretely, that means having clear contributing
  guidelines, good newcomer issues, and well-labeled issues. As a nice
  side-effect, this also makes your project a better target for future
  Outreachy projects.


Ready to Get Involved?
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  If you've gotten interested in any of those roles or have any other
  comments, please just answer here in the thread.  It would be super
  nice to get a discussion going and start our Outreachy efforts early!


Sudha Parimala then said
────────────────────────

  I along with @shakthimaan @gs0510 are submitting a project:

  • Extend OCaml 5's parallel benchmark suite.

  The idea is to gather parallel benchmarks available elsewhere and make
  them available in our benchmark suite, to aid the development of the
  OCaml compiler and parallel programming libraries. Relevant repos:
  [sandmark] and [current-bench].


[sandmark] <https://github.com/ocaml-bench/sandmark>

[current-bench] <https://github.com/ocurrent/current-bench>


Set up OCaml 2.0.0-beta13
═════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-set-up-ocaml-2-0-0-beta13/9248/1>


Sora Morimoto announced
───────────────────────

Changed
╌╌╌╌╌╌╌

  • Do not install opam-depext if it's not enabled.


Fixed
╌╌╌╌╌

  • Print a proper error if the version not found in the `.ocamlformat'
    file.

  <https://github.com/ocaml/setup-ocaml/releases/tag/v2.0.0-beta13>


First release of scfg
═════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-first-release-of-scfg/9249/1>


zapashcanon announced
─────────────────────

  I'm pleased to announce the first release of [scfg] on opam.

  It provides a library and an executable to work with the [scfg
  configuration file format]. (disclaimer: scfg has been created by my
  good friend @emersion)

  Here's an example of an scfg file taken from the specification:

  ┌────
  │ train "Shinkansen" {
  │ 	model "E5" {
  │ 		max-speed 320km/h
  │ 		weight 453.5t
  │ 
  │ 		lines-served "Tōhoku" "Hokkaido"
  │ 	}
  │ 
  │ 	model "E7" {
  │ 		max-speed 275km/h
  │ 		weight 540t
  │ 
  │ 		lines-served "Hokuriku" "Jōetsu"
  │ 	}
  │ }
  └────

  Scfg is a file format designed to be simple and indeed the
  implementation was really straightforward. I'm planning to use it in
  small tools I wrote (mostly [sway] tools written in OCaml) but never
  released because I couldn't stand having to use TOML, YAML or JSON for
  them…

  The library provides an executable to validate and pretty-print an
  scfg file. It'll indent it properly, remove useless quoting and
  whitespaces:

  ┌────
  │ $ scfg spec.scfg
  │ train Shinkansen {
  │   model E5 {
  │     max-speed 320km/h
  │     weight 453.5t
  │     lines-served Tōhoku Hokkaido
  │   }
  │   model E7 {
  │     max-speed 275km/h
  │     weight 540t
  │     lines-served Hokuriku Jōetsu
  │   }
  │ }
  └────

  The library is made of four modules : `Types', `Parse', `Pp' and
  `Query'.

  The `Types' module simply defines the following types, which are all
  you need to deal with scfg:

  ┌────
  │ (** A directive has a name, a list of parameters and children (a list of directive). *)
  │ type directive =
  │   { name : string
  │   ; params : string list
  │   ; children : directive list
  │   }
  │ 
  │ (** A config is a list of directives. *)
  │ type config = directive list
  └────

  The others modules can be used as follow:

  ┌────
  │ let file = {|
  │   train A-Train {
  │     bla bla bla
  │   }
  │   train "John Col Train" {
  │     tut tut tut
  │   }
  │ |}
  │ 
  │ (* parsing the file *)
  │ let config =
  │   (* there's also a `Parse.from_file` function that should be more useful *)
  │   match Scfg.Parse.from_string file with
  │   | Error e ->
  │     Format.eprintf "error: %s@." e;
  │     exit 1
  │   | Ok config -> config
  │ 
  │ (* printing the file *)
  │ let () =
  │   Format.printf "```scfg@.%a@.```@." Scfg.Pp.config config
  │ 
  │ (* querying the file *)
  │ let () =
  │   (* gets the first directive with the name `train` *)
  │   match Scfg.Query.get_dir "train" config with
  │   | None -> Format.printf "No train found.@."
  │   | Some train -> (
  │     (* get the parameter at index 0 in the `train` directive *)
  │     match Scfg.Query.get_param 0 train with
  │     | Error _e -> Format.printf "Train has no name.@."
  │     | Ok name -> Format.printf "The first train is `%s`.@." name )
  └────

  For more have a look at the [project's README], the [documentation] or
  feel free to ask here ! :partying_face:


[scfg] <https://git.zapashcanon.fr/zapashcanon/scfg>

[scfg configuration file format] <https://git.sr.ht/~emersion/scfg>

[sway] <https://swaywm.org/>

[project's README]
<https://git.zapashcanon.fr/zapashcanon/scfg/src/branch/master#scfg>

[documentation] <https://doc.zapashcanon.fr/scfg/>


Brr 0.0.3, a toolkit for programming browsers
═════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-brr-0-0-3-a-toolkit-for-programming-browsers/9252/1>


Daniel Bünzli announced
───────────────────────

  It's my pleasure to announce the release `0.0.3' of [`Brr'], a toolkit
  for programming browsers in OCaml with the [`js_of_ocaml'] compiler.

  Once it has made it to the repo, install with `opam install brr' and
  consult the [API docs and manuals] (or via `odig doc brr').

  Among small additions and fixes, this release brings support for
  `js_of_ocaml' 4.0.0. Thanks to Hugo Heuzard (@hhugo) who has made the
  ground work in `js_of_ocaml' this means that:

  1. `Brr', `js_of_ocaml' and ([soon]) `gen_js_api' JavaScript bindings
     can now all be used in the same program without problems (issue
     [#2]).
  2. You no longer need to specify the `-no-check-prim' flag at
     bytecode link time. Linking against the `brr' library is
     sufficient, see the [build instructions].

  The [release notes] have all the details.


[`Brr'] <https://erratique.ch/software/brr>

[`js_of_ocaml'] <https://ocsigen.org/js_of_ocaml>

[API docs and manuals] <https://erratique.ch/software/brr/doc/>

[soon] <https://github.com/LexiFi/gen_js_api/pull/164>

[#2] <https://github.com/dbuenzli/brr/issues/2>

[build instructions]
<https://erratique.ch/software/brr/doc/web_page_howto.html>

[release notes]
<https://github.com/dbuenzli/brr/blob/master/CHANGES.md#v003-2022-01-30-la-forclaz-vs>


(anonymous?) polymorphic records
════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/anonymous-polymorphic-records/9256/1>


nrolland asked
──────────────

  Is there a way to avoid to create records only to preserve
  polymorphism ?

  Say, for this, in haskell style
  ┌────
  │ h :: (forall r. (r -> a) -> (f r -> f b)) -> f a -> f b
  │ h malg = malg id
  └────


octachron replied
─────────────────

  You can use objects, they can have polymorphic methods:

  ┌────
  │ let f (id:<f:'a. 'a -> 'a>) = id#f 0, id#f "zero"
  └────


Maëlan also replied
───────────────────

  The following doesn’t help reducing the syntactic noise, but note that
  when using a record for non-prenex polymorphism like this, your record
  has only one field and is immutable, so (with a recent enough OCaml)
  you can unbox it and get rid of the runtime overhead:

  ┌────
  │ type ('a, 'b) fwrap = { f : 'r. ('r -> 'a) -> 'r list -> 'b list } [@@unboxed]
  │ 
  │ let apply_id : type a b. (a, b) fwrap -> a list -> b list =
  │   fun w xs -> w.f Fun.id xs
  │ (* is compiled the same as just: *)
  │ let apply_id_magic : type a b. (a, b) fwrap -> a list -> b list =
  │   fun w xs -> (Obj.magic w) Fun.id xs
  │ 
  │ let mwrap : type a. (a, a) fwrap = { f = List.map }
  │ (* is compiled to nothing at all (alias of List.map). *)
  └────


2 postdoc positions on Runtime Verification at CEA LIST, Université Paris-Saclay, France
════════════════════════════════════════════════════════════════════════════════════════

  Archive:
  <https://sympa.inria.fr/sympa/arc/caml-list/2022-02/msg00001.html>


Julien Signoles announced
─────────────────────────

  The Software Safety and Security Lab at CEA LIST, Université
  Paris-Saclay, France has 2 open postdoc positions in the area of
  runtime verification for code safety and security:

  • Designing Compilation Techniques for Improving Efficiency of E-ACSL,
    a Runtime Assertion Checker for C Programs

    <http://julien-signoles.fr/positions/postdoc-eacsl.pdf>

  • Control Flow Integrity for Remote Attestation

    <http://julien-signoles.fr/positions/postdoc-cfi.pdf>

  The candidates will:
  • solve challenging research problems;
  • implement their results in Frama-C, an industrial-strength
    open-source framework for analyses of C code;
  • evaluate their solutions on concrete benchmarks or/and use cases;
  • publish their results in international conferences and journals.

  Strong knowledge in at least one of the following areas is welcome:
  • programming
    • OCaml and C
    • formal semantics
  • formal verification
    • runtime verification, static analysis, formal specification
      languages, …
  • compilation
    • code generation, program transformation, type system, …

  Interested applicants should send a CV and a motivation letter to
  Julien Signoles (julien dot signoles at cea dot fr).


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2022-01-25 12:44 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2022-01-25 12:44 UTC (permalink / raw)
  To: lwn, cwn, caml-list

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

Hello

Here is the latest OCaml Weekly News, for the week of January 18 to 25,
2022.

Table of Contents
─────────────────

wu-manber-fuzzy-search 0.1.0 (new library)
findlib-1.9.2
Signals and Threads on Memory Management
OCaml 4.14.0, first alpha release
A brief survey for Learn-OCaml Community
Blog post: Js_of_ocaml, a bundle size study
Interesting OCaml Articles
Old CWN


wu-manber-fuzzy-search 0.1.0 (new library)
══════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-wu-manber-fuzzy-search-0-1-0-new-library/9173/1>


Ifaz Kabir announced
────────────────────

  I'm happy to introduce wu-manber-fuzzy-seach, my library for doing
  fuzzy searches using the Wu and Manber fuzzy search algorithm.

  The novel part of this library particularly, when compared to
  `agrep/ocamlagrep', is that I additionally provide a right-leaning
  variant of the algorithm. The variant reports better matches and error
  counts when looking at the first match. Here's an example of the
  differences.

  ┌────
  │ # open Wu_Manber;;
  │ # StringSearch.(search ~k:2 ~pattern:"brown" ~text:"quick brown fox" |> report);;
  │ - : string = "Pattern matched with 2 errors at character 9 of text"
  │ # StringSearch.(search_right_leaning ~k:2 ~pattern:"brown" ~text:"quick brown fox" |> report);;
  │ - : string = "Pattern matched with 0 errors at character 11 of text"
  └────

  It's a pure OCaml implementation, using `Optint.Int63.t' as
  bit-vectors. I don't current support all the extensions that
  `agrep/ocamlagrep' supports, and will definitely not match the
  performance: OCaml+C vs pure OCaml.

  The documentation for the library can be found [here].

  It's not on `opam' yet, but there is a [PR].

  Expect more bitvector, Levenshtein distance, and fuzzy search
  shenanigans in the near future!


[here] <https://ifazk.github.io/wu-manber-fuzzy-search/>

[PR] <https://github.com/ocaml/opam-repository/pull/20479>


findlib-1.9.2
═════════════

  Archive:
  <https://sympa.inria.fr/sympa/arc/caml-list/2022-01/msg00040.html>


Gerd Stolpmann announced
────────────────────────

  findlib-1.9.2 is out. The only change is a fix for a build problem
  regarding the OCaml-5 trunk.

  For manual, download, manuals, etc. see here:

  <http://projects.camlcity.org/projects/findlib.html>

  An updated OPAM package will follow soon.


Signals and Threads on Memory Management
════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/signals-and-threads-on-memory-management/9190/1>


gasche said
───────────

  I just had an excellent time listening to the last Signals and Threads
  podcast episode on [Memory Management], with Stephen Dolan (@stedolan)
  as the guest and Yaron Minsky (@Yaron_Minsky) as the host discussing:
  • memory management in programming languages in general
  • memory management in OCaml
  • ongoing research by Stephen and Leo White (@lpw25) on
    memory-management and data-representation features for OCaml
    (unboxed types, local values on the stack).

  The link <https://signalsandthreads.com/memory-management/> contains
  both the audio and a full text transcript.

  I would warmly recommend giving it a try if you are interested in
  programming language implementation. There is new stuff to learn for
  everyone, and I also liked the presentation of the parts I was already
  familiar with.


[Memory Management] <https://signalsandthreads.com/memory-management/>


Yaron Minsky replied
────────────────────

  Thanks for the nice words. Interviewing Dolan was fun and I learned a
  lot.

  Local types are still very new: we're hoping to start rolling it out
  in a limited way internally in the next few weeks, and I expect we'll
  learn a lot from that. We plan on discussing it more publicly as well,
  but that's a bit farther out. In the meantime, the source is all
  available [on Github] if anyone wants to poke around.

  The approach to stack allocation is different and simpler than the one
  in Rust, as Dolan explained in the episode.  Instead of having
  implicit, polymorphic lifetime variables, function arguments can be
  marked as local, which prevents the function in question from stashing
  a reference to those types. This avoids the need to deal with
  higher-rank polymorphism, which Rust's lifetime approach requires, and
  as a result makes inference work nicely.

  Another neat trick is that you can create functions that can allocate
  on the parent stack frame (by dint of not having their own stack
  frame). This lets you build smart constructors for stack-allocated
  values.

  Local types are apparently an example of modal types, though I don't
  really know enough type theory to have a deep sense of what that
  means. But it's a powerful thing, and local types appear to be useful
  for more than just stack allocation, as we're just starting to
  discover.


[on Github] <https://github.com/ocaml-flambda/ocaml-jst>


Yaron Minsky then added
───────────────────────

  And, I suppose as I should always mention: we're looking for people to
  come and work with Dolan and Leo and the rest of the team on this kind
  of stuff.

  More here:

  <https://blog.janestreet.com/applied-PL-research/>


OCaml 4.14.0, first alpha release
═════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ocaml-4-14-0-first-alpha-release/9191/1>


octachron announced
───────────────────

  The set of new features for the future version 4.14.0 of OCaml has
  been (finally) stabilized, three months after the release of OCaml
  4.13.1. I am thus happy to announce the first alpha release for OCaml
  4.14.0 .

  This alpha version is here to help fellow hackers join us early in our
  bug hunting and opam ecosystem fixing fun (see below for the
  installation instructions). You can see the progress on this front at
  <https://github.com/ocaml/opam-repository/issues/20501> .

  If you find any bugs, please report them here:

  <https://github.com/ocaml/ocaml/issues>

  Most major OCaml developer tools are already supported with this alpha
  (from odoc to merlin), thus I expect us to switch to beta releases in
  the beginning of February. The full release is expected to happen in
  late February.

  This early release will give us time to focus on the release of OCaml
  5.0.

  If you are interested by the list of new features and the ongoing list
  of bug fixes, the updated change log for OCaml 4.14.0 is available at:

  <https://github.com/ocaml/ocaml/blob/4.14/Changes>

  Happy hacking, Florian Angeletti for the OCaml team.


Installation instructions
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  The base compiler can be installed as an opam switch with the
  following commands
  ┌────
  │ opam update
  │ opam switch create 4.14.0~alpha1 --repositories=default,beta=git+https://github.com/ocaml/ocaml-beta-repository.git
  └────
  With opam 2.1, the previous command line can be simplified to
  ┌────
  │ opam update
  │ opam switch create 4.14.0~alpha1
  └────
  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~alpha1+options,<option_list>
  │ --repositories=default,beta=git+https://github.com/ocaml/ocaml-beta-repository.git
  └────
  or with opam 2.1:
  ┌────
  │ opam update
  │ opam switch create <switch_name> ocaml-variants.4.14.0~alpha1+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~alpha1+flambda+nffa ocaml-variants.4.14.0~alpha1+options ocaml-option-flambda
  │ ocaml-option-no-flat-float-array
  └────
  All available options can be listed with `opam search ocaml-option'.

  If you want to test this version, it is advised to install the alpha
  opam repository

  <https://github.com/kit-ty-kate/opam-alpha-repository>

  with
  ┌────
  │ opam repo add alpha git://github.com/kit-ty-kate/opam-alpha-repository.git
  └────
  This alpha repository contains various fixes in the process of being
  upstreamed.

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

  • <https://github.com/ocaml/ocaml/archive/4.14.0-alpha1.tar.gz>
  • <https://caml.inria.fr/pub/distrib/ocaml-4.14/ocaml-4.14.0~alpha1.tar.gz>


A brief survey for Learn-OCaml Community
════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/a-brief-survey-for-learn-ocaml-community/9193/1>


Erik Martin-Dorel announced
───────────────────────────

  [This post is just a follow-up of an earlier message on [caml-list],
  intended to reach more learn-ocaml instructors, so you can ignore this
  one if you already replied!]

  The OCaml Software Foundation is developing the teaching platform
  Learn-OCaml that provides auto-graded exercises for OCaml, and was
  initially authored by OCamlPro for the OCaml MOOC:
  <https://ocaml-sf.org/learn-ocaml>.

  The platform is free software and easy to deploy; this is great, but
  as a result we keep learning of users/deployments that we had no idea
  of. We would be interested in having a better view of our user-base.

  If you use Learn-OCaml as a teacher, could you fill *[this Evento
  survey]* to let us know?  (the survey will be closed on 2022-02-07)

  → It contains these questions:
  • Where are you using Learn-OCaml? (in which university (a specific
    course?), which company, online community or…?)
  • Would you like to see your university/company added in
    [github.com/ocaml-sf/learn-ocaml-places]?
  • How many students/learners use your deployment in a year?

  And just to recall, a few links:

  • For an example of Learn-OCaml instance, see
    <https://discuss.ocaml.org/t/interesting-ocaml-exercises-from-francois-pottier-available-online/7050>
  • Last October we had a 0.13.0 release with several new features:
    <https://discuss.ocaml.org/t/ann-release-of-ocaml-sf-learn-ocaml-0-13-0/8577>
  • For any question related to Learn-OCaml, feel free to create a
    discussion topic on <https://discuss.ocaml.org>, category
    *`Community'*, tag *`learn-ocaml'* (/similarly to this discussion
    topic!/ :slight_smile:)
  • And if need be, opening an issue in
    <https://github.com/ocaml-sf/learn-ocaml/issues> if of course warmly
    welcome as well.


[caml-list]
<https://sympa.inria.fr/sympa/arc/caml-list/2021-12/msg00007.html>

[this Evento survey]
<https://evento.renater.fr/survey/learn-ocaml-community-survey-vsn3yc7j>

[github.com/ocaml-sf/learn-ocaml-places]
<https://github.com/ocaml-sf/learn-ocaml-places#readme>


Blog post: Js_of_ocaml, a bundle size study
═══════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/blog-post-js-of-ocaml-a-bundle-size-study/9211/1>


Javier Chávarri announced
─────────────────────────

  Hi all, I hope your Monday is going great. :slight_smile:

  I wanted to analyze bundle size performance in Js_of_ocaml, so I
  rewrote an existing ReScript web app to compare both outputs.

  Here is the blog post with all the data, conclusions, and takeaways:

  <https://www.javierchavarri.com/js_of_ocaml-bundle-size-study/>

  It has been a very interesting experiment, that helped me learn more
  about Js_of_ocaml and the way it generates JavaScript code, and also
  improve some small things along the way in the libraries I was using
  for the project.

  The conclusions, while maybe already known by others, are also quite
  exciting to me, as the experiment confirms my suspicion that
  Js_of_ocaml bundle size scales just fine as applications get more
  complex, so it is suitable for a quite significant number of real
  world scenarios.

  I hope you find it interesting and exciting as well. Please share any
  feedback you might have! Or any questions if anything is unclear.


Interesting OCaml Articles
══════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/interesting-ocaml-articles/1867/94>


Yotam Barnoy said
─────────────────

  <https://blog.darklang.com/first-thoughts-on-rust-vs-ocaml/#tooling-musing>


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2022-01-11  8:20 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2022-01-11  8:20 UTC (permalink / raw)
  To: lwn, cwn, caml-list

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

Hello

Here is the latest OCaml Weekly News, for the week of January 04 to 11,
2022.

Table of Contents
─────────────────

New release of PPrint (20220103)
Bogue, the OCaml GUI
Cohttp 5.0.0 and 2.5.6
Multicore OCaml: December 2021 and the Big PR
Set up OCaml 2.0.0-beta12
Old CWN


New release of PPrint (20220103)
════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-new-release-of-pprint-20220103/9097/1>


François Pottier announced
──────────────────────────

  I am pleased to announce a new release of PPrint, the pretty-printing
  library, with [improved documentation].

  The documentation can also be viewed offline:

  ┌────
  │ opam update
  │ opam install pprint.20220103
  │ opam install odig
  │ odig odoc                 # this may take some time
  │ odig doc pprint           # this opens the doc in your browser
  └────

  Happy pretty-printing!


[improved documentation]
<http://cambium.inria.fr/~fpottier/pprint/doc/pprint/>


Bogue, the OCaml GUI
════════════════════

  Archive: <https://discuss.ocaml.org/t/ann-bogue-the-ocaml-gui/9099/1>


sanette announced
─────────────────

  I'm happy to announce a brand new version of [Bogue], a GUI (Graphical
  User Interface) library entirely written in `ocaml', using SDL2 for
  hardware accelerated graphics.

  The doc can be found [here], it will be enriched over time.

  Install with `opam install bogue'

  In addition to the library, this installs an executable `boguex' to
  showcase about 50 useful constructions, see `boguex -h' for the list.

  Some screenshots of a demo compiled with the latest version:

  <https://aws1.discourse-cdn.com/standard11/uploads/ocaml/original/2X/6/619a6b3c5d7a9860e4c24df7d8b931815e9b95a1.png>

  <https://aws1.discourse-cdn.com/standard11/uploads/ocaml/original/2X/3/3e5e04d1db0022d4070b7fd3dab45f4399828e90.png>

  Note that many widgets are not shown in this demo: tables, menus,
  drop-down select lists, knob buttons,… I will add more images to the
  doc when I have some time!


[Bogue] <https://github.com/sanette/bogue>

[here] <http://sanette.github.io/bogue/Principles.html>


Cohttp 5.0.0 and 2.5.6
══════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-cohttp-5-0-0-and-2-5-6/9109/1>


Marcello Seri announced
───────────────────────

  We are glad to announce the release of version [5.0.0] and [2.5.6] of
  cohttp and its dependent packages.

  The latter is a bug fix release that in particular backports the
  compatibility with the upcoming release 0.15 of core and async.

  The first introduces the breaking changes [announced in the previous
  release]. I append the changelog below, which explains in details the
  changes and emphasizes the breaking changes:


[5.0.0]
<https://github.com/ocaml/opam-repository/pull/20246#issue-1080986510>

[2.5.6]
<https://github.com/ocaml/opam-repository/pull/20245#issue-1080822215>

[announced in the previous release]
<https://discuss.ocaml.org/t/ann-release-of-cohttp-4-0-0/7537>

Cohttp.Header: new implementation (lyrm #747)
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  • New implementation of Header modules using an associative list
    instead of a map, with one major semantic change (function `get',
    see below), and some new functions (`clean_dup', `get_multi_concat')
  • More Alcotest tests as well as fuzzing tests for this particular
    module.


Purpose
┄┄┄┄┄┄┄

  The new header implementation uses an associative list instead of a
  map to represent headers and is focused on predictability and
  intuitivity: except for some specific and documented functions, the
  headers are always kept in transmission order, which makes debugging
  easier and is also important for [RFC7230§3.2.2] that states that
  multiple values of a header must be kept in order.

  Also, to get an intuitive function behaviour, no extra work to enforce
  RFCs is done by the basic functions. For example, RFC7230§3.2.2
  requires that a sender does not send multiple values for a non
  list-value header. This particular rule could require the `Header.add'
  function to remove previous values of non-list-value headers, which
  means some changes of the headers would be out of control of the
  user. With the current implementation, an user has to actively call
  dedicated functions to enforce such RFCs (here `Header.clean_dup').


[RFC7230§3.2.2] <https://tools.ietf.org/html/rfc7230#section-3.2.2>


Semantic changes
┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄

  Two functions have a semantic change : `get' and `update'.


get
┈┈┈

    `get' was previously doing more than just returns the value
  associated to a key; it was also checking if the searched header could
  have multiple values: if not, the last value associated to the header
  was returned; otherwise, all the associated values were concatenated
  and returned. This semantics does not match the global idea behind the
  new header implementation, and would also be very inefficient.

  ⁃ The new `get' function only returns the last value associated to the
    searched header.
  ⁃ `get_multi_concat' function has been added to get a result similar
    to the previous `get' function.


update
┈┈┈┈┈┈

  `update' is a pretty new function (#703) and changes are minor and
  related to `get' semantic changes.

  ⁃ `update h k f' is now modifying only the last occurrences of the
    header `k' instead of all its occurrences.
  ⁃ a new function `update_all' function has been added and work on all
    the occurrences of the updated header.


New functions :
┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄

  ⁃ `clean_dup' enables the user to clean headers that follows the
    [RFC7230§3.2.2] (no duplicate, except `set-cookie')
  ⁃ `get_multi_concat' has been added to get a result similar to the
    previous `get' function.


[RFC7230§3.2.2] <https://tools.ietf.org/html/rfc7230#section-3.2.2>


Cohttp.Header: performance improvement (mseri, anuragsoni #778)
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

    *Breaking* the headers are no-longer lowercased when parsed, the
  headers key comparison is case insensitive instead.


cohttp-lwt-unix: Adopt ocaml-conduit 5.0.0 (smorimoto #787)
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  *Breaking* `Conduit_lwt_unix.connect''s `ctx' param type chaged from
   `ctx' to `ctx Lazy.t'


other changes
╌╌╌╌╌╌╌╌╌╌╌╌╌

  • cohttp-mirage: fix deprecated fmt usage (tmcgilchrist #783)
  • lwt_jsoo: Use logs for the warnings and document it (mseri #776)
  • lwt: Use logs to warn users about leaked bodies and document it
    (mseri #771)
  • lwt, lwt_unix: Improve use of logs and the documentation, fix bug in
    the Debug.enable_debug function (mseri #772)
  • lwt_jsoo: Fix exception on connection errors in chrome (mefyl #761)
  • lwt_jsoo: Fix `Lwt.wakeup_exn' `Invalid_arg' exception when a js
    stack overflow happens in the XHR completion handler (mefyl #762).
  • lwt_jsoo: Add test suite (mefyl #764).

  We wish to thank to all the users and the contributors for their help
  leading to this release.


Multicore OCaml: December 2021 and the Big PR
═════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/multicore-ocaml-december-2021-and-the-big-pr/9115/1>


Anil Madhavapeddy announced
───────────────────────────

  Welcome to the December 2021 [Multicore OCaml] monthly report!  The
  [previous updates] along with this update have been compiled by
  myself, @ctk21, @kayceesrk and @shakthimaan.

  Well, it's finally here! @kayceesrk opened the [Multicore OCaml
  PR#10831] to the main OCaml development repository that represents the
  "minimum viable" implementation of multicore OCaml that we decided on
  in [November's core team review].  The branch pushes the limits of
  GitHub's rendering capability, with around 4000 commits.

  Once the PR was opened just before Christmas, the remaining effort has
  been for a number of developers to pore over [the diff] and look for
  any unexpected changes that crept in during multicore development. A
  large number of code changes, improvements and fixes have been merged
  into the ocaml-multicore trees since the PR was opened to facilitate
  this upstreaming process. We're expecting to have the PR merged during
  January, and then will continue onto the "post-MVP" tasks described
  last month, but working directly from ocaml/ocaml from now on.  We
  therefore remain on track to release OCaml 5.00 in 2022.

  In the multicore ecosystem, progress also continued:
  • `Eio' continues to improve as the recommended effects-based
    direct-style IO library to use with Multicore OCaml.
  • A newer `domainslib.0.4.0' has been released that includes bug fixes
    and API changes.
  • The continuous benchmarking pipeline with further integration
    enhancements between Sandmark and current-bench is making progress.

  We would like to acknowledge the following external contributors as
  well::

  • Danny Willems (@dannywillems) for an OCaml implementation of the
    Pippenger benchmark and reporting an undefined behaviour.
  • Matt Pallissard (@mattpallissard) reported an installation issue
    with `Eio' with vendored uring.
  • Edwin Torok (@edwintorok) for contributing a PR to `domainslib' to
    allow use of a per-channel key.

  As always, the Multicore OCaml updates are listed first, which contain
  the upstream efforts, improvements, fixes, test suite, and
  documentation changes. This is followed by the ecosystem updates to
  `Eio', `Tezos', and `Domainslib'.  The Sandmark, sandmark-nightly and
  current-bench tasks are finally listed for your reference.

  /editor’s note: please follow the archive link above for the full
  changelog./


[Multicore OCaml] <https://github.com/ocaml-multicore/ocaml-multicore>

[previous updates] <https://discuss.ocaml.org/tag/multicore-monthly>

[Multicore OCaml PR#10831] <https://github.com/ocaml/ocaml/pull/10831>

[November's core team review]
<https://discuss.ocaml.org/t/multicore-ocaml-november-2021-with-results-of-code-review/8934#core-team-code-review-1>

[the diff] <http://github.com/ocaml/ocaml/pull/10831.diff>


Stéphane Lavergne asked and Robin Björklin replied
──────────────────────────────────────────────────

        To clarify for relative newbies like myself: this would be
        a new way to do concurrent I/O, like Async and Lwt, but
        unlike those, it wouldn't require the use of a promise
        monad? In other words, does this mean that we'll have the
        choice between Async, Lwt and Eio in the near future for
        our concurrent I/O needs?

  That's correct as far as I can tell. This presentation provides an
  introduction to the current state of eio:
  <https://watch.ocaml.org/videos/watch/74ece0a8-380f-4e2a-bef5-c6bb9092be89>


Set up OCaml 2.0.0-beta12
═════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-set-up-ocaml-2-0-0-beta12/9123/1>


Sora Morimoto announced
───────────────────────

Fixed
╌╌╌╌╌

  • Fallback to the version in which the assets exist if no assets exist
    in the latest opam release.
  • Instruct Cygwin setup to use "sys" symlinks during setup (partial
    workaround for bug with native symlinks in Cygwin setup - some
    depexts may still be affected)

  <https://github.com/ocaml/setup-ocaml/releases/tag/v2.0.0-beta12>


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2022-01-04  7:56 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2022-01-04  7:56 UTC (permalink / raw)
  To: lwn, cwn, caml-list

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

Hello

Here is the latest OCaml Weekly News, for the week of December 28, 2021
to January 04, 2022.

Table of Contents
─────────────────

A hack for toplevel breakpoints using effect handlers
Multi-shot continuations gone forever?
New release of Menhir (20211230)
Improved documentation for Fix
pp-binary-ints 0.1.1
Old CWN


A hack for toplevel breakpoints using effect handlers
═════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/a-hack-for-toplevel-breakpoints-using-effect-handlers/9065/1>


wiktor announced
────────────────

  I started playing with effect handlers and wondered if they could be
  used to implement toplevel breakpoints. It's a big hack and probably
  unsound at the moment, but it works and here's an example interaction:

  ┌────
  │ let arr =
  │   let fact n =
  │     let arr = Array.make (n+1) 1 in
  │     let rec loop i =
  │       if i <= n then begin
  │ 	Break.break ["i", i; "arr", arr];
  │ 	arr.(i) <- arr.(i-1) * i;
  │ 	loop (i+1)
  │       end
  │     in
  │     (loop 1; arr)
  │   in
  │     fact 5;;
  │ # (* We hit a breakpoint and obtain the continuation k *)
  │   k ();;
  │ - : bool = true
  │ # (* the bools are leaking from the execute_phrase function
  │    * inside the toplevel *)
  │   k ();;
  │ - : bool = true
  │ # i;;
  │ - : int = 3
  │ # arr;;
  │ - : int array = [|1; 1; 2; 1; 1; 1|]
  │ # (* let's disturb the computation of factorials *)
  │   arr.(i-1) <- 42;;
  │ - : unit = ()
  │ # k ();;
  │ - : bool = true
  │ # (* btw: here the user is like a scheduler for yield-based async *)
  │   k ();;
  │ - : bool = true
  │ # k ();;
  │ val arr : int array = [|1; 1; 42; 126; 504; 2520|]
  │ - : bool = true
  └────

  Currently I don't try to clean up bindings or values, which is a
  source of unsoundness. After the last `k ()' we got two results: First
  the computation of `let arr ...' finished, and then the computation of
  `k ()' finished. But `k' is a part of the execution of `let arr ...',
  so these two executions "intersect" without one being contained in the
  other. This makes the question of what should the current variable
  bindings be complicated. Setting the bindings at end of execution is
  futile, when a continuation may in such a way leak bindings from
  breakpoint time.

  Possibly a stack discipline for the execution of phrases is required
  to make the environments behave properly: at the end of executing a
  phrase we cancel (with another effect, maybe) other executions which
  "depend" on the current execution (evaluate the `k' obtained from a
  breakpoint in the current execution). This should eliminate these
  "intersections" and we could throw out the bindings added by the
  cancelled executions.

  I haven't tried anything with polymorphism yet, but type variables
  should probably be changed into abstract types inside the binders.

  Here's the code:
  <https://github.com/ocaml-multicore/ocaml/compare/multicore-pr...wiktorkuchta:toplevel-break>


wiktor later said
─────────────────

  Well, this might have been unnecessary, as most of it can be done
  properly in userspace (with more syntactic overhead).

  ┌────
  │ open EffectHandlers
  │ open Deep
  │ 
  │ type ('a, 'b) res =
  │   | Bp of 'a * ((unit, ('a, 'b) res) continuation)
  │   | Fin of 'b
  │ 
  │ module type P1 = sig  val i : int  val arr : int array end
  │ type payload = P1 of (module P1)
  │ type _ eff += Break : payload -> unit eff
  │ 
  │ let arr () =
  │   let fact n =
  │     let arr = Array.make (n+1) 1 in
  │     let rec loop i =
  │       if i <= n then begin
  │ 	perform (Break (P1 (module struct let i = i let arr = arr end)));
  │ 	arr.(i) <- arr.(i-1) * i;
  │ 	loop (i+1)
  │       end
  │     in
  │     (loop 1; arr)
  │   in
  │     fact 5;;
  │ 
  │ let with_break th =
  │   try_with (fun () -> Fin (th ())) ()
  │   { effc = fun (type a) (e : a eff) ->
  │       match e with
  │       | Break p -> Some (fun (k : (a,_) continuation) -> Bp (p, k))
  │       | _ -> None }
  │ 
  │ let cont = function
  │   | Bp (_, k) -> continue k ()
  │   | Fin _ -> failwith "computation finished, cannot continue"
  │ 
  │ let get = function
  │   | Bp (r, _) -> r
  │   | Fin _ -> failwith "computation finished, no breakpoint payload"
  │ 
  │ let get1 r = match get r with P1 m -> m
  └────

  ┌────
  │ # let r = with_break arr;;
  │ val r : (payload, int array) res = Bp (P1 <module>, <abstr>)
  │ # open (val get1 r);;
  │ val i : int = 1
  │ val arr : int array = [|1; 1; 1; 1; 1; 1|]
  └────

  The main pain point is having to define the payload types. In basic
  cases the payload type could be just a simple polymorphic variant. It
  would be nice if it could be completely inferred, but it's unlikely as
  `Break` has to have a statically known argument.

  With a bit of help from tooling (ppxes for code generation and
  shorthands in the toplevel), this could be better than printf
  debugging.


Guillaume Munch-Maccagnoni then said
────────────────────────────────────

  This is an interesting experiment.
  • This reminds me of the idea of high-level stack inspection for
    debugging and security (articulated for instance in Clements' PhD
    thesis _[Portable and high-level access to the stack with
    Continuation Marks]_; here's [another more recent paper] from the
    Racket people that might be relevant). One can ask whether a PPX can
    provide high-level stack inspection or if one needs support from the
    compiler for that. It's nice to experiment.
  • A few years ago someone asked whether there could be a use to
    untyped algebraic effects in OCaml (in the sense that they do not
    appear in the effect annotation in function types). I proposed
    debugging as an example. Someone suggested that it is not too hard
    to adapt the interface types of all functions in the call chain to
    add the appropriate effect annotation (and remove it afterwards),
    but I was not convinced.


[Portable and high-level access to the stack with Continuation Marks]
<https://www2.ccs.neu.edu/racket/pubs/dissertation-clements.pdf>

[another more recent paper]
<https://dl.acm.org/doi/10.1145/3385412.3385981>


Multi-shot continuations gone forever?
══════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/multi-shot-continuations-gone-forever/9072/1>


cyberpink asked
───────────────

  What happens with multi-shot continuations now that
  Obj.clone_continuation was removed?
  ([https://github.com/ocaml-multicore/ocaml-multicore/pull/651])

  Anything that requires a "fork" operation, like say, a probabilistic
  programming EDSL, needs this. None of the old examples I've looked at
  like [Delimcc on top of effects] have been updated to use a new
  method, and I haven't been able to find any hints of one.

  Are multi-shot continuations just not possible now? Are there plans to
  add something equivalent back in later?


[https://github.com/ocaml-multicore/ocaml-multicore/pull/651]
<https://github.com/ocaml-multicore/ocaml-multicore/pull/651>

[Delimcc on top of effects]
<https://github.com/ocaml-multicore/effects-examples/blob/master/delimcc.ml>


Nicolás Ojeda Bär replied
─────────────────────────

  Yes, multi-shot continuations are gone and is unlikely that they will
  find their way back any time soon. One (good) reason is explained in
  <https://dl.acm.org/doi/10.1145/3434314> :

  <https://aws1.discourse-cdn.com/standard11/uploads/ocaml/original/2X/8/8d26520ef0f790fd3dc4407458d925c1a28fdbca.png>

  and

  <https://aws1.discourse-cdn.com/standard11/uploads/ocaml/original/2X/b/b28fa14f967364743277c0132a804c430d2d66d1.png>


Guillaume Munch-Maccagnoni then said
────────────────────────────────────

  I think the question still stands. You cut the sentence “_Extending
  our system with multi-shot continuations is future work (§8)_”. Also
  the paper is about a particular model based on separation logic rather
  than OCaml itself (for instance the authors also mention that their
  continuations are affine instead of linear unlike in OCaml multicore).

  Nevertheless, the multicore designers were aware that duplicating
  continuations makes it complicated to reason about resources. The
  topic of mixing continuations and linearity has been better studied
  from the angle of algebraic models of computation and proof
  theory. Essentially, with an effect system you could ensure that
  certain kinds of effects do not happen in the delimited part of the
  program (including allocating a resource), which controls copiability
  of the stack from the point of view of reasoning about the
  program. This is inspired by some logics that mix classical and
  intuitionistic or linear logic. From this angle the ability to copy a
  continuation would be restricted to a sub-part of the language which
  is pure to some degree. This should also be a suitable starting point
  if one wanted to develop a program logic to formalise the reasoning
  about such programs.

  However according to [#651] there were more technical reasons to drop
  `clone_continuation', such as breaking compiler optimizations. I am
  curious as well to know whether there are plans to reintroduce
  `clone_continuation' at some point, but obviously this would require
  some effort.


[#651] <https://github.com/ocaml-multicore/ocaml-multicore/pull/651>


KC Sivaramakrishnan said
────────────────────────

  @nojb and @gadmm have already answered why we've dropped support for
  `clone_continuation' now. We will need to track the copiability of the
  continuation in the continuation type and compiler optimisations also
  need to be made aware of the possibility of copying. Given the
  pervasive nature of its effects, there are no immediate plans to bring
  the feature back. We will have to come back to this after we have
  typed effects.

        Anything that requires a “fork” operation, like say, a
        probabilistic programming EDSL

  One can get pretty far with PPL with just one-shot continuations. My
  student and I did some experiments building a DSL for a PPL to learn
  about the space: <https://github.com/Arnhav-Datar/EffPPL>. Having
  spoken to PPL experts there are indeed some usecases where multi-shot
  continuations are useful, but from what I understand, the one-shotness
  isn't a blocker for PPL.

  I would be interested in collecting usecases where multi-shot
  continuations are absolutely necessary.


gasche then said
────────────────

  Interesting!

  My (probably naive) mental model of HANSEI-style libraries, using
  multishot continuations, is that they are extensions/generalization of
  a non-probabilistic "logic/non-deterministic monad" that searches for
  the set of solutions to a problem. Multishot continuations are
  naturally used in non-deterministic computations at backtracking
  points, to explore different search directions and collect the
  result. It is possible to avoid multishot continuations by replaying
  the whole search from the start each time (reference: [Capturing the
  future by replaying the past]), but this involves duplicated
  computations so it is less efficient (reference: [Asymptotic speedup
  with first-class control]).

  Can you give some intuition of how other approaches to probalistic
  inference work, that do not require multishot continuations? Are they
  also duplicating computations, or are they using a magic trick to
  avoid this issue with a different inference algorithm?

  I tried to find an answer to this question by reading the [internship
  report], but I couldn't locate an answer. (The report mentions HANSEI
  in the related work, but it does not discuss this question.) The
  report explains that the inference algorithm, called HMC (Hamiltonian
  Monte Carlo), uses automatic differenciation; so it uses a sort of
  symbolic manipulation / analysis of the probabilistic program to
  sample. But does this avoid repeated computations?  It may be the case
  instead that the differential is as large or larger than the program
  itself, and that the search algorithm using this differential in
  effect perform a program-sized computation at each search step,
  duplicating computations.


[Capturing the future by replaying the past]
<https://arxiv.org/pdf/1710.10385>

[Asymptotic speedup with first-class control]
<https://arxiv.org/abs/2007.00605>

[internship report]
<https://github.com/Arnhav-Datar/EffPPL/blob/main/EffPPL_Report.pdf>


Sadiq said
──────────

  Not a PPL but I've been hacking on a little effects-based model
  checker for concurrent data structures that implements dynamic partial
  order reduction (<https://github.com/sadiqj/dscheck/> - a
  WIP!). Multi-shot continuations would have been very useful.

  I ended up implementing something that involves maintaining a schedule
  and repeatedly replaying the computation. It looks very similar to
  what [Capturing the future..] proposes.


[Capturing the future..] <https://arxiv.org/pdf/1710.10385>


New release of Menhir (20211230)
════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-new-release-of-menhir-20211230/9077/1>


François Pottier announced
──────────────────────────

  Dear OCaml & Menhir users,

  I am pleased to announce a new release of Menhir, with a major
  improvement.

  The code back-end has been rewritten from the ground up by Émile
  Trotignon and by myself, and now produces efficient and well-typed
  OCaml code. The infamous Obj.magic is not used any more.

  Furthermore, the new code back-end produces code that is more
  aggressively optimized, leading to a significant reduction in memory
  allocation and a typical performance improvement of up to 20% compared
  to the previous code back-end.

  ┌────
  │ opam update
  │ opam install menhir.20211230
  └────

  Happy well-typed parsing in 2022!


2021/12/30
╌╌╌╌╌╌╌╌╌╌

  • The code back-end has been rewritten from the ground up by Émile
    Trotignon and François Pottier, and now produces efficient and
    *well-typed* OCaml code. The infamous `Obj.magic' is not used any
    more.

    The table back-end and the Coq back-end are unaffected by this
    change.

    The main side effects of this change are as follows:

    • The code back-end now needs type information. This means that
      /either/ Menhir's type inference mechanism must be enabled (the
      	 easiest way of enabling it is to use Menhir via `dune'
      	 and to check that the `dune-project' file says `(using
      	 menhir 2.0)' or later)
      /or/ the type of every nonterminal symbol must be explicitly given
           via a `%type' declaration.

    • The code back-end no longer allows the type of any symbol to be an
      open polymorphic variant type, such as `[> `A ]'. As a workaround,
      we suggest using a closed polymorphic variant instead.

    • The code back-end now adheres to the /simplified/ error-handling
      strategy, as opposed to the /legacy/ strategy.

      For grammars that do /not/ use the `error' token, this makes no
      difference.

      For grammars that use the `error' token in the limited way
      permitted by the simplified strategy, this makes no difference
      either. The simplified strategy makes the following requirement:
      the `error' token should always appear at the end of a production,
      whose semantic action should abort the parser by raising an
      exception.

      Grammars that make more complex use of the `error' token, and
      therefore need the `legacy' strategy, cannot be compiled by the
      new code back-end.  As a workaround, it is possible to switch to
      the table back-end (using `--table --strategy legacy') or to the
      ancient code back-end (using `--code-ancient'). *In the long run,
      we recommend abandoning the use of the `error' token*. Support for
      the `error' token may be removed entirely at some point in the
      future.

    The original code back-end, which has been around since the early
    days of Menhir (2005), temporarily remains available (using
    `--code-ancient'). It will be removed at some point in the future.

    The new code back-end offers several levels of optimization, which
    remain undocumented and are subject to change in the future. At
    present, the main levels are roughly as follows:

    • `-O 0 --represent-everything' uses a uniform representation of the
      stack and produces straightforward code.
    • `-O 0' uses a non-uniform representation of the stack; some stack
      cells have fewer fields; some stack cells disappear altogether.
    • `-O 1' reduces memory traffic by moving `PUSH' operations so that
      they meet `POP' operations and cancel out.
    • `-O 2' optimizes the reduction of unit productions (that is,
      productions whose right-hand side has length 1) by performing a
      limited amount of code specialization.

    The default level of optimization is the maximum level, `-O 2'.

  • The new command line switch `--exn-carries-state' causes the
    exception `Error' to carry an integer parameter: `exception Error of
    int'. When the parser detects a syntax error, the number of the
    current state is reported in this way. This allows the caller to
    select a suitable syntax error message, along the lines described in
    [Section 11] of the manual. This command line switch is currently
    supported by the code back-end only.

  • The `$syntaxerror' keyword is no longer supported.

  • Document the trick of wrapping module aliases in `open struct
    ... end', like this: `%{ open struct module alias M =
    MyLongModuleName end %}'.  This allows you to use the short name `M'
    in your grammar, but forces OCaml to infer types that refer to the
    long name `MyLongModuleName'.  (Suggested by Frédéric Bour.)


[Section 11]
<http://cambium.inria.fr/~fpottier/menhir/manual.html#sec68>


Improved documentation for Fix
══════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-improved-documentation-for-fix/9079/1>


François Pottier announced
──────────────────────────

  My last contribution for 2021 is an improved documentation for Fix, a
  library that helps with various algorithmic constructions that involve
  memoization, recursion, and numbering.

  The documentation can be [viewed online].

  It can also be viewed locally (on your own machine) as follows:

  ┌────
  │ opam update
  │ opam install fix.20211231
  │ opam install odig
  │ odig odoc                 # this may take some time
  │ odig doc fix              # this opens the doc in your browser
  └────

  Happy fix'in' in 2022!


[viewed online] <http://cambium.inria.fr/~fpottier/fix/doc/fix/>


pp-binary-ints 0.1.1
════════════════════

  Archive: <https://discuss.ocaml.org/t/ann-pp-binary-ints-0-1-1/9080/1>


Ifaz Kabir announced
────────────────────

  Tired of printing octals and hexadecimals and then mentally converting
  them to bits. Ever wanted to just see the bits in an int? Now you can!

  Just run `opam install pp-binary-ints' and off you go:
  ┌────
  │ # Pp_binary_ints.Int.to_string 0b10101001;;
  │ - : string = "10101001"
  └────

  You can find the documentation for the project and more examples of
  how to use it [here].

  The library is very customizable.

  • You can choose to print with `0b' prefixes and `_' separators.
  • You can choose to print zeros just like the non-zeros, with prefixes
    and separators.
  • If you use zero padding, you can control how many leading zeros show
    up with the `~min_width' argument.
  • It correctly handles the edge cases when adding `_' separators: you
    won’t get leading underscores.
  • It includes pretty printers that work with `Format' and `Fmt' , not
    just `to_string' functions.
  • Supports `int', `int32', `int64', and `nativeint'.
  • Don't like the default prefixes and suffixes? Customize the prefixes
    and suffixes with the provided functor.


[here]
<https://ifazk.github.io/pp-binary-ints/pp-binary-ints/index.html>


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2021-12-28  8:59 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2021-12-28  8:59 UTC (permalink / raw)
  To: lwn, cwn, caml-list

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

Hello

Here is the latest OCaml Weekly News, for the week of December 21 to 28,
2021.

Happy Winter Solstice!

Table of Contents
─────────────────

New release of Feat
Debugger support for OCaml
Old CWN


New release of Feat
═══════════════════

  Archive:
  <https://sympa.inria.fr/sympa/arc/caml-list/2021-12/msg00010.html>


François Pottier announced
──────────────────────────

  I am happy to announce a new release of Feat, a library that offers
  support for counting, enumerating, and sampling objects of a certain
  kind, such as (say) the inhabitants of an algebraic data type.

  This new release integrates a contribution by Jonah Beckford. The
  library is now split in three packages: `feat-core' is parameterized
  over an implementation of big integers; `feat' instantiates
  `feat-core' with big integers provided by `zarith'; `feat-num'
  instantiates it with big integers provided by `num'.

  ┌────
  │ opam update
  │ opam install feat
  │ # or: opam install feat-num
  └────

  More details can be found here:

  <https://gitlab.inria.fr/fpottier/feat/>


Debugger support for OCaml
══════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/debugger-support-for-ocaml/9057/1>


Christian Lindig asked
──────────────────────

  What is the current state of debugger support for OCaml? I am aware of
  ocamldebug but every time I'm trying to use it I feel thrown back to
  2000 where it essentially existed in the same form (and still has no
  command line editing built in). Despite the powerful concept of time
  traveling, it does not seem very useful today. For example, it can't
  be attached to a running program and it does not work with native
  code. What is the state of GDB support? What debugger would one use on
  macOS?


linoscope replied
─────────────────

  Have you taken a look at ocamlearlybird ([github], [announcement])? I
  have never used it myself, but based on [the demo] it seems pretty
  nice.


[github] <https://github.com/hackwaly/ocamlearlybird>

[announcement]
<https://discuss.ocaml.org/t/ann-ocamlearlybird-1-0-0-beta1/7180>

[the demo] <https://imgur.com/U3GDHXM>


Sid Kshatriya also replied
──────────────────────────

  I agree that debugging in OCaml seems to be stuck in time.

  This is extremely unfortunate because it is able to do time traveling
  (as you mention) which is something that many other languages still
  cannot boast.

  • `ocamldebug' does not work properly when there is more than 1 OS
    thread
  • As types are erased during compile time in OCaml, it can be
    difficult to debug polymorphic functions. Rust and C/C++
    monomorphise all code so there is never any confusion about the type
    of anything in the debugger. Golang and Java have type information
    available during runtime so again, debugging is easy. In this
    respect OCaml is similar to Haskell while using the byte-code
    debugger.
  • The future of ocamldebug is unknown on multicore

  As far as GDB support is concerned, there was a project to improve GDB
  support (so you could print out variables like in ocamldebug IIUC) but
  it never got merged into trunk.

  However, if you are interested in low level debugging in gdb, here is
  a [recent] answer related to this.

  My guess is that `ocamldebug' will continue to work for the single
  domain, single thread case in OCaml 5.00 but ocamldebug is currently
  broken in multicore there (AFAIK).


[recent]
<https://discuss.ocaml.org/t/multicore-ocaml-september-2021-effect-handlers-will-be-in-ocaml-5-0/8554/9>


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2021-12-21  9:11 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2021-12-21  9:11 UTC (permalink / raw)
  To: lwn, cwn, caml-list

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

Hello

Here is the latest OCaml Weekly News, for the week of December 14 to 21,
2021.

Table of Contents
─────────────────

Are you teaching using the Learn-OCaml platform?
A SOCKS implementation for OCaml
Old CWN


Are you teaching using the Learn-OCaml platform?
════════════════════════════════════════════════

  Archive:
  <https://sympa.inria.fr/sympa/arc/caml-list/2021-12/msg00007.html>


Erik Martin-Dorel announced
───────────────────────────

  The OCaml Software Foundation is developing the teaching platform
  Learn-OCaml that provides auto-graded exercises for OCaml, and was
  initially authored by OCamlPro for the OCaml MOOC:
  <https://ocaml-sf.org/learn-ocaml/>

  The platform is free software and easy to deploy; this is great, but
  as a result we keep learning of users/deployments that we had no idea
  of. We would be interested in having a better view of our
  user-base. If you use Learn-OCaml as a teacher, could you answer this
  email (To: e.mdorel@gmail.com) and let us know?

  Ideally we would like to know:

  • Where are you using Learn-OCaml?  → in which university (in a
    specific course?), or in which company, online community or … ?
  • How many students/learners use your deployment in a year?

  Also FYI:

  • For an example of Learn-OCaml instance, see
    <https://discuss.ocaml.org/t/interesting-ocaml-exercises-from-francois-pottier-available-online/7050>
  • Last October we had a 0.13.0 release, full of new features:
    <https://discuss.ocaml.org/t/ann-release-of-ocaml-sf-learn-ocaml-0-13-0/8577>
  • For any question related to Learn-OCaml, feel free to create a
    discussion topic on <https://discuss.ocaml.org/> , category
    Community, tag /learn-ocaml/.
  • And if need be, opening an issue in
    <https://github.com/ocaml-sf/learn-ocaml/issues> if of course warmly
    welcome as well.


A SOCKS implementation for OCaml
════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/a-socks-implementation-for-ocaml/9041/1>


Renato Alencar announced
────────────────────────

  I have been working on a SOCKS implementation for OCaml and specially
  for MirageOS. It's not really complete or stable yet (not even
  published), it only has a couple of proof of concepts on the examples
  directory and it doesn't integrate with the well known libraries of
  the ecosystem.

  I would like to ask for feedback, and some thoughts about how could we
  have that in Conduit and Cohttp for example, so It'd be just plugged
  in into those libraries without having to directly depending on it. I
  plan to implement that for those libraries and have it submitted
  upstream, but not without some clear thoughts about how to make a
  clear interface for that.

  Besides being sloppy, I have a few issues described on GitHub, and it
  should be addressed on the next few days. Anyone is welcome to discuss
  those issues as some of them are still foggy for me, and having some
  other views on that would be great.

  <https://github.com/renatoalencar/ocaml-socks-client>


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2021-12-14 11:02 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2021-12-14 11:02 UTC (permalink / raw)
  To: lwn, cwn, caml-list

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

Hello

Here is the latest OCaml Weekly News, for the week of December 07 to 14,
2021.

Table of Contents
─────────────────

kqueue-ml 0.2.0 and poll 0.1.0
SWIPl-OCaml v0.5 - Never write your own unification algorithms again!
opam 2.1.2
Set up OCaml 2.0.0-beta10
A hassle-free setup to release binaries for different platforms: the opam release process experiment
Set up OCaml 2.0.0-beta11
What's the best way to save an huge amount of data in a file
p5scm 0.1.0
nanoid 1.0.0
Other OCaml News
Old CWN


kqueue-ml 0.2.0 and poll 0.1.0
══════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-kqueue-ml-0-2-0-and-poll-0-1-0/8958/1>


Anurag Soni announced
─────────────────────

  I'd like to announce new releases for [kqueue-ml] (version 0.2.0) and
  an initial release of [poll] (version 0.1.0).

  *Kqueue-ml*: Thin bindings to the kqueue event notification
   system. Changes since the last release:

  • Remove dependency on ctypes
  • Limit support to 64 bit systems
  • Adds constant values to be used as filter flags in the public API

  Installation: [opam install kqueue]

  Caveat: This is again mostly tested on macOS, but I plan to work on
  testing and fixing bugs for getting the library to work well on the
  various BSD systems, so please open issues if you use it on a BSD
  system and notice problems (Thanks!).

  *Poll*: Portable OCaml interface to macOS/Linux/Windows native IO
   event notification mechanisms

  Installation: [opam install poll]

  This is the first release of poll, which builds on top of `kqueue-ml'
  and adds bindings to the system IO event notifications on linux and
  windows to provide a portable polling interface. It uses kqueue on
  macOS, epoll on linux, and uses [wepoll] on windows so it can leverage
  IOCP on windows instead of select. All io events will be level
  triggered, i.e. there will be a notification as long as the file
  descriptor being watched is ready to read/write.

  If you experience any problems, please open an issue on the Github
  Issue tracker :slightly_smiling_face:


[kqueue-ml] <https://github.com/anuragsoni/kqueue-ml/>

[poll] <https://github.com/anuragsoni/poll>

[opam install kqueue] <https://opam.ocaml.org/packages/kqueue/>

[opam install poll] <https://opam.ocaml.org/packages/poll/poll.0.1.0/>

[wepoll] <https://github.com/piscisaureus/wepoll>


SWIPl-OCaml v0.5 - Never write your own unification algorithms again!
═════════════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-swipl-ocaml-v0-5-never-write-your-own-unification-algorithms-again/8968/1>


Kiran Gopinathan announced
──────────────────────────

  Hey all! I am just posting to announce a new package I've been working
  on: OCaml bindings to SWI-Prolog (ver 8.5 or higher)!

  <https://aws1.discourse-cdn.com/standard11/uploads/ocaml/original/2X/b/b5a466fc6bc98f83b6935205ea9b4ff1d16a324d.png>

  It's currently in the process of being submitted to OPAM, but it's my
  first time writing a package with bindings to C (using ctypes), so
  some further changes might be needed? maybe?, but you can find the
  source code repository here: [repo]/[github mirror].

  As a sneak peek of what the API looks like, here's a hello world:
  ┌────
  │ (* initialise SWIProlog *)
  │ let () = Swipl.initialise ()
  │ (* setup the prolog database with some facts *)
  │ let () = Swipl.load_source "hello :- writeln('hello world')."
  │ (* construct a Swipl term in OCaml *)
  │ let hello = Swipl.Syntax.(!"hello")
  │ (* send the term to the Prolog engine *)
  │ let () = Swipl.with_ctx @@ fun ctx -> Swipl.call ctx hello
  └────

  I've taken care to provide some detailed documentation + quick start
  guide using odoc (see
  <https://gopiandcode.github.io/SWIPL-OCaml/swipl/index.html>) - the
  quick start guide shows a step by step walkthrough on using the
  library to write a type inference algorithm for lambda calculus using
  OCaml+Prolog (no need to write your own UF).

  Anyway, hope this might be useful for others - I have spent way too
  long racking my brains on writing dumb custom unification algorithms,
  but now, no more!


[repo] <https://gitlab.com/gopiandcode/swipl-ocaml>

[github mirror] <https://github.com/Gopiandcode/SWIPL-OCaml>


Kiran Gopinathan later added
────────────────────────────

  Here's another example that might be interesting for those who have
  experience with SWI-Prolog.

  You can even get native interaction with CHR:
  <https://en.wikipedia.org/wiki/Constraint_Handling_Rules> is a very
  elegant framework which comes bundled with SWI Prolog that allows
  users to write complex domain specific constraint solving engines in a
  concise declaritive way.

  Here's a CHR system that models the interaction between `salt' and
  `water' (basic I know, but look up CHR to see some more powerful
  examples):
  ┌────
  │ let () = Swipl.load_source "
  │ :- use_module(library(chr)).
  │ 
  │ :- chr_constraint salt/0, water/0, salt_water/0.
  │ 
  │ salt, water <=> salt_water.
  │ 
  │ reducesTo_(Goal, C) :-
  │ 	call(Goal),
  │ 	call(user:'$enumerate_constraints'(C)).
  │ reducesTo(Goal, Constraints) :-
  │ 	findall(Constraint, reducesTo_(Goal, Constraint), Constraints).
  │ "
  └────

  Which we can then embed into OCaml using the following code:
  ┌────
  │ let solve_constraints ls =
  │   (* Create a new term variable context *)
  │   Swipl.with_ctx (fun ctx ->
  │     (* create a term for the result *)
  │     let result = Swipl.fresh ctx in
  │     (* encode the constraint store *)
  │     let goal = encode ls in
  │     (* send the query to the Prolog engine *)
  │     Swipl.call ctx (reducesTo goal result);
  │     (* extract the result *)
  │     decode ctx result
  │   )
  │ (* val solve_constraints: t list -> t list *)
  └────
  (Again, some steps have been omitted for brevity, and you should check
  out the quick start guide for a step by step walkthrough).


opam 2.1.2
══════════

  Archive: <https://discuss.ocaml.org/t/ann-opam-2-1-2/8973/1>


Kate announced
──────────────

  We are pleased to announce the minor release of [opam 2.1.2].

  This opam release consists of [backported] fixes, including:

  • Fallback on `dnf' if `yum' does not exist on RHEL-based systems
    ([#4825])

  • Use `--no-depexts' in CLI 2.0 mode. This further improves the use of
    opam 2.1 as a drop-in replacement for opam 2.0 in CI, for example
    with setup-ocaml in GitHub Actions. ([#4908])

  To upgrade simply run:
  ┌────
  │ bash -c "sh <(curl -fsSL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh) --version 2.1.2"
  └────


[opam 2.1.2] <https://github.com/ocaml/opam/releases/tag/2.1.2>

[backported] <https://github.com/ocaml/opam/issues/4920>

[#4825] <https://github.com/ocaml/opam/pull/4825>

[#4908] <https://github.com/ocaml/opam/pull/4908>


Set up OCaml 2.0.0-beta10
═════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-set-up-ocaml-2-0-0-beta10/8974/1>


Sora Morimoto announced
───────────────────────

Added
╌╌╌╌╌

  • Added "extends" experimentally.


Changed
╌╌╌╌╌╌╌

  • Remove some hacks as `--no-depexts' is now used in CLI 2.0 mode from
    opam 2.1.2.

  <https://github.com/ocaml/setup-ocaml/releases/tag/v2.0.0-beta10>


A hassle-free setup to release binaries for different platforms: the opam release process experiment
════════════════════════════════════════════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/a-hassle-free-setup-to-release-binaries-for-different-platforms-the-opam-release-process-experiment/8975/1>


Kate announced
──────────────

  On top of the [opam 2.1.2 announcement], I’d like share an experiment
  with the opam release script used for this release.

  As you might know, for each releases of opam we provide pre-compiled
  binaries for ease of use.  We’ve had a release script which up to this
  point required a specific setup to get it running correctly. For
  instance we had to setup a local OpenBSD machine (possibliy
  virtualised), a macOS/x86_64 machine and a macOS/arm64. This setup is
  rather tedious to reproduce.

  To improve this situation I’ve experimented over the past week with
  [QEMU] and [Rosetta 2] to make it a "one click script":

  <https://github.com/ocaml/opam/pull/4947>

  This change makes so that the script now only requires a
  macOS/arm64. From there you can:
  • compile locally for macOS/arm64 binaries
  • compile locally for macOS/x86_64 binaries (using Rosetta 2)
  • compile for BSDs (using QEMU)
  • compile for Linux (using Docker)

  With this, the [binaries] for this release have been compiled with
  this more reproducible setup, and now include FreeBSD/x86_64 binaries
  as well :sparkles:

  If someone wants to have a similar setup to distribute binaries here
  is the git repository (using Git LFS to store the large files). Feel
  free to use and experiment with it:

  <https://gitlab.com/kit-ty-kate/qemu-base-images>

  For now it only has OpenBSD/x86_64 and FreeBSD/x86_64 images but it
  could theoretically have more. Although I’m not accepting PRs for now
  (for obvious security reasons), I’m open to suggestions to add more
  platforms. See the [README] for high level details about the setup.


[opam 2.1.2 announcement]
<https://discuss.ocaml.org/t/ann-opam-2-1-2/8973>

[QEMU] <https://en.wikipedia.org/wiki/QEMU>

[Rosetta 2] <https://en.wikipedia.org/wiki/Rosetta_(software)#Rosetta_2>

[binaries] <https://github.com/ocaml/opam/releases/tag/2.1.2>

[README]
<https://gitlab.com/kit-ty-kate/qemu-base-images/-/blob/master/README.md>


Set up OCaml 2.0.0-beta11
═════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-set-up-ocaml-2-0-0-beta11/9002/1>


Sora Morimoto announced
───────────────────────

Fixed
╌╌╌╌╌

  • Add support for more styles for the ocamlformat configuration in
    lint-fmt action.

  <https://github.com/ocaml/setup-ocaml/releases/tag/v2.0.0-beta11>


What's the best way to save an huge amount of data in a file
════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/whats-the-best-way-to-save-an-huge-amount-of-data-in-a-file/9003/5>


Deep in this thread, Simon Cruanes announced
────────────────────────────────────────────

  What a coincidence, I wrote an [Avro library] very recently. The paint
  is still fresh. However, it might be worth giving it a try as it's
  exactly the targeted use case: many rows of relatively simple data,
  encoded as binary; it also supports gzip compression (per "block" of N
  many rows, with N configurable). And there's no need to worry about
  endianess.

  It typically uses code generation from a schema (a json file).

  There's libraries for Avro in java (with all the Spark ecosystem) and
  also python (see "fastavro").


[Avro library] <https://github.com/c-cube/ocaml-avro>


p5scm 0.1.0
═══════════

  Archive: <https://discuss.ocaml.org/t/ann-p5scm-0-1-0/9014/1>


Jason Nielsen announced
───────────────────────

  I’ve released [p5scm] which is now up on `opam'.  It is a scheme-like
  implementation on top of `camlp5''s [pa_schemer.ml] extension.  I know
  that `camlp5' isn't the cool kid on the block these days but it is a
  powerful tool and pretty cool in my estimation ;-).


[p5scm] <https://github.com/drjdn/p5scm>

[pa_schemer.ml]
<https://github.com/camlp5/camlp5/blob/master/etc/pa_schemer.ml>


nanoid 1.0.0
════════════

  Archive: <https://discuss.ocaml.org/t/ann-nanoid-1-0-0/9017/1>


mefyl announced
───────────────

  I'm pleased to announce the release of [nanoid 1.0.0]. NanoID are
  [popular unique ids] amongst the javascript ecosystem. This library
  brings an equivalent native implementation and a virtual library to
  transparently branch between the native implementation and the
  original javascript one. The intent is to enable pieces of code
  generating such ids to be moved transparently between frontend and
  backend of a web stack.

  This is an humble first contribution to gain some experience and will
  hopefully be followed by more of our internal developments.


[nanoid 1.0.0] <https://github.com/routineco/ocaml-nanoid>

[popular unique ids] <https://github.com/ai/nanoid>


Other OCaml News
════════════════

>From the ocamlcore planet blog
──────────────────────────────

  Here are links from many OCaml blogs aggregated at [OCaml Planet].

  • [Monorobot: a Slack bot for monorepos]
  • [opam 2.1.2 release]


[OCaml Planet] <http://ocaml.org/community/planet/>

[Monorobot: a Slack bot for monorepos]
<https://tech.ahrefs.com/monorobot-a-slack-bot-for-monorepos-374260e2ca43?source=rss----303662d88bae--ocaml>

[opam 2.1.2 release] <http://opam.ocaml.org/blog/blog/opam-2-1-2/>


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2021-11-30 10:51 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2021-11-30 10:51 UTC (permalink / raw)
  To: lwn, cwn, caml-list

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

Hello

Here is the latest OCaml Weekly News, for the week of November 23 to 30,
2021.

Table of Contents
─────────────────

opam 2.1.1, opam 2.0.10, and opam-depext 1.2
OTOML 0.9.0 — a compliant and flexible TOML parsing, manipulation, and pretty-printing library
New release of Fix
New release of Menhir (20211125)
Lwt 5.5.0, Lwt_domain 0.1.0, Lwt_react.1.1.5
OCaml's CI is gradually moving to GitHub Actions
How to combine 3 monads: Async/Lwt, Error and State?
Old CWN


opam 2.1.1, opam 2.0.10, and opam-depext 1.2
════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-opam-2-1-1-opam-2-0-10-opam-depext-1-2/8872/1>


R. Boujbel announced
────────────────────

  We are pleased to announce several minor releases: [opam 2.0.10],
  [opam 2.1.1], and [opam-depext 1.2].

  The opam releases consist of backported fixes, while `opam-depext' has
  been adapted to be compatible with opam 2.1, to allow for workflows
  which need to maintain compatibility with opam 2.0. With opam 2.1.1,
  if you export `OPAMCLI=2.0' into your environment then workflows
  expecting opam 2.0 should now behave even more equivalently.

  You'll find more information in the [blog post ].


[opam 2.0.10] <https://github.com/ocaml/opam/releases/tag/2.0.10>

[opam 2.1.1] <https://github.com/ocaml/opam/releases/tag/2.1.1>

[opam-depext 1.2]
<https://github.com/ocaml-opam/opam-depext/releases/tag/1.2>

[blog post ] <https://opam.ocaml.org/blog/opam-2-0-10-2-1-1-depext/>


OTOML 0.9.0 — a compliant and flexible TOML parsing, manipulation, and pretty-printing library
══════════════════════════════════════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-otoml-0-9-0-a-compliant-and-flexible-toml-parsing-manipulation-and-pretty-printing-library/8152/10>


Daniil Baturin announced
────────────────────────

  A new 0.9.3 relase is available. Still not 1.0.0 just in case. The
  change I'm most glad I managed to make is that the lexer is now
  re-entrant and doesn't use any mutable state. Where can I apply for
  the "Designed for multicore OCaml" certification sticker? ;)


Breaking change in the functor interface
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  I found an oversight that took a breaking change to fix. It didn't
  break any package that was already in the OPAM repository, so I'm glad
  I noticed it before it caused anyone trouble.

  My idea to make the functor take separate integer and float modules
  turned out to be misguided: it wouldn't compose with `Otoml.get_float
  ~strict:false' and similar functions that apply type conversions.

  Logically, `Otoml.get_float ~strict:false (Otoml.integer 5)' should
  produce `Otoml.TomlFloat 5.0'. However, it means that `get_float'
  needs to know how to convert integers to float. If integer and float
  types are in separate modules, that isn't possible.

  So I combined both integers and floats in a single `TomlNumber'. That
  way people who want to bring their own bignum libraries will have to
  write more code, but numbers will behave as they are expected to in a
  dynamically typed format.

  ┌────
  │ module BigNumber = struct
  │   type int = Z.t
  │   type float = Decimal.t
  │ 
  │   let int_of_string = Z.of_string
  │   let int_to_string = Z.to_string
  │   let int_of_boolean b = if b then Z.one else Z.zero
  │   let int_to_boolean n = (n <> Z.zero)
  │ 
  │   (* Can't just reuse Decimal.to/of_string because their optional arguments
  │      would cause a signature mismatch. *)
  │   let float_of_string s = Decimal.of_string s
  │ 
  │   (* Decimal.to_string uses "NaN" spelling
  │      while TOML requires all special float values to be lowercase. *)
  │   let float_to_string x = Decimal.to_string x |> String.lowercase_ascii
  │   let float_of_boolean b = if b then Decimal.one else Decimal.zero
  │   let float_to_boolean x = (x <> Decimal.zero)
  │ 
  │   let float_of_int = Decimal.of_bigint
  │   let int_of_float = Decimal.to_bigint
  │ end
  │ 
  │ module Otoml = Otoml.Base.Make (BigNumber) (Otoml.Base.StringDate)
  └────

  The next release will likely be 1.0.0 for real.


New release of Fix
══════════════════

  Archive: <https://discuss.ocaml.org/t/ann-new-release-of-fix/8895/1>


François Pottier announced
──────────────────────────

  I am pleased to announce a new release of Fix, with several new
  modules contribued by Frédéric Bour (thanks!).

  In short, Fix is a toolkit that helps perform memoization and fixed
  point computations (including data flow analyses). More generally, it
  offers a number of basic algorithmic building blocks that can be
  useful in many circumstances.

  ┌────
  │ opam update
  │ opam install fix.20211125
  └────

  Documentation can be found here:

  • <https://gitlab.inria.fr/fpottier/fix/-/blob/master/README.md>
  • <http://cambium.inria.fr/~fpottier/fix/doc/fix/Fix/index.html>

  Enjoy,

  François Pottier
  francois.pottier@inria.fr
  <http://cambium.inria.fr/~fpottier/>


2021/11/25
╌╌╌╌╌╌╌╌╌╌

  • The new module `CompactQueue' offers a minimalist mutable FIFO
    queue. It is comparable with OCaml's `Queue' module. In comparison
    with `Queue', it uses a more compact internal representation:
    elements are stored contiguously in a circular array. This has a
    positive impact on performance: both time and memory consumption are
    reduced. This data structure is optimized for maximum
    throughput. (Contributed by Frédéric Bour, reviewed by François
    Pottier.)

  • The new functor `DataFlow.ForCustomMaps' offers a forward data flow
    analysis that is tuned for greater performance. (Contributed by
    Frédéric Bour, reviewed by François Pottier.)

  • The new module `Indexing' offers a safe API for manipulating indices
    into fixed-size arrays. This API involves some dynamic checks as
    well as static type checks, thereby (hopefully) greatly reducing the
    risk of confusion in code that uses many arrays and many indices
    into these arrays. (Contributed by Frédéric Bour, reviewed by
    François Pottier.)

  • In `DataFlow', allow the function `foreach_root' (which is part of
    the signature `DATA_FLOW_GRAPH') to call `contribute x _' several
    times at a single root `x'.


New release of Menhir (20211125)
════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-new-release-of-menhir-20211125/8896/1>


François Pottier announced
──────────────────────────

  I am pleased to announce a new release of Menhir, with an exciting
  contribution by Frédéric Bour: a groundbreaking performance
  improvement in `menhir --list-errors'. This is made possible by an
  entirely new reachability algorithm, which has been designed and
  implemented by Frédéric, and which is described in our paper "Faster
  Reachability Analysis for LR(1) Parsers". This is the link to the
  paper:

  <http://cambium.inria.fr/~fpottier/publis/bour-pottier-reachability.pdf>

  To install the new release, just type

  ┌────
  │ opam update
  │ opam install menhir.20211125
  └────

  Enjoy!

  François Pottier
  Francois.Pottier@inria.fr
  <http://cambium.inria.fr/~fpottier/>

  • The command `menhir --list-errors' has been sped up by a factor of
    up to x100, and requires up to x1000 less memory, thanks to a new
    LR(1) reachability algorithm, which has been designed and
    implemented by Frédéric Bour.

  • Better document the restricted way in which the `error' token must
    be used when using `--strategy simplified'. Menhir now checks that
    this token is used only at the end of a production, and warns if
    this is not the case. (Better yet, our suggestion is to not use the
    `error' token at all!)

  • The `$syntaxerror' keyword is now forbidden when using `--strategy
    simplified'. This keyword will be entirely removed in the next
    release. Incidentally, we have just found out that it behaves
    differently under the code back-end and under the table back-end.

  • Disable OCaml warning 39 (unused rec flag) in the OCaml code
    produced by Menhir's code back-end. This does not affect the table
    back-end.  (Reported by Armaël Guéneau.)

  • Fix a bug in `--random-*' which could cause Menhir to diverge if the
    grammar uses the `error' token.

  • Warn if a terminal symbol is named `Error'. This creates a name
    clash in the public interface of the generated parser.

  • Menhir now requires OCaml 4.03.0 (instead of 4.02.3) and Dune 2.8.0
    (instead of 2.0.0).


Lwt 5.5.0, Lwt_domain 0.1.0, Lwt_react.1.1.5
════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-lwt-5-5-0-lwt-domain-0-1-0-lwt-react-1-1-5/8897/1>


Raphaël Proust announced
────────────────────────

  It is my pleasure to announce the release of Lwt version 5.5.0,
  Lwt_domain version 0.1.0, Lwt_react version 1.1.5, Lwt_ppx version
  2.0.3 and Lwt_ppx_let version 5.5.0.

  <https://github.com/ocsigen/lwt/releases/tag/5.5.0>

  All those packages can be installed via opam as usual.


:rotating_light:  Deprecation
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  One notable change is the deprecation of `Lwt_main.yield' and
  `Lwt_unix.yield'. It is recommended to use `Lwt.pause' instead.


:rocket:  Lwt_domain: an interface to multicore parallelism
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  Another notable change is the addition of the Lwt_domain package. This
  package includes a single module `Lwt_domain' with functions to
  execute some computations in parallel, using the features of Multicore
  OCaml. The package requires an OCaml compiler with domains support to
  install.

  Code for this package is the work of @sudha with reviews and packaging
  from Lwt contributors.


Other changes
╌╌╌╌╌╌╌╌╌╌╌╌╌

  The full list of changes is available in the [CHANGES file].


[CHANGES file] <https://github.com/ocsigen/lwt/blob/5.5.0/CHANGES>


OCaml's CI is gradually moving to GitHub Actions
════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-ocamls-ci-is-gradually-moving-to-github-actions/8902/1>


Sora Morimoto announced
───────────────────────

  The OCaml team started switching to GitHub Actions last year for some
  of the official OCaml repositories. Also, we have released some CI
  related stuff, such as setup-ocaml, to the community. Some OCaml
  hackers also know that CI in the OCaml community is gradually
  switching to GitHub Actions nowadays.

  However, what gradually became a problem when we started switching was
  that the number of concurrent jobs that could run in a free account on
  GitHub was not enough for our activeness.

  One of the major pain points for compiler contributors is that the
  wait time for CI to complete, which is unrelated to the actual build,
  is too long. However, this has been a pain point in all services, even
  before GitHub Actions.

  The GitHub team did their best to help us make it better. As a result,
  they offered to upgrade the OCaml organization's plan to the team plan
  for free, which means that we can now benefit from a range of
  features, including access to 3x more concurrent runners than before.

  • About team plan:
    <https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration>
  • Concurrency/plan:
    <https://docs.github.com/en/get-started/learning-about-github/githubs-products#github-team>

  We would like to thank GitHub for supporting our team and Ahmed Bilal,
  who supported this effort.


How to combine 3 monads: Async/Lwt, Error and State?
════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/how-to-combine-3-monads-async-lwt-error-and-state/8906/9>


Deep in this thread, Ivan Gotovchits said
─────────────────────────────────────────

  The monads library provides the transformers for some well-known
  monads. All these monads have a more or less standard implementation,
  offering the same performance as any other monadic library can
  offer. Like there is no better way of implementing the state monad
  other than a function. We have experimented a lot with different
  performance optimizations, such as boxing and unboxing it and inlining
  various operators, and keep experimenting to get the maximum from the
  current compiler. In BAP, we heavily use the monads library, first of
  all for our [knowledge representation and reasoning engine], which is
  the foundation for all BAP analyses. We also use it for [emulating
  binary programs].  The rich interface is here to make our life easier
  and more comfortable when we use monads. It definitely comes for free¹
  as the number of functions doesn't affect the performance of the
  underlying monad.

  But… there is always a but :) Stacking monads using a transformer does
  have a price. Even with the flambda compiler. The latter is doing an
  excellent job of unstacking them and eliminating the overhead of
  having a chain of monads. But our latest experiments show that a
  custom-made monad (still with the monads library) performs better
  under either branch of the compiler. We [have rewritten our main
  monads] that were relying on transformers and got from 20% to 50%
  performance improvement. But that is not to say that the monads
  library itself is slow or that we're not using it, it is to say that
  there are other options to transformers that might work in some cases.
  See the linked PR if you want to learn the trick.

  ¹⁾ Provided that we ignore the size of the executable, e.g., linking
  the core_kernel library results in a quite large binary, which may
  increase the startup time. Insignificantly, but in some use cases, it
  might be a significant factor.


[knowledge representation and reasoning engine]
<https://binaryanalysisplatform.github.io/bap/api/master/bap-knowledge/Bap_knowledge/Knowledge/index.html>

[emulating binary programs]
<https://binaryanalysisplatform.github.io/bap/api/master/bap-primus/Bap_primus/Std/index.html>

[have rewritten our main monads]
<https://github.com/BinaryAnalysisPlatform/bap/pull/1361>


Ivan Gotovchits then said
─────────────────────────

  As it was already suggested, you can use [monad transformers], to
  compose several monads into a single monad. As a show-case, we will
  use the [monads] library (disclaimer, I am an author of this library),
  which you can install with

  ┌────
  │ opam install monads
  └────

  It offers most of the well-known monads in a form of a monad
  transformer, which in terms of OCaml, is a functor that takes a monad
  and returns a new monad that enriches it with some new behavior. For
  example, to make a non-deterministic error monad, we can do
  `Monad.List.Make(Monad.Result.Error)' and get a monadic structure
  (i.e., a module that implements the [Monad.S] interface) that is both
  a list monad and an error monad.  The small caveat is that the
  operations of the wrapped monad, the error monad in our case, are not
  available directly, so we have to _lift_ them, e.g.,
  ┌────
  │ let fail p = lift @@ Monad.Result.Error.fail p
  └────
  So that in the end, the full implementation of the transformed monad
  still requires some boilerplate code,

  ┌────
  │ module ListE = struct
  │   type 'a t = 'a list Monad.Result.Error.t
  │   include Monad.List.Make(Monad.Result.Error)
  │   let fail p = lift@@Monad.Result.Error.fail p
  │   (* and so on for each operation that is specific to the wrapped monad *)
  │ end
  └────

  Now, let's try wrapping the Lwt monad into the state. We don't want to
  add the Error monad because Lwt is already the error monad and adding
  an extra layer of errors monad is not what we want. First of all, we
  need to adapt the `Lwt' monad to the `Monad.S' interface, e.g.,
  ┌────
  │ module LwtM = struct
  │   type 'a t = 'a Lwt.t
  │   include Monad.Make(struct
  │       type 'a t = 'a Lwt.t
  │       let return = Lwt.return
  │       let bind = Lwt.bind
  │       let map x ~f = Lwt.map f x
  │       let map = `Custom map
  │     end)
  │ end
  └────

  If we want to keep the state type monomorphic, then we will need a
  module for it. Suppose your state is represented as,
  ┌────
  │ module State = struct
  │   type t = string Map.M(String).t
  │ end
  └────

  Now, we can use it to build our `State(Lwt)' Russian doll,
  ┌────
  │ module IO = struct
  │   include Monad.State.T1(State)(LwtM)
  │   include Monad.State.Make(State)(LwtM)
  │ 
  │   (* let's lift [read] as an example *)
  │   let read fd buf ofs len =
  │     lift (Lwt_unix.read fd buf ofs len)
  │ end
  └────

  The `Monad.State.T1' functor is used to create the types for the
  generated monad. You can write them manually, of course, like as we
  did in the List(Error) example, but the type generating modules are
  here for the convenience¹

  Now, let's get back to the problem of the lifting. It looks tedious to
  impossible to lift every operation from Lwt.  Commonly, we try to put
  the smaller monad inside, to minimize the work, but it doesn't work
  with Lwt as the latter is not a transformer. So what is the solution?
  For me, the solution is to not lift the operations at all, but
  instead, define your IO abstraction and hide that it is using Lwt
  underneath the hood. This will make the code that uses this new
  abstraction more generic and less error-prone so that it can focus on
  the business logic and the implementation details could be hidden
  inside the monad implementation. This is what the monads are for,
  anyway.

  ¹⁾ We omit the types from the output of the `Make' functor since for a
  long time OCaml didn't allow the repetition of types in a structure so
  having the types in it will prevent us from composing various flavors
  of monads using `include'. It is also a long-time convention widely
  used in many OCaml libraries, including Core and Async. A convention
  that we probably don't need anymore.


[monad transformers] <https://en.wikipedia.org/wiki/Monad_transformer>

[monads]
<https://binaryanalysisplatform.github.io/bap/api/master/monads/Monads/Std/index.html>

[Monad.S]
<https://binaryanalysisplatform.github.io/bap/api/master/monads/Monads/Std/Monad/index.html>


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2021-11-16  8:41 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2021-11-16  8:41 UTC (permalink / raw)
  To: lwn, cwn, caml-list

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

Hello

Here is the latest OCaml Weekly News, for the week of November 09 to 16,
2021.

Table of Contents
─────────────────

Early preview of the Algorithmic with OCaml Book
pyml_bindgen: a CLI app to generate Python bindings directly from OCaml value specifications
ocaml-wayland (pure OCaml wayland protocol library)
Set up OCaml 2.0.0-beta6
Set up OCaml 2.0.0-beta7
Set up OCaml 2.0.0-beta8
phylogenetics, a library for molecular evolution
release of svmwrap: a wrapper around libsvm-tools
GeoPub - A XMPP web client
Old CWN


Early preview of the Algorithmic with OCaml Book
════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/early-preview-of-the-algorithmic-with-ocaml-book/8785/1>


Damien Guichard announced
─────────────────────────

  Please report bugs, bad English & nonsenses.  But do not report
  omissions (it is work-in-progress plus it's not an ocaml bible).

  <https://www.cjoint.com/c/KKjulI1Dx03>

  Why the book is not bottom up, instead some concepts are used without
  explained ?

  • Because some notions (what is the `unit' type ? what is a queue ?)
    are considered easy-enough to go without saying.

  What will be in the missing chapter 6 ?

  • Type polymorphism, universal quantification, `Stdlib.compare', weak
    polymorphism, constrained polymorphism, phantom types, type
    variance.

  What will be in the chapters 12 and more ?
  • High performance lexing
  • Recursive-descent parsing
  • The art of searching
  • Detailed construction of the ERic 0.3 application

  Will the source files go to a repository ?

  • No. The source files are already included in the zip archive.


pyml_bindgen: a CLI app to generate Python bindings directly from OCaml value specifications
════════════════════════════════════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-pyml-bindgen-a-cli-app-to-generate-python-bindings-directly-from-ocaml-value-specifications/8786/1>


Ryan Moore announced
────────────────────

  I wanted to announce the first release of [pyml_bindgen], a CLI app
  for generating Python bindings using [pyml] directly from OCaml value
  specifications.

  Manually writing bindings to Python libraries can get tedious pretty
  quickly.  `pyml_bindgen' aims to help you avoid a lot of the
  repetitive work when binding Python libraries by letting you focus on
  the OCaml side of things and (mostly) not worrying about the
  implementation of the pyml bindings.


[pyml_bindgen] <https://github.com/mooreryan/ocaml_python_bindgen>

[pyml] <https://github.com/thierry-martinez/pyml/>

Quick start
╌╌╌╌╌╌╌╌╌╌╌

  First, install `pyml_bindgen'.  It is available on [Opam].

  ┌────
  │ $ opam install pyml_bindgen
  └────

  Say you have a Python class you want to bind and use in OCaml.
  (Filename: `adder.py')

  ┌────
  │ class Adder:
  │     @staticmethod
  │     def add(x, y):
  │ 	return x + y
  └────

  To do so, you write OCaml value specifications for the class and
  methods you want to bind.  (Filename: `val_specs.txt')

  ┌────
  │ val add : x:int -> y:int -> unit -> int
  └────

  Then, you run `pyml_bindgen'.

  ┌────
  │ $ pyml_bindgen val_specs.txt adder Adder --caml-module Adder > lib.ml
  └────

  Now you can use your generated functions in your OCaml code.
  (Filename: `run.ml')

  ┌────
  │ open Lib
  │ 
  │ let () = Py.initialize ()
  │ 
  │ let result = Adder.add ~x:1 ~y:2 ()
  │ 
  │ let () = assert (result = 3)
  └────

  Finally, set up a dune file and run it.

  ┌────
  │ (executable
  │  (name run)
  │  (libraries pyml))
  └────

  ┌────
  │ $ dune exec ./run.exe
  └────


[Opam] <https://opam.ocaml.org/packages/pyml_bindgen/>


Documentation
╌╌╌╌╌╌╌╌╌╌╌╌╌

  For more information on installing and using `pyml_bindgen', check out
  the [docs].  There you will find lots of tips and examples to help you
  get started!


[docs] <https://mooreryan.github.io/ocaml_python_bindgen/>


ocaml-wayland (pure OCaml wayland protocol library)
═══════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-ocaml-wayland-pure-ocaml-wayland-protocol-library/7616/2>


Thomas Leonard announced
────────────────────────

  ocaml-wayland has been very stable over the last few months and so
  I've now released [version 1.0]. The main changes are improved error
  handling and diagnostics.

  I've been using this to write an Xwayland adaptor, which acts as an
  X11 window manager to Xwayland, converting between the two
  protocols. This allows running X11 apps in VMs and having them appear
  alongside other application windows on the host. It can also be used
  to fix other problems, such as support for HiDPI screens and Sway's
  buggy clipboard support:

  <https://roscidus.com/blog/blog/2021/10/30/xwayland/>


[version 1.0]
<https://github.com/talex5/ocaml-wayland/releases/tag/v1.0>


Set up OCaml 2.0.0-beta6
════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-set-up-ocaml-2-0-0-beta6/8795/1>


Sora Morimoto announced
───────────────────────

Changed
╌╌╌╌╌╌╌

  • Unlock opam 2.1 on the Ubuntu and macOS runners.

  <https://github.com/ocaml/setup-ocaml/releases/tag/v2.0.0-beta6>


Set up OCaml 2.0.0-beta7
════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-set-up-ocaml-2-0-0-beta7/8796/1>


Sora Morimoto announced
───────────────────────

Fixed
╌╌╌╌╌

  • Return an empty array to avoid depext failure when depext flags are
    not passed.

  <https://github.com/ocaml/setup-ocaml/releases/tag/v2.0.0-beta7>


Set up OCaml 2.0.0-beta8
════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-set-up-ocaml-2-0-0-beta8/8821/1>


Sora Morimoto announced
───────────────────────

Changed
╌╌╌╌╌╌╌

  • Use 2.1 mode instead of 2.0 mode on the Ubuntu and macOS runners.

  <https://github.com/ocaml/setup-ocaml/releases/tag/v2.0.0-beta8>


phylogenetics, a library for molecular evolution
════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-phylogenetics-a-library-for-molecular-evolution/8812/1>


Philippe announced
──────────────────

  I'm happy to announce the availability on opam of [phylogenetics], a
  bioinformatics library dedicated to [molecular evolution] and
  phylogeny. It provides a few algorithms and data structures that can
  be useful to study how biological sequences like proteins or genes
  have evolved, or to simulate datasets under various evolutionary
  models.

  Comments/questions welcomed on the repo's issue tracker!


[phylogenetics] <https://github.com/biocaml/phylogenetics>

[molecular evolution]
<https://en.wikipedia.org/wiki/Molecular_evolution>


release of svmwrap: a wrapper around libsvm-tools
═════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-release-of-svmwrap-a-wrapper-around-libsvm-tools/8818/1>


UnixJunkie announced
────────────────────

  I am pleased to announce the availability in opam of the svmwrap
  package.  A wrapper around libsvm's svm-train and svm-predict
  executables.  Currently, only regression modeling is supported, using
  the linear, RBF, sigmoid or polynomial kernel.

  <https://github.com/UnixJunkie/svmwrap>

  The quite scary usage looks like this:
  ┌────
  │ usage: svmwrap
  │   -i <filename>: training set or DB to screen
  │   --feats <int>: number of features
  │   [-o <filename>]: predictions output file
  │   [-np <int>]: ncores
  │   [--kernel <string>] choose kernel type {Lin|RBF|Sig|Pol}
  │   [-c <float>]: fix C
  │   [-e <float>]: epsilon in the loss function of epsilon-SVR;
  │   (0 <= epsilon <= max_i(|y_i|))
  │   [-g <float>]: fix gamma (for RBF and Sig kernels)
  │   [-r <float>]: fix r for the Sig kernel
  │   [--iwn]: turn ON instance-wise-normalization
  │   [--scale]: turn ON [0:1] scaling (NOT PRODUCTION READY)
  │   [--no-plot]: no gnuplot
  │   [{-n|--NxCV} <int>]: folds of cross validation
  │   [-q]: quiet
  │   [-v|--verbose]: equivalent to not specifying -q
  │   [--seed <int>]: fix random seed
  │   [-p <float>]: training set portion (in [0.0:1.0])
  │   [--pairs]: read from .AP files (atom pairs; will offset feat. indexes by 1)
  │   [--train <train.liblin>]: training set (overrides -p)
  │   [--valid <valid.liblin>]: validation set (overrides -p)
  │   [--test <test.liblin>]: test set (overrides -p)
  │   [{-l|--load} <filename>]: prod. mode; use trained models
  │   [{-s|--save} <filename>]: train. mode; save trained models
  │   [-f]: force overwriting existing model file
  │   [--scan-c]: scan for best C
  │   [--scan-e <int>]: epsilon scan #steps for SVR
  │   [--scan-g]: scan for best gamma
  │   [--regr]: regression (SVR); also, implied by -e and --scan-e
  │   [--e-range <float>:<int>:<float>]: specific range for e
  │   (semantic=start:nsteps:stop)
  │   [--c-range <float,float,...>] explicit scan range for C
  │   (example='0.01,0.02,0.03')
  │   [--g-range <float,float,...>] explicit range for gamma
  │   (example='0.01,0.02,0.03')
  │   [--r-range <float,float,...>] explicit range for r
  │   (example='0.01,0.02,0.03')
  └────

  For people who know my linwrap opam package (a wrapper around
  liblinear tools), this is quite similar.
  <https://github.com/UnixJunkie/linwrap>


GeoPub - A XMPP web client
══════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-geopub-a-xmpp-web-client/8819/1>


pukkamustard announced
──────────────────────

  I'd like to announce an initial, proof-of-concept release of GeoPub -
  an XMPP web client. Unlike many XMPP clients the focus is not on
  instant messaging but on creating, displaying and managing things such
  as events, maps, information on local organizations and other local
  knowledge (see [the openEngiadina] project for the context).

  This initial release is not really anything useful but a
  proof-of-concept how such an application can be developed using XMPP
  and OCaml. There are many rough edges and broken hacks that need
  fixing. I'd be very grateful for your feedback, thoughts and ideas.

  The source code of the app is on [codeberg] and a pre-built hosted
  version is available [here].

  The application consists of some parts and ideas that I'd like to
  illustrate separately:


[the openEngiadina] <https://openengiadina.net>

[codeberg] <https://codeberg.org/openEngiadina/geopub>

[here] <https://geopub.openengiadina.net/>

ocaml-xmpp
╌╌╌╌╌╌╌╌╌╌

  [ocaml-xmpp] is a XMPP client library for OCaml (documentation
  available [online].


[ocaml-xmpp] <https://codeberg.org/openEngiadina/ocaml-xmpp>

[online] <https://inqlab.net/projects/ocaml-xmpp/>

Reactive
┄┄┄┄┄┄┄┄

  ocaml-xmpp is reactive in the sense that the XMPP connection is
  abstracted as a React event of Stanzas (small pieces of information
  that flow over XMPP):

  ┌────
  │ val stanzas : t -> Stanza.t React.event
  └────

  This React event can be filtered for messages in a specific
  conversation, for example.


Transports
┄┄┄┄┄┄┄┄┄┄

  XMPP works with different transport mechanisms and ocaml-xmpp supports
  this. Currently ocaml-xmpp can be used from Unix with a TCP/SSL
  connection to a XMPP server and from web browsers with a WebSocket
  connection. This is implemented by abstracting the XMPP transport:

  ┌────
  │ module type TRANSPORT = sig
  │   (** {2 Connection} *)
  │ 
  │   type options
  │   (** Additional options that may be passed to the transport *)
  │ 
  │   type t
  │   (** Type of an instantiated connection to an XMPP server *)
  │ 
  │   val connect : host:string -> options -> t Lwt.t
  │ 
  │   val close : t -> unit Lwt.t
  │ 
  │   val closed : t -> unit Lwt.t
  │ 
  │   (** {2 XML Stream} *)
  │ 
  │   type stream
  │ 
  │   val open_stream : t -> to':string -> stream Lwt.t
  │ 
  │   val stream_id : stream -> string Lwt.t
  │ 
  │   val send_xml : stream -> Xmlc.t -> unit Lwt.t
  │ 
  │   val signals : stream -> Xmlc.signal Lwt_stream.t
  │ 
  │   val stop_stream : stream -> unit Lwt.t
  │ end
  └────

  A transport establishes the underlying connection to a server and can
  create XML streams (in XMPP a connection is by multiple XML streams
  sequentially). For technical reasons XML parsing is also handled by
  the transport and a stream of XML signals (element start, data,
  element end) is returned. This is due to the fact that XML parsing in
  XMPP needs to be done slightly differently when using TCP (a single
  XML document over the entire stream) or WebSockets (every WebSocket
  frame is a parse-able XML document).

  The Unix/TCP/SSL transport uses Markup.ml and whereas the WebSocket
  transport uses Xmlm (and Brrr).


Parser combinators for XML
┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄

  For parsing streams of XML signals to OCaml types ocaml-xmpp contains
  a parser combinator helper library: [Xmlc]. This allows parser for XML
  such as this:

  ┌────
  │ <bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'><jid>w4iu4ckn3kjbqvcd@demo.openengiadina.net/z8Pkzfa8</jid></bind>
  └────

  to be parses like this:

  ┌────
  │ Xmlc.Parser.(
  │   element (Ns.bind "bind") (fun _ ->
  │     element (Ns.bind "jid") (fun _ ->
  │       text >>| String.concat "" >>= fun jid_s ->
  │       match Jid.of_string jid_s with
  │       | Some jid -> return jid
  │       | None -> fail_with "invalid JID")))
  └────


[Xmlc] <https://inqlab.net/projects/ocaml-xmpp/xmlc/Xmlc/index.html>


XMPP extensions
┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄

  Inspiration for the scope of the core library is taken from the
  [Strophe] XMPP libraries - everything that does not have directly to
  do with XMPP transport, authentication or stream management is kept
  outside of the core library.

  There are already some "extension" libraries outside of the core for
  useful XMPP features (e.g. [Roster management], [PubSub] and
  [pinging]).

  One thing that I do want to add to the core library is stream
  management according to [XEP-0198]. I expect this addition to change
  the core library API - the API is not stable yet!

  Much inspiration was taken from [Jackline] - an OCaml XMPP client -
  and in particular [this post] on Jackline. Many thanks to @hannes.


[Strophe] <http://strophe.im/>

[Roster management]
<https://inqlab.net/projects/ocaml-xmpp/xmpp/Xmpp_roster/index.html>

[PubSub]
<https://inqlab.net/projects/ocaml-xmpp/xmpp/Xmpp_pubsub/index.html>

[pinging]
<https://inqlab.net/projects/ocaml-xmpp/xmpp/Xmpp_ping/index.html>

[XEP-0198] <https://xmpp.org/extensions/xep-0198.html>

[Jackline] <https://github.com/hannesm/jackline>

[this post] <https://hannes.nqsb.io/Posts/Jackline>


reactor
╌╌╌╌╌╌╌

  GeoPub uses Brr. I had some trouble figuring out a suitable
  "architecture" for managing complex logic and ended up hacking an
  [Elm] inspired helper library: [reactor.mli]. State updates for the
  entire application are then handled in a single [update function].

  I'm not yet very happy with this machinery and I'm pretty sure I'm
  using react in wrong and dangerous ways. I'd be very grateful for
  ideas on how to improve this. THis might be related to this
  discussion:
  <https://discuss.ocaml.org/t/structuring-frp-specifically-note-applications/8645/17>.

  The reason for using React over Note is because ocaml-xmpp uses a lot
  of Lwt and `Lwt_react' provides nice bindings for working with both. I
  guess something similar could be created for Note (e.g. `Lwt_note')
  and I'm open to using Note (also in ocaml-xmpp).


[Elm] <https://elm-lang.org/>

[reactor.mli]
<https://codeberg.org/openEngiadina/geopub/src/branch/main/src/reactor/reactor.mli>

[update function]
<https://codeberg.org/openEngiadina/geopub/src/branch/main/src/geopub/main.ml#L28>


Leaflet
╌╌╌╌╌╌╌

  GeoPub displays a map using the [Leaflet.js] JavaScript
  library. GeoPub contains OCaml bindings to Leaflet using Brr:
  [leaflet.mli]. Writing this was very straightforward and pleasant (I
  like Brr!).

  One issue I have is that the Leaflet map needs to be manipulated very
  imperatively, whereas the rest of the application is much more
  functional. This causes some mismatches. I guess one needs to find a
  way of hiding the impressiveness of Leaflet (e.g. like
  [react-leaflet]).


[Leaflet.js] <https://leafletjs.com/>

[leaflet.mli]
<https://codeberg.org/openEngiadina/geopub/src/branch/main/src/leaflet/leaflet.mli>

[react-leaflet] <https://github.com/PaulLeCam/react-leaflet>


Guix for build and development environments
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  I use [Guix] for providing a build and development environment. With
  guix installed one can run `guix shell' in the GeoPub repository to
  get a reproducible build environment. All dependencies are fetched and
  made available by Guix in this environment (e.g. `ocaml-xmpp' or the
  OCaml compiler).

  I will publish `ocaml-xmpp' on OPAM once the API is more stable and an
  initial release can be made.


[Guix] <https://guix.gnu.org/>


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2021-11-09 10:08 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2021-11-09 10:08 UTC (permalink / raw)
  To: lwn, cwn, caml-list

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

Hello

Here is the latest OCaml Weekly News, for the week of November 02 to 09,
2021.

Table of Contents
─────────────────

OTOML 0.9.0 — a compliant and flexible TOML parsing, manipulation, and pretty-printing library
Build System Engineer at Jane Street
Real-world use example of ts2ocaml
First release of `ts2ocaml' - generates OCaml bindings from .d.ts files!
OUPS meetups are back!
Old CWN


OTOML 0.9.0 — a compliant and flexible TOML parsing, manipulation, and pretty-printing library
══════════════════════════════════════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-otoml-0-9-0-a-compliant-and-flexible-toml-parsing-manipulation-and-pretty-printing-library/8152/9>


Daniil Baturin announced
────────────────────────

  OTOML 0.9.2 is now available from the OPAM repository.


Breaking changes
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  It makes a breaking change to the `get_array' accessor: it now has
  type `Otoml.get_array' now has type `?strict:bool -> (t -> 'a) -> t ->
  'a list' , that is, it requires an accessor function that will be
  applied to every item of the array.

  For example, you can use `Otoml.find t (Otoml.get_array
  Otoml.get_string) ["foo"]' to retrieve an array of strings from a TOML
  document's key `foo' .

  The motivation for the change is that it allows retrieving arrays of
  unwrapped OCaml values in one step. The old behaviour can still be
  emulated using an identify function for the accessor, for example the
  built-in `Otoml.get_value : 'a -> 'a' .


New features
╌╌╌╌╌╌╌╌╌╌╌╌

  New `Otoml.path_exists t ["some"; "table"; "key"]' allows checking if
  a key path exists in a TOML document.

  `Otoml.Printer.to_string/to_channel' functions now provide
  `~force_table_array' option. When set to true, it forces every array
  that contains nothing but tables to be rendered using the `[[...]]~'
  table array syntax.


Bug fixes
╌╌╌╌╌╌╌╌╌

  Unicode escape sequences are now printed correctly.

  If a table has subtables and non-table items, the non-table items are
  forcibly moved before the first subtable for printing. This way the
  output parses correctly, otherwise the non-table items would be
  mistakenly treated as subtable members. This way hand-constructed TOML
  tables are always formatted correctly even if the user inserts
  non-table items after a subtable.


Testing
╌╌╌╌╌╌╌

  I added a minimal test suite for the read-write interface. If anyone
  wants to contribute to it, that will be much appreciated. Ideally, all
  lookup functions and all accessors/constructors should be tested to
  work as expected.

  Both parser and formatter are now tested with the
  [github.com/BurntSushi/toml-test] and are fully compliant (one
  formatter test is skipped because the test itself is malformed).


[github.com/BurntSushi/toml-test]
<https://github.com/BurntSushi/toml-test>


Future plan
╌╌╌╌╌╌╌╌╌╌╌

  My idea was to call it 1.0.0 when it passes both parsing and formatter
  tests. That goal is reached now, but I'd like to see if anyone has any
  more ideas for the API that cannot be implemented without breaking
  changes. If not, I'll call it 1.0.0 in the next release.


Build System Engineer at Jane Street
════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/job-build-system-engineer-at-jane-street/8737/1>


Andrey Mokhov announced
───────────────────────

  Jane Street is looking for new build system engineers! I've worked in
  this team for two years and I love the job.  Here is why:

  • You frequently change focus from low-level work, like debugging a
    weird file-system issue, to high-level work, like designing a cloud
    build cache.

  • Your colleagues are amazing. If you're like me, you'll feel like an
    imposter in most conversations but it's OK since everyone is kind
    and helpful, so you'll learn something new every day.

  • Most of your work is open-source and benefits the wider OCaml
    community.

  For balance, let me also say a few words about challenges.

  • Build systems accumulate years of knowledge of many people on how to
    get things done. When this knowledge goes out of date, you are often
    the only person to fix it. For this reason, build systems work can
    be daunting.

  • It's far from our core business, so you don't get to work on any of
    our cool trading systems. Your role is to empower others.

  • Our team is small, so we may have to turn down some good
    candidates. However, please don't get discouraged by this! If in
    doubt, send me a message and we'll chat.

  • There is no remote work for now.

  To apply, follow [this link] and mention the build systems role in
  your application.

  Our plans for 2022 include: implementing cloud builds in Dune, better
  integration with other tools like IDEs and the OCaml compiler, and
  making Dune even faster than it is today. To learn more about our
  work, listen to [this podcast].

  And feel free to message me or @jeremiedimino if you have any
  questions!


[this link]
<https://janestreet.com/join-jane-street/position/4274814002/>

[this podcast] <https://signalsandthreads.com/build-systems/>


Real-world use example of ts2ocaml
══════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/real-world-use-example-of-ts2ocaml/8745/1>


Sora Morimoto announced
───────────────────────

  Some OCaml/JavaScript enthusiasts may know that we spent almost two
  years working on a tool automatically generating OCaml bindings from
  TypeScript's type definition files. To prepare for its release, we
  just published a repository to show an example use of it.

  <https://aws1.discourse-cdn.com/standard11/uploads/ocaml/optimized/2X/3/3473fc11da0c56335e8de2b91bd7d9172444913a_2_1380x374.png>

  <https://github.com/ocsigen/ts2ocaml-example>

  This example generates and actually uses a binding to a small
  JavaScript library called [pretty-bytes], and it doesn't only generate
  the binding, but also converts JSDoc comments to odoc ones.

  We believe we can release ts2ocaml as early as this month, please look
  forward to the new announcement!


[pretty-bytes] <https://github.com/sindresorhus/pretty-bytes>


First release of `ts2ocaml' - generates OCaml bindings from .d.ts files!
════════════════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-first-release-of-ts2ocaml-generates-ocaml-bindings-from-d-ts-files/8772/1>


Cannorin announced
──────────────────

  We're pleased to announce that ts2ocaml is now public!

  <https://github.com/ocsigen/ts2ocaml>

  This is a tool which parses TypeScript definition files (`.d.ts') of a
  JS package and then generates an OCaml binding for the package.

  ts2ocaml currently supports js_of_ocaml as a target via
  [LexiFi/gen_js_api], and ReScript is also going to be supported too!

  You can install ts2ocaml from NPM: `npm install -g @ocsigen/ts2ocaml'.
  Please take a look at the documentation on our GitHub repository
  before using it.

  Also, we appreciate any feedback or bug reports, especially since this
  is the first release of ts2ocaml!

  This tool is heavily inspired by ts2fable, which generates Fable (F#
  AltJS) bindings from `.d.ts' files. This tool is also written in
  Fable. Thank you very much for the great language and an awesome
  ecosystem, Fable team!


[LexiFi/gen_js_api] <https://github.com/LexiFi/gen_js_api>


OUPS meetups are back!
══════════════════════

  Archive: <https://discuss.ocaml.org/t/oups-meetups-are-back/8776/1>


zapashcanon announced
─────────────────────

  We (@Vertmo, @lsylvestre, Colin González and myself) are happy to
  announce that the [OUPS (OCaml Users in PariS) meetups] are back.

  If you're not familiar with OUPS, the idea is to have people using
  OCaml (developers, applications' users, researchers, …) to meet in
  Paris where a talk is given, followed by some discussions while eating
  pizza and drinking beer.

  We're planning to have the first meetup happening this year in
  December.

  Thus we're looking for speakers willing to give a talk for the first
  meetups or the following ones.

  The talks usually happen at [IRILL]'s offices, [4 Place Jussieu, 75005
  Paris]. We'll prefer talks in french and with someone able to be
  physically present, but we're open about english and remote talks.

  If you want to give a talk in December or in the future, you can let
  us know here or [on zulip] where we plan to have our main discussions.
  We also have [a group on Framagit] where we'll store some stuff. If
  you don't like Zulip, I'm also on IRC (#oups in [libera.chat]) and
  [matrix] but not everyone is.

  The four of us are doing a PhD in the following places: [ENS] ([Parkas
  team]), [Université de Paris] ([Irif]) + [Nomadic Labs], [Université
  Paris-Saclay] ([LMF]) + [OCamlPro], [Sorbonne Université] ([APR team -
  LIP6]) ; so we have a good coverage of the OCaml users in Paris but we
  don't know everyone. Even if you don't want to give a talk, if you
  know someone that may be interested, please talk to him about OUPS !
  :)

  Also, if there's a subject you'd like to hear about at OUPS, you can
  tell us and we'll try to find a speaker to give a talk about it.

  We'll come back to you very quickly about the December meetup.


[OUPS (OCaml Users in PariS) meetups]
<https://www.meetup.com/fr-FR/ocaml-paris/>

[IRILL] <https://www.irill.org/>

[4 Place Jussieu, 75005 Paris]
<https://www.openstreetmap.org/#map=19/48.84650/2.35457>

[on zulip] <https://oups.zulipchat.com>

[a group on Framagit] <https://framagit.org/oups>

[libera.chat] <https://libera.chat/>

[matrix] <https://matrix.to/#/#oups:matrix.org>

[ENS] <https://www.ens.psl.eu/>

[Parkas team] <https://parkas.di.ens.fr/>

[Université de Paris] <https://u-paris.fr/>

[Irif] <https://www.irif.fr/>

[Nomadic Labs] <https://www.nomadic-labs.com/>

[Université Paris-Saclay] <https://www.universite-paris-saclay.fr/>

[LMF] <https://lmf.cnrs.fr/>

[OCamlPro] <https://www.ocamlpro.com/>

[Sorbonne Université] <https://www.sorbonne-universite.fr/>

[APR team - LIP6] <https://www.lip6.fr/recherche/team.php?acronyme=APR>


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2021-11-02  8:50 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2021-11-02  8:50 UTC (permalink / raw)
  To: lwn, cwn, caml-list

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

Hello

Here is the latest OCaml Weekly News, for the week of October 26 to
November 02, 2021.

Table of Contents
─────────────────

Lists.ocaml.org: service temporarily sunsetted
Talk at Func Prog Sweden
First OPAM releases of Scad_ml and [@@deriving scad]
Other OCaml News
Old CWN


Lists.ocaml.org: service temporarily sunsetted
══════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/lists-ocaml-org-service-temporarily-sunsetted/8692/1>


Anil Madhavapeddy announced
───────────────────────────

  *This note does not concern the main OCaml email list, which continues
  to be available through <https://sympa.inria.fr/sympa/arc/caml-list/>*

  The lists.ocaml.org e-mail service has been going through a rough time
  in the past few years, with vast swathes of spam regularly hitting our
  ingress email server and require manual unblocking every time.  It was
  set up [back in 2012] as an augmentation of the main OCaml mailing
  list and really helped with some big projects in the early days (the
  design of and migration to ppx from camlp4, for example).  However, in
  the intervening years e-mail has reduced in importance as a primary
  community communication mechanism (as evidenced, for example, in this
  forum).

  With the latest spam surge, I've moved the service into read-only mode
  with all the mailboxes and archives still available on the website,
  but with mail delivery and list creation/admin disabled. All existing
  links should continue to work to historical links online without
  change.  The only mailing list on there that was still active to my
  knowledge is the opam-commits cron list, which will be replaced by an
  ocurrent-based deployer for that website shortly.

  I hope to bring e-mail back to ocaml.org sometime in 2022, as it's an
  important communications medium that is highly accessible. One
  challenge is spam, and another is the inflexibility of GNU Mailman and
  its upgrade mechanism (essentially a manual process from 2 to
  3). Therefore, if there is anyone in the community interested in
  building a simple e-mail list manager in OCaml, that would be of
  interest :slight_smile:


[back in 2012]
<https://sympa.inria.fr/sympa/arc/caml-list/2012-12/msg00015.html>


Talk at Func Prog Sweden
════════════════════════

  Archive: <https://discuss.ocaml.org/t/talk-at-func-prog-sweden/8703/1>


Leonardo Laguna Ruiz announced
──────────────────────────────

  Here's a link for the talk I gave at the Func Prog Sweden meetup. In
  that talk I show the process we follow some years ago in order to move
  all our code base to OCaml and why it was an excellent decision.

  <https://youtu.be/FGXiAARXE2M>

  [Wolfram System Modeler] is a simulation environment that can be used
  to model multi-domain systems. For example systems composed of
  electrical, thermal, hydraulic, mechanical, etc, components.

  One of the main parts of System Modeler is the model compiler (Kernel)
  which takes models written in the Modelica language and compiles them
  into efficient simulation executables. This compiler was ported to
  OCaml by using custom tool that performed the code to code translation
  of our old code base.

  Slides
  <https://a2076202-c90b-450e-901b-cb56c346913c.usrfiles.com/ugd/a20762_adfa899586c7413a8c17f7b708dbc177.pdf>


[Wolfram System Modeler] <https://www.wolfram.com/system-modeler/>


First OPAM releases of Scad_ml and [@@deriving scad]
════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-first-opam-releases-of-scad-ml-and-deriving-scad/8718/1>


geoffder announced
──────────────────

  I'd like to announce the first release onto opam of [Scad_ml] and
  [ppx_deriving_scad]. The former being a DSL front-end to the
  [OpenSCAD] solid modelling language, and the latter providing
  transformation function generation for custom types (a pattern that I
  have found useful during my time using `Scad_ml'.

  When I decided I wanted to pick up OpenScad, I was pleasantly
  surprised to discover that the `Scad_ml' library already existed on
  GitHub, credits to <https://github.com/namachan10777>. Over time I
  filled out the rest of the OpenSCAD language coverage, as well as some
  additional helpful math, and reorganized things to try and keep it
  from getting too messy as more and more was tacked on. Finally, after
  some help in the ocaml discord (from NULL and octachron), we also now
  can track whether shapes are 2D or 3D with minimal changes to the user
  interface, preventing misapplications of operations that would
  otherwise only appear in the OpenSCAD console.

  The `[@@deriving scad]' ppx is my solution to make a habit I developed
  to get around the otherwise fully declarative nature of working in
  OpenSCAD more ergonomic. Shapes in OpenSCAD cannot be queried in any
  way, so upon creation, the locations of it's vertices or it's origin
  are not available. Of course, since you created it, you know exactly
  it's dimensions, and where you have moved it, but what if you want to
  use the location of one of it's vertices, wherever that ends up after
  a series of transformations? What I did for some time before learning
  how to write a ppx, was put the coordinates I cared about into a
  record with the shape, and mapped over the type (by hand (and regex))
  with the relevant functions (typically transform and rotate). Turns
  out writing a ppx with `Ppxlib' and `metaquot' isn't so bad, and I
  really wish I did it sooner!

  Anyway, to the few of you out there that might use OpenSCAD, I hope
  that these tools might come in handy!


[Scad_ml] <https://github.com/namachan10777/scad-ml>

[ppx_deriving_scad] <https://github.com/geoffder/ppx_deriving_scad>

[OpenSCAD] <https://openscad.org/>


Other OCaml News
════════════════

>From the ocamlcore planet blog
──────────────────────────────

  Here are links from many OCaml blogs aggregated at [OCaml Planet].

  • [Hiring a Developer Educator]
  • [Verification for Dummies: SMT and Induction]
  • [SCoP Passed Phase 1 of the DAPSI Initiative!]


[OCaml Planet] <http://ocaml.org/community/planet/>

[Hiring a Developer Educator]
<https://blog.janestreet.com/hiring-a-developer-educator/>

[Verification for Dummies: SMT and Induction]
<https://www.ocamlpro.com/2021/10/14/verification-for-dummies-smt-and-induction/>

[SCoP Passed Phase 1 of the DAPSI Initiative!]
<https://tarides.com/blog/2021-10-14-scop-selected-for-dapsi-phase2>


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2021-10-19  8:23 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2021-10-19  8:23 UTC (permalink / raw)
  To: lwn, cwn, caml-list

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

Hello

Here is the latest OCaml Weekly News, for the week of October 12 to 19,
2021.

Table of Contents
─────────────────

Verification for Dummies: SMT and Induction
OCaml Café: Wed, Oct 13 @ 1pm (U.S. Central)
Windows-friendly OCaml 4.12 distribution 2nd preview release (0.2.0)
Release of ocaml-sf/learn-ocaml:0.13.0
Old CWN


Verification for Dummies: SMT and Induction
═══════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/verification-for-dummies-smt-and-induction/8631/1>


OCamlPro announced
──────────────────

  We are pleased to share with you [Verification for Dummies: SMT and
  Induction], a complete and detailed series of blogposts written by
  Adrien Champion about Induction as a formal verification technique.

  The subject is treated with many concrete and executable examples. All
  examples can be (and should be) launched locally by readers thanks to
  small and easy to find tools. Modification and experimentation are
  strongly encouraged!

  Take a look at all the notions covered:

  • introduction to formal logics and formal frameworks;
  • SMT-solving: modern, low-level verification building blocks;
  • declarative transition systems;
  • transition system unrolling;
  • BMC and induction proofs over transition systems;
  • candidate strengthening.

  We hope you enjoy reading and we look forward to your feedback!


[Verification for Dummies: SMT and Induction]
<https://www.ocamlpro.com/2021/10/14/verification-for-dummies-smt-and-induction/>


OCaml Café: Wed, Oct 13 @ 1pm (U.S. Central)
════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ocaml-cafe-wed-oct-13-1pm-u-s-central/8610/14>


Claude Jager-Rubinson announced
───────────────────────────────

  The video of @dra27's talk on OPAM is now available:
  <https://youtu.be/RHSdlH4el0g>. Thanks so much for the great talk,
  David!  And thanks to everybody who attended!  (The video starts a
  couple of minutes into the talk because yours truly forgot to start
  recording.  D'oh!)

  We already have some ideas for the next meeting but if there's a topic
  that you'd like to hear about or are interested on presenting on,
  please message me.


Windows-friendly OCaml 4.12 distribution 2nd preview release (0.2.0)
════════════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-windows-friendly-ocaml-4-12-distribution-2nd-preview-release-0-2-0/8488/3>


jbeckford announced
───────────────────

  0.2.5 is available. This release brings significant user friendly
  improvements.

  There is a new binary called `with-dkml.exe'. Just plop `with-dkml' in
  front of a Windows command that requires access to Unix scripts
  (ie. `with-dkml opam install') and it should just work.

  There is now a section called **Beyond Basics** in [the Diskuv OCaml
  user documentation] that walks through:
  • the first and second tutorials of [Getting Started - Learn OCaml]
  • the bare Opam essentials you need as a beginner (how to find and
    select an Opam switch, and how to find and install packages using
    `with-dkml opam install'), all without leaving the Command Prompt
  • installing Visual Studio Code with the OCaml plugin

  Huge thanks to @Butanium who lent me much of his time to validate
  usability from the perspective of a newcomer. More feedback is always
  welcome.

  Links:
  • [Installation instructions for the latest version]
  • [Release notes for all versions]

  PS. You won't need `with-dkml' most of the time. The Beyond Basics
  documentation shows how to run Dune and the OCaml native compiler
  directly from the Visual Studio Command Prompt.


[the Diskuv OCaml user documentation]
<https://diskuv.gitlab.io/diskuv-ocaml/index.html>

[Getting Started - Learn OCaml] <https://ocaml.org/learn/tutorials/>

[Installation instructions for the latest version]
<https://diskuv.gitlab.io/diskuv-ocaml/index.html#two-step-installation-instructions>

[Release notes for all versions]
<https://gitlab.com/diskuv/diskuv-ocaml/-/releases>


Release of ocaml-sf/learn-ocaml:0.13.0
══════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-release-of-ocaml-sf-learn-ocaml-0-13-0/8577/6>


Erik Martin-Dorel announced
───────────────────────────

  Just FYI, a bugfix release learn-ocaml `0.13.1' has just been tagged
  and:

  • [released in GitHub] ← see the Release Notes and binaries-assets
  • [pushed to Docker Hub] ← `ocamlsf/learn-ocaml' being the official
    distribution of Learn-OCaml
  • [submitted to OPAM default repository]


[released in GitHub]
<https://github.com/ocaml-sf/learn-ocaml/releases/tag/v0.13.1>

[pushed to Docker Hub]
<https://hub.docker.com/r/ocamlsf/learn-ocaml/tags>

[submitted to OPAM default repository]
<https://github.com/ocaml/opam-repository/pull/19787>


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2021-09-28  6:37 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2021-09-28  6:37 UTC (permalink / raw)
  To: lwn, cwn, caml-list

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

Hello

Here is the latest OCaml Weekly News, for the week of September 21 to
28, 2021.

Table of Contents
─────────────────

Brr 0.0.2, a toolkit for programming browsers
Become an Outreachy Mentor: support the growth and diversity of the OCaml community
OCaml 4.13.0 (and 4.12.1)
Other OCaml News
Old CWN


Brr 0.0.2, a toolkit for programming browsers
═════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-brr-0-0-2-a-toolkit-for-programming-browsers/8521/1>


Daniel Bünzli announced
───────────────────────

  It's my pleasure to announce the release `0.0.2' of [`Brr'], a toolkit
  for programming browsers in OCaml with the [`js_of_ocaml'] compiler.

  Once it has made it to the repo, install with `opam install brr' and
  consult the [API docs and manuals] (or via `odig doc brr').

  This release fixes binding bugs, adds a few new bindings and tweaks
  some existing signatures. Thanks to all of those who provided bug
  reports, suggestions and code.

  The [release notes] have all the details.


[`Brr'] <https://erratique.ch/software/brr>

[`js_of_ocaml'] <https://ocsigen.org/js_of_ocaml>

[API docs and manuals] <https://erratique.ch/software/brr/doc/>

[release notes]
<https://github.com/dbuenzli/brr/blob/master/CHANGES.md#v002-2020-09-23-zagreb>


Become an Outreachy Mentor: support the growth and diversity of the OCaml community
═══════════════════════════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/become-an-outreachy-mentor-support-the-growth-and-diversity-of-the-ocaml-community/8213/13>


Thibaut Mattio announced
────────────────────────

  I've submitted two projects for the winter session:

  • Integrate a package health check in ocaml.org

  To essentially integrate a version of check.ocamllabs.io that can be
  used by opam-repository maintainers and opam users into the next
  version of ocaml.org (<https://v3.ocaml.org>).

  • Support `.eml' files in OCaml's VSCode extension

  To add support for Dream's [`.eml' files] syntax in the extension, and
  eventually have error reporting for these files from OCaml LSP Server.

  I'm more than interested in having co-mentors for these two projects,
  so if you wanted to mentor Outreachy interns but didn't have any
  project ideas, don't hesitate to reach out :slight_smile:

  Another way to help that does not involve mentoring is to find good
  first issues that will help onboard and select candidates for the
  projects. Any help on this effort to identify, create and document
  good first issues for the different projects is more than welcome!


[`.eml' files]
<https://github.com/aantron/dream/tree/master/example/7-template>


OCaml 4.13.0 (and 4.12.1)
═════════════════════════

  Archive: <https://discuss.ocaml.org/t/ocaml-4-13-0-and-4-12-1/8529/1>


octachron announced
───────────────────

  The OCaml team ha the pleasure of celebrating the 175th anniversary of
  the discovery of Neptune by announcing the joint releases of OCaml
  version 4.13.0 and 4.12.1 .

  Some of the highlights in the 4.13.0 release are:

  • Safe points: a multicore prerequisite that ensures that
    ocamlopt-generated code can always be interrupted.
  • The best-fit GC allocation policy is now the default policy (and
    many other GC improvements).
  • Named existential type variables in pattern matching: `Showable
    (type a) (x, show : a * (a -> string))'.

  • Improved error messages for functor application and functor types.
  • Let-punning for monadic let: `let* x = x in' can be shortened to
    `let* x in'.
  • Module type substitutions: `SIG with module type T = F(X).S'.

  • Many other quality of life improvements
  • Many bug fixes

  The 4.12.1 release is a collection of safe bug fixes, cherry-picked
  from the 4.13.0 development cycle. If you were using OCaml 4.12.0 and
  cannot yet upgrade to 4.13.0, this release is for you.

  The full list of changes can be found in the changelogs
  below. (*Editor note*: as it’s quite long, it is not included
  here. Please follow the link to the original article to read it.)

  Those releases are available as OPAM switches, and as a source
  download here:

  • <https://github.com/ocaml/ocaml/archive/4.13.0.tar.gz>
  • <https://caml.inria.fr/pub/distrib/ocaml-4.13/>

  and there:

  • <https://github.com/ocaml/ocaml/archive/4.12.1.tar.gz>
  • <https://caml.inria.fr/pub/distrib/ocaml-4.12/>


Other OCaml News
════════════════

From the ocamlcore planet blog
──────────────────────────────

  Here are links from many OCaml blogs aggregated at [OCaml Planet].

  • [Announcing Tezos’ 8th protocol upgrade proposal: Hangzhou]
  • [Measuring OCaml compilation speed after a refactoring]
  • [Writing Lifters Using Primus Lisp]
  • [Tarides Returns to FIC 2021]
  • [Generating static and portable executables with OCaml]


[OCaml Planet] <http://ocaml.org/community/planet/>

[Announcing Tezos’ 8th protocol upgrade proposal: Hangzhou]
<https://marigold.dev/blog/announcing-hangzhou/>

[Measuring OCaml compilation speed after a refactoring]
<http://gallium.inria.fr/blog/measuring-compilation-time/>

[Writing Lifters Using Primus Lisp]
<http://binaryanalysisplatform.github.io/2021/09/15/writing-lifters-using-primus-lisp/>

[Tarides Returns to FIC 2021]
<https://tarides.com/blog/2021-09-06-tarides-returns-to-fic-2021>

[Generating static and portable executables with OCaml]
<https://www.ocamlpro.com/2021/09/02/generating-static-and-portable-executables-with-ocaml/>


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2021-09-21  9:09 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2021-09-21  9:09 UTC (permalink / raw)
  To: lwn, cwn, caml-list

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

Hello

Here is the latest OCaml Weekly News, for the week of September 14 to
21, 2021.

Table of Contents
─────────────────

opam-grep: search through the sources of all the packages in opam-repository
Hardcaml MIPS CPU Learning Project and Blog
Puzzling through some GADT errors
Parany for multicore OCaml
OCaml 4.13.0, second release candidate
Unicode 14.0.0 update for Uucd, Uucp, Uunf and Uuseg
Set up OCaml 2.0.0-beta4
Become an Outreachy Mentor: support the growth and diversity of the OCaml community
The OCaml 4.13 preview for Merlin is now available
Old CWN


opam-grep: search through the sources of all the packages in opam-repository
════════════════════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-opam-grep-search-through-the-sources-of-all-the-packages-in-opam-repository/8434/3>


Kate announced
──────────────

  I've just released opam-grep.0.2.0 with quite a bit of change compared
  to the previous version. Here is the highlight:
  • Complete rewrite from shell script to OCaml, making it more portable
  • Use the faster `ripgrep' and `ugrep' over `grep' when available
    (suggestion by @Engil)
  • Use the `progress' library to show progress instead of a
    non-portable/DIY spinner

  See the [changelog] for the full list of relevant changes.

  *Big thanks to @CraigFe for the `progress' library (such a treat!) and
  to @dbuenzli for `bos' and `cmdliner' in particular, making it easy to
  do such rewrite* :relaxed:


[changelog]
<https://github.com/kit-ty-kate/opam-grep/blob/master/CHANGES.md>


Hardcaml MIPS CPU Learning Project and Blog
═══════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/hardcaml-mips-cpu-learning-project-and-blog/8088/10>


Alexander (Sasha) Skvortsov announced
─────────────────────────────────────

  Hi everyone! We are excited to announce that we have completed this
  project and blog. Progress has been slow these past few months due to
  work, internships, and college, but we’ve now released [v1.0.0 on
  GitHub]. We also published posts on:

  • [Design patterns, conventions, and testing]
  • [How the Always DSL can be used to write safe “pseudo-imperative”
    code in Hardcaml]
  • [Hardcaml’s testing and interactive simulation tools]
  • [A recap of some interesting hardware/CPU features in our design]

  Finally, we published a [conclusion blog post], which wraps up some
  strengths/weaknesses of Hardcaml, as well as some takeaways on OCaml
  and blogging more generally.

  Thank you to @andyman and @fyquah95 for building Hardcaml, and for
  helping us out on GitHub issues! We really appreciate your time and
  suggestions.

  Overall, we’ve come to the conclusion that Hardcaml is a much better
  tool for hardware design than Verilog. This has been a great
  experience, and we walk away with a better understanding of hardware,
  functional programming, and technical writing.


[v1.0.0 on GitHub]
<https://github.com/askvortsov1/hardcaml-mips/releases/tag/v1.0.0>

[Design patterns, conventions, and testing]
<https://ceramichacker.com/blog/14-8x-design-patterns-conventions-and-testing>

[How the Always DSL can be used to write safe “pseudo-imperative” code
in Hardcaml]
<https://ceramichacker.com/blog/15-9x-always-dsl-and-the-control-unit>

[Hardcaml’s testing and interactive simulation tools]
<https://ceramichacker.com/blog/16-10x-testing-and-debugging-hardcaml>

[A recap of some interesting hardware/CPU features in our design]
<https://ceramichacker.com/blog/18-11x-cpu-functionality-wrap-up>

[conclusion blog post]
<https://ceramichacker.com/blog/20-1212-project-conclusion>


Puzzling through some GADT errors
═════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/puzzling-through-some-gadt-errors/8478/8>


Deep in this thread, gasche said
────────────────────────────────

  Not exactly what you are asking for, but @Octachron wrote an excellent
  [chapter on GADTs] in the OCaml manual, which could be recommended to
  people starting GADT programming. It explains why recursive functions
  on GADT need "explicit polymorphic annotations" in less
  "implementation driven" terms.

  (The chapter also demonstrates the new naming scheme for existential
  type variables introduced by GADT constructors, which can help a lot
  working through type errors, but are still a bit heavy and deserve a
  gentle introduction.)


[chapter on GADTs] <https://ocaml.org/releases/4.12/manual/gadts.html>


octachron then added
────────────────────

  I have only written the nomenclature part and a bit of the explanation
  for recursive functions in this chapter, @garrigue is the author of
  most of this chapter.


Parany for multicore OCaml
══════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/parany-for-multicore-ocaml/8495/1>


UnixJunkie announced
────────────────────

  There is now an implementation using multicore-OCaml in the 'domains'
  branch.

  <https://github.com/UnixJunkie/parany/tree/domains>

  People are very welcome to give it a try and share the speedup they
  observe, especially compared to fork-based parallelism.

  Thanks to @nilsbecker for having motivated me.


UnixJunkie later added
──────────────────────

  If you don't use the domains branch, then parany is using fork-based
  parallelism.  If you want to use the domains branch, you need to
  install multicore-ocaml first:
  ┌────
  │ opam switch create 4.12.0+domains
  │ eval `opam config env`
  └────


OCaml 4.13.0, second release candidate
══════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ocaml-4-13-0-second-release-candidate/8496/1>


octachron announced
───────────────────

  The release of OCaml 4.13.0 is expected for next week.

  Since we had a native code generation bug fix and two minor
  configuration tweaks since the first release candidate, we are
  publishing a second release candidate.  If you find any bugs, please
  report them here:

  <https://github.com/ocaml/ocaml/issues>

  Happy hacking, Florian Angeletti for the OCaml team.


Installation instructions
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  The base compiler can be installed as an opam switch with the
  following commands
  ┌────
  │ opam update
  │ opam switch create 4.13.0~rc2 --repositories=default,beta=git+https://github.com/ocaml/ocaml-beta-repository.git
  └────
  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.13.0~rc2+options,<option_list>
  │ --repositories=default,beta=git+https://github.com/ocaml/ocaml-beta-repository.git
  └────

  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.13.0~rc2+flambda+nffa
  │ --packages=ocaml-variants.4.13.0~rc2+options,ocaml-option-flambda,ocaml-option-no-flat-float-array
  │ --repositories=default,beta=git+https://github.com/ocaml/ocaml-beta-repository.git
  └────
  All available options can be listed with "opam search ocaml-option".

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

  • <https://github.com/ocaml/ocaml/archive/4.13.0-rc2.tar.gz>
  • <https://caml.inria.fr/pub/distrib/ocaml-4.13/ocaml-4.13.0~rc2.tar.gz>


Changes since the first release candidate
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  • [#10626], [#10628]: Wrong reloading of the x86-64 instruction for
    integer multiplication by a constant, causing the assembler to
    reject the ocamlopt-generated code. (Xavier Leroy, report by Dave
    Aitken, review by Vincent Laviron)

  • [#10176], [#10632(new in rc2)]: By default, call the assembler
    through the C compiler driver (Sébastien Hinderer, review by Gabriel
    Scherer, David Allsopp and Xavier Leroy)

  • [#10451], [#10635(new in rc2)]: Replace the use of iconv with a C
    utility to convert $(LIBDIR) to a C string constant on Windows when
    building the runtime. Hardens the generation of the constant on Unix
    for paths with backslashes, double-quotes and newlines. (David
    Allsopp, review by Florian Angeletti and Sébastien Hinderer)


[#10626] <https://github.com/ocaml/ocaml/issues/10626>

[#10628] <https://github.com/ocaml/ocaml/issues/10628>

[#10176] <https://github.com/ocaml/ocaml/issues/10176>

[#10632(new in rc2)] <https://github.com/ocaml/ocaml/issues/10632>

[#10451] <https://github.com/ocaml/ocaml/issues/10451>

[#10635(new in rc2)] <https://github.com/ocaml/ocaml/issues/10635>


Unicode 14.0.0 update for Uucd, Uucp, Uunf and Uuseg
════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-unicode-14-0-0-update-for-uucd-uucp-uunf-and-uuseg/8497/1>


Daniel Bünzli announced
───────────────────────

  Unicode 14.0.0 was released on the 14th of september.

  It adds 838 new characters to the standard including, for our friends
  from Central Asia, support for [Old Uyghur].  For information about
  all the other additions, see [the announcement page].

  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.

  Best,

  Daniel

  P.S. Though I'm not very fond of the concept, I recently enabled
  sponsors on my github account as an experiment. So I'd like to thanks
  my [github sponsors], @davesnx became the first one monday.


[Old Uyghur]
<https://unicode.org/charts/PDF/Unicode-14.0/U140-10F70.pdf>

[the announcement page]
<http://blog.unicode.org/2021/09/announcing-unicode-standard-version-140.html>

[github sponsors] <https://github.com/sponsors/dbuenzli/>


Set up OCaml 2.0.0-beta4
════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-set-up-ocaml-2-0-0-beta4/8501/1>


Sora Morimoto announced
───────────────────────

Changed
╌╌╌╌╌╌╌

  • Set `OPAMSOLVERTIMEOUT' to `1000' to avoid a timeout even if the
    opam solver is slow.
  • Increase cache hit ratio by loosening restore keys of opam cache.

  <https://github.com/ocaml/setup-ocaml/releases/tag/v2.0.0-beta4>


Become an Outreachy Mentor: support the growth and diversity of the OCaml community
═══════════════════════════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/become-an-outreachy-mentor-support-the-growth-and-diversity-of-the-ocaml-community/8213/8>


Sonja Heinze announced
──────────────────────

  Hey all, I've just submitted an Outreachy project for the winter
  round. The project is to write the basic ppx_deriving plugins in
  ppxlib; that is, the ones that don't already have a version based on
  ppxlib. I think both, having them available to use, and having their
  code available as simple examples of how to use Ppxlib.Deriving would
  be very nice! And improving ppxlib's documentation and finding simple
  issues on already existing PPXs to prepare for Outreachy, will be
  beneficial as well.

  Of course, it's not clear if someone with the right interest comes
  along for this project, but if we don't find an intern for it this
  round, I can just re-submit the same project next round.


Sonja Heinze
────────────

  Btw, the deadline to submit projects was extended and is now Sept
  23rd. So the timeline in our post above is slightly outdated.


The OCaml 4.13 preview for Merlin is now available
══════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-the-ocaml-4-13-preview-for-merlin-is-now-available/8436/6>


Continuing this thread, Kate announced
──────────────────────────────────────

  The OCaml 4.13 preview for ocaml-lsp-server is now available as well.

  To install it along with the OCaml 4.13 rc, please refer to the first
  post.

  If you encounter any problems while using ocaml-lsp-server, please
  feel free to report it directly in
  <https://github.com/ocaml/ocaml-lsp/pull/506>


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2021-09-07 13:23 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2021-09-07 13:23 UTC (permalink / raw)
  To: lwn, cwn, caml-list

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

Hello

Here is the latest OCaml Weekly News, for the week of August 31 to
September 07, 2021.

Table of Contents
─────────────────

Just reinvented OOP
v3.OCaml.org: A roadmap for OCaml's online presence
Become an Outreachy Mentor: support the growth and diversity of the OCaml community
Generating static and portable executables with OCaml
OCaml quant-developer at Bloomberg. London or New York
HTTP client library
Other OCaml News
Old CWN


Just reinvented OOP
═══════════════════

  Archive: <https://discuss.ocaml.org/t/just-reinvented-oop/8399/1>


Yawar Amin said
───────────────

  ┌────
  │ let ( .![] ) obj f = f obj
  │ 
  │ type person = { id : int; name : string }
  │ 
  │ let id { id; _ } = id
  │ 
  │ let bob = { id = 1; name = "Bob" }
  │ let next_id = bob.![id].![succ]
  └────

  ==> 2


Kiran Gopinathan replied
────────────────────────

  Haha, what a coincidence, just did the same very recently while
  translating a rust library to OCaml:
  <https://github.com/Gopiandcode/ego/blob/5daf312f8a444f9abcde5996c671b9282727a972/lib/generic.ml#L211>
  ┌────
  │ let eclasses = eg.@[eclasses] in
  │ let cost_map = Id.Map.create 10 in
  │ let node_total_cost node =
  │   let has_cost id = Id.Map.mem cost_map (eg.@[find] id) in
  │   if List.for_all has_cost (L.children node)
  │   then let cost_f id = fst @@ Id.Map.find cost_map (eg.@[find] id) in Some (E.cost cost_f
  │ node)
  │   else None in
  │   (* ... *)
  └────
  with `.@[]' defined as:
  ┌────
  │ let (.@[]) self fn = fn self [@@inline always]
  └────

  for bonus(?) points, you can name the first parameter self:
  ┌────
  │ let add_enode self (node: Id.t L.shape) =
  │   let node = self.@[canonicalise] node in
  │   (* ... *)
  └────
  I don't normally write code like this in OCaml, but in this case, it
  made porting from rust easier, because the code mostly looked the
  same.


hyphenrf also replied
─────────────────────

  You can use the multiple-indexing syntax to implement slicing (well,
  technically subs) sugar:
  ┌────
  │ let (.:[;..]) s = function
  │   | [|start; finish|] -> String.sub s start (finish - start)
  │   | _ -> raise (Invalid_argument "slice takes exactly two indexes")
  └────
  ┌────
  │ # "hello world".:[1;5];;
  │ - : string = "ello"
  └────
  The new indexing syntax is quite versatile :>


Kiran Gopinathan added
──────────────────────

  Oh wow, this is perfect! brb, off to reimplement the python slicing
  semantics in OCaml:
  ┌────
  │ let (.@[;..]) ls = function[@warning "-8"]
  │   | [| start; -1 |] ->
  │     List.to_iter ls
  │     |> Iter.zip_i
  │     |> Iter.drop_while (Pair.fst_map ((>) start))
  │     |> Iter.map snd
  │   | [| start; finish |] ->
  │     List.to_iter ls
  │     |> Iter.zip_i
  │     |> Iter.drop_while (Pair.fst_map ((>) start))
  │     |> Iter.take_while (Pair.fst_map ((>) finish))
  │     |> Iter.map snd
  │   | [| start; finish; step |] ->
  │     List.to_iter ls
  │     |> Iter.zip_i
  │     |> Iter.drop_while (Pair.fst_map ((>) start))
  │     |> Iter.take_while (Pair.fst_map ((>) finish))
  │     |> Iter.filter (Pair.fst_map (fun ind -> (ind - start) mod step = 0))
  │     |> Iter.map snd
  └────


v3.OCaml.org: A roadmap for OCaml's online presence
═══════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/v3-ocaml-org-a-roadmap-for-ocamls-online-presence/8368/19>


Continuing this thread, Anil Madhavapeddy replied to many comments
──────────────────────────────────────────────────────────────────

  Many thanks for all the constructive comments and suggestions so far,
  and also for those who have gotten in touch to contribute. Please do
  keep them coming (either on this thread or on the various issue
  trackers that @jonludlam and @patricoferris have pointed to).  I'll
  answer some earlier questions here:

        Having said that, the colors on the [packages landing page
        ] feel very aggressive to me. Might be my setup here, but
        I would like to have a slightly less harsh contrast.

        Also, there is a bit of an overlap in content with
        [https://ocamlverse.github.io/ ] for some things (eg best
        practices, community) but the (to me) most valuable
        feature is missing: The ecosystems overview, where I can
        find packages sorted thematically. Could such a section
        also have a place in the packages subpage somewhere?
        Alternatively, maybe opam can allow to “tag” packages in
        the future so one could see all packages for graphics,
        databases etc.

  The styling of the /packages sub-URL does indeed differ from the main
  design, but this is simply due to a temporary technical detail. The
  majority of the site uses React/NextJS to generate the frontend, and
  this uses the now-trendy medium-contrast colours and also features
  like fast-page-switching that NextJS offers.  However, the
  documentation portion generated around 2.7 million individual pages
  when run across the full opam repository, and so we restored to
  dynamic generation of the content for that. What's going to happen
  next is a rationalisation of the code across the ReScript and OCaml
  frontends so that there will be no observable difference in the colour
  schemes across the full site.

  Regarding creating a categorised list of recommendations, that is
  absolutely in scope for the v3 iteration of the site. However, this
  metadata should ideally live in the opam-repository (for example,
  using `tags' as you suggest, which opam already supports). If anyone
  would like to have a go at this, I'd encourage PRs to the
  opam-repository to add the relevant tag metadata for a
  codex. Meanwhile, @lambda_foo @tmattio and @patricoferris are working
  on the core OCaml Platform workflow information for the guides section
  of the website which will cover opam, merlin, lsp-server, dune and so
  on.

        Do we have access to all of the previous years’ workshops
        to add to [watch.ocaml.org]?  I can see pieces of 2015,
        2017, 2020 and this year. @avsm

        Is it possible to add the ML Workshop as well?

  Absolutely. The watch.ocaml.org has held up nicely after the OCaml
  Workshop, so I think it's in good shape to populate with more
  videos. This needs a volunteer to help us upload the past [nine years]
  of videos from YouTube to watch.ocaml.org. If anyone wants to have a
  go, please message me and I'll create you an account.

        It’s a bit unclear what you meant in this paragraph. Does
        that mean that you plan to kill the ocaml planet ? I would
        find it a little bit sad.

        One of the reason why you may feel it doesn’t work well
        may be that it has been constantly broken in the current
        version of the site…

  I'm not sure why you think the current ocaml.org new feed has been
  broken – it's been working fairly reliably for the past decade. The
  only real problem came up a few times when a feed's domain expired and
  got taken over by domain squatters, at which point we got spam into
  the main page of ocaml.org.

  What I meant with that part of the announcement is that the
  syndication feed should not be mistaken with original news on the
  website. Right now it's difficult to distinguish official
  announcements (such as compiler or opam releases) as they are a little
  scattered (e.g. on opam.ocaml.org). The plan is to combine the
  [platform-blog] with the new website directly. I've also been
  considering just having a special tag on this forum so that nice
  announcement posts could also be syndicated to the website easily (for
  example, @gasche's compiler newsletters).

  My general desire is to _grow_ the planet feed and syndication system,
  but to clearly demarcate them as not being published by ocaml.org and
  to manage them via more modern decentralised techniques that feature
  spam, moderation and archival. PeerTube is a good example of this for
  videos that is working well, and I'd welcome suggestions for Atom/RSS
  (there must be something in this space, ideally ActivityPub-based).

  Depending on how the experiments go, it's very likely that we'll have
  a Matrix homeserver for ocaml.org where CI bots can report status
  information (see this [prototype PR]) for ocaml-ci that will also
  apply to opam-repository. The goal here is to for ocaml.org to publish
  its data using an open protocol, which can then be syndicated into
  whatever technologies are in vogue (e.g. Discord, Slack, Teams, …).

  So if you spot some decentralised syndication system that you think
  might be interesting for OCaml, please do let me know.  Even better,
  if you'd like to develop one to tailor it to our needs, let me know
  even sooner ;-)


[packages landing page ] <https://v3.ocaml.org/packages>

[https://ocamlverse.github.io/ ] <https://ocamlverse.github.io/>

[watch.ocaml.org] <http://watch.ocaml.org>

[nine years] <https://ocaml.org/meetings/ocaml/2012/>

[platform-blog] <https://github.com/ocaml/platform-blog>

[prototype PR] <https://github.com/ocurrent/ocaml-ci/pull/362>


Become an Outreachy Mentor: support the growth and diversity of the OCaml community
═══════════════════════════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/become-an-outreachy-mentor-support-the-growth-and-diversity-of-the-ocaml-community/8213/3>


Anil Madhavapeddy announced
───────────────────────────

  There's been a very disappointing response to this call for mentors to
  increase the diversity of our community. Precisely *noone* has been in
  touch for the winter call, leaving the burden of mentorship on the
  same people that did all the work this summer.

  Before making [new calls for programs like GSoC], let's get Outreachy
  onto more sustainable ground please. We are purely limited by
  mentorship time at present. This can be as simple as organising new
  first issues for projects in the ecosystem, and all the way to pair
  programming with a mentee. You can chose how to be involved.


[new calls for programs like GSoC]
<https://discuss.ocaml.org/t/v3-ocaml-org-a-roadmap-for-ocamls-online-presence/8368/16?u=avsm>


Generating static and portable executables with OCaml
═════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/generating-static-and-portable-executables-with-ocaml/8405/1>


OCamlPro announced
──────────────────

  It has been a few times now that we have been tasked to generate
  portable binaries for different projects. Over time, we have gathered
  quite some know-how and, seeing the question frequently arise in the
  community, we decided to share this experience.

  You can find the article written by Louis Gesbert on[ the OCamlPro
  blog]


        Distributing OCaml software on opam is great (if I dare
        say so myself), but sometimes you need to provide your
        tools to an audience outside of the OCaml community, or
        just without recompilations or in a simpler way.

        However, just distributing the locally generated binaries
        requires that the users have all the required shared
        libraries installed, and a compatible libc. It's not
        something you can assume in general, and even if you don't
        need any C shared library or are confident enough it will
        be installed everywhere, the libc issue will arise for
        anyone using a distribution based on a different kind, or
        a little older than the one you used to build.

        There is no built-in support for generating static
        executables in the OCaml compiler, and it may seem a bit
        tricky, but it's not in fact too complex to do by hand,
        something you may be ready to do for a release that will
        be published. So here are a few tricks, recipes and advice
        that should enable you to generate truly portable
        executables with no external dependency whatsoever. Both
        Linux and macOS will be treated, but the examples will be
        based on Linux unless otherwise specified.

  Don't hesitate to share your thoughts with us, have a good reading!


[ the OCamlPro blog]
<https://www.ocamlpro.com/2021/09/02/generating-static-and-portable-executables-with-ocaml/>


OCaml quant-developer at Bloomberg. London or New York
══════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ocaml-quant-developer-at-bloomberg-london-or-new-york/8409/1>


Philip Craig announced
──────────────────────

  Extend a financial contracts DSL that is implemented in OCaml.

  It's London or New York based. It's not a remote position.

  Please see details and/or apply at
  (<https://careers.bloomberg.com/job/detail/93825>)


HTTP client library
═══════════════════

  Archive: <https://discuss.ocaml.org/t/ann-http-client-library/8428/1>


Hannes Mehnert announced
────────────────────────

  we just released to the opam-repository the [`http-lwt-client']
  package, which consists of both a library doing HTTP requests and a
  binary (`hurl') that does HTTP requests.

  The code is based on [HTTP/AF] and [H2], and uses [tls] for HTTPS
  connections. Both HTTP/1(.1) and HTTP/2 protocols are supported. The
  motivation behind this package is to have a http client that has a
  reasonably small dependency cone, is purely implemented in OCaml, and
  uses the asynchronous task library lwt.

  This package uses [happy-eyeballs] to connect to a remote host via
  IPv4 and IPv6, as proposed by IETF [RFC 8305]: on any computer with
  either IPv4 or IPv6 connectivity, a remote IPv6 or IPv4 server will be
  connected. Preference is given to IPv6.

  If a https url is provided, the server certificate is verified using
  the [ca-certs] package.

  If you experience any issues or have further needs for this package,
  please report an issue on the GitHub issue tracker.

  The installation is just an `opam install http-lwt-client' away :)


[`http-lwt-client'] <https://github.com/roburio/http-lwt-client>

[HTTP/AF] <https://github.com/inhabitedtype/httpaf>

[H2] <https://github.com/anmonteiro/ocaml-h2>

[tls] <https://github.com/mirleft/ocaml-tls>

[happy-eyeballs] <https://github.com/roburio/happy-eyeballs>

[RFC 8305] <https://tools.ietf.org/html/rfc8305>

[ca-certs] <https://github.com/mirage/ca-certs>


Hannes Mehnert later added
──────────────────────────

  now [0.0.2] is released that unifies the response type and API
  (previously it was a variant and clients had to write code for both
  HTTP1 and HTTP2). Now, a single record and Status/Headers/Version
  module aliases are provided (very close to HTTP/AF). Enjoy.


[0.0.2] <https://github.com/ocaml/opam-repository/pull/19410>


Other OCaml News
════════════════

From the ocamlcore planet blog
──────────────────────────────

  Here are links from many OCaml blogs aggregated at [OCaml Planet].

  • [Goodbye Core_kernel]
  • [Tarides Engineers to Present at ICFP 2021]
  • [Benchmarking OCaml projects with current-bench]
  • [What the interns have wrought, 2021 edition]


[OCaml Planet] <http://ocaml.org/community/planet/>

[Goodbye Core_kernel] <https://blog.janestreet.com/goodbye-Core_kernel/>

[Tarides Engineers to Present at ICFP 2021]
<https://tarides.com/blog/2021-08-26-tarides-engineers-to-present-at-icfp-2021>

[Benchmarking OCaml projects with current-bench]
<https://tarides.com/blog/2021-08-26-benchmarking-ocaml-projects-with-current-bench>

[What the interns have wrought, 2021 edition]
<https://blog.janestreet.com/what-the-interns-have-wrought-2021/>


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2021-08-24 13:44 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2021-08-24 13:44 UTC (permalink / raw)
  To: lwn, cwn, caml-list

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

Hello

Here is the latest OCaml Weekly News, for the week of August 17 to 24,
2021.

Table of Contents
─────────────────

routes v1.0.0 released
Feather 0.3.0
Release of GopCaml-mode (0.0.3) and GopCaml-mode-Merlin (0.0.4) - Wizardry release
Share my experience about running OCaml on WebAssembly
Old CWN


routes v1.0.0 released
══════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-routes-v1-0-0-released/8319/1>


Anurag Soni announced
─────────────────────

  I'd like to announce release of version 1.0.0 of [routes]. The PR to
  opam repository has been merged, and the new release should be
  available via opam once the package cache refreshes.

  *Routes* provides a DSL for bi-directional URI dispatch. It allows
  writing route definitions that can be used for both matching, and
  printing URI paths.

  Changes since the last opam release:

  • Support for merging two routers by adding a union operation ([#115],
    [@Chattered])
  • Support for wildcard parameters ([#118], [#129], [@Lupus]) ->
    Compile time checks ensure that wildcard parameters can only be
    defined at the end of a route
  • Support `map' operation for path parameter definitions, and support
    defining path prefixes that can be pre-prended to other routes
    ([#121], [@Chattered])
  • Addition of a `ksprintf' style function for routes. ([#123],
    [@Chattered])

  Examples of how to use the library are available in the [tests] and in
  a [small demo]

  Documentation can be found [here]

  *Edit*

  1.0.0 is available via opam now -
  <http://opam.ocaml.org/packages/routes/routes.1.0.0/>


[routes] <https://github.com/anuragsoni/routes/>

[#115] <https://github.com/anuragsoni/routes/pull/115>

[@Chattered] <https://github.com/Chattered>

[#118] <https://github.com/anuragsoni/routes/pull/118>

[#129] <https://github.com/anuragsoni/routes/pull/129>

[@Lupus] <https://github.com/Lupus>

[#121] <https://github.com/anuragsoni/routes/pull/121>

[#123] <https://github.com/anuragsoni/routes/pull/123>

[tests]
<https://github.com/anuragsoni/routes/blob/b9bb8a0f50b7bd9fbd0c79113142ea82830ce2bb/test/routing_test.ml>

[small demo]
<https://github.com/anuragsoni/routes/blob/b9bb8a0f50b7bd9fbd0c79113142ea82830ce2bb/example/no_http.ml>

[here] <https://anuragsoni.github.io/routes/>


Feather 0.3.0
═════════════

  Archive: <https://discuss.ocaml.org/t/ann-feather-0-3-0/8322/1>


Charles announced
─────────────────

  I'm happy to announce Feather 0.3.0! Feather is a minimal library for
  bash-like scripting and process execution.  ([github/tutorial],
  [documentation]) This release adds two major features:


[github/tutorial] <https://github.com/charlesetc/feather>

[documentation]
<https://www.charlesetc.com/feather/feather/Feather/index.html>

1. A new interface for collecting the exit status, stdout, and stderr of a Feather command.
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  For example, you can easily print a process's stderr if it exits
  non-zero:

  ┌────
  │ open Feather;;
  │ let stderr, status =
  │   process "ls" [ "/tmp/does-not-exist" ] |> collect stderr_and_status
  │ in
  │ if status <> 0 then failwith ("ls failed with stderr:\n" ^ stderr)
  └────
  where the types are

  ┌────
  │ val process : string -> string list -> cmd
  │ 
  │ type 'a what_to_collect
  │ val stderr_and_status : (string * int) what_to_collect
  │ 
  │ val collect :
  │   ?cwd:string ->
  │   ?env:(string * string) ->
  │   'a what_to_collect ->
  │   cmd ->
  │   'a
  └────

  as you can imagine, we expose several of these
  `what_to_collect''s. Here's the full set:

  ┌────
  │ val stdout : string what_to_collect
  │ val stderr : string what_to_collect
  │ val status : int what_to_collect
  │ 
  │ val stdout_and_stderr : (string * string) what_to_collect
  │ val stdout_and_status : (string * int) what_to_collect
  │ val stderr_and_status : (string * int) what_to_collect
  │ 
  │ type everything = { stdout : string; stderr : string; status : int }
  │ val everything : everything what_to_collect
  └────
  We considered different design approaches here. I think what we landed
  on keeps the call site readable and the types of the interface simple.

  It should be noted: the simplest way to run a command without
  collecting anything is to use [Feather.run].


[Feather.run]
<https://www.charlesetc.com/feather/feather/Feather/index.html#val-run>


2. The ability to wait on background processes and collect their output.
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  Starting with Feather 0.1.0, you were able to start processes in the
  background, but the only way to wait for them to complete was to use
  Feather's [async wrapper].  For those wanting an async-less,
  direct-style interface, we now expose new methods to do this properly:

  ┌────
  │ type 'a background_process
  │ 
  │ val run_in_background :
  │   ?⁠cwd:string ->
  │   ?⁠env:(string * string) Base.list ->
  │   cmd ->
  │   unit background_process
  │ 
  │ val collect_in_background :
  │   ?cwd:string ->
  │   ?env:(string * string) list ->
  │   'a what_to_collect ->
  │   cmd ->
  │   'a background_process
  │ 
  │ val wait : 'a background_process -> 'a
  │ val wait_all : unit -> unit
  └────
  where an example use might be

  ┌────
  │ let server_process =
  │    process "my-server.exe" [] |> collect_in_background stdout_and_status
  │ in
  │ ... do other things ...
  │ match Feather.wait server_process with
  │ | (stdout, 0) -> ...
  │ | (_, 1) -> ...
  └────

  Thanks again to @Firobe and @tmarti2 for their contributions to this
  release! I think we've made a lot of progress here and I'm excited to
  see where things go :slight_smile:


[async wrapper]
<https://www.charlesetc.com/feather/feather_async/Feather_async/index.html>


Release of GopCaml-mode (0.0.3) and GopCaml-mode-Merlin (0.0.4) - Wizardry release
══════════════════════════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-release-of-gopcaml-mode-0-0-3-and-gopcaml-mode-merlin-0-0-4-wizardry-release/8333/1>


Kiran Gopinathan announced
──────────────────────────

  I'm pleased to announce the latest version of *GopCaml-mode* (0.0.3),
  and the new release of *GopCaml-mode-Merlin* (0.0.4).

  GopCaml-mode-Merlin is a brand *new!* variant of GopCaml-mode that
  uses the Merlin parser rather than the OCaml compiler-libs one, and
  thus has some level of robustness to invalid syntax:

  <https://aws1.discourse-cdn.com/standard11/uploads/ocaml/original/2X/a/a09586b9db3bf19667b6969c701a40f0791a2a9d.gif>

  If that's piqued your interest, I'd recommend checking out the release
  posts for the previous versions for more details on what GopCaml can
  do, and how to get it: [0.0.2 release], [0.0.1 release]

  The Merlin parser seems to assign text-regions for syntactic
  constructs slightly more liberally than the standard OCaml parser, so
  the overlays can feel a bit weird if you're used to the normal GopCaml
  overlays, but the benefit is that all your favorite structural
  movement/transformation operations work even when you're dealing with
  ill-formed programs, allowing for a more fluid editing experience:

  <https://aws1.discourse-cdn.com/standard11/uploads/ocaml/original/2X/9/9f2976b47018e2d892b9cea09da913d07f8c1f00.gif>


[0.0.2 release]
<https://discuss.ocaml.org/t/ann-release-of-gopcaml-mode-0-0-2-unicode-compatibility-update/7425>

[0.0.1 release]
<https://discuss.ocaml.org/t/introducing-gopcaml-mode-structural-ocaml-editing/5310>

Detailed Changelog
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  • *new!* [for GopCaml-mode-Merlin] *Robustness to ill-formated syntax*
    • Vendored a copy of Merlin to reuse its parser and thereby gain
      it's robustness to invalid syntax.
  • *new!* *Added support for customisable verbosity*
    • Customise the Emacs variable `gopcaml-messaging-level` to change
      the level of messages that are output by GopCaml. Set it to
      `'none` to disable messages entirely.
  • *new!* *Fixed bug when starting zipper mode at the start of a file.*
    • Zipper mode selects the immediately prior byte position to avoid
      inconsistencies when the cursor is just on the edge of an
      expression, but when the cursor is at position 1, this causes an
      error as 0 is not a valid point.
  • *new!* *Special casing of shebangs*
    • Added support for handling shebangs at the start of a buffer.
    • Implemented as part of a larger library for preprocessing
      buffertext before running the parser on it - could be extended to
      support additional preprocessing in the future.
    • Another possible direction for extension is to use an Emacs
      callback to modify the text, although this may not be ideal, as
      the parsing has to be as fast as possible.


Get Gopcaml-mode
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  Its as easy as 1, 2, 3!

  1. Install from opam (either `gopcaml-mode` xor
     `gopcaml-mode-merlin`):

     ┌────
     │ opam install gopcaml-mode
     └────
     or
     ┌────
     │ opam install gopcaml-mode-merlin
     └────

  2. Compile your emacs with support for dynamic modules
  3. Load gopcaml-mode in your init.el:
     ┌────
     │ (let ((opam-share (ignore-errors (car (process-lines "opam" "var" "share")))))
     │     (when (and opam-share (file-directory-p opam-share))
     │       ;; Register Gopcaml mode
     │       (add-to-list 'load-path (expand-file-name "emacs/site-lisp" opam-share))
     │ 	(autoload 'gopcaml-mode "gopcaml-mode" nil t nil)
     │ 	(autoload 'tuareg-mode "tuareg" nil t nil)
     │ 	(autoload 'merlin-mode "merlin" "Merlin mode" t)
     │       ;; Automatically start it in OCaml buffers
     │       (setq auto-mode-alist
     │       (append '(("\\.ml[ily]?$" . gopcaml-mode)
     │ 	  ("\\.topml$" . gopcaml-mode))
     │ 	auto-mode-alist))
     │       ))
     └────

  See the [release post ] for version 0.0.1 for detailed instructions on
  how you can install it.


[release post ]
<https://discuss.ocaml.org/t/introducing-gopcaml-mode-structural-ocaml-editing/5310>


Contribute
╌╌╌╌╌╌╌╌╌╌

  • Github: [GitHub - Gopiandcode/gopcaml-mode: [MIRROR] Ultimate Ocaml
    Editing Mode]
  • Gitlab: [Kiran Gopinathan / gopcaml-mode · GitLab ]


[GitHub - Gopiandcode/gopcaml-mode: [MIRROR] Ultimate Ocaml Editing
Mode] <https://github.com/Gopiandcode/gopcaml-mode>

[Kiran Gopinathan / gopcaml-mode · GitLab ]
<https://gitlab.com/gopiandcode/gopcaml-mode>


Share my experience about running OCaml on WebAssembly
══════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/share-my-experience-about-running-ocaml-on-webassembly/8343/1>


Vincent Chan announced
──────────────────────

  In the last two weeks, I was working on migrating OCaml to
  WebAssembly. I wrote an article to share my experience.

  [Run OCaml in the browser by WebAssembly | by Vincent Chan | Aug, 2021
  | Medium]


[Run OCaml in the browser by WebAssembly | by Vincent Chan | Aug, 2021 |
Medium]
<https://okcdz.medium.com/run-ocaml-in-the-browser-by-webassembly-31ce464594c6>


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2021-08-17  6:24 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2021-08-17  6:24 UTC (permalink / raw)
  To: lwn, cwn, caml-list

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

Hello

Here is the latest OCaml Weekly News, for the week of August 10 to 17,
2021.

Table of Contents
─────────────────

http-multipart-formdata v3.0.1 released
Call for participation: ML Family Workshop 2021
Coq-of-ocaml to translate OCaml to Coq
Old CWN


http-multipart-formdata v3.0.1 released
═══════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-http-multipart-formdata-v3-0-1-released/8261/2>


Continuing the thread from last week, Hannes Mehnert asked
──────────────────────────────────────────────────────────

  Thanks for your work on that. I'm curious about the different
  "multipart" libraries now available for OCaml – anyone has a brief
  comparison of them?

  • [http-multipart-formdata] as announced above
  • [multipart_form] by @dinosaure
  • [multipart-form-data] by cryptosense

  Are there functional differences? Correctness? Performance? Or just a
  matter of style and co-development?


[http-multipart-formdata]
<https://github.com/lemaetech/http-multipart-formdata>

[multipart_form] <https://github.com/dinosaure/multipart_form/>

[multipart-form-data]
<https://github.com/cryptosense/multipart-form-data>


Bikal Lem replied
─────────────────

  One obvious difference among the three is `http-multipart-formdata'
  doesn't depend on any IO/Promise libraries, such as lwt or async. so
  you may find it easier to integrate in your project.

  `mulitpart-form-data' exposes a callback based streaming api, whereas
  http-multipart-formdata exposes a non-callback, non-blocking based API
  streaming api.

  The API surface of `http-multipart-formdata' is kept as low as
  possible, primarily 3 API calls - `boundary, reader' and `read' call.

  The dependency list of `http-multipart-formdata' is the thinnest. This
  may or may not be an issue depending on your aesthetics. However,
  relatively/comparatively the less your dependencies, the easier it is
  to integrate the lib with other OCaml libs and environments such as
  various OSes.


Bikal Lem added
───────────────

  I should also add `http-multipart-formdata' has been implemented with
  zero-copy streaming and minimal allocation in mind.


Call for participation: ML Family Workshop 2021
═══════════════════════════════════════════════

  Archive:
  <https://sympa.inria.fr/sympa/arc/caml-list/2021-08/msg00005.html>


Jonathan Protzenko announced
────────────────────────────

  We are happy to announce that the ML Family Workshop is back for its
  2021 edition, which we will be held online on Thursday August 26th, in
  conjunction with ICFP 2021. We invite you to subscribe to, and attend
  the workshop, in addition to the main ICFP conference.

  We are thrilled to announce that Don Syme will give this year's
  keynote: "Narratives and Lessons from The Early History of F#". Please
  join us!

  The program features 14 exciting submissions, including 4 short talks.
  The workshop will be held online in the 6pm-3am time band (Seoul
  Time).  Talks will be pre-recorded and uploaded online for those who
  cannot attend.

  • Program:
    <https://icfp21.sigplan.org/home/mlfamilyworkshop-2021#program>
  • Keynote:
    <https://icfp21.sigplan.org/details/mlfamilyworkshop-2021-papers/15/Keynote-Narratives-and-Lessons-from-The-Early-History-of-F>-
  • ICFP home: <http://icfp21.sigplan.org/home>


Program committee
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  • Danel Ahman (University of Ljubljana)
  • Robert Atkey (University of Strathclyde)
  • Frédéric Bour (Tarides)
  • Ezgi Çiçek (Facebook London)
  • Youyou Cong (Tokyo Institute of Technology)
  • Richard A. Eisenberg (Tweag I/O)
  • Martin Elsman (University of Copenhagen, Denmark)
  • Ohad Kammar (University of Edinburgh)
  • Naoki Kobayashi (University of Tokyo, Japan)
  • Benoît Montagu (Inria)
  • Jonathan Protzenko (Microsoft Research) (Chair)
  • Kristina Sojakova (INRIA Paris)
  • Don Syme (Microsoft)
  • Matías Toro (University of Chile)
  • Katsuhiro Ueno (Tohoku University)


Coq-of-ocaml to translate OCaml to Coq
══════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/coq-of-ocaml-to-translate-ocaml-to-coq/8288/1>


Guillaume Claret announced
──────────────────────────

  I am pleased to present the [coq-of-ocaml] project, to translate a
  subset of OCaml to the [Coq] proof assistant. The aim is to do formal
  verification on OCaml programs. The idea is to generate a Coq
  translation as close as possible to the original code in terms of
  intent but using the Coq syntax. As a short example, if we take the
  following OCaml code and run `coq-of-ocaml':
  ┌────
  │ type 'a tree =
  │ | Leaf of 'a
  │ | Node of 'a tree * 'a tree
  │ 
  │ let rec sum tree =
  │   match tree with
  │   | Leaf n -> n
  │   | Node (tree1, tree2) -> sum tree1 + sum tree2
  └────
  we get the following Coq file:
  ┌────
  │ Require Import CoqOfOCaml.CoqOfOCaml.
  │ Require Import CoqOfOCaml.Settings.
  │ 
  │ Inductive tree (a : Set) : Set :=
  │ | Leaf : a -> tree a
  │ | Node : tree a -> tree a -> tree a.
  │ 
  │ Arguments Leaf {_}.
  │ Arguments Node {_}.
  │ 
  │ Fixpoint sum (tree : tree int) : int :=
  │   match tree with
  │   | Leaf n => n
  │   | Node tree1 tree2 => Z.add (sum tree1) (sum tree2)
  │   end.
  └────

  We support the following OCaml features:
  • the core of OCaml (functions, let bindings, pattern-matching,…)
  • type definitions (records, inductive types, synonyms, mutual types)
  • monadic programs
  • modules as namespaces
  • modules as polymorphic records (signatures, functors, first-class
    modules)
  • multiple-file projects (thanks to Merlin)
  • both `.ml' and `.mli' files
  • existential types (we use impredicative sets option in Coq)

  We also have some support for the GADTs, the polymorphic variants, and
  the extensible types.  We are in particular working on having an
  axiom-free translation of the GADTs to Coq. We do not support:
  • side-effects outside of a monad (references, exceptions, …);
  • object-oriented programming;
  • various combinations of OCaml features for which `coq-of-ocaml'
    should generate a warning.

  Our main example and use case is the [coq-tezos-of-ocaml]
  project. This contains a translation of most of the [economic
  protocol] of the [Tezos] blockchain (around 30.000 lines of OCaml
  translated to 40.000 lines of Coq). For example, we verify the
  comparison functions defined in
  [src/proto_alpha/lib_protocol/script_comparable.ml] with
  [src/Proto_alpha/Proofs/Script_comparable.v].

  We are looking for the application to other projects too.

  We think the best way to use `coq-of-ocaml' is to continue developing
  in OCaml and run `coq-of-ocaml' to keep a synchronized translation in
  Coq. Having a working Coq translation (as compiling in Coq) forces us
  to avoid some OCaml constructs. We believe these constructs would
  probably be hard to verify anyway. Then, on the Coq side, we can
  verify some important or easy to catch properties. If there is a
  regression in the OCaml code, re-running `coq-of-ocaml' should make
  the proofs break.


[coq-of-ocaml] <https://clarus.github.io/coq-of-ocaml/>

[Coq] <https://coq.inria.fr/>

[coq-tezos-of-ocaml]
<https://nomadic-labs.gitlab.io/coq-tezos-of-ocaml/>

[economic protocol]
<https://gitlab.com/tezos/tezos/-/tree/master/src/proto_alpha/lib_protocol>

[Tezos] <https://tezos.com/>

[src/proto_alpha/lib_protocol/script_comparable.ml]
<https://gitlab.com/tezos/tezos/-/blob/master/src/proto_alpha/lib_protocol/script_comparable.ml>

[src/Proto_alpha/Proofs/Script_comparable.v]
<https://nomadic-labs.gitlab.io/coq-tezos-of-ocaml/docs/proofs/script_comparable>


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2021-08-10 16:47 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2021-08-10 16:47 UTC (permalink / raw)
  To: lwn, cwn, caml-list

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

Hello

Here is the latest OCaml Weekly News, for the week of August 03 to 10,
2021.

Table of Contents
─────────────────

Lwt 5.4.2
OCaml Workshop 2021: Call for Volunteers
opam 2.1.0!
containers 3.5
Short contract job for OCaml/C++ programmer
http-multipart-formdata v3.0.1 released
wtr (Well Typed Router) v2.0.0 released
New playlist just dropped
Other OCaml News
Old CWN


Lwt 5.4.2
═════════

  Archive: <https://discuss.ocaml.org/t/ann-lwt-5-4-2/8248/1>


Raphaël Proust announced
────────────────────────

  We are glad to announce the release of version 5.4.2 of Lwt: a
  bugfix-only release.

  <https://github.com/ocsigen/lwt/releases/tag/5.4.2>

  You can update to this version in `opam' :

  ┌────
  │ opam update
  │ opam upgrade lwt
  └────

  Thanks to the contributors for finding and fixing the bugs, leading to
  this release. Check out the release notes (link above) for a full
  list.


OCaml Workshop 2021: Call for Volunteers
════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ocaml-workshop-2021-call-for-volunteers/8253/1>


Frédéric Bour announced
───────────────────────

  The OCaml Workshop will be held virtually, just like last year. We are
  looking for volunteers to fill the role of session host.


[Session Hosts]
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  On August 27, the session hosts will assist session chairs in
  streaming the pre-recorded videos as well as helping and moderating
  the Q&A sessions. They will also be responsible for security and be
  ready to react to potential threats and wrongdoers.

  This year there will be only one broadcast for each session, but the
  workshop day will be quite long. There will be six sessions, lasting
  one hour and a half, as well as a one hour keynote.


[Session Hosts]
<https://icfp20.sigplan.org/home/ocaml-2020#session-hosts>

[Duties]
┄┄┄┄┄┄┄┄

  • Moderating the text chats
  • Controlling microphones in the video-conferencing
  • Watching for the time
  • Performing sound checks
  • Welcoming and otherwise guiding participants


[Duties] <https://icfp20.sigplan.org/home/ocaml-2020#duties>


opam 2.1.0!
═══════════

  Archive: <https://discuss.ocaml.org/t/ann-opam-2-1-0/8255/1>


R. Boujbel announced
────────────────────

  We are happy to announce two opam releases: the freshly new [2.1.0] &
  the LTS support [2.0.9].


[2.1.0] <https://github.com/ocaml/opam/releases/tag/2.1.0>

[2.0.9] <https://github.com/ocaml/opam/releases/tag/2.0.9>

What's new in opam 2.1.0?
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  • Integration of system dependencies (formerly the `opam-depext`
    plugin), increasing their reliability as it integrates the solving
    step
  • Creation of lock files for reproducible installations (formerly the
    `opam-lock` plugin)
  • Switch invariants, replacing the _"base packages"_ in opam 2.0 and
    allowing for easier compiler upgrades
  • Improved options configuration (see the new `option` and expanded
    `var` sub-commands)
  • CLI versioning, allowing cleaner deprecations for opam now and also
    improvements to semantics in future without breaking
    backwards-compatibility
  • opam root readability by newer and older versions, even if the
    format changed
  • Performance improvements to opam-update, conflict messages, and many
    other areas

  You'll find these features presentation in the [blog post] ; and for a
  full complete you can take a look [pre-releases changelogs].


[blog post] <https://opam.ocaml.org/blog/opam-2-1-0>

[pre-releases changelogs] <https://github.com/ocaml/opam/releases>


What's in 2.0.9
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  This 2.0.9 version contains back-ported fixes, you can find more
  information in this [blog post], especially for fish users & sandbox
  updates.

  *Tremendous thanks to all involved people, all those who've tested,
   re-tested, tested again, given feedback, commented on issues, tested,
   tested, tested again…!*

  /The opam team/ 🐪


[blog post] <https://opam.ocaml.org/blog/opam-2-0-9>


containers 3.5
══════════════

  Archive: <https://discuss.ocaml.org/t/ann-containers-3-5/8257/1>


Simon Cruanes announced
───────────────────────

  I'm glad to announce that version 3.5 of [containers] has just been
  released. There's a bugfix for bitvectors, and a tasteful assortment
  of new functions (see changelog). I want to thank all the
  contributors, among whom first time contributor @favonia.

  The release and changelog can be found [here]


[containers] <https://github.com/c-cube/ocaml-containers>

[here] <https://github.com/c-cube/ocaml-containers/releases/tag/v3.5>


Short contract job for OCaml/C++ programmer
═══════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/short-contract-job-for-ocaml-c-programmer/8260/1>


Ashish Agarwal announced
────────────────────────

  We have a small project (possibly only days of work) for an
  experienced OCaml and C++ programmer. If you are available for a short
  engagement as a contractor, please DM me. Thank you.


http-multipart-formdata v3.0.1 released
═══════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-http-multipart-formdata-v3-0-1-released/8261/1>


Bikal Lem announced
───────────────────

  I am pleased to announce v3.0.1 of `http-multipart-formdata'. This
  release follows a major overhaul of the parser as well as the design
  of the library. Here is the summary of changes:

  1. Flatten module `Part_header' to `part_header'
  2. Implement reader/pull based parser to retrieve multipart parts,
     i.e. implement a `streaming' design. This is very useful if the
     HTTP file upload is large.
  3. Implement push-based incremental input model, i.e. the library is
     now a non-blocking multipart parser
  4. Remove dependency on IO based libs such as `lwt, async' since it is
     no longer needed due to point 3 above.

  Github repo: [http-multipart-formdata]

  API doc : [API manual]


[http-multipart-formdata]
<https://github.com/lemaetech/http-multipart-formdata>

[API manual]
<https://lemaetech.co.uk/http-multipart-formdata/http-multipart-formdata/Http_multipart_formdata/index.html>


wtr (Well Typed Router) v2.0.0 released
═══════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-wtr-well-typed-router-v2-0-0-released/8262/1>


Bikal Lem announced
───────────────────

  I am pleased to announce v2.0.0 release of `wtr (Well Typed
  Router)'. `wtr' is a trie-based router for OCaml HTTP web
  applications.

  v2.0.0 release adds support for specifying and matching HTTP methods
  in a router. So now we can do the following;
  ┌────
  │ Wtr.(
  │     create
  │       [ {%wtr| get,post,head,delete  ; /home/about/  |} about_page
  │       ; {%wtr| head                  ; /home/:int/   |} prod_page
  │       ]
  └────
  Note: we can specify single or multiple HTTP methods supported by a
  route.

  The release also features a pretty-printer - `Wtr.pp' - for a `Wtr.t'
  type. This has proven to be very useful when diagnosing/understanding
  routing issues. Sample output below,
  ┌────
  │ POST
  │   /home
  │     /about
  │       /
  │     /:float
  │       /
  │ HEAD
  │   /home
  │     /about
  │       /
  │     /:int
  │       /
  └────

  The manual has also been improved in this release.

  • [wtr API]
  • [CoHTTP demo]
  • [CLI demo]
  • [Changes v2.0.0]


[wtr API] <https://lemaetech.co.uk/wtr/wtr/Wtr/index.html>

[CoHTTP demo]
<https://github.com/lemaetech/wtr/blob/main/examples/cohttp.ml>

[CLI demo] <https://github.com/lemaetech/wtr/blob/main/examples/demo.ml>

[Changes v2.0.0]
<https://github.com/lemaetech/wtr/blob/main/CHANGES.md#v200-2021-08-02>


New playlist just dropped
═════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/new-playlist-just-dropped/8272/1>


Rahul announced
───────────────

  Haven't watched them all yet, but these look like they'd be a great
  resource for anyone wanting to learn OCaml:
  <https://www.youtube.com/watch?v=MUcka_SvhLw&list=PLre5AT9JnKShBOPeuiD9b-I4XROIJhkIU>


Other OCaml News
════════════════

From the ocamlcore planet blog
──────────────────────────────

  Here are links from many OCaml blogs aggregated at [OCaml Planet].

  • [opam 2.1.0 is released!]
  • [opam 2.0.9 release]


[OCaml Planet] <http://ocaml.org/community/planet/>

[opam 2.1.0 is released!]
<https://www.ocamlpro.com/2021/08/05/opam-2-1-0-is-released/>

[opam 2.0.9 release]
<https://www.ocamlpro.com/2021/08/05/opam-2-0-9-release/>


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2021-07-27  8:54 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2021-07-27  8:54 UTC (permalink / raw)
  To: lwn, cwn, caml-list

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

Hello

Here is the latest OCaml Weekly News, for the week of July 20 to 27,
2021.

Table of Contents
─────────────────

pyre-ast: full-fidelity Python parser in OCaml
OCaml+Opam Images for Docker for Windows
Borns a stream talking about OCaml/Reason & ReScript language
An Update on the State of the PPX Ecosystem and `ppxlib''s Transition
How to send email from Dream
Old CWN


pyre-ast: full-fidelity Python parser in OCaml
══════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-pyre-ast-full-fidelity-python-parser-in-ocaml/8177/1>


Jia Chen announced
──────────────────

  I am happy to announce the initial opam release of [`pyre-ast'], a
  Python parsing library.

  The library features its full-fidelity to the official Python
  spec. Apart from a few technical edge cases, as long as a given file
  can be parsed/rejected by the CPython interpreter, `pyre-ast' will be
  able to parse/reject it as well. Furthermore, abstract syntax trees
  obtained from `pyre-ast' is guaranteed to 100% match the results
  obtained by Python's own `ast.parse' API, down to every AST node and
  every line/column number.

  Another notable feature of this library is that it represents the
  Python syntax using the *tagless-final style*. This style typically
  offers more flexibility and extensibility for the downstream consumers
  of the syntax, and allow them to build up their analysis without
  explicitly constructing a syntax tree. That said, for developers who
  are less familiar with the tagless-final approach, we also offer
  alternative interfaces that operates on traditional syntax tree
  represented as algebraic data types.

  Documentation of the library can be found [here].

  The reason why we can can claim full-conformance with CPython is
  really simple: the library is, under the hood, merely an OCaml wrapper
  around the parsing logic in CPython source code.  The project was
  initially motivated to replace the custom `menhir'-based parser
  currently used in the Pyre type checker (hence the name), but I
  figured that it would be useful to release this as a standalone `opam'
  package to the community so other static Python analyzers or other
  DSLs with Python-based syntax can leverage it as well.

  The library has yet to be put into production for Pyre (I'm working on
  it though) so please do expect bugs/jankiness at times. Feedback and
  bug reports are very welcomed.

  Happy parsing!


[`pyre-ast'] <https://github.com/grievejia/pyre-ast>

[here] <https://grievejia.github.io/pyre-ast/doc/pyre-ast/>


OCaml+Opam Images for Docker for Windows
════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-ocaml-opam-images-for-docker-for-windows/8179/1>


Antonin Décimo announced
────────────────────────

  I'm glad to announce the availability of OCaml and opam [native
  Windows Container][windows-containers] images for Docker for
  Windows. This is the result of my hard work at Tarides, with precious
  help from @dra27, @talex5, @avsm, and the rest of the team.

  They can be found under the [ocaml/opam][hub] repository in the Docker
  Hub. Try them with [Docker for Windows][docker-for-windows]! Be sure
  to [switch Docker to Native Windows Containers][enable-native].

  ┌────
  │ docker run -it ocaml/opam:windows-mingw
  │ docker run -it ocaml/opam:windows-msvc
  └────

  We provide images for the mingw-w64 (from OCaml 4.02 to 4.12) and the
  MSVC (from OCaml 4.06 to 4.12) ports. They are based on each release
  of Windows 10 amd64 currently supported by [Microsoft on the Docker
  Hub][mcr]. The images use opam 2.0, and we plan to update to opam 2.1
  when it's released. The images also ship a [Cygwin][cygwin]
  installation, [Git for Windows][git-for-windows], and the [winget
  package manager][winget].

  We use @fdopen's [OCaml for Windows][ocaml-for-windows] distribution
  and opam-repository fork. As it is getting deprecated at the end of
  August 2021, we'll transition to opam 2.1 and the standard
  opam-repository when that happens.

  In order to get the correct environment for any `RUN' command
  involving OCaml or opam, prefix the command with

  • `ocaml-env exec --64 --' if based on mingw-w64; or
  • `ocaml-env exec --64 --ms=vs2019 --' if based on MSVC.

  The images are built at <https://base-images.ocamllabs.io/>, using an
  [OCurrent][ocurrent] pipeline that [builds Docker
  images][docker-base-images]. You can rebuild them yourself using the
  [OCluster][ocluster] set of tools that I have ported to Windows.

  We provide a comprehensive set of tags (replace _port_ with either
  _mingw_ or _msvc_):
  • `windows-port': the latest version of OCaml for each Windows
    version;
  • `windows-port-winver': the latest version of OCaml for Windows 10
    _winver_;
  • `windows-port-ocaml-mlver': OCaml version _mlver_ for each Windows
    version;
  • `windows-port-winver-ocaml-mlver': OCaml version _mlver_ for Window
    10 _winver_.

  When the Windows version is not specified in the tag, the image is a
  multiarch image that will work on every supported version of Windows
  10. Docker automatically selects the appropriate one based on the host
  version.

  We will be using these images in the upcoming `ocaml-ci' and
  `opam-repo-ci' for Windows.

  Further work on these include the transition to opam 2.1, and we'll
  provide the Cygwin port of OCaml when it's fixed upstream and
  available in the Cygwin package repository.

  Happy hacking!


Borns a stream talking about OCaml/Reason & ReScript language
═════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-borns-a-stream-talking-about-ocaml-reason-rescript-language/8185/1>


David Sancho announced
──────────────────────

  I'm very excited to announce starting a new show in Twitch to bring
  OCaml, Reason and ReScript community best brains to casually
  talk. It's called emelleTV

  It's made by [@fakenickels] and myself [@davesnx], and we will try to
  do our best!

  Our first guest is [@___zth___]

  <https://aws1.discourse-cdn.com/standard11/uploads/ocaml/optimized/2X/e/e9f08607687aeb843968a430e4e9082541cf87c2_2_1380x690.jpeg>

  We go live on [http://twitch.tv/emelletv] next Wednesday.  Subscribe
  to not miss it!

  Thanks for reading, hope to see you there!


[@fakenickels] <https://twitter.com/fakenickels>

[@davesnx] <https://twitter.com/davesnx>

[@___zth___] <https://twitter.com/___zth___>

[http://twitch.tv/emelletv] <http://twitch.tv/emelletv>


An Update on the State of the PPX Ecosystem and `ppxlib''s Transition
═════════════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/an-update-on-the-state-of-the-ppx-ecosystem-and-ppxlib-s-transition/8200/1>


Sonja Heinze announced
──────────────────────

  I hope you're all having a nice summer (or a nice whichever season
  you're in, of course)!  We've set up a new [wiki page on the ppxlib
  repository] containing a status overview of the current `ppxlib'
  transition, which aims at keeping the PPX ecosystem always
  up-to-date. We'll keep that wiki page up-to-date, as well.

  @jeremiedimino and @NathanReb have already explained our three-part
  plan for this transition in different posts here on discuss. Nothing
  has changed in that plan, but it has been a while since we [last
  posted about the overall transition] and even longer since we [last
  posted about the `Astlib' transition in detail]. So if you want, you
  can refresh your memory about that transition and get updated about
  its current state (in more detail than the new wiki page) by reading
  this post.


[wiki page on the ppxlib repository]
<https://github.com/ocaml-ppx/ppxlib/wiki/The-State-of-the-PPX-Transition>

[last posted about the overall transition]
<https://discuss.ocaml.org/t/ppxlib-0-22-an-update-on-the-state-of-ppx/7296>

[last posted about the `Astlib' transition in detail]
<https://discuss.ocaml.org/t/ppx-omp-2-0-0-and-next-steps/6231>

Which Issues `ppxlib' was Facing
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  With `ocaml-migrate-parsetree' (`OMP'), the PPX ecosystem became
  cross-compiler-compatible.  With `ppxlib', the latest compiler
  features were supported more easily and broadly within the PPX
  ecosystem, while `ppxlib' also brought along other improvements such
  as the one in performance and the clear composition semantics when
  using several PPXs. With that, both `OMP' and `ppxlib' have taken away
  several maintenance burdens from the PPX maintainers and have created
  a more homogeneous and up-to-date PPX ecosystem. However, we were
  facing the following issues:
  1. To keep the PPX ecosystem cross-compiler compatible
     1. `ppxlib' was handling parts of the unstable `compiler-libs' API
        to abstracting them away;
     2. the `OMP~/~ppxlib' maintainers needed to keep the AST migration
        information up-to-date by coordination with the compiler devs.
  2. To guarantee new feature support, `ppxlib' needed to bump the
     `ppxlib' AST to the newest version.
  3. Bumping the AST implies a breaking change. That was an issue for a
     homogeneous and up-to-date PPX ecosystem.
  4. Not all PPXs migrated from `OMP' to `ppxlib'. That was also an
     issue for a homogeneous and up-to-date PPX ecosystem.

  Some time ago, there was the very ambitious plan of tackling Issues 1,
  2, and 3 all at once by writing a stable AST abstraction and
  upstreaming it to the compiler. That plan has been put on ice for
  now. Instead we're currently on track with a more down-to-earth plan,
  outlined below.


Tackling the Issues in Three Parts
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  The plan we're currently following contains three simultaneous
  parts. It approaches three of the four issues I've pointed out
  above. However, it leaves the need to bump the AST (Issue 2)
  untouched.


Part One: `Astlib' as an Interface between `ppxlib' and the Compiler
┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄

  The first part works towards continuous cross-compiler compatibility
  (Issue 1 above) while making the situation of still having PPXs based
  on `OMP' (Issue 4 above) even more of a problem. It consists of
  implementing an interface module called `Astlib' between `ppxlib' and
  the compiler, then upstreaming it to the compiler. As long as `Astlib'
  is stable and up-to-date, the rest of `ppxlib' won't be affected by
  any compiler changes—neither by new AST versions nor by compiler
  library changes.

  The first step of this part of the plan was moving the `OMP' driver
  and other `OMP' features from `OMP' to `ppxlib'. That was done in
  August 2020, and it introduced `OMP2'. Since the PPX driver has to be
  unique, this was the start of having the PPX ecosystem split into the
  two incompatible worlds of `OMP1' PPXs on one hand and `ppxlib' PPXs
  on the other hand.

  By now, we have written [`Astlib' as an internal `ppxlib' library] and
  have reduced `ppxlib''s compiler library usage as much as possible to
  keep `Astlib' minimal. As you can see, it contains a minimal compiler
  library sub-API in addition to the former `OMP' modules of our
  supported ASTs and the migration information between them. We will
  upstream `Astlib' to the compiler asking for it to be kept stable and
  up-to-date, while also keeping our local copy for old compiler
  support.


[`Astlib' as an internal `ppxlib' library]
<https://github.com/ocaml-ppx/ppxlib/tree/master/astlib>


Part Two: Sending Patch PRs when Bumping the AST
┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄

  So, thanks to Part One of the plan, `ppxlib' will always be compatible
  with the development compiler _OCaml trunk_ and the newest compiler
  version. However, to also support the newest compiler features, we
  need to bump the internal `ppxlib' AST to the newest version. That
  modifies some of the AST nodes and so it breaks any PPX that rewrites
  one of those nodes (Issue 3 above). Usually just a handful of PPXs are
  affected, but we still want them to be up-to-date.

  Our current plan doesn't provide a solution for that problem, but it
  does make handling the problem more efficient and, once again, it
  takes away the burden from the PPX maintainers.  Since the AST bump to
  `4.10', whenever we bump the AST, we send patch PRs to the PPXs we
  break. Not much has changed since February, when @NathanReb last
  [explained our workflow of sending patch PRs] in detail.  To some it
  up: we create a workspace with all `ppxlib' reverse dependencies on
  opam fulfilling a certain standard, which we call the
  _ppx-universe_. We then fix the PPXs that break all at once and open
  the PRs.

  Lately, the _ppx-universe_ has also proven very useful to make
  well-founded decisions regarding our API by having an easy look at our
  reverse dependencies. You can find a [_ppx-universe_ snapshot],
  currently from March, on our repo.

  In our experience, once the _ppx-universe_ is created and "builds up
  to the expected breakages," writing a couple of patches takes very
  little time, so we plan to make the tooling that creates and interacts
  with the workspace more sophisticated.


[explained our workflow of sending patch PRs]
<https://discuss.ocaml.org/t/ppxlib-0-22-an-update-on-the-state-of-ppx/7296>

[_ppx-universe_ snapshot] <https://github.com/ocaml-ppx/ppx_universe>


Part Three: Porting PPXs to Put an End to the "Split-World Situation"
┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄

  As explained above, Part One split the PPXs into the two incompatible
  worlds of `OMP1' PPXs on one hand and `ppxlib' PPXs on the other
  hand. That made the fact that some PPXs were still based on `OMP'
  (Issue 4 above) even more of a problem. For some PPX maintainers, the
  reason to avoid porting their PPXs to `ppxlib' was that `ppxlib'
  depended on `base' and `stdio', so we decided to tackle this situation
  by three means:

  • Dropping the `base' and the `stdio' dependencies, which was done in
    August last year. Now, all dependencies are the very basic `ocaml',
    `dune', `ocaml-compiler-libs', `stdlib-shims', `sexplib0' and
    `ppx_derivers'.
  • Porting and reviewing some of the most important PPXs ourselves. So
    far we've ported `js_of_ocaml', `bisect_ppx', and `tyxml' with the
    help of the respective maintainers, and we've also reviewed several
    ports.
  • Spreading the word about the need to port PPXs and asking for help.

  About a year ago, we made a non-exhaustive [list of PPXs that needed
  to be ported].  Since then, this community has proven to be awesome
  and there has been an amazing porting effort by a lot of people. So by
  now, all packages on that list have been ported with the exception of
  one(*). So hopefully the "split world" situation can soon be
  considered past.  :tada:

  By the way, thanks to all involved in porting PPXs to `ppxlib'! It has
  been a great joint effort so far. :heart: And if anyone still has or
  comes across a project somewhere that needs porting and wants to port
  it, that's awesome!

  You can find the full list of opam packages that are still stuck in
  the `OMP1' world by [filtering for them in opam's health check
  pipeline].  However, notice that that's a generated list, so it also
  contains libraries that intrinsically form part of the `OMP1'
  ecosystem (such as `ppx_tools_versioned'), PPXs that have already been
  ported but haven't relesed their port on opam yet (such as
  `graphql_ppx'), deprecated PPXs that aren't marked as deprecated yet
  (such as `mirage-dns'), and several PPXs that only transitively depend
  on `OMP1'.

  (*) `ppx_import' has a PR for a port to `ppxlib', but it's not quite
  ready to be merged just yet.


[list of PPXs that needed to be ported]
<https://github.com/ocaml-ppx/ppxlib/issues?q=is%3Aissue+label%3Aport-to-ppxlib+>

[filtering for them in opam's health check pipeline]
<http://check.ocamllabs.io:8080/?comp=4.12&available=4.12&show-latest-only=true&sort-by-revdeps=true&maintainers=&logsearch=ocaml-migrate-parsetree%5C.1%5C.8%5C.0&logsearch_comp=4.12>


How to send email from Dream
════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/how-to-send-email-from-dream/8201/1>


Joe Thomas announced
────────────────────

  I’ve written a short [blog post ] about what I learned building simple
  email features for a web server written in the Dream framework. The
  accompanying source code is available here:

  <https://github.com/jsthomas/dream-email-example>

  I’m interested in adding more examples and tutorials to the OCaml
  ecosystem and would be happy to get your feedback, positive or
  negative, on this write-up (here or via email/github/discord).


[blog post ] <https://jsthomas.github.io/ocaml-email.html>


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2021-07-20 12:58 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2021-07-20 12:58 UTC (permalink / raw)
  To: lwn, cwn, caml-list

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

Hello

Here is the latest OCaml Weekly News, for the week of July 13 to 20,
2021.

Table of Contents
─────────────────

Writing a REST API with Dream
OTOML 0.9.0 — a compliant and flexible TOML parsing, manipulation, and pretty-printing library
soupault: a static website generator based on HTML rewriting
OCaml 4.13.0, second alpha release
OCamlFormat 0.19.0
OCaml Café: Wed, Aug 4 @ 7pm (U.S. Central)
Old CWN


Writing a REST API with Dream
═════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/writing-a-rest-api-with-dream/8150/1>


Joe Thomas announced
────────────────────

  I've written a short [blog post] about the positive experience I had
  using Dream to build a REST API. The accompanying source code is
  available here:

  <https://github.com/jsthomas/sensors>

  I'm interested in adding more examples and tutorials to the OCaml
  ecosystem and would be happy to get your feedback on this writeup
  (here or via email/github).


[blog post] <https://jsthomas.github.io/ocaml-dream-api.html>


OTOML 0.9.0 — a compliant and flexible TOML parsing, manipulation, and pretty-printing library
══════════════════════════════════════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-otoml-0-9-0-a-compliant-and-flexible-toml-parsing-manipulation-and-pretty-printing-library/8152/1>


Daniil Baturin announced
────────────────────────

  I don't really like to base a release announcement on bashing another
  project, but this whole project is motivated by my dissatisfaction
  with [To.ml]—the only TOML library for OCaml, so here we go. OTOML is
  a TOML library that you (hopefully) can use without writing long rants
  afterwards. ;)

  In short:

  • [TOML 1.0-compliant] (To.ml is not).
  • Good error reporting.
  • Makes it easy to look up nested values.
  • Bignum and calendar libraries are pluggable via functors.
  • Flexible pretty-printer with indentation.

  OPAM: <https://opam.ocaml.org/packages/otoml/> GitHub:
  <https://github.com/dmbaturin/otoml>

  Now let's get to details.

  TOML is supposed to be human-friendly so that people can use it as a
  configuration file format. For that, both developer and end-user
  experience must be great. To.ml provides neither. I've been using
  To.ml in my projects for a long time, and


[To.ml] <https://opam.ocaml.org/packages/toml/>

[TOML 1.0-compliant] <https://toml.io/en/v1.0.0>

Standard compliance
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  TOML is neither minimal nor obvious really, it's much larger than the
  commonly used subset and the spec is not consistent and not easy to
  read, but To.ml fails at rather well-known things, like dotted keys,
  arrays of tables and heterogeneous arrays.

  OTOML passes all tests in the [test suite], except the tests related
  to bignum support. Those tests fail because the default implementation
  maps integers and floats to the native 31/63-bit OCaml types. More on
  that later.


[test suite] <https://github.com/BurntSushi/toml-test>


Error reporting
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  Let's look at error reporting. To.ml's response to any parse error is
  a generic error with just line and column numbers.

  ┌────
  │ utop # Toml.Parser.from_string "foo = [" ;;
  │ - : Toml.Parser.result =
  │ `Error
  │   ("Error in <string> at line 1 at column 7 (position 7)",
  │    {Toml.Parser.source = "<string>"; line = 1; column = 7; position = 7})
  └────

  Menhir offers excellent tools for error reporting, so I took time to
  make descriptive messages for many error conditions (there _are_
  generic "syntax error" messages still, but that's better than nothing
  at all).

  ┌────
  │ utop # Otoml.Parser.from_string_result "foo = [" ;;
  │ - : (Otoml.t, string) result =
  │ Error
  │  "Syntax error on line 1, character 8: Malformed array (missing closing square bracket?)\n"
  │ 
  │ utop # Otoml.Parser.from_string_result "foo = {bar " ;;
  │ - : (Otoml.t, string) result =
  │ Error
  │  "Syntax error on line 1, character 12: Key is followed by end of file or a malformed TOML construct.\n"
  └────


Looking up nested values
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  Nested sections are common in configs and should be easy to work
  with. This is how you do it in OTOML:

  ┌────
  │ utop # let t = Otoml.Parser.from_string "[this.is.a.deeply.nested.table]
  │ answer=42";;
  │ val t : Otoml.t =
  │   Otoml.TomlTable
  │    [("this",
  │      Otoml.TomlTable...
  │ 
  │ utop # Otoml.find t Otoml.get_integer ["this"; "is"; "a"; "deeply"; "nested"; "table"; "answer"] ;;
  │ - : int = 42
  └────

  For comparison, this is how it was done in To.ml:

  ┌────
  │ utop # let toml_data = Toml.Parser.(from_string "
  │ [this.is.a.deeply.nested.table]
  │ answer=42" |> unsafe);;
  │ val toml_data : Types.table = <abstr>
  │ 
  │ utop # Toml.Lenses.(get toml_data (
  │   key "this" |-- table
  │   |-- key "is" |-- table
  │   |-- key "a" |-- table
  │   |-- key "deeply" |-- table
  │   |-- key "nested" |-- table
  │   |-- key "table" |-- table
  │   |-- key "answer"|-- int ));;
  │ - : int option = Some 42
  └────


Extra dependencies
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  The TOML spec includes first-class RFC3339 dates, for better or
  worse. The irony is that most uses of TOML (and, indeed, most
  configuration files in the world) don't need that, so it's arguably a
  feature bloat—but if we set out to support TOML as it's defined, that
  question is academic.

  The practical implication is that if the standard library of a
  language doesn't include a datetime type, a TOML library has to decide
  how to represent those values. To.ml makes ISO8601 a hard dependency,
  so if you don't use dates, you end up with a useless dependency. And
  if you prefer another library (or need functionality no present in
  ISO8601), you end up with two libraries: one you chose to use, and one
  more forced on you.

  Same goes for the arbitrary precision arithmetic. Most configs won't
  need it, but the standard demands it, so something needs to be done.

  Luckily, in the OCaml land we have functors, so it's easy to make all
  these dependencies pluggable. So I made it a functor that takes three
  modules.

  ┌────
  │ module Make (I : TomlInteger) (F : TomlFloat) (D : TomlDate) :
  │   TomlImplementation with type toml_integer = I.t and type toml_float = F.t and type toml_date = D.t
  └────

  This is how to use Zarith for big integers and keep the rest
  unchanged:

  ┌────
  │ (* No signature ascription:
  │    `module BigInteger : Otoml.Base.TomlInteger` would make the type t abstract,
  │    which is inconvenient.
  │  *)
  │ module BigInteger = struct
  │   type t = Z.t
  │   let of_string = Z.of_string
  │   let to_string = Z.to_string
  │   let of_boolean b = if b then Z.one else Z.zero
  │   let to_boolean n = (n <> Z.zero)
  │ end
  │ 
  │ module MyToml = Otoml.Base.Make (BigInteger) (Otoml.Base.OCamlFloat) (Otoml.Base.StringDate)
  └────


Printing
╌╌╌╌╌╌╌╌

  To.ml's printer can print TOML at you, that's for certain. No
  indentation, nothing to help you navigate nested values.

  ┌────
  │ utop # let toml_data = Toml.Parser.(from_string "[foo.bar]\nbaz=false\n [foo.quux]\n xyzzy = [1,2]" |> unsafe) |>
  │ Toml.Printer.string_of_table |> print_endline;;
  │ [foo.bar]
  │ baz = false
  │ [foo.quux]
  │ xyzzy = [1, 2]
  └────

  We can do better:

  ┌────
  │ utop # let t = Otoml.Parser.from_string "[foo.bar]\nbaz=false\n [foo.quux]\n xyzzy = [1,2]" |>
  │ Otoml.Printer.to_channel ~indent_width:4 ~collapse_tables:false stdout;;
  │ 
  │ [foo]
  │ 
  │ [foo.bar]
  │     baz = false
  │ 
  │ [foo.quux]
  │     xyzzy = [1, 2]
  │ val t : unit = ()
  │ 
  │ utop # let t = Otoml.Parser.from_string "[foo.bar]\nbaz=false\n [foo.quux]\n xyzzy = [1,2]" |>
  │ Otoml.Printer.to_channel ~indent_width:4 ~collapse_tables:false ~indent_subtables:true stdout;;
  │ 
  │ [foo]
  │ 
  │     [foo.bar]
  │ 	baz = false
  │ 
  │     [foo.quux]
  │ 	xyzzy = [1, 2]
  │ val t : unit = ()
  └────


Maintenance practices
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  Last but not least, good maintenance practices are also important, not
  just good code. To.ml is at 7.0.0 now. It has a [CHANGES.md] file, but
  I'm still to see the maintainers document what the breaking change is,
  who's affected, and what they should do to make their code compatible.

  For example, in 6.0.0 the breaking change was a rename from
  `TomlLenses' to `Toml.Lenses'. In an earlier release, I remember the
  opposite rename. Given the standard compatibility problems going
  unfixed for years, that's like rearranging furniture when the roof is
  leaking.

  I promise not to do that.


[CHANGES.md]
<https://github.com/ocaml-toml/To.ml/blob/master/CHANGES.md>


Conclusion
╌╌╌╌╌╌╌╌╌╌

  I hope this library will help make TOML a viable configuration file
  format for OCaml programs.

  It's just the first version of course, so there's still room for
  improvement. For example, the lexer is especially ugly: due to TOML
  being highly context-sensitive, it involves massive amounts of lexer
  hacks for context tracking.  Maybe ocamllex is a wrong tool for the
  job abd it should be replaced with something else (since I'm using
  Menhir's incremental API anyway, it's not tied to any lexer API).

  The printer is also less tested than the parser, so there may be
  unhandled edge cases. It also has some cosmetic issues like newlines
  between parent and child tables.

  Any feedback and patches are welcome!


soupault: a static website generator based on HTML rewriting
════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-soupault-a-static-website-generator-based-on-html-rewriting/4126/15>


Daniil Baturin announced
────────────────────────

  [soupault 3.0.0] is now available.

  It now uses the new [OTOML] library for loading the configs, which has
  some positive side effects, e.g. keys in the output of `soupault
  --show-effective-config' (that shows your config plus default values
  you didn't set explicitly) now come in the same order as in your
  config file.

  It also provides TOML and YAML parsing functions to Lua plugins and
  has colored log headers (can be disabled with NO_COLOR environment
  variables).


[soupault 3.0.0] <https://soupault.app/blog/soupault-3.0.0-release/>

[OTOML] <https://opam.ocaml.org/packages/otoml/>


OCaml 4.13.0, second alpha release
══════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ocaml-4-13-0-second-alpha-release/8164/1>


octachron announced
───────────────────

  The release of OCaml 4.13.0 is approaching. We have released a second
  alpha version to help fellow hackers join us early in our bug hunting
  and opam ecosystem fixing fun (see below for the installation
  instructions). You can see the progress on this front at
  <https://github.com/ocaml/opam-repository/issues/18791> .

  Beyond the usual bug fixes (see the full list below), this second
  alpha integrates a new feature for native code: poll points. Those
  poll points currently fixes some issues with signals in non-allocating
  loops in native code. More importantly, they are prerequisite for the
  multicore runtime.

  Another change is the removal of the removal of interbranch
  propagation of type information.  The feature, already postponed from
  4.12, has been removed to focus for now on better error message in the
  `-principal' mode.

  If you find any bugs, please report them here:

  <https://github.com/ocaml/ocaml/issues>

  The first beta release may follow soon since the opam ecosystem is in
  quite good shape; and we are on track for a full release in September.

  Happy hacking, Florian Angeletti for the OCaml team.


Installation instructions
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  The base compiler can be installed as an opam switch with the
  following commands
  ┌────
  │ opam update
  │ opam switch create 4.13.0~alpha2 --repositories=default,beta=git+https://github.com/ocaml/ocaml-beta-repository.git
  └────

  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.13.0~alpha2+options,<option_list>
  │ --repositories=default,beta=git+https://github.com/ocaml/ocaml-beta-repository.git
  └────
  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.13.0~alpha2+flambda+nffa
  │ --packages=ocaml-variants.4.13.0~alpha2+options,ocaml-option-flambda,ocaml-option-no-flat-float-array
  │ --repositories=default,beta=git+https://github.com/ocaml/ocaml-beta-repository.git
  └────
  All available options can be listed with "opam search ocaml-option".

  If you want to test this version, it is advised to install the alpha
  opam repository

  <https://github.com/kit-ty-kate/opam-alpha-repository>

  with
  ┌────
  │ opam repo add alpha git://github.com/kit-ty-kate/opam-alpha-repository.git
  └────
  This alpha repository contains various fixes in the process of being
  upstreamed.

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

  • <https://github.com/ocaml/ocaml/archive/4.13.0-alpha2.tar.gz>
  • <https://caml.inria.fr/pub/distrib/ocaml-4.13/ocaml-4.13.0~alpha2.tar.gz>


Changes since the first alpha release
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

New feature
┄┄┄┄┄┄┄┄┄┄┄

  • [10039]: Safepoints Add poll points to native generated code. These
    are effectively zero-sized allocations and fix some signal and
    remembered set issues. Also multicore prerequisite.  (Sadiq Jaffer,
    Stephen Dolan, Damien Doligez, Xavier Leroy, Anmol Sahoo, Mark
    Shinwell, review by Damien Doligez, Xavier Leroy, and Mark Shinwell)


[10039] <https://github.com/ocaml/ocaml/issues/10039>


New bug fixes
┄┄┄┄┄┄┄┄┄┄┄┄┄

  • [10449]: Fix major GC work accounting (the GC was running too
    fast). (Damien Doligez, report by Stephen Dolan, review by Nicolás
    Ojeda Bär and Sadiq Jaffer)

  • [10454]: Check row_more in nondep_type_rec.  (Leo White, review by
    Thomas Refis)

  • [10468]: Correctly pretty print local type substitution, e.g. type t
    := …, with -dsource (Matt Else, review by Florian Angeletti)

  • [10461], [10498]: `caml_send*' helper functions take derived
    pointers as arguments.  Those must be declared with type Addr
    instead of Val. Moreover, poll point insertion must be disabled for
    `caml_send*', otherwise the derived pointer is live across a poll
    point. (Vincent Laviron and Xavier Leroy, review by Xavier Leroy and
    Sadiq Jaffer)

  • [10478]: Fix segfault under Windows due to a mistaken initialization
    of thread ID when a thread starts. (David Allsopp, Nicolás Ojeda
    Bär, review by Xavier Leroy)

  • [9525], [10402]: ocamldoc only create paragraphq at the toplevel of
    documentation comments (Florian Angeletti, report by Hendrik Tews,
    review by Gabriel Scherer)

  • [10206]: Split labels and polymorphic variants tutorials Splits the
    labels and polymorphic variants tutorial into two. Moves the GADTs
    tutorial from the Language Extensions chapter to the tutorials.
    (John Whitington, review by Florian Angeletti and Xavier Leroy)


[10449] <https://github.com/ocaml/ocaml/issues/10449>

[10454] <https://github.com/ocaml/ocaml/issues/10454>

[10468] <https://github.com/ocaml/ocaml/issues/10468>

[10461] <https://github.com/ocaml/ocaml/issues/10461>

[10498] <https://github.com/ocaml/ocaml/issues/10498>

[10478] <https://github.com/ocaml/ocaml/issues/10478>

[9525] <https://github.com/ocaml/ocaml/issues/9525>

[10402] <https://github.com/ocaml/ocaml/issues/10402>

[10206] <https://github.com/ocaml/ocaml/issues/10206>


Removed feature
┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄

  • [ *breaking change* ] [9811]: remove propagation from previous
    branches Type information inferred from previous branches was
    propagated in non-principal mode. Revert this for better
    compatibility with -principal mode. For the time being, infringing
    code should result in a principality warning. (Jacques Garrigue,
    review by Thomas Refis and Gabriel Scherer)

  The up-to-date list of changes for OCaml 4.13 is available at
  <https://github.com/ocaml/ocaml/blob/4.13/Changes> .


[9811] <https://github.com/ocaml/ocaml/issues/9811>


OCamlFormat 0.19.0
══════════════════

  Archive: <https://discuss.ocaml.org/t/ann-ocamlformat-0-19-0/8167/1>


Guillaume Petiot announced
──────────────────────────

  We are happy to announce the release of [OCamlFormat 0.19.0].

  OCamlformat is an auto-formatter for OCaml code, writing the parse
  tree and comments in a consistent style, so that you do not have to
  worry about formatting it by hand, and to speed up code review by
  focusing on the important parts.

  OCamlFormat is beta software. We expect the program to change
  considerably before we reach version 1.0.0. In particular, upgrading
  the `ocamlformat` package will cause your program to get
  reformatted. Sometimes it is relatively pain-free, but sometimes it
  will make a diff in almost every file. We are working towards having a
  tool that pleases most usecases in the OCaml community, please bear
  with us!

  To make sure your project uses the last version of ocamlformat, please
  set

  ┌────
  │ version=0.19.0
  └────

  in your `.ocamlformat' file.

  Main changes in `ocamlformat.0.19.0' are:
  • OCaml 4.13 features are supported
  • `ppxlib' dependency has been dropped
  • A new `line-endings={lf,crlf}' option has been added for windows
    compatibility

  Here is the [full list of changes].

  We encourage you to try ocamlformat, that can be installed from opam
  directly ( `opam install ocamlformat' ), but please remember that it
  is still beta software. We have a [FAQ for new users ] that should
  help you decide if ocamlformat is the right choice for you.


[OCamlFormat 0.19.0] <https://github.com/ocaml-ppx/ocamlformat>

[full list of changes]
<https://github.com/ocaml-ppx/ocamlformat/releases/tag/0.19.0>

[FAQ for new users ]
<https://github.com/ocaml-ppx/ocamlformat#faq-for-new-users>


Nicolás Ojeda Bär then added
────────────────────────────

        A new `line-endings={lf,crlf}' option has been added for
        windows compatibility

  Just to expand a bit on this feature: previously, `ocamlformat' would
  use the system EOL convention (ie LF on Unix-like OSs and CRLF on
  Windows). This meant that if you applied `ocamlformat' on systems with
  different EOL conventions, you would get a diff on every line on every
  file purely due to the changed newlines. Furthermore, this meant
  `ocamlformat' was hard to use if your project used LF on Windows (a
  common usage).

  With the new option, `ocamlformat' enforces a given EOL
  convention. The system EOL convention is no longer used for any
  purpose and the EOL convention used is the one specified in
  `ocamlformat''s config (LF by default).


OCaml Café: Wed, Aug 4 @ 7pm (U.S. Central)
═══════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ocaml-cafe-wed-aug-4-7pm-u-s-central/8169/1>


Michael Bacarella announced
───────────────────────────

  Please join us at the next OCaml Cafe, a friendly, low stakes
  opportunity to ask questions about the OCaml language and ecosystem,
  work through programming problems that you’re stuck on, and get
  feedback on your code. Especially geared toward new and intermediate
  users, experienced OCaml developers will be available to answer your
  questions.  Bring your code and we’ll be happy to review it, assist
  with debugging, and provide recommendations for improvement.

  This month, OCaml Café will consist of two parts. First, Rudi Grinberg
  of [OCaml Labs] will present an informal introduction to [Dune], the
  OCaml build system. Learn about Dune from one the people developing
  it. Following Rudi’s presentation, we will open the discussion to all
  things OCaml-related.

  Full [Zoom meeting details here].
  • Add to your [Google Calendar]
  • Add to your [iCal]


[OCaml Labs] <https://ocamllabs.io/>

[Dune] <https://dune.build/>

[Zoom meeting details here]
<https://hfpug.org/event/ocaml-cafe-introduction-to-dune-and-open-forum/>

[Google Calendar]
<https://www.google.com/calendar/event?action=TEMPLATE&text=OCaml+Caf%C3%A9%3A+Introduction+to+Dune+and+Open+Forum&dates=20210804T190000/20210804T210000&details=OCaml+Caf%C3%A9+offers+a+friendly%2C+low+stakes+opportunity+to+ask+questions+about+the+OCaml+language+and+ecosystem%2C+work+through+programming+problems+that+you%E2%80%99re+stuck+on%2C+and+get+feedback+on+your+code.+Especially+geared+toward+new+and+intermediate+users%2C+experienced+OCaml+developers+will+be+available+to+answer+your+questions.%C2%A0+Bring+your+code+and+we%26%238217%3Bll+be+happy+to+review+it%2C+assist+with+debugging%2C+and+provide+recommendations+for+improvement.+%0AThis+month%2C+OCaml+Caf%C3%A9+will+consist+of+two+parts.%C2%A0+First%2C+Rudi+Grinberg+of+OCaml+Labs+will+present+an+informal+introduction+to+Dune%2C+the+OCaml+build+system.%C2%A0+Learn+about+Dune+from+one+the+people+developing+it.%C2%A0+Following+Rudi%26%238217%3Bs+presentation%2C+we+will+open+the+discussion+to+all+things+OCaml-related.+%0AWhether+you%E2%80%99re+still+trying+to+make+sense+of+currying+or+can+spot+non-tail-recursive+code+from+across+the+room%2C+we+hope+that+you%E2%80%99ll+join+us+with+your+questions+about+OCaml%2C+or+just+to+hang+out+with+the+OCaml+community.+%0A%0AClaude+Ru+%28View+Full+Event+Description+Here%3A+https%3A%2F%2Fhfpug.org%2Fevent%2Focaml-cafe-introduction-to-dune-and-open-forum%2F%29&location=Zoom&trp=false&sprop=website:https://hfpug.org&ctz=America%2FChicago>

[iCal]
<https://hfpug.org/event/ocaml-cafe-introduction-to-dune-and-open-forum/?ical=1>


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2021-07-06 12:33 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2021-07-06 12:33 UTC (permalink / raw)
  To: lwn, cwn, caml-list

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

Hello

Here is the latest OCaml Weekly News, for the week of June 29 to July
06, 2021.

Table of Contents
─────────────────

LibreRef - LablGtk-based Digital Reference Tool Application
u2f - universal second factor
Reproducible OPAM packages / MirageOS
Dune 2.9.0
Hardcaml MIPS CPU Learning Project and Blog
dune-release 1.5.0
anders 0.7.1
Old CWN


LibreRef - LablGtk-based Digital Reference Tool Application
═══════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-libreref-lablgtk-based-digital-reference-tool-application/8077/1>


Kiran Gopinathan announced
──────────────────────────

  I'm not sure if this is that close to the typical uses of OCaml, but
  posting this here just in case anyone was interested in another
  end-user facing application using LablGtk.

  <https://aws1.discourse-cdn.com/standard11/uploads/ocaml/optimized/2X/b/b72b4bd7838e41dbaed2254350799c5e75245a3d_2_250x250.png>

        LibreRef is a free as in freedom digital referencing tool
        for artists.

  It's written in OCaml using LablGtk and Cairo to implement the GUI.

  You can find the source code at: [gitlab] ([github mirror])

  A picture is worth a thousand words, so before I continue, here are a
  few examples of it in action:

  <https://aws1.discourse-cdn.com/standard11/uploads/ocaml/original/2X/1/126997c61b83b700feac41e380b42c560bdf2340.gif>

  <https://aws1.discourse-cdn.com/standard11/uploads/ocaml/original/2X/4/49b11ef943e491ba220332d257bc6a15b506ed6b.gif>

  Overall, getting LablGtk to work was fairly straightforward, although
  the documentation was a bit lacking (although the same might be said
  of Gtk itself).

  I was able to piece together the correct uses of most of the API calls
  by relying on either the examples from the repository or by
  translating snippets of code from online back into LablGtk.

  As for deploying it as an application, I found the AppImage &
  LinuxDeploy toolchain to work well with the resulting binary
  (admittedly I've only tested it with two devices so far), and it meant
  that I could publish the program without having to ask people to setup
  the full OCaml & Opam toolchain, which would probably be a large ask.

  As for the implementation, I think it was fairly elegant (if I say so
  myself :slight_smile:), although I may have gone overboard with
  functors (see this higher-order functor in the GUI interface:
  <https://gitlab.com/gopiandcode/libre-ref/-/blob/master/gui.mli#L175>)
  and some aspects of the separation of concerns weren't so well
  established.


[gitlab] <https://gitlab.com/gopiandcode/libre-ref>

[github mirror] <https://github.com/Gopiandcode/LibreRef>


u2f - universal second factor
═════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-u2f-universal-second-factor/8078/1>


Hannes Mehnert announced
────────────────────────

  it is our pleasure to announce the just released opam package u2f,
  which is a server side implementation of the FIDO standard for
  two-factor authentication using a special device (yubikey etc.). The
  device does challenge-response authentication with the server using
  public key cryptography.

  The implementation is stateless and does not use a specific IO
  library, but only achieves the logic for constructing a registration
  request, verifying a response thereof, and authorization requests with
  responses thereof. Please have a look at
  <https://github.com/roburio/u2f> if you're interested. It is licensed
  under the permissive 2-clause BSD license.

  We use this library in an example server (in the `bin' directory) that
  uses dream. The live server is online at <https://u2f-demo.robur.coop>
  – please let us know if you run into any trouble, or open an issue on
  the GitHub repository.

  One question though: we're unable to generate the documentation from
  the mli – already asked on discord with no result. Anyone with a
  better understanding of odoc etc. can take a look why `dune build
  @doc' outputs a nearly empty file? Thanks a lot :)

  The development was sponsored by skolem.tech.


Reproducible OPAM packages / MirageOS
═════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/reproducible-opam-packages-mirageos/8079/1>


Hannes Mehnert announced
────────────────────────

  we are pleased to announce reproducible binary images for MirageOS
  unikernels (see the blog post at
  <https://hannes.robur.coop/Posts/Deploy>). The binaries are located at
  <https://builds.robur.coop> (all components are open source and linked
  from the page).

  Additionally, the required tools to achieve reproducible builds are
  released as binary packages for various operating systems as well on
  the same site. They are used by the infrastructure to run daily builds
  (always with the HEAD of opam-repository to not loose any updates /
  new releases). The custom overlay
  <https://git.robur.io/robur/unikernel-repo> is used that adds some
  development packages.

  Happy to hear your thoughts and feedback here. (Earlier post
  <https://discuss.ocaml.org/t/reproducible-builds-with-ocaml-opam-and-mirageos/4877>)

  This work was funded by the [NGI Pointer] project "Funding The Next
  Generation Ecosystem of Internet Architects".


[NGI Pointer] <https://pointer.ngi.eu>


Dune 2.9.0
══════════

  Archive: <https://discuss.ocaml.org/t/ann-dune-2-9-0/8087/1>


Emilio Jesús Gallego Arias announced
────────────────────────────────────

  Dear all, on behalf of the Dune team I'm pleased to announce the
  release of Dune 2.9.0. This is the last release on the Dune 2.x series
  and could be considered a maintenance release as it mostly consists on
  bug fixes and miscellaneous tweaks and features for sites,
  instrumentation, and mdx support.

  Please find the full list of changes below:
  • Add `(enabled_if ...)' to `(mdx ...)'
    (<https://github.com/ocaml/dune/pull/4434>, @emillon)

  • Add support for instrumentation dependencies
    (<https://github.com/ocaml/dune/pull/4210>, fixes
    <https://github.com/ocaml/dune/issues/3983>, @nojb)

  • Add the possibility to use `locks' with the cram tests stanza
    (<https://github.com/ocaml/dune/pull/4480>, @voodoos)

  • Allow to set up merlin in a variant of the default context
    (<https://github.com/ocaml/dune/pull/4145>, @TheLortex, @voodoos)

  • Add `(package ...)' to `(mdx ...)'
    (<https://github.com/ocaml/dune/pull/4691>, fixes
    <https://github.com/ocaml/dune/issues/3756>, @emillon)

  • Handle renaming of `coq.kernel' library to `coq-core.kernel' in Coq
    8.14 (<https://github.com/ocaml/dune/pull/4713>, @proux01)

  • Fix generation of merlin configuration when using `(include_subdirs
    unqualified)' on Windows (<https://github.com/ocaml/dune/pull/4745>,
    @nojb)

  • Fix bug for the install of Coq native files when using
    `(include_subdirs qualified)'
    (<https://github.com/ocaml/dune/pull/4753>, @ejgallego)

  • Allow users to specify install target directories for `doc' and
    `etc' sections. We add new options `--docdir' and `--etcdir' to both
    Dune's configure and `dune install'
    command. (<https://github.com/ocaml/dune/pull/4744>, fixes
    <https://github.com/ocaml/dune/issues/4723>, @ejgallego, thanks to
    @JasonGross for reporting this issue)

  • Fix issue where Dune would ignore `(env ... (coq (flags ...)))'
    declarations appearing in `dune' files
    (<https://github.com/ocaml/dune/pull/4749>, fixes
    <https://github.com/ocaml/dune/issues/4566>, @ejgallego @rgrinberg)

  • Disable some warnings on Coq 8.14 and `(lang coq (>= 0.3))' due to
    the rework of the Coq "native" compilation system
    (<https://github.com/ocaml/dune/pull/4760>, @ejgallego)

  • Fix a bug where instrumentation flags would be added even if the
    instrumentatation was disabled (@nojb,
    <https://github.com/ocaml/dune/pull/4770>)

  • Fix <https://github.com/ocaml/dune/issues/4682>: option `-p' takes
    now precedence on environement variable `DUNE_PROFILE'
    (<https://github.com/ocaml/dune/pull/4730>,
    <https://github.com/ocaml/dune/pull/4774>, @bobot, reported by
    @dra27 <https://github.com/ocaml/dune/issues/4632>)

  • Fix installation with opam of package with dune sites. The
    `.install' file is now produced by a local `dune install' during the
    build phase (<https://github.com/ocaml/dune/pull/4730>,
    <https://github.com/ocaml/dune/pull/4645>, @bobot, reported by
    @kit-ty-kate <https://github.com/ocaml/dune/issues/4198>)

  • Fix multiple issues in the sites feature
    (<https://github.com/ocaml/dune/pull/4730>,
    <https://github.com/ocaml/dune/pull/4645> @bobot, reported by
    @Lelio-Brun <https://github.com/ocaml/dune/issues/4219>, by @Kakadu
    <https://github.com/ocaml/dune/issues/4325>, by @toots
    <https://github.com/ocaml/dune/issues/4415>)


Hardcaml MIPS CPU Learning Project and Blog
═══════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/hardcaml-mips-cpu-learning-project-and-blog/8088/1>


"Alexander (Sasha) Skvortsov announced
──────────────────────────────────────

  Tl;dr: I’m [writing a blog] about making a MIPS CPU in Hardcaml.

  Hi! My name is Sasha, and I’m a student at Penn State majoring in CS
  and Math. Last semester, I took a computer engineering class where we
  built a pipelined MIPS CPU in Verilog as a semester-long project. I
  enjoyed the class, but a lot of frustration came from Verilog itself.

  A few months ago, I came across the [Signals and Threads Programmable
  Hardware episode]. I really liked the idea of [Hardcaml]: a library to
  write and test hardware designs in OCaml. Representing circuits as
  functions felt like a good abstraction, and I’ve been wanting to learn
  OCaml for a while.

  So this summer, a friend and I are rewriting the Verilog MIPS CPU we
  made last semester into Hardcaml.  We’re still working on the project,
  but have made some good progress and wanted to share it in case anyone
  finds it interesting / useful. If anyone wants to take a look, it’s
  [up on GitHub].

  We’ve written some blog posts about our project:

  1. [Some more background on what we’re doing and why]
  2. [An ELI5 overview of how hardware, and pipelined CPUs in
     particular, work]
  3. [Another high-level overview of Verilog, hardware design, FPGAs,
     and why I think OCaml might be a great fit for hardware design]
  4. [How to set up a Hardcaml project, including testing and Verilog
     generation]
  5. [How to split Hardcaml circuits into multiple modules]

  There’s also a few more that we’ve written code for, but are still
  drafting blog posts about:

  • How to work with memory in Hardcaml
  • How to design stateful, sequential circuits in Hardcaml
  • A safer design pattern for Hardcaml circuits

  I’m new to both OCaml and blogging, and this has definitely been a fun
  experience so far! Would love to hear any feedback / comments.


[writing a blog] <https://ceramichacker.com/>

[Signals and Threads Programmable Hardware episode]
<https://signalsandthreads.com/programmable-hardware/>

[Hardcaml] <https://github.com/janestreet/hardcaml>

[up on GitHub] <https://github.com/askvortsov1/hardcaml-mips>

[Some more background on what we’re doing and why]
<https://ceramichacker.com/blog/1-1x-hardcaml-mips-intro-what-and-why>

[An ELI5 overview of how hardware, and pipelined CPUs in particular,
work]
<https://ceramichacker.com/blog/2-2x-a-bit-on-computers-hardware-and-cpus>

[Another high-level overview of Verilog, hardware design, FPGAs, and why
I think OCaml might be a great fit for hardware design]
<https://ceramichacker.com/blog/4-3x-verilog-fpgas-and-why-ocaml>

[How to set up a Hardcaml project, including testing and Verilog
generation]
<https://ceramichacker.com/blog/5-4x-ocaml-setup-hardcaml-basics-and-project-plan>

[How to split Hardcaml circuits into multiple modules]
<https://ceramichacker.com/blog/11-5x-multi-module-circuits-in-hardcaml>


dune-release 1.5.0
══════════════════

  Archive: <https://discuss.ocaml.org/t/ann-dune-release-1-5-0/8095/1>


Nathan Rebours announced
────────────────────────

  On behalf of the dune-release team I'm pleased to announce that we're
  releasing dune-release.1.5.0.

  It has been quite a while since the last release so there are numerous
  changes and improvements in this one, along with a lot of bug fixes.

  The two main new features in 1.5.0 are:
  • A draft release mode that creates a draft Github release and a draft
    PR to opam-repository. It comes with an `undraft' command that will
    undraft both and update the opam file's `url.src' field
    accordingly. We believe this feature will prove helpful to
    maintainers of tools such as `dune' which releases are often watched
    by distribution maintainers. Draft releases allow you to wait until
    you have opam-repository's CI approval to actually create a GH
    release that will notify anyone watching the repository. This
    feature is still a bit experimental, we have ideas on how to improve
    it but we wanted to get a first version out to collect feedback on
    how it is used and what you folks expect from it.
  • A `check' command that you can run ahead of a release to know if
    dune-release has all the information it needs in the repository,
    along with running the lint, build and test checks it normally runs
    after building the tarball. We're aware that it can be frustrating
    to see dune-release fail right in the middle of the release
    process. We're trying to improve this situation and this is a first
    step in that direction.

  You can see the full changelog [here]

  You'll note we also deprecated a few features such as delegates (as we
  announced in [this post]), opam 1.x and the `--user' option and
  corresponding config file field.  This release is likely to be the
  last 1.x release of `dune-release' except for important bug fixes as
  we'll start working on 2.0 soon.

  Our main goals for 2.0 are to make the experience for github users as
  seemless as possible. We want the tool to do the right thing for those
  users without them having to configure anything. Delegates got in the
  way there and that's why we're removing them.  We do care about our
  non github users and we've worked on making it as configurable as
  possible so that you can integrate it in your release workflow. The
  situation should already have improved quite a bit with this release
  as we fixed several bugs for non github hosted repositories. We want
  to make sure that these users will be happy with dune-release 2.0 as
  well.  Hopefully in the future dune-release will support other release
  workflows such as handling gitlab hosted repositories but we want to
  make sure our main user base is happy with the tool before adding
  this.

  We'll communicate a bit more on our plans for 2.0 in the next few
  months. Our hope is that it will hit opam before the end of this year.

  We hope that you'll like this new version and wish you all successful
  and happy releases!


[here] <https://github.com/ocamllabs/dune-release/releases/tag/1.5.0>

[this post]
<https://discuss.ocaml.org/t/replacing-dune-release-delegates/4767>


anders 0.7.1
════════════

  Archive: <https://discuss.ocaml.org/t/ann-anders-0-7-1/8098/1>


Namdak Tonpa announced
──────────────────────

  The HTS language proposed by Voevodsky exposes two different presheaf
  models of type theory: the inner one is homotopy type system presheaf
  that models HoTT and the outer one is traditional Martin-Löf type
  system presheaf that models set theory with UIP. The motivation behind
  this doubling is to have an ability to express semisemplicial
  types. Theoretical work on merging meta-theoretical and homotopical
  languages was continued in [2LTT] [Anenkov, Capriotti, Kraus,
  Sattler].

  While we are on our road to HTS with Lean-like tactic language,
  currently we are at the stage of regular cubical (HoTT) type checker
  with CHM-style primitives, or more general CCHM type checker. You may
  try it at Github: [groupoid/anders].

  ┌────
  │ $ opam install anders
  │ $ anders
  │ Anders theorem prover [PTS][MLTT][CCHM-4][HTS].
  │ 
  │    invoke = anders | anders list
  │      list = [] | command list
  │   command = check filename     | lex filename
  │           | parse filename     | help
  │           | cubicaltt filename | girard
  │           | trace
  └────

  Anders is idiomatic and educational. We carefully draw the favourite
  Lean-compatible syntax to fit 130 LOC in Menhir, the MLTT core (based
  on Mini-TT) is 500 LOC and pretypes presheaf is another 500 LOC.


[2LTT] <https://arxiv.org/pdf/1705.03307.pdf>

[groupoid/anders] <https://github.com/groupoid/anders>


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2021-06-29 12:24 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2021-06-29 12:24 UTC (permalink / raw)
  To: lwn, cwn, caml-list

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

Hello

Here is the latest OCaml Weekly News, for the week of June 22 to 29,
2021.

Table of Contents
─────────────────

wasicaml - a code emitter for OCaml targeting WebAssembly
opam 2.1.0~rc2
Set up OCaml 2.0.0-beta2
Any OCaml bindings to Apache Arrow?
Compiler engineer for OCaml and WebAssembly, Germany
v3.0.0 release of reparse, reparse-lwt, reparse-lwt-unix
Progress 0.2.0
http-multipart-formdata v2.0.0
Old CWN


wasicaml - a code emitter for OCaml targeting WebAssembly
═════════════════════════════════════════════════════════

  Archive:
  <https://sympa.inria.fr/sympa/arc/caml-list/2021-06/msg00017.html>


Gerd Stolpmann announced
────────────────────────

  I'd like to announce a new project to develop a code generator that
  emits WebAssembly:

  <https://github.com/remixlabs/wasicaml>

  With the support of RemixLabs I could already create a very first
  version that takes the OCaml bytecode as input and translates it to
  WebAssembly.  While this approach probably doesn't lead to the fastest
  code, it is easy to accomplish, and it demonstrates the challenge (and
  already shows how to solve many of the part problems along the road).

  To be precisely, the target of the translator is wasm32-unknown-wasi,
  i.e.  the WASI ABI. This ABI is still in early development, but
  provides already the syscalls (or better, host calls) to access files,
  to get the current time, and to read the environment. This is almost
  enough to run a compiler - I only had to add system() so that ocamlc
  can start external preprocessors.  Also, due to the fact that the
  current wasm implementations still lack exception handling, I had to
  assume the presence of a host emulation of exceptions (which is easy
  to provide if the host environment is Javascript, but not necessarily
  for other environments).

  The translator takes the OCaml bytecode as input, i.e. you first
  create an excecutable

  ┌────
  │ $ ocamlc -o myexec ...
  └────

  and then make wasm out of it:

  ┌────
  │ $ wasicaml -o myexec.wasm myexec
  └────

  If you omit the .wasm suffix, wasicaml will put a preamble in front of
  the wasm code that starts the execution:

  ┌────
  │ $ wasicaml -o myexec_wasm myexec
  │ $ ./myexec_wasm
  └────

  Because of this trick, many problems of cross-compiling can be
  avoided.

  You may ask what the benefits of yet another "Web" language are. We
  already have two emitters targeting Javascript - isn't that enough?
  Well, two answers here.

  First, WASI is a proper LLVM target. Because of this, you can link
  code from other languages with your executable (e.g. C or Rust). So
  you are not limited to OCaml but can use any language that also
  targets the WASI ABI. E.g. you can do

  ┌────
  │ $ wasicaml -o myexec.wasm myexec -ccopt -lfoo
  └────

  to also link in libfoo.a (which must also be compiled to wasm). So it
  is multi-lingual from the beginning.

  Second, WebAssembly can be used outside the web, too. WASI targets
  more the command-line, and server plugins, and generally any
  OS-independent environments. For example, imagine you have an Electron
  app with a great UI, but for some special functionality you need to
  include some OCaml code, too. You don't want to give up the
  OS-independence, and WASI gives you now a natural option to add the
  OCaml code. And you still have access to the filesystem without
  hassle. - Another example is edge computing, i.e. when the cloud is
  extended by computers outside the data center, and the code should be
  in a form so that it can be run on as many platforms as possible. -
  All in all, WASI plays well when you need to combine OS-independence
  with a classic way of organizing the code as command or as server
  function, and you also need predictable performance.

  The challenge of translating OCaml to wasm is mainly the garbage
  collector.  Wasm doesn't permit many of the tricks ocamlopt is using
  to know in which memory (or register) locations OCaml values are
  stored. In wasm, there are no registers but the closest vehicle are
  local variables. Now, it is not possible to scan these variables from
  the GC function, making it practically impossible to put OCaml values
  there while a function is called that might trigger a GC. There is
  also no really cheap way of obtaining a stack descriptor.

  Wasicaml inherits the stack from the bytecode interpreter and uses it
  as its own shadow stack for OCaml values. As wasicaml bases on the
  bytecode representation of the code, the bytecode instructions already
  ensure that values always live in this stack when the GC might
  run. Wasicaml additionally tries to identify values that don't need
  this special treatment (like ints and bools) and that are preferably
  stored in local variables, giving the wasm executor freedom to put
  these into registers or other high-speed locations. (Unfortunately,
  most of the type information is already erased in the bytecode, and
  this is definitely one of the deficiencies of the bytecode approach.)

  In order to maximize the performance, it is probably best to avoid the
  stack whenever possible. The current approach of transforming the
  bytecode hasn't brought to an end yet with respect to such
  optimizations. For example, there could be more analyses that figure
  out when GC runs are actually possible and when it is safe to use
  local variables.

  Another problem of the bytecode basis is that all function calls are
  indirect, preventing the wasm executor from inlining functions.

  As a project, I'd like to see wasicaml progressing in two directions.
  First, make the current approach as good as possible - although basing
  it on the bytecode representation has its downsides, it is easy to
  understand and it is possible to figure out what the necessary
  ingredients for fast code are. Second, get an idea where a possible
  real wasm backend would fit into the OCaml compiler (maybe it is c–
  but maybe this doesn't give us much and you start better with lambda).

  Anyway, welcome to the new world of WebAssembly!

  Gerd

  PS. If you are interested in WebAssembly and like to work with me on
  another Wasm port for some time, there is a position:
  <https://www.mixtional.de/recruiting/2021-01/index.html>

  PPS. Wasicaml is a project of Figly, Inc., commonly known as
  RemixLabs, developing a reactive low-code and code collaboration
  platform.  <https://remixlabs.com/>


opam 2.1.0~rc2
══════════════

  Archive: <https://discuss.ocaml.org/t/ann-opam-2-1-0-rc2/8042/1>


David Allsopp announced
───────────────────────

  The opam team has great pleasure in announcing opam 2.1.0~rc2!

  The focus since beta4 has been preparing for a world with more than
  one released version of opam (i.e.  2.0.x and 2.1.x). The release
  candidate extends CLI versioning further and, under the hood, includes
  a big change to the opam root format which allows new versions of opam
  to indicate that the root may still be read by older versions of the
  opam libraries. A plugin compiled against the 2.0.9 opam libraries
  will therefore be able to read information about an opam 2.1 root
  (plugins and tools compiled against 2.0.8 are unable to load opam
  2.1.0 roots).

  Please do take this release candidate for a spin! It is available in
  the Docker images at ocaml/opam on [Docker Hub] as the opam-2.1
  command (or you can `sudo ln -f /usr/bin/opam-2.1 /usr/bin/opam' in
  your `Dockerfile' to switch to it permanently). The release candidate
  can also be tested via our installation script (see the [wiki] for
  more information).

  Thank you to anyone who noticed the unannounced first release
  candidate and tried it out. Between tagging and what would have been
  announcing it, we discovered an issue with upgrading local switches
  from earlier alpha/beta releases, and so fixed that for this second
  release candidate.

  Assuming no showstoppers, we plan to release opam 2.1.0 next week. The
  improvements made in 2.1.0 will allow for a much faster release cycle,
  and we look forward to posting about the 2.2.0 plans soon!


[Docker Hub] <https://hub.docker.com/r/ocaml/opam/tags>

[wiki]
<https://github.com/ocaml/opam/wiki/How-to-test-an-opam-feature#from-a-tagged-release-including-pre-releases>


Set up OCaml 2.0.0-beta2
════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-set-up-ocaml-2-0-0-beta2/8046/1>


Sora Morimoto announced
───────────────────────

  This release includes changes to address a corner case primarily
  related to multicore OCaml.

  <https://github.com/ocaml/setup-ocaml/releases/tag/v2.0.0-beta2>


Any OCaml bindings to Apache Arrow?
═══════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/any-ocaml-bindings-to-apache-arrow/8047/2>


UnixJunkie asked and Laurent Mazare announced
─────────────────────────────────────────────

        Looks interesting:

        <https://arrow.apache.org/>

        <https://arrow.apache.org/overview/>

  I've put together some simple [ocaml-arrow] library. It works
  reasonably well and is quite battle tested but definitely needs a bit
  of cleanup as the bits under src/ are deprecated in favor of the ones
  under c_api/. There is also a ppx to automatically convert ocaml
  records to/from arrow. Some examples using this can be seen in the
  [tests directory].

  If there is some interest, I can certainly push up on cleaning this
  and make an actual opam package.


[ocaml-arrow] <https://github.com/LaurentMazare/ocaml-arrow>

[tests directory]
<https://github.com/LaurentMazare/ocaml-arrow/blob/master/c_api/tests/ppx.ml>


Compiler engineer for OCaml and WebAssembly, Germany
════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/compiler-engineer-for-ocaml-and-webassembly-germany/8053/1>


Gerd Stolpmann announced
────────────────────────

  We are developing a compiler for a no-code platform that translates
  our DSL to bytecode and/or WebAssembly. The language is largely of
  functional type but is also able to manage state with a spreadsheet
  model, allowing reactive programming without having to resort to
  libraries. The language is statically typed using a Hindley-Milner
  type checker. The compiler is primarily written in OCaml. Other
  languages of our platform are Go, C, Elm, and Javascript.

  We are looking for a compiler engineer with skills in code generation
  for WebAssembly:

  • Translation of an intermediate representation to WebAssembly
  • Writing runtimes and SDKs targeting WebAssembly
  • Code optimization

  See the full ad here:
  <https://www.mixtional.de/recruiting/2021-01/index.html>


v3.0.0 release of reparse, reparse-lwt, reparse-lwt-unix
════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-v3-0-0-release-of-reparse-reparse-lwt-reparse-lwt-unix/8058/1>


Bikal Lem announced
───────────────────

  I am happy to announce v3.0.0 of `reparse' - an OCaml library for
  constructing various types of parsers in OCaml.

  The release follows a complete overhaul of the internal working of the
  library to achieve the following goals:

  1. Allow construction of efficient, zero-copy parsers. See [String
     parser for example]. The library provides a [Make functor]
     parametrised over a `Promise' and a `Input' type allowing you
     control over both parser memory allocation and copying.

  2. Support usage of async libraries - lwt and async. Following the
     first point the library can now be used together with `lwt' and/or
     `async'. A lwt parse - for example - can now be used seamlessly
     with your other lwt code. The integration is seamless.

  3. Provide `Make_buffered' functor to produce parsers where the input
     type natively doesn't allow random read, for example sockets, lwt
     streams and channels. There is now two new supporting packages
     `reparse-lwt' which provides parsing from `char Lwt_stream.t'
     input type and `reparse-lwt-unix' which provides parsing from
     `Lwt_unix.file_descr' and ~Lwt_unix.input_channel' respectively.

  4. Provide `Make_unbuffered' functor to produce parsers where the
     input type natively supports random read, for example strings,
     bigstrings, bytes.

  5. Introduce function `unsafe_any_char' to allow efficient
     (zero-copy?) parsing.

  6. Prune dependencies by removing `base'.

  P.S. The documentation is bit behind in this release so please bear
  with me while work through the issues in the coming days.

  [Reparse repo]


[String parser for example]
<https://github.com/lemaetech/reparse/blob/master/lib/reparse.mli#L1237>

[Make functor]
<https://github.com/lemaetech/reparse/blob/master/lib/reparse.mli#L1230>

[Reparse repo]
<https://github.com/lemaetech/reparse/blob/master/lib/reparse.ml>


Progress 0.2.0
══════════════

  Archive: <https://discuss.ocaml.org/t/ann-progress-0-2-0/8063/1>


Craig Ferguson announced
────────────────────────

  I'm pleased to announce the 0.2.0 release of [`Progress'], now
  available via Opam.

  <https://aws1.discourse-cdn.com/standard11/uploads/ocaml/original/2X/7/727d878b6d17f3c48e6946f4df424bcc59938da3.png>

  `Progress' is an OCaml library for defining and using progress
  bars. It has the following features:

  • allows user-defined progress bar layouts;
  • supports rendering multiple progress bars simultaneously;
  • dynamically responds to changes in terminal size;
  • supports interleaving logging with progress bar rendering.

  This second release contains a much-improved DSL for specifying
  progress bars, alongside improvements and extensions to the rendering
  logic. The bars in the screenshot above are defined as follows:

  ┌────
  │ let bar ~color ~total =
  │   let open Progress.Line in
  │   list
  │     [ spinner ~color:(Progress.Color.ansi ~green) ()
  │     ; brackets (elapsed ())
  │     ; bar ~color total
  │     ; bytes
  │     ; parens (const "eta: " ++ eta total)
  │     ]
  └────

  It also comes with more complete [documentation] and many more
  [examples], including:

  • a Cargo-like progress bar w/ logging of intermediate results:

    <https://aws1.discourse-cdn.com/standard11/uploads/ocaml/optimized/2X/4/4b148999f7b6029ac0155b049b6a7cf1fa8b40f1_2_1380x500.png>

  • a Yarn-like stack of spinners:

    <https://aws1.discourse-cdn.com/standard11/uploads/ocaml/original/2X/6/67ccf011a403a4c082829f69d5a609b4c0c23f6e.png>

  • a showcase of various progress bar styles:

    <https://aws1.discourse-cdn.com/standard11/uploads/ocaml/optimized/2X/d/d4df4a2df07fd161982243251fbee56d52a4afbf_2_1034x538.png>


  The changelog is [here] and the API documentation is [here]. The
  library is not yet feature-complete, but should still be reasonably
  useful :-) Happy hacking!


[`Progress'] <https://github.com/craigfe/progress>

[documentation]
<https://craigfe.github.io/progress/progress/Progress/index.html>

[examples] <https://github.com/CraigFe/progress/tree/main/examples>

[here]
<https://github.com/CraigFe/progress/blob/0.2.0/CHANGES.md#020-2021-06-26>

[here] <https://craigfe.github.io/progress/progress/Progress/index.html>


http-multipart-formdata v2.0.0
══════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-http-multipart-formdata-v2-0-0/8064/1>


Bikal Lem announced
───────────────────

  I am pleased to announce v2.0.0 release of
  `http-multpart-formdata'. This release departs from previous in-memory
  representation of http multipart forms to a streaming, memory
  efficient representation. The new streaming mechanism should help when
  processing larg file uploads in your OCaml web applications.

  1. [httpaf sample web app]
  2. [http-multipart-formdata repo]


[httpaf sample web app]
<https://github.com/lemaetech/http-multipart-formdata/blob/master/examples/multipart_httpaf.ml>

[http-multipart-formdata repo]
<https://github.com/lemaetech/http-multipart-formdata>


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2021-06-22  9:04 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2021-06-22  9:04 UTC (permalink / raw)
  To: lwn, cwn, caml-list

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

Hello

Here is the latest OCaml Weekly News, for the week of June 15 to 22,
2021.

Table of Contents
─────────────────

First releases of dirsp-exchange: auditable variant of Signal Protocol and ProScript-to-OCaml translator
Job offer: 3 year research engineer in static analysis of OCaml programs at Inria Rennes
IRC channels available on libera.chat
Set up OCaml 2.0.0-beta
First release of Jsonxt - a set of JSON parsers and writers
mula 0.1.0, ML's radishal Universal Levenshtein Automata library
New release of mlcuddidl, the OCaml interface to the CUDD BDD library
first release of orf: OCaml Random Forests
Old CWN


First releases of dirsp-exchange: auditable variant of Signal Protocol and ProScript-to-OCaml translator
════════════════════════════════════════════════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-first-releases-of-dirsp-exchange-auditable-variant-of-signal-protocol-and-proscript-to-ocaml-translator/8008/1>


jbeckford announced
───────────────────

  I'm pleased to announce the first release of [dirsp-exchange],
  available today from the Opam repositories.

  The intent of the *[dirsp]* libraries is to provide software engineers
  with auditable source code that has some level of safety assurance
  (typically proofs) from security researchers.

  The first libraries are:

  • dirsp-exchange-kbb2017 0.1.0 - The KBB2017 protocol for securing a
    two-party conversation. Similar to Signal Protocol v3 and Olm
    Cryptographic Ratchet.
  • dirsp-ps2ocaml 0.1.0 - A ProScript to OCaml translator. ProScript is
    an executable subset of JavaScript that can be formally verified.

  and a couple more supporting libraries.

  `dirsp-exchange-kbb2017' has a build process that generates its own
  OCaml code using `dirsp-ps2ocaml' on formally verified ProScript
  source code.

  The canonical example for `dirsp-exchange-kbb2017' is:

  ┌────
  │ module P       = Dirsp_proscript_mirage.Make()
  │ module ED25519 = P.Crypto.ED25519
  │ module K       = Dirsp_exchange_kbb2017.Make(P)
  │ module U       = K.UTIL
  │ 
  │ (* Alice sends a message to Bob *)
  │ let aliceSessionWithBob = T.newSession (* ... supply some keys you create with ED25519 and U ... *) ;;
  │ let aliceToBobSendOutput = T.send
  │   aliceIdentityKey
  │   aliceSessionWithBob
  │   (P.of_string "Hi Bob!")
  │ 
  │ (* Now you can send the output "aliceToBobSendOutput" from Alice to Bob.
  │    Let's switch to Bob's computer. He gets notified of a new message using a notification library of
  │ your choosing, and then does ...  *)
  │ 
  │ let bobSessionWithAlice = T.newSession (* ... supply some keys ... *);;
  │ let bobFromAliceReceiveOutput = T.recv
  │   bobIdentityKey
  │   bobSignedPreKey
  │   bobSessionWithAlice
  │   theEncryptedMessageBobReceivedFromAlice
  │ assert (bobFromAliceReceiveOutput.output.valid)
  │ Format.printf "Bob just received a new message: %s\n"
  │   (bobFromAliceReceiveOutput.plaintext |> P.to_bytes |> Bytes.to_string)
  └────

  These are early releases, especially `dirsp-ps2ocaml'.

  Online docs are at <https://diskuv.github.io/dirsp-exchange>

  Feedback, contributions and downloads are very welcome!


[dirsp-exchange] <https://github.com/diskuv/dirsp-exchange#readme>


Job offer: 3 year research engineer in static analysis of OCaml programs at Inria Rennes
════════════════════════════════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/job-offer-3-year-research-engineer-in-static-analysis-of-ocaml-programs-at-inria-rennes/8012/1>


Benoit Montagu announced
────────────────────────

  as part of a project between Inria and Nomadic Labs, we are offering a
  3 year research engineer position, to work on static analysis for
  OCaml programs.  The position will start in October in the Celtique
  Inria research team, in the vibrant city of Rennes, France.  If you
  are a talented OCaml programmer, if you are interested in static
  analysis, or if you simply want to know more about this project,
  please contact me!

  The detailed job description is here:
  <https://jobs.inria.fr/public/classic/fr/offres/2021-03821>

  Please feel free to transfer this announce to people that you think
  could be interested.


IRC channels available on libera.chat
═════════════════════════════════════

  Archive:
  <https://sympa.inria.fr/sympa/arc/caml-list/2021-06/msg00014.html>


Deep in this thread, Romain Calascibetta announced
──────────────────────────────────────────────────

  Just to let you know that I spent a time to re-implement the IRC
  protocol in OCaml and to deploy a simple MirageOS as a logger to save
  discussions into a Git repository. The bot is currently deployed, the
  explanation is available here:
  <https://github.com/dinosaure/cri/tree/master/unikernel> And used for
  #mirage@irc.libera.chat

  It's a nice example about MirageOS/unikernel and I may deploy one to
  save #ocaml@irc.libera.chat as whitequark already does with her bot.


Set up OCaml 2.0.0-beta
═══════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-set-up-ocaml-2-0-0-beta/8016/1>


Sora Morimoto announced
───────────────────────

  Hopefully, this will be the last release before stable 2.0.0. This
  release allows you to add multiple custom repositories, which enables
  testing with multicore and beta repository.

  ┌────
  │ - name: Use Multicore OCaml
  │   uses: ocaml/setup-ocaml@v2
  │   with:
  │     ocaml-compiler: ocaml-variants.4.12.0+domains+effects
  │     opam-repositories: |
  │       multicore: https://github.com/ocaml-multicore/multicore-opam.git
  │       default: https://github.com/ocaml/opam-repository.git
  └────


First release of Jsonxt - a set of JSON parsers and writers
═══════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-first-release-of-jsonxt-a-set-of-json-parsers-and-writers/8018/1>


Stephen Bleazard announced
──────────────────────────

  Jsonxt provides a number of JSON parsers and writers for RFC 8259
  compliant JSON as well as non-standard extensions supported by Yojson.
  Features include
  • RFC 8259 compliant when in strict and basic mode
  • Performance focused especially for files and strings
  • Support for standard and extended JSON tree types:
    • Strict follows a strict interpretation of RFC 8259 with all
      numbers represented as floats.
    • Basic extends the strict type to include convenience types while
      maintaining RFC compliance.  This is compatible with Yojson's
      Basic type
    • Extended adds additional non-standard types including tuples and
      variants and is not RFC compliant. This is compatible with
      Yojson's Safe type
  • A number of different parsers including
    • A standard JSON tree parser for various sources including string,
      file and channel
    • A Stream parser that returns a stream of raw JSON tokens.
    • A monad based parser compatible with async
  • Writers including
    • File and string writers
    • A monad based writer that is compatible with async
    • A stream writer that converts a stream of JSON tokens
  • Support for streaming JSON via the [Stream] module
  • Standard interfaces including Yojson compatibility
  • Support for `ppx_deriving_yojson' and `ppx_yojson_conv' via Yojson
    compatibility

  The package is available via opam, with documentation on [github.io].
  The source can be found at [github/jsonxt]


[Stream] <https://ocaml.org/api/Stream.html>

[github.io]
<https://stevebleazard.github.io/ocaml-jsonxt/jsonxt/index.html>

[github/jsonxt] <https://github.com/stevebleazard/ocaml-jsonxt>


mula 0.1.0, ML's radishal Universal Levenshtein Automata library
════════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-mula-0-1-0-mls-radishal-universal-levenshtein-automata-library/8021/1>


Ifaz Kabir announced
────────────────────

  I'm happy to announce the release of my library `mula'. The package
  uses Universal Levenshtein Automata (ULA) to not only check if a word
  is within a certain edit distance of another, but to also output what
  the edit distance is! It uses the automata themselves to calculate
  edit distances. A fun use case for this is that we can feed a set of
  words to the automaton and immediately rank the words by their edit
  distance.

  `Mula' supports both the standard Levenshtein edit distance as well as
  the Demarau-Levenshtein distance which counts transpositions of two
  adjacent characters as a single edit. I also support getting live
  error counts, so you can feed part of a string into an automaton, and
  get the minimum number of errors that have occurred so far.

  I currently have matching working using non-deterministic ULA, but I
  have partially started the work toward the deterministic versions. It
  should be possible to pre-compute the DFAs for up to edit distance 3
  and pack it with the library, never needing to be recomputed because
  the Universal Automata are independent of the input strings. But the
  non-deterministic automata support very large edit distances:
  (Sys.int_size - 1)/2, so they have value on their own.

  This library came about from a desire to add a "did you mean" feature
  to a toy compiler, but not wanting to write the kind of dynamic
  programming code that you can find in the OCaml compiler [1] or
  merlin/spelll [2,3].

  You can find the library [here] and the documentation [here].  It's
  not on `opam' yet, but I have submitted a [pull request].

  Happy OCamling!

  References:
  1. Edit distance in the OCaml
     compiler. <https://github.com/ocaml/ocaml/blob/e5e9c5fed56efdd67601e4dbbaebeb134aee361c/utils/misc.ml#L516>.
  2. Edit distance in
     merlin. <https://github.com/ocaml/merlin/blob/444f6e000f6b7dc58dac44d6ac096fc0e09894cc/src/utils/misc.ml#L527>
  3. Edit distance in
     spelll. <https://github.com/c-cube/spelll/blob/3da1182256ff2507a0be812f945a7fe1a19adf9b/src/Spelll.ml#L26>


[here] <https://github.com/ifazk/mula/>

[here] <https://ifazk.github.io/mula/mula/index.html>

[pull request] <https://github.com/ocaml/opam-repository/pull/18895>


Ifaz Kabir then added
─────────────────────

Some details:
╌╌╌╌╌╌╌╌╌╌╌╌╌

  I followed the paper by Touzet [1] as much as possible. If you take a
  look at the code, you'll see a a lot of +1's for 1-indexing. This was
  to keep the implementation as close to the paper as possible! (If you
  do want to check the implementation against the paper, note that the
  paper has a typo in Definition 2). For the Demarau-Levenshtein
  automaton, I adapted Figure 9 from Mitankin's thesis [2]. I'm
  convinced that my adaptation works, but my adaptation of Touzet's
  subsumption relation for Demarau-Levenshtein might be slightly
  sub-optimal. If you have question about the adaptation, feel free to
  ask!

  `mula' does not completely replace c-cube's `spelll' package. In
  particular I don't support any indexs, etc. But there are some
  interesting differences in the automata they use. (`w' stands for the
  base word here)
  1. The `spelll' package creates the Levenshtein Automaton for a single
     string/word (LA_w), `mula' uses Universal Levenshtein Automata
     (ULA).
  2. `Spelll' computes a DFA from a non-deterministic automaton that
     uses eplison transitions. ULA do not have epsilon transitions, but
     for transitions it looks ahead into the base word `w'. Additionally
     the NFA's states/transitions are computable on the fly, so there is
     no need to store the NFA in memory.
  3. `Spelll''s automata transitions using characters. `mula' computes a
     bitvector from an input character to transition from states to
     states. (Computing the bitvector is where the look ahead comes in).
  4. `Spelll''s automata return `true~/~false', and uses a separate
     function to calculate edit distances. `Mula' uses the automaton
     itself to calculate edit distances, the outputs have type `int
     option'. (LA_w can be modified to support this though!)

  References:
  1. On the Levenshtein Automaton and the Size of the Neighborhood of a
     Word. Hélène Touzet
     <https://hal.archives-ouvertes.fr/hal-01360482/file/LATA2016.pdf>
  2. Universal Levenstein Automata: Building and Properties. Petar
     Nikolaev
     Mitankin. <https://store.fmi.uni-sofia.bg/fmi/logic/theses/mitankin-en.pdf>


New release of mlcuddidl, the OCaml interface to the CUDD BDD library
═════════════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-new-release-of-mlcuddidl-the-ocaml-interface-to-the-cudd-bdd-library/8028/1>


nberth announced
────────────────

  I'm pleased to write this first release announcement for the
  [mlcuddidl] package.

  These bindings to the CUDD BDD library were initially written by
  Bertrand Jeannet and have been around as an OPAM package for quite
  some time now.  The source code is now hosted on [framagit].

  This release of version 3.0.7 mostly ports the package to OCaml
  versions ≥ 4.10.


[mlcuddidl] <https://opam.ocaml.org/packages/mlcuddidl>

[framagit] <https://framagit.org/nberth/mlcuddidl>


first release of orf: OCaml Random Forests
══════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-first-release-of-orf-ocaml-random-forests/8034/1>


UnixJunkie announced
────────────────────

  I finished implementing a classifier and regressor using Random
  Forests (seminal paper:
  <https://link.springer.com/article/10.1023/A:1010933404324>):

  <https://github.com/UnixJunkie/orf>

  Some caveats:
  • this is somewhat slow; especially the classifier (and I don’t know
    so much how to accelerate it; probably two orders of magnitude
    slower than sklearn).
  • this is not super generic (int IntMap sparse features only; i.e. a
    sparse vector of integers represents a sample).

  The package is now available in opam (opam install orf).

  Two interfaces are exposed:

  RFC (for classification)
  <https://github.com/UnixJunkie/orf/blob/master/src/RFC.mli>

  RFR (for regression)
  <https://github.com/UnixJunkie/orf/blob/master/src/RFR.mli>

  The test file shows some usage examples:
  <https://github.com/UnixJunkie/orf/blob/master/src/test.ml>

  If you want to help, I tried to flag a few things for the near future:
  <https://github.com/UnixJunkie/orf/issues>

  If you use it and if it is useful to you, I would be happy to know.


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2021-06-01  9:23 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2021-06-01  9:23 UTC (permalink / raw)
  To: lwn, cwn, caml-list

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

Hello

Here is the latest OCaml Weekly News, for the week of May 25 to June 01,
2021.

Table of Contents
─────────────────

Dream — a simple, yet feature-complete Web framework
Ocaml developer at Routine, Paris, Remote OK
Feather 0.2.0
BAP 2.3.0 Release
Building Ahrefs codebase with Melange
Lwt 5.4.1
Other OCaml News
Old CWN


Dream — a simple, yet feature-complete Web framework
════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/dream-a-simple-yet-feature-complete-web-framework/7909/1>


Anton Bachin announced
──────────────────────

  I am pleased to announce [*Dream*], a very easy-to-use Web framework
  with high performance, secure defaults, and thorough documentation!

  <https://aws1.discourse-cdn.com/standard11/uploads/ocaml/original/2X/3/3384d2a4557f6ab17b585711a47e4f6c90a77652.png>

  It is available now from opam, with `opam install dream'.

  Dream offers:

  • [WebSockets] and [GraphQL].
  • A [template syntax], which you can see in the image above.
  • Trivial [HTTPS and HTTP/2 support], allowing simple deployments
    without a proxy.
  • [Sessions] with pluggable [back ends].
  • Easy [secure cookies] and [CSRF-safe forms].

  …and more, yet Dream sticks to a simple programming model:

  • Web apps are just [bare functions] from requests to responses.
  • [Middlewares] are just higher-order wrapper functions.
  • [Routes] tell the [router] which of these functions to call.

  Indeed, for those who like algebra, there is a certain [structure] to
  Dream. However, that's not the point of this post!

  Dream is meant to be very easy to understand. It sticks to base types,
  introducing only a few types of its own, and uses existing languages,
  such as HTML for templates, and URLs for routes. Dream itself is one
  module in one opam package, which lives in a monorepo. The [docs] are
  on one page.

  Dream is loosely coupled. Even though Dream offers many defaults, it
  is unopinionated, and you can quickly configure or replace
  anything. For example, it is easy to [use TyXML] for templates, and
  Dream happily supports such usage with examples.

  Security-sensitive features, such as cookies, are arranged so that
  simple and obvious usage is automatically secure.  Wherever security
  still depends on the Dream app, the docs [highlight] it. Dream has
  selected a modern [cipher] as a default, supports [key rotation], and
  offers suggestions for other purposes, such as password hashing. It
  implements and abstracts away all of the [OWASP] security guidelines
  that are relevant to its level.

  Dream is designed for full internationalization. It has a centralized
  [error handler] that intercepts even lower-level HTTP errors, so that
  you can decorate them with your app's own error template, and leak no
  hardcoded strings. Dream's URL encoders [favor] internationalized
  (UTF-8) URIs, and the router accepts them.

  Finally, Dream is designed for a wide range of applications, including
  with or without a proxy, standalone or embedded in larger binaries,
  and with external static assets or [assets compiled in].


[*Dream*] <https://github.com/aantron/dream>

[WebSockets]
<https://github.com/aantron/dream/tree/master/example/k-websocket#files>

[GraphQL]
<https://github.com/aantron/dream/tree/master/example/w-graphql-subscription#files>

[template syntax]
<https://github.com/aantron/dream/tree/master/example/7-template#files>

[HTTPS and HTTP/2 support]
<https://github.com/aantron/dream/tree/master/example/l-https#files>

[Sessions]
<https://github.com/aantron/dream/tree/master/example/b-session#files>

[back ends] <https://aantron.github.io/dream/#back-ends>

[secure cookies] <https://aantron.github.io/dream/#cookies>

[CSRF-safe forms] <https://aantron.github.io/dream/#forms>

[bare functions] <https://aantron.github.io/dream/#type-handler>

[Middlewares] <https://aantron.github.io/dream/#type-middleware>

[Routes] <https://aantron.github.io/dream/#type-route>

[router] <https://aantron.github.io/dream/#val-router>

[structure] <https://aantron.github.io/dream/#algebra>

[docs] <https://aantron.github.io/dream/>

[use TyXML]
<https://github.com/aantron/dream/tree/master/example/w-tyxml#files>

[highlight]
<https://github.com/aantron/dream/tree/master/example/7-template#security>

[cipher] <https://aantron.github.io/dream/#cryptography>

[key rotation] <https://aantron.github.io/dream/#servers>

[OWASP] <https://cheatsheetseries.owasp.org/>

[error handler]
<https://github.com/aantron/dream/tree/master/example/9-error#files>

[favor] <https://aantron.github.io/dream/#val-to_percent_encoded>

[assets compiled in]
<https://github.com/aantron/dream/tree/master/example/w-one-binary#files>

Documentation
╌╌╌╌╌╌╌╌╌╌╌╌╌

  Dream is very extensively documented. See…

  • [*Examples*], the first several of which make up a tutorial. Each
    example is a complete project.
  • The online [*playground*], which features many of the examples, and
    is itself a [Dream app]!
  • The [*API docs*].

  In particular, see

  • Deployment examples for [Heroku], Digital Ocean [with Docker], and
    Digital Ocean [with systemd], all of which include GitHub Actions
    scripts and instructions.
  • Full-stack examples with [js_of_ocaml], [ReScript], and [Melange].
  • Examples in [Reason syntax].
  • Development [watching] and [live reloading].


[*Examples*]
<https://github.com/aantron/dream/tree/master/example#readme>

[*playground*] <http://dream.as/ocaml>

[Dream app]
<https://github.com/aantron/dream/tree/master/example/z-playground>

[*API docs*] <https://aantron.github.io/dream/>

[Heroku]
<https://github.com/aantron/dream/tree/master/example/z-heroku#files>

[with Docker]
<https://github.com/aantron/dream/tree/master/example/z-docker-esy#files>

[with systemd]
<https://github.com/aantron/dream/tree/master/example/z-systemd#files>

[js_of_ocaml]
<https://github.com/aantron/dream/tree/master/example/w-fullstack-jsoo#files>

[ReScript]
<https://github.com/aantron/dream/tree/master/example/w-fullstack-rescript#files>

[Melange]
<https://github.com/aantron/dream/tree/master/example/r-fullstack-melange#files>

[Reason syntax]
<https://github.com/aantron/dream/tree/master/example#reason>

[watching]
<https://github.com/aantron/dream/tree/master/example/w-fswatch#files>

[live reloading]
<https://github.com/aantron/dream/tree/master/example/w-live-reload#files>


Contributing
╌╌╌╌╌╌╌╌╌╌╌╌

  Dream has already received several very helpful [contributions], and
  more are very welcome! See [`CONTRIBUTING.md']. I must also
  acknowledge all the people working on Dream's [dependecies] and [prior
  art]. In particular, Dream relies heavily on the HTTP and WebSocket
  [servers] primarily by Spiros Eliopoulos (@seliopou) and Antonio Nuno
  Monteiro (@anmonteiro).

  Apart from accepting code, docs, and examples, Dream will happily link
  to:

  • Blogs and articles, as different people learn best from different
    presentations.
  • "Downstream" libraries to use with Dream.

  For example, Thibaut Mattio (@tmattio) is working on
  [dream-livereload], a live-reloading middleware for Dream, similar to
  the [example], which he also contributed! Once dream-livereload is
  slightly more mature, Dream will link to it from its README.

  There is also [dream-serve], a live-reloading static site server based
  on Dream and libuv, which was used to develop the docs.


[contributions] <https://github.com/aantron/dream/graphs/contributors>

[`CONTRIBUTING.md']
<https://github.com/aantron/dream/blob/master/docs/CONTRIBUTING.md>

[dependecies]
<https://github.com/aantron/dream/blob/b79b06dd6add32beba6eee6864ce99413634b7b3/dream.opam#L49-L111>

[prior art] <https://github.com/aantron/dream#acknowledgements>

[servers]
<https://github.com/aantron/dream/tree/b79b06dd6add32beba6eee6864ce99413634b7b3/src/vendor>

[dream-livereload] <https://github.com/tmattio/dream-livereload>

[example]
<https://github.com/aantron/dream/tree/master/example/w-live-reload#files>

[dream-serve] <https://github.com/aantron/dream-serve>


Roadmap
╌╌╌╌╌╌╌

  Dream is currently in an alpha state. It is thought (by me) to be
  internally quite stable. However, there will probably be various API
  tweaks before release 1.0.0.

  My current, rough plan is to release several alphas of Dream over six
  months or so. The releases will address:

  1. Flow control for very large responses, and getting the "advanced"
     part of the I/O API to be as close to zero-copy and non-allocating
     as possible (or reasonable).
  2. Remaining (optional) [security enhancements], such as a [default
     content security policy].
  3. Remaining [session improvements], such as re-keying.
  4. Friction in handling of JSON, database access, etc. This is not
     properly part of or due to Dream, but it should be addressed for a
     better Web development experience.
  5. Multicore and effects support.

  That's all. Let's bring OCaml to the Web! Happy Web programming!


  <https://github.com/aantron/dream>


[security enhancements]
<https://github.com/aantron/dream/issues?q=is%3Aissue+is%3Aopen+label%3Asecurity>

[default content security policy]
<https://github.com/aantron/dream/issues/48>

[session improvements] <https://github.com/aantron/dream/issues/13>


Anton Bachin then added
───────────────────────

  For readers who saw the repo during the earlier ["leak,"] the main
  updates are:

  • A large number of new examples, including [deployment].
  • The [playground], which runs the examples, and itself served as a
    test.
  • An esy-based [quick start] script.

  There have also been very many smaller changes to the code, API, and
  the rest of the docs, but the above changes are the biggest "chunks."
  The rest is too much to detail :)


["leak,"] <https://discuss.ocaml.org/t/7605>

[deployment]
<https://github.com/aantron/dream/tree/master/example#deploying>

[playground] <http://dream.as>

[quick start] <https://github.com/aantron/dream#quick-start>


Ivan Gotovchits asked and Anton Bachin replied
──────────────────────────────────────────────

        I was always wondering how does the source code that uses
        [templates] work with OCaml tooling, in particular with
        merlin, ocp-indent, ocaml-format, tuareg and other editor
        modes?

  It doesn't work well in practice with anything other than syntax
  highlighting. Note that you control the syntax mode with the
  extension. If your template is mostly HTML, you can name it
  `foo.eml.html'.

  The intent is that the templates should contain mostly HTML in a large
  project, and most of them would be in their own `template/'
  subdirectory. OCaml tooling wouldn't be needed for these mostly-HTML
  files. For a still-small, but real example of this, see the
  Playground's [`client.eml.html'].

  The one-file `.ml' projects with templates, where tooling is a
  problem, are mostly good for the very first steps of getting started,
  and examples.

  There is also an issue about this in the repo, [#55 " how to apply
  ocamlformat"].

  Note that, as in the announcement text, you can use Dream with other
  templaters, including [TyXML], which has an [HTML PPX]. In addition,
  if you are using Reason, you can use [TyXML JSX]. Either of these
  options interacts well with tooling, as far as I know.

  I didn't make TyXML the default because it considerably increases the
  Dream learning curve for getting basic tasks done. However, Dream
  still supports the choice of using TyXML with examples and links.


[templates] <https://aantron.github.io/dream/#templates>

[`client.eml.html']
<https://github.com/aantron/dream/blob/fa20aebf36307a07b59c9ea018c25e508415d91a/example/z-playground/client/client.eml.html>

[#55 " how to apply ocamlformat"]
<https://github.com/aantron/dream/issues/55>

[TyXML]
<https://github.com/aantron/dream/tree/master/example/w-tyxml#files>

[HTML PPX]
<https://github.com/aantron/dream/tree/master/example/w-tyxml#html-syntax>

[TyXML JSX]
<https://github.com/aantron/dream/tree/master/example/r-tyxml#files>


Ocaml developer at Routine, Paris, Remote OK
════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/job-ocaml-developer-at-routine-paris-remote-ok/7911/1>


mefyl announced
───────────────

  Routine (<https://routine.co>) is looking for an OCaml developer.

  Routine is a personal productivity assistant. The technological
  revolves heavily around OCaml which represents 90% of the codebase,
  the remaining 10% being the UI in Typescript and Vue.js. We target
  both the browser and desktop through electron, using Js_of_ocaml.

  While the product is "just" a web app, our technological and academic
  background leads us to use designs that, I think, can pique the
  interest of seasoned Ocaml developer. Amongst other things :

  • Type-driven programming based on ppx derivers that produces
    typescript declaration for frontend bindings, JSON schema to expose
    and consume external REST APIs (Google, Notion, …), automatic SQL
    bindings, etc.
  • Angstrom based parsing for the interactive console with highlighting
    and completion.
  • Incremental based state updates to refresh minimal subsets of the
    app.
  • Highly concurrent implementation through Lwt, exception-free design.

  We use state of the art CI/CD and development processes. We plan on
  distributing open sources packages of these utilities (type-driven
  system, Google API bindings, Notion API bindings, …). Future exciting
  subjects could be extending Angstrom with manual rollback to implement
  generic completions or binding Vue in OCaml directly using melange or
  rescript to achieve rock solid typing down to the very frontend code
  (highly prospective teases, don't quote me on this yet :).

  The company is very much a startup, having just completed YC batch W21
  and closed its first round of investment.  Salary is up to market
  standard depending on the profile, plus usual options package, to be
  discussed.

  While we expect great OCaml and general computer science proficiency,
  we're open to most levels of experience.  Thoroughness and a love for
  well rounded, robust and beautiful software design is a must have -
  but that comes bundled with OCaml love, right ?

  Do not hesitate to reach out for any question here, at
  quentin.hocquet@routine.co or refer this to someone who may be
  interested.

  Thanks for your time and happy camel riding !


Feather 0.2.0
═════════════

  Archive: <https://discuss.ocaml.org/t/ann-feather-0-2-0/7916/1>


Charles announced
─────────────────

  I'm happy to announce feather version 0.2.0! Feather is a minimal
  library for bash-like scripting and process execution.  ([github],
  [opam])

  This release fixes some bugs and adds three new functions

  • `val and_ : cmd -> cmd -> cmd' — chain two commands, short
    circuiting if the first fails, akin to bash's `&&' operator.
  • `val or_ : cmd -> cmd -> cmd' — chain two commands, short circuiting
    if the first succeeds, akin to bash's `||' operator.
  • `val sequence : cmd -> cmd -> cmd' — chain two commands regardless
    of exit status.

  We include two new operators `&&.' and `||.' which correspond to
  `and_' and `or_' respectively. They'll be found in the `Feather.Infix'
  module, which has been renamed from `Feather.File_redirection_infix'.

  Many thanks to new contributors @Firobe @juxd and @tmarti2 for making
  this release possible!


[github] <https://github.com/charlesetc/feather>

[opam] <https://opam.ocaml.org/packages/feather/>


BAP 2.3.0 Release
═════════════════

  Archive: <https://discuss.ocaml.org/t/ann-bap-2-3-0-release/7926/1>


Ivan Gotovchits announced
─────────────────────────

  We're proud to release the next stable version of Carnegie Mellon
  University Binary Analysis Platform ([BAP]). The full list of changes
  can be found on the [release page] but the most interesting new
  features are highlighted below.


[BAP] <https://github.com/BinaryAnalysisPlatform/bap>

[release page]
<https://github.com/BinaryAnalysisPlatform/bap/releases/tag/v2.3.0>

The Primus Lisp Frontend
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  Now BAP is able to understand not only binary programs but sources
  written in Primus Lisp. In case if you don't know, [Primus Lisp] is
  our DSL for writing analysis and library stubs (e.g., to specify
  semantics of missing library functions). Now, it is possible to reify
  Primus Lisp programs into static representation. For example, we can
  translate the following Lisp program

  ┌────
  │ ;; file demo.lisp
  │ 
  │ (defun example1 (x)
  │   (set R0 1)
  │   (set R1 2)
  │   (set R3 (+ R1 R2 (* R1 R2 3)))
  │   (memory-write R4 (+ R3 R1))
  │   (if (> R0 (* R0 R0))
  │       (exec-addr 0xDEADBEEF)
  │     (set R0 (* R0 R2 R3))))
  └────

  into the BIL (BAP Instruction Language) AST and then pretty print it,
  ┌────
  │ $ bap show --primus-lisp-load=demo --target=armv7+le -obap:bil example1
  │ example1:
  │ "{
  │    R0 := 1
  │    R1 := 2
  │    R3 := R1 + R2 + R1 * R2 * 3
  │    mem := mem with [R4] <- low:8[R3 + R1]
  │    #1 := R0 * R0 < R0
  │    if (#1) {
  │      jmp 0xDEADBEEF
  │    }
  │    else {
  │      R0 := R0 * R2 * R3
  │    }
  │  }"
  └────

  This new feature not only allows us to reify our Lisp stubs into
  static form but also enables the main killer feature. It is now
  possible to specify the semantics of machine instructions in Primus
  Lisp. This feature enables rapid development and experimentation with
  CPU semantics. And this brings us to the next new feature.


[Primus Lisp]
<https://binaryanalysisplatform.github.io/bap/api/master/bap-primus/Bap_primus/Std/Primus/Lisp/index.html>


New Target: RISC-V
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  The first application of the Primus Lisp Frontend was writing the
  RISC-V semantics. It took me only one day to write the semantic of the
  [minimal subset] of RISC-V instruction. Well, partially it is because
  RISCV-V is truly RISC, like the `add' instruction just adds,

  ┌────
  │ (defun ADDI (dst rm rn)
  │   (set$ dst (+ rm rn)))
  └────


[minimal subset]
<https://github.com/BinaryAnalysisPlatform/bap/pull/1287>


New Target: ARMv8 (Aarch64)
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  The next target that we tried was Aarch64, the 64-bit ARM
  architecture. It was a little bit [harder] but still definitely more
  readable than the official ARM semantics.


[harder]
<https://github.com/BinaryAnalysisPlatform/bap/blob/master/plugins/arm/semantics/aarch64.lisp>


Adds namespaces (packages) to Primus Lisp
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  Since now we have much more code in Primus Lisp we found ourselves
  struggling with name clashes. The Primus Lisp program model is a set
  of mututally recursive overloaded definitions, so naming things is
  crucial for us. Therefore we implemented namespaces (which are,
  following Common Lisp trandition, named packages). We ended up in a
  very Common Lisp look and fill but without inheriting CL problems,
  like the dependency on the order of inclusion and package
  redefinitions, and so on. Given our model, and that Primus Lisp
  features type inference and Haskell-style type classes for
  overloading, it wasn't that easy to implement :)


Adds the `bap dependencies' command
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  The [command] outputs program dependencies such as libraries and
  symbols. The information is collected recursively with various output
  options, including dependency graph, YAML, JSON, and SEXP.

  Much like `nm~+~ldd' on steroids and cross-platform (works on
  PE/ELF/COFF, and on binaries that are not native to the host). So it
  could be quite useful even if you're not doing program analysis, but
  just want to solve a nasty missing library feature or figure our what
  programs use what libraries, e.g.,
  ┌────
  │ $ bap dependencies `which ping` --recursive --ldconfig -ograph | graph-easy --as boxart
  │                      ┌────────────────┐
  │                      │ libresolv.so.2 │ ──────────────────────────────────┐
  │                      └────────────────┘                                   │
  │                        ▲                                                  │
  │                        │                                                  │
  │                        │                                                  │
  │ ┌──────────────┐     ┌──────────────────────────┐     ┌────────────────┐  │
  │ │ libidn.so.11 │ ◀── │           ping           │ ──▶ │ libnettle.so.6 │  │
  │ └──────────────┘     └──────────────────────────┘     └────────────────┘  │
  │   │                    │                 │              │                 │
  │   │                    │                 │              │                 │
  │   │                    ▼                 │              │                 │
  │   │                  ┌────────────────┐  │              │                 │
  │   │                  │  libcap.so.2   │  │              │                 │
  │   │                  └────────────────┘  │              │                 │
  │   │                    │                 │              │                 │
  │   │                    │                 │              │                 │
  │   │                    ▼                 ▼              │                 │
  │   │                  ┌──────────────────────────┐       │                 │
  │   └────────────────▶ │        libc.so.6         │ ◀─────┘                 │
  │                      └──────────────────────────┘                         │
  │                        │                      ▲                           │
  │                        │                      └───────────────────────────┘
  │                        ▼
  │                      ┌────────────────┐
  │                      │ ld-linux.so.2  │
  │                      └────────────────┘
  └────


[command] <https://github.com/BinaryAnalysisPlatform/bap/pull/1294>


What's Next?
╌╌╌╌╌╌╌╌╌╌╌╌

  We are working on decompilation and integrating with Ghidra, so in
  2.4.0 you should expect that bap will output C code for binaries. But
  it is not all, we're even working into turning BAP into a program
  analysis framework that enables analysis of source code programs. And
  even crazier, we're working on adding compilation capabilities to BAP,
  i.e., an ability to compile/recompile the input sources. So soon BAP
  will outlive its name, or we will need to find a new interpretation
  for the BAP acronym, something like the Best Analysis Platform ;)

  We also plan to make BAP more available for non-seasoned OCaml users
  and want to push bap into mainstream Linux distributions and overall
  lower the entrance barrier.  Of course, with the end goal to lure
  users into installing opam))


Questions and Suggestions
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  Please, do not hesitate to ask questions and provide your suggestions
  and, ideally, join our [community]. Even if you don't plan to work on
  binary analysis, BAP offers lots of opportunities for writing your toy
  programs for learning the language, or maybe even student projects.


[community] <https://gitter.im/BinaryAnalysisPlatform/bap>


Building Ahrefs codebase with Melange
═════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/building-ahrefs-codebase-with-melange/7941/1>


Javier Chávarri announced
─────────────────────────

  At Ahrefs, we make extensive use of OCaml and ReScript —previously
  [known as BuckleScript]. So we have been following the latest
  developments in the ReScript ecosystem with great interest.

  A few months ago, [António Monteiro] released [Melange], a fork of
  ReScript with an emphasis of keeping compatibility with OCaml
  ecosystem. One of the key features of Melange is that it uses OCaml
  4.12, with all the upsides that that entails (ppxlib, let syntax,
  better errors, …). Besides that, Melange has been modeled recently [as
  just a `compiler-libs' library], so it can be integrated with other
  OCaml code in a single opam switch.

  We decided to give Melange a try recently at Ahrefs, and shared the
  results of this experiment in a blog post:

  <https://tech.ahrefs.com/building-ahrefs-codebase-with-melange-9f881f6d022b>

  We are currently looking into how a deeper integration with Dune would
  look like. If your team or company has tried Melange, or is interested
  on doing so, we would be very interested to hear your use cases and
  share experiences.


[known as BuckleScript]
<https://rescript-lang.org/blog/bucklescript-is-rebranding>

[António Monteiro] <https://discuss.ocaml.org/u/anmonteiro/summary>

[Melange] <https://github.com/melange-re/melange>

[as just a `compiler-libs' library]
<https://github.com/melange-re/melange/pull/107>


Lwt 5.4.1
═════════

  Archive: <https://discuss.ocaml.org/t/ann-lwt-5-4-1/7943/1>


Raphaël Proust announced
────────────────────────

  We are glad to announce the release of version 5.4.1 of Lwt: a
  bugfix-only release.

  <https://github.com/ocsigen/lwt/releases/tag/5.4.1>

  You can update to this version in `opam':

  ┌────
  │ opam update
  │ opam upgrade lwt
  └────

  Thanks to the contributors for finding and fixing the bugs, leading to
  this release. Check out the release notes (link above) for a full
  list.


Other OCaml News
════════════════

From the ocamlcore planet blog
──────────────────────────────

  Here are links from many OCaml blogs aggregated at [OCaml Planet].

  • [Beta release of Frama-C 23.0~rc1 (Vanadium)]
  • [Building Ahrefs codebase with Melange]
  • [Computing an integer using a Grothendieck topos]
  • [ ReScript 9.1]
  • [Tutorial: Format Module of OCaml]
  • [Tarides project SCoP is selected as one of the brightest Data
    Portability projects in Europe!]
  • [Alt-Ergo Users’ Club Annual Meeting (2021)]


[OCaml Planet] <http://ocaml.org/community/planet/>

[Beta release of Frama-C 23.0~rc1 (Vanadium)]
<https://frama-c.com/fc-versions/vanadium.html>

[Building Ahrefs codebase with Melange]
<https://tech.ahrefs.com/building-ahrefs-codebase-with-melange-9f881f6d022b>

[Computing an integer using a Grothendieck topos]
<http://math.andrej.com/2021/05/18/computing-an-integer-using-a-sheaf-topos/>

[ ReScript 9.1] <https://rescript-lang.org/blog/release-9-1>

[Tutorial: Format Module of OCaml]
<https://www.ocamlpro.com/2021/05/06/tutorial-format-module-of-ocaml/>

[Tarides project SCoP is selected as one of the brightest Data
Portability projects in Europe!]
<https://tarides.com/blog/2021-04-30-scop-selected-for-dapsi-initiative>

[Alt-Ergo Users’ Club Annual Meeting (2021)]
<https://www.ocamlpro.com/2021/04/29/alt-ergo-users-club-annual-meeting-2021/>


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2021-05-25  7:30 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2021-05-25  7:30 UTC (permalink / raw)
  To: lwn, cwn, caml-list

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

Hello

Here is the latest OCaml Weekly News, for the week of May 18 to 25,
2021.

Table of Contents
─────────────────

Applied PL research at Jane Street
IRC channels available on libera.chat
B Trees in Ocaml via Fmlib 0.3.0
GitHub Actions for OCaml: now stable and on the ocaml org
Set up OCaml 2.0.0-alpha
FrontC 4.1.0 (Vingt ans après)
Old CWN


Applied PL research at Jane Street
══════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/job-applied-pl-research-at-jane-street/7877/1>


Yaron Minsky announced
──────────────────────

  This isn't exactly news, but we're (still) actively looking to hire
  people to do applied PL research, with a particular focus on
  type-level work. Follow this link if you want to see how to apply.

  <https://blog.janestreet.com/applied-PL-research/>

  Please share it around with anyone who you think might be on the
  market!

  *About the job*

  Part of our ambition is to grow OCaml into a language that does an
  ever better job of being convenient and expressive by default, while
  allowing for the kind of precise control you need when building high
  performance systems, where it's needed.

  That's led us to do research on stack-allocation, unboxed types,
  algebraic effects, type-level resource tracking, and more. We think
  it's an exciting direction for the language, and there's a lot of
  challenging and novel work to be done, and the main thing that could
  speed us up is having more of the right people to work on it!

  Jane Street is an excellent laboratory for this kind of work: big
  enough to have serious and demanding use-cases, but small and nimble
  enough to be able to try out new language features, and then back out
  of them or change them in incompatible ways if need be.

  And all the work we do on the compiler is in the open, with the goal
  of getting the final results into a state where they can be
  upstreamed.

  Also, it's a great team! Full of serious experts who have collectively
  contributed a lot to OCaml and PL research over the years, and also a
  really nice set of people to work with. And I think the team has a
  good balance of the practical and theoretical: working hard to do the
  right thing, but also finding practical ideas that can make forward
  progress in the near term.

  *Who are we looking for*

  We're looking for people with a good balance of theoretical and
  engineering backgrounds, since the work is demanding on both fronts.

  We're happy to hire people at a range of experience levels: people who
  have just finished a post-doc or PhD, up to experienced academics and
  people in industry.

  The team has a presence in New York and London, and we're hiring in
  both offices. No remote work, I'm afraid.


IRC channels available on libera.chat
═════════════════════════════════════

  Archive:
  <https://sympa.inria.fr/sympa/arc/caml-list/2021-05/msg00022.html>


Adrien Nader announced
──────────────────────

  Due to the recent troubles on freenode[1][2], I've connected to
  irc.libera.chat early in order to create and register the same
  channels that I know and take care ofa on freenode (i.e. #ocaml and
  #ocaml-fr).

  I am not stating libera.chat is better than freenode.net although the
  amount of staffers moving makes me think freenode.net will not be
  running fine for a much longer time.

  At the moment I believe it is better to keep both channels running and
  to encourage people to connect on libera.chat too. In the future, I
  might force migration by progressively silencing the channel that
  should be abandoned.

  If you maintain a relay bot, can you please add it on libera.chat too?

  As far as I know, there is no Matrix bridge available currently. It
  seems the discussion/process for bridge additions occurs at [3].

  A good news is that I've gotten the full rights on the channel,
  something which was requiring paperwork on freenode (which I had
  already mentioned but never got around to doing and for which I never
  even remotely got time for).

  [1] <https://lwn.net/Articles/856543/> (this still constantly changes)
  [2]
  <https://en.wikipedia.org/wiki/Freenode#2021_ownership_change_and_conflict>
  [3] <https://github.com/matrix-org/matrix-appservice-irc/issues/208>


B Trees in Ocaml via Fmlib 0.3.0
════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/b-trees-in-ocaml-via-fmlib-0-3-0/7880/1>


Hbr announced
─────────────

  I am pleased to announce the release (0.3.0) of fmlib, a functional
  library with managed effects.

  The main new feature of release 0.3.0 are B trees. B trees can be used
  to implement finite sets and finite maps. Fmlib's B trees have
  functionality similar to the modules `Set' and `Map' of the standard
  library.

  The modules `Set' and `Map' of the standard library are based on AVL
  trees. B trees offer the same functionality but have on modern
  processors a better cache performance and have better data locality.

  The current B tree implementation in `Fmlib' implements B trees by
  using arrays which are guaranteed to fit into a cache line. The design
  of B trees is described [here]. The API can be found [here].

  The library `Fmlib' has four main components:

  • [Standard Datatypes]: This component offers some modules from
    `Stdlib' with additional functionality. E.g. `Fmlib_std.Array'
    offers functions to insert elements into arrays, remove elements
    from an array and binary search in a sorted array. It has the
    modules `Result' and `Option' which can be used to avoid exceptions
    and use exceptions in a more structured way. The modules `Result'
    and `Option' in `Fmlib' offer a complete monadic interface and offer
    the `let*' operator to write well readable monadic code.

  • [Pretty Printing]: Print tree like structures in a nice way and use
    the library completely functional. The library does not assume a
    specific IO method. The pretty printer generates a lazy stream of
    characteres which can be written by all io functions.

  • [Combinator Parsing]: Easily parse textual input by the use of
    combinators. The library supports indentation sensitivity and can
    therefore be used to parse yaml files, haskell, python,
    etc. Furthermore no input method is assumed. The generated parsers
    are sink of tokens (or characters). You can choose any input method
    and push the tokens/characters into the parsers. The generated
    parsers are fully incremental. Parser can be stored at any position
    of the input stream and in case of interactive editing, parsing can
    be resumed from any point of the stream.

  • [Interface to Javascript]: This components contains primitives to
    interface to javascript via `js_of_ocaml'.

  `Fmlib' can be installed via opam:

  ┌────
  │ opam update
  │ opam install fmlib
  │ opam install fmlib_std
  │ opam install fmlib_pretty
  │ opam install fmlib_parse
  │ opam install fmlib_js
  └────

  The source code of the library is located at [github]


[here] <https://fmlib_ocaml.readthedocs.io>

[here] <https://hbr.github.io/fmlib/odoc/fmlib_std>

[Standard Datatypes] <https://hbr.github.io/fmlib/odoc/fmlib_std>

[Pretty Printing] <https://hbr.github.io/fmlib/odoc/fmlib_pretty>

[Combinator Parsing] <https://hbr.github.io/fmlib/odoc/fmlib_parse>

[Interface to Javascript] <https://hbr.github.io/fmlib/odoc/fmlib_js>

[github] <https://github.com/hbr/fmlib>


GitHub Actions for OCaml: now stable and on the ocaml org
═════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/github-actions-for-ocaml-now-stable-and-on-the-ocaml-org/7889/1>


Anil Madhavapeddy announced
───────────────────────────

  I [announced a beta] of OCaml/opam support for GitHub Actions back in
  Nov 2019, and the functionality has turned out to be popular. A number
  of projects in our community have been using the Action, and it can be
  found in the [GitHub Marketplace].

  It has been sufficiently popular that it's definitely time to get it
  off my personal GitHub account, and so I have transferred it to its
  new home at <https://github.com/ocaml/setup-ocaml>.  I am also very
  pleased to announce that @smorimoto and @dra27 are also now
  maintainers – they have both made significant improvements to it, and
  @smorimoto in particular has been working with the GitHub ecosystem to
  further improve the efficiency of the Action (such as by adding
  reliable caching).  Thank you to them both and [all the other
  contributors] for your help improving the CI experience around OCaml.

  If anyone else wishes to contribute to improving the action, please do
  get involved on [the issue tracker].  And of course, if you are still
  referencing `avsm/setup-ocaml' in your own workflow definition, this
  is a good time to change it to `ocaml/setup-ocaml'.

  This is probably a good time to note that the other [ci-scripts]
  repository on the ocaml/ GitHub organisation is in sore need of either
  new maintainers (for the Travis CI), or being retired due to lack of
  support (primarily due to the shift to GitHub Actions). I'm immensely
  grateful to Travis CI for the decade of mostly free builds they have
  provided our community to date.


[announced a beta]
<https://discuss.ocaml.org/t/github-actions-for-ocaml-opam-now-available/4745>

[GitHub Marketplace]
<https://github.com/marketplace/actions/set-up-ocaml>

[all the other contributors]
<https://github.com/ocaml/setup-ocaml/graphs/contributors>

[the issue tracker] <https://github.com/ocaml/setup-ocaml/issues>

[ci-scripts] <https://github.com/ocaml/ocaml-ci-scripts>


Set up OCaml 2.0.0-alpha
════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-set-up-ocaml-2-0-0-alpha/7895/1>


Sora Morimoto announced
───────────────────────

  This is the announcement of the first alpha release of setup-ocaml
  v2. This includes quite a few changes, including reliable cache, as
  described in a recent [post].

  There are so many changes, so I would like to list only the notable
  changes. (The full changelog can be found at the bottom of the post.)


[post]
<https://discuss.ocaml.org/t/github-actions-for-ocaml-now-stable-and-on-the-ocaml-org/7889>

The "ocaml-version" input is now named "ocaml-compiler"
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  This was changed because calling it "OCaml Version" is not appropriate
  enough, e.g. to use the new variant naming convention introduced from
  4.12.


32 bits compiler support
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌


Semver-style version matching support
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  With the naughty exception of `4.02.2' , point releases are meant to
  be strictly compatible, so once OCaml dev team release a new point
  release, upgrading should be a no-brainer. With that in mind, it's
  obviously not smart to rewrite every workflow every time a new point
  release is released, so you can now specify versions in the style like
  `4.12.x'.


Reliable cache feature
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  The action supports not only the compiler cache, but also the [dune
  cache]. However, note that it is not available on the macOS runners
  until opam 2.0.9 is released. The dune cache is actually quite
  powerful for large projects, if you're interested in it, check out the
  comparison section of [ocaml/setup-ocaml#66]. The reliable cache
  feature uses the [@actions/cache] package internally, and I worked
  with the GitHub team to make it fast enough for setup-ocaml to be up
  to 4x faster. For the Ubuntu runners, you can set up your environment
  with cache in about 30~40 seconds at the fastest.


[dune cache] <https://github.com/ocaml/dune/blob/2.8.5/doc/caching.rst>

[ocaml/setup-ocaml#66] <https://github.com/ocaml/setup-ocaml/pull/66>

[@actions/cache]
<https://github.com/actions/toolkit/tree/main/packages/cache>


Automatic pinning and depext handling of local packages
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  For example, if you have a very large number of local packages, like
  the [Irmin] project, it can be quite a pain for a human to have to
  write a script to pin them all in your workflow. The action pins and
  depext the local packages if they exist in the repository by
  default. You can also use the glob pattern to select which local
  packages to handle, as described [here].

  <https://github.com/ocaml/setup-ocaml/releases/tag/v2.0.0-alpha>


[Irmin] <https://github.com/mirage/irmin>

[here]
<https://github.com/ocaml/setup-ocaml/blob/master/examples.md#using-glob-patterns-to-filter-local-packages>


FrontC 4.1.0 (Vingt ans après)
══════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-frontc-4-1-0-vingt-ans-apres/7906/1>


Ivan Gotovchits announced
─────────────────────────

  More than twenty years after its original release [FrontC] is still
  alive and getting new updates. Mostly it started with my frustration
  with its Makefiles that ended up in switching to menhir and dune and
  adding cram tests that finally enabled us to safely touch the grammar
  definitions and introduce a few c99 … c11 language features as well as
  more GNU extensions. Our end goal is to get a robust and easy-to-use C
  parser that is capable of taking a C program on a modern Linux
  distribution and get it parsed into a C abstract tree. It is not that
  trivial as it may sound as modern C library headers (especially GNU
  libc) use non-standard or standard but very modern C features, and
  most of the OCaml parsers that I have seen are still unable to parse
  them, including parsers from FramaC, C11parser, and even compcert
  parser (mostly they do not handle complex floating-point types and
  various extension types and some GCC attributes).

  Therefore, FrontC is still useful, especially if all that you want is
  to start doing program analysis with minimal initial effort, just do
  (but wait until it is [merged])

  ┌────
  │ opam install FrontC
  └────

  and start hacking!

  With that said, FrontC is mostly maintained at leisure time by
  volunteers, so the pull requests are very welcome.


[FrontC] <https://github.com/BinaryAnalysisPlatform/FrontC>

[merged] <https://github.com/ocaml/opam-repository/pull/18736>


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2021-05-11 14:47 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2021-05-11 14:47 UTC (permalink / raw)
  To: lwn, cwn, caml-list

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

Hello

Here is the latest OCaml Weekly News, for the week of May 04 to 11,
2021.

Table of Contents
─────────────────

Software engineer position at LexiFi (Paris)
Open source editor for iOS, iPadOS and macOS
Backend developer position at Issuu (Copenhagen)
25 years of OCaml
OCaml compiler development newsletter, issue 1: before May 2021
After so many years, I discover 'Str.bounded_full_split regexp str n'
Parser for the Scala programming language?
Old CWN


Software engineer position at LexiFi (Paris)
════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/job-software-engineer-position-at-lexifi-paris/7782/1>


Alain Frisch announced
──────────────────────

  [LexiFi] is hiring! We are looking for a fully-time software engineer
  to join our core development team. The vast majority of our stack is
  implemented in OCaml, and we have plenty of exciting projects on a
  wide range of topics.

  More info on <https://www.lexifi.com/careers/software_engineer/>


[LexiFi] <https://www.lexifi.com>


Open source editor for iOS, iPadOS and macOS
════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/open-source-editor-for-ios-ipados-and-macos/7624/15>


Continuing this thread, Nathan Fallet announced
───────────────────────────────────────────────

  Just updated the editor, I redesigned the macOS version, and it just
  looks better and more native

  <https://aws1.discourse-cdn.com/standard11/uploads/ocaml/optimized/2X/6/6b03c462755fb37a2d5018013c3d1c8bd45f53bf_2_1380x766.jpeg>

  What are your first impressions on it?


Backend developer position at Issuu (Copenhagen)
════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/job-backend-developer-position-at-issuu-copenhagen/7793/1>


Dario Teixeira announced
────────────────────────

  We are looking for a Backend Developer with experience in machine
  learning – and preferably also OCaml! – to join our Research &
  Development team. You will help build machine learning research
  prototypes and be responsible for integrating them into new and
  existing products.

  At Issuu, we use OCaml extensively in our production systems. If you
  love OCaml and functional programming in general, Issuu is a great
  place to put your passion into real-world products!

  Please find more information about this position at the following
  link:
  <https://jobs.lever.co/issuu/f502cb20-b216-4c67-8357-d748e1b35178>


Anentropic asked and Dario Teixeira replied
───────────────────────────────────────────

        I would love to hear more about your OCaml backend stack

  Well, we love to talk about our OCaml stack! :slightly_smiling_face:

  We rely on the Jane Street ecosystem a lot, using Core as a Stdlib
  replacement and Async for monadic concurrency.

  AMQP forms the backbone of our messaging system, and therefore we use
  [amqp-client] extensively.

  We use both MySQL and Postgresql databases in production. For the
  former we use [ppx_mysql], and for the latter, [PGOCaml]. (Thanks to
  Docker, we can give PGOCaml compile-time access to the DB without
  having to depend on the actual production DB.)

  We currently use Protobuf for serialisation, but spend a great amount
  of time complaining about it. We rely on [ocaml-protoc-plugin] to
  generate the OCaml code from Protobuf definitions.

  Anyway, that's just the basics of our stack. Do let me know if there's
  something else you'd like to know in more detail!


[amqp-client] <https://github.com/andersfugmann/amqp-client>

[ppx_mysql] <https://github.com/issuu/ppx_mysql>

[PGOCaml] <https://github.com/darioteixeira/pgocaml>

[ocaml-protoc-plugin] <https://github.com/issuu/ocaml-protoc-plugin>


roddy asked and Dario Teixeira replied
──────────────────────────────────────

        Do you use Protobuf for interop with non-OCaml systems? If
        not, I'm curious about whether you've considered
        [bin_prot] as an alternative; it seems like an obvious
        choice if you're using Core/Async.

  Yes, we use Protobuf mainly because we have a heterogeneous stack,
  where besides OCaml we also have services running Python, Kotlin, or
  Elixir.


[bin_prot]
<https://github.com/janestreet/bin_prot/blob/master/README.md>


Tim McGilchrist asked and Dario Teixeira
────────────────────────────────────────

        I'm curious about how you structure the business code (for
        want of a better word), in between the technical layers of
        talking to AMQP or an SQL store. Are there larger scale
        patterns like CQRS or DDD that you use to organise code?

  How do you package up code for deployment? Docker / AWS something.
  We're slowly migrating to a micro-service architecture (the pros and
  cons of which are outside the scope of this thread; that's a can of
  worms I'd rather not open…) whose cast of characters includes
  "entities" (responsible for storing/retrieving data from DBs), generic
  backend services that encapsulate business logic, frontend services,
  and backend-for-frontend services.

  We're using Docker for deployment on AWS (mostly), and slowly
  migrating from Docker Swarm to Kubernetes.


25 years of OCaml
═════════════════

  Archive: <https://discuss.ocaml.org/t/25-years-of-ocaml/7813/1>


Xavier Leroy announced
──────────────────────

  25 years ago, on May 9th 1996, release 1.00 of the Objective Caml
  language and system was announced:
  <https://sympa.inria.fr/sympa/arc/caml-list/1996-05/msg00003.html>

  It was already the consolidation of many years of work, integrating
  Jérôme Vouillon and Didier Rémy's work on objects and classes within
  Caml Special Light, itself a combination of my work on modules and
  native-code compilation with earlier code taken from Caml Light,
  especially Damien Doligez's GC.

  Little did I know that O(bjective) Caml would still be there 25 years
  later!

  A lot happened during this time, including several major evolutions of
  the language, and, much more importantly, the emergence of a community
  of users and an ecosystem of tools and libraries.  But maybe this was
  just the beginning for something even bigger?  We'll see…

  Happy birthday, OCaml!


David Allsopp replied
─────────────────────

  Most pleasingly, with a [very small number of patches], the Windows
  port still works in Visual Studio 2019:

  ┌────
  │ C:\Birthday>ocaml.exe
  │ 	Objective Caml version 1.00
  │ 
  │ #print_endline "Happy 25th Birthday, OCaml!";;
  │ Happy 25th Birthday, OCaml!
  │ - : unit = ()
  │ ##quit;;
  │ 
  │ C:\Birthday>type hooray.ml
  │ let rec hip_hip n =
  │   if n > 0 then
  │     let () = print_endline "hip hip! hooray!" in
  │     hip_hip (pred n)
  │ 
  │ let () = hip_hip 25
  │ C:\Birthday>ocamlopt -o hooray.exe hooray.ml
  │ 
  │ C:\Birthday>hooray
  │ hip hip! hooray!
  │ ...
  └────


[very small number of patches]
<https://github.com/dra27/ocaml/commits/25-years-of-ocaml>


On the OCaml Maling List, Roberto Di Cosmo also replied
───────────────────────────────────────────────────────

  Long live OCaml!

  Thanks Xavier, and to all the brilliant minds that contributed to the
  evolution and adoption of this beautiful language, and system, in this
  past quarter of a century.

  If I may add a personal note, one truly remarkable fact is that some
  rather complex code written in 1998 using OCaml 1.07 [1] could be
  compiled and run last year using OCaml 4.x *without modifications*:
  the only visible changes were the new warnings spotting potential
  issues in the code, thanks to the many improvements to the compiler
  over time.

  For the curious, all the details are here:
  <https://www.dicosmo.org/Articles/2020-ReScienceC.pdf>

  Cheers

  Roberto

  [1] that was the first version including support for marshalling
  closures, added in a fantastic one week-spring in Pisa exactly for
  this code :-)


OCaml compiler development newsletter, issue 1: before May 2021
═══════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ocaml-compiler-development-newsletter-issue-1-before-may-2021/7831/1>


gasche announced
────────────────

  I'm happy to introduce the first issue of the "OCaml compiler
  development newsletter". I asked frequent contributors to the OCaml
  compiler codebase to write a small burb on what they have been doing
  recently, in the interest of sharing more information on what people
  are interested in, looking at and working on.

  This is by no means exhaustive: many people didn't end up having the
  time to write something, and it's fine. But hopefully this can give a
  small window on development activity related to the OCaml compiler,
  structured differently from the endless stream of [Pull Requests] on
  the compiler codebase.

  (This initiative is inspired by the excellent Multicore
  newsletter. Please don't expect that it will be as polished or
  consistent :yo-yo: .)

  Note:

  • Feel free of course to comment or ask questions, but I don't know if
    the people who wrote a small blurb will be looking at the thread, so
    no promises.

  • If you have been working on the OCaml compiler and want to say
    something, please feel free to post! If you would like me to get in
    touch next time I prepare a newsletter issue (some random point in
    the future), please let me know by email at (gabriel.scherer at
    gmail).


[Pull Requests] <https://github.com/ocaml/ocaml/pulls>

@dra27 (David Allsopp)
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  Compiler relocation patches now exist. There's still a few left to
  write, and they need splitting into reviewable PRs, but the core
  features are working. A compiler installation can be copied to a new
  location and still work, meaning that local switches in opam may in
  theory be renamed and, more importantly, we can cache previously-built
  compilers in an opam root to allow a new switch's compiler to be a
  copy. This probably won't be reviewed in time for 4.13, although it's
  intended that once merged opam-repository will carry back-ports to
  earlier compilers.

  A whole slew of scripting pain has lead to some possible patches to
  reduce the use of scripts in the compiler build to somewhat closer to
  none.

  FlexDLL bootstrap has been completely overhauled, reducing build time
  considerably. This will be in 4.13 (#[10135])


[10135] <https://github.com/ocaml/ocaml/pull/10135>


@nojb (Nicolás Ojeda Bär)
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  I am working on #[10159], which enables debug information in
  `-output-complete-exe' binaries. It uses [incbin] under Unix-like
  system and some other method under Windows.


[10159] <https://github.com/ocaml/ocaml/pull/10159>

[incbin] <https://github.com/graphitemaster/incbin>


@gasche (Gabriel Scherer)
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  I worked on bringing more PRs to a decision (merge or close). The
  number of open PRs has gone from 220-ish to 180, which feels nice.

  I have also contributed to @Ekdohibs' project [camlboot], which is a
  "bootstrap-free" implementation of OCaml able to compile the OCaml
  compiler itself. It currently targets OCaml 4.07 for various
  reasons. We were able to do a full build of the OCaml compiler, and
  check that the result produces bootstrap binaries that coincide with
  upstream bootstraps. This gives extremely strong confidence that the
  OCaml bootstrap is free from "trusting trust" attacks. For more
  details, see our [draft paper].


[camlboot] <https://github.com/Ekdohibs/camlboot>

[draft paper] <http://gallium.inria.fr/~scherer/drafts/camlboot.pdf>

with @Octachron (Florian Angeletti)
┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄

  I worked with Florian Angeletti on deprecating certain command-line
  warning-specifier sequences, to avoid usability issues with (new in
  4.12) warning names. Before `-w -partial-match' disables warning 4,
  but `-w -partial' is interpreted as the sequence `w -p -w a -w r -w t
  -w i -w a -w l', most of which are ignored but `-w a' silences all
  warnings. Now multi-letter sequences of "unsigned" specifiers (`-p' is
  signed, `a' is unsigned) are deprecated. (We first deprecated all
  unsigned specifiers, but Leo White tested the result and remarked that
  `-w A' is common, so now we only warn on multi-letter sequences of
  unsigned specifiers.

  I am working with @Octachron (Florian Angeletti) on grouping signature
  items when traversing module signatures. Some items are "ghost items"
  that are morally attached in a "main item"; the code mostly ignores
  this and this creates various bugs in corner cases. This is work that
  Florian started in September 2019 with #[8929], to fix a bug in the
  reprinting of signatures. I only started reviewing in May-September
  2020 and we decided to do sizeable changes, he split it in several
  smaller changes in January 2021 and we merged it in April 2021. Now we
  are looking are fixing other bugs with his code (#[9774],
  #[10385]). Just this week Florian landed a nice PR fixing several
  distinct issues related to signature item grouping: #[10401].


[8929] <https://github.com/ocaml/ocaml/pull/8929>

[9774] <https://github.com/ocaml/ocaml/pull/9774>

[10385] <https://github.com/ocaml/ocaml/pull/10385>

[10401] <https://github.com/ocaml/ocaml/pull/10401>


@xavierleroy (Xavier Leroy)
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  I fixed #[10339], a mysterious crash on the new Macs with "Apple
  silicon".  This was due to a ARM (32 and 64 bits)-specific
  optimization of array bound checking, which was not taken into account
  by the platform-independent parts of the back-end, leading to
  incorrect liveness analysis and wrong register allocation.  #[10354]
  fixes this by informing the platform-independent parts of the back-end
  that some platform-specific instructions can raise.  In passing, it
  refactors similar code that was duplicating platform-independent
  calculations (of which instructions are pure) in platform-dependent
  files.

  I spent quality time with the Jenkins continuous integration system at
  Inria, integrating a new Mac Mini M1.  For unknown reasons, Jenkins
  ran the CI script in x86-64 emulation mode, so we were building and
  testing an x86-64 version of OCaml instead of the intended ARM64
  version.  A bit of scripting later (8b1bc01c3) and voilà, arm64-macos
  is properly tested as part of our CI.

  Currently, I'm reading the "safe points" proposal by Sadiq Jaffer
  (#[10039]) and the changes on top of this proposed by Damien Doligez.
  It's a necessary step towards Multicore OCaml, so we really need to
  move forward on this one.  It's a nontrivial change involving a new
  static analysis and a number of tweaks in every code emitter, but
  things are starting to look good here.


[10339] <https://github.com/ocaml/ocaml/pull/10339>

[10354] <https://github.com/ocaml/ocaml/pull/10354>

[10039] <https://github.com/ocaml/ocaml/pull/10039>


@mshinwell (Mark Shinwell)
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  I did a first pass of review on the safe points PR (#[10039]) and
  significantly simplified the proposed backend changes.  I've also been
  involved in discussions about a new function-level attribute to cause
  an error if safe points (including allocations) might exist within a
  function's body, to make code that currently assumes this robust.
  There will be a design document for this coming in due course.

  I fixed the random segfaults that were occurring on the RISC-V Inria
  CI worker (#[10349]).

  In Flambda 2 land we spent two person-days debugging a problem
  relating to Infix_tag!  We discovered that the code in OCaml 4.12
  onwards for traversing GC roots in static data ("caml_globals") is not
  correct if any of the roots are closures.  This arises in part because
  the new compaction code (#[9728]) has a hidden invariant: it must not
  see any field of a static data root more than once (not even via an
  Infix_tag).  As far as we know, these situations do not arise in the
  existing compiler, although we may propose a patch to guard against
  them.  They arise with Flambda 2 because in order to compile
  statically-allocated inconstant closures (ones whose environment is
  partially or wholly computed at runtime) we register closures directly
  as global roots, so we can patch their environments later.


[10039] <https://github.com/ocaml/ocaml/pull/10039>

[10349] <https://github.com/ocaml/ocaml/pull/10349>

[9728] <https://github.com/ocaml/ocaml/pull/9728>


@garrigue (Jacques Garrigue)
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  I have been working on a number of PRs fixing bugs in the type system,
  which are now merged:
  • #[10277] fixes a theoretical bug in the principality of GADT type
     inference (#[10383] applies only in -principal mode)
  • #[10308] fixes an interaction between local open in patterns and the
     new syntax for introducing existential type variables
  • #[10322] is an internal change using a normal reference inside of a
     weak one for backtracking; the weak reference was an optimization
     when backtracking was a seldom used feature, and was not useful
     anymore
  • #[10344] fixes a bug in the delaying of the evaluation of optional
     arguments
  • #[10347] cleans up some code in the unification algorithm, after a
     strengthening of universal variable scoping
  • #[10362] fixes a forgotten normalization in the type checking
     algorithm

  Some are still in progress:
  • #[10348] improves the way expansion is done during unification, to
     avoid some spurious GADT related ambiguity errors
  • #[10364] changes the typing of the body of the cases of
     pattern-matchings, allowing to warn in some non-principal
     situations; it also uncovered a number of principality related bugs
     inside the the type-checker

  Finally, I have worked with Takafumi Saikawa (@t6s) on making the
  representation of types closer to its logical meaning, by ensuring
  that one always manipulate a normalized view in #[10337] (large
  change, evaluation in progress).


[10277] <https://github.com/ocaml/ocaml/pull/10277>

[10383] <https://github.com/ocaml/ocaml/pull/10383>

[10308] <https://github.com/ocaml/ocaml/pull/10308>

[10322] <https://github.com/ocaml/ocaml/pull/10322>

[10344] <https://github.com/ocaml/ocaml/pull/10344>

[10347] <https://github.com/ocaml/ocaml/pull/10347>

[10362] <https://github.com/ocaml/ocaml/pull/10362>

[10348] <https://github.com/ocaml/ocaml/pull/10348>

[10364] <https://github.com/ocaml/ocaml/pull/10364>

[10337] <https://github.com/ocaml/ocaml/pull/10337>


@let-def (Frédéric Bour)
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  For some time, I have been working on new approaches to generate error
  messages from a Menhir parser.

  My goal at the beginning was to detect and produce a precise message
  for the ‘let ;’ situation:
  ┌────
  │ let x = 5;
  │ let y = 6
  │ let z = 7
  └────
  LR detects an error at the third ‘let’ which is technically correct,
  although we would like to point the user at the ‘;’ which might be the
  root cause of the error. This goal has been achieved, but the
  prototype is far from being ready for production.

  The main idea to increase the expressiveness and maintainability of
  error context identification is to use a flavor of regular
  expressions.  The stack of a parser defines a prefix of a sentential
  form. Our regular expressions are matched against it. Internal details
  of the automaton does not leak (no reference to states), the regular
  language is defined by the grammar alone.  With appropriate tooling,
  specific situations can be captured by starting from a coarse
  expression and refining it to narrow down the interesting cases.

  Now I am focusing on one specific point of the ‘error message’
  development pipeline: improving the efficiency of ‘menhir
  –list-errors’.  This command is used to enumerate sentences that cover
  all erroneous situations (as defined by the LR grammar). On my
  computer and with the OCaml grammar, it takes a few minutes and quite
  a lot of RAM. Early results are encouraging and I hope to have a PR
  for Menhir soon. The performance improvement we are aiming for is to
  make the command almost real time for common grammars and to tackle
  bigger grammars by reducing the memory needs.  For instance, in the
  OCaml case, the runtime is down from 3 minutes to 2–3 seconds and
  memory consumption goes from a few GiB down to 200 MiB.


Daniel Bünzli asked and gasche replied
──────────────────────────────────────

        > […] @Ekdohibs’ project [camlboot ], which is a
          “bootstrap-free”
        > implementation of OCaml able to compile the OCaml
          compiler itself. It currently targets OCaml 4.07 for
          various
        > reasons. We were able to do a full build of the OCaml
          compiler, and check that the result produces bootstrap
        > binaries that coincide with upstream bootstraps. This
          gives extremely strong confidence that the OCaml
          bootstrap is
        > free from “trusting trust” attacks. For more details,
          see our [draft paper].

        Something that is not clear to me (but I read quickly) is
        the impact of `guile` itself being not bootstrapped yet.
        Could there be a *very* elaborate attack (with probability
        0 of existing) on both the guile and ocaml bootstrap or is
        there something in the whole scheme that prevents it ?

  Yes, currently Guile needs to be trusted, and it would be possible
  that a bootstrapping virus in Guile would break our correctness
  result. (It would need to reproduce itself through our compiler and
  interpreter that were written after Guile itself, but I think in
  theory this could be done with an almost-infinitely clever program
  analysis.) Of course, an attack at the source level (inserting
  malicious source, instead of malicious binaries) is also possible
  anywhere in the chain.  Our main reason for using Guile is that this
  is the high-level language community most active on
  debootstrapping-towards-the-metal (through the Guix connection), so we
  believe it is more likely to manage debootstrapping and maintain it in
  the longer run.

  (The seed that Guile depends on is its macro-expander, which is
  written using macros itself. In theory one may perform the
  macro-expansion of the expander, and then manually review the two
  versions to verify the absence of attack there.)


[camlboot ] <https://github.com/Ekdohibs/camlboot>

[draft paper] <http://gallium.inria.fr/~scherer/drafts/camlboot.pdf>


After so many years, I discover 'Str.bounded_full_split regexp str n'
═════════════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/after-so-many-years-i-discover-str-bounded-full-split-regexp-str-n/7838/1>


UnixJunkie said
───────────────

  This is so useful and powerful:
  ┌────
  │ #require "str";;
  │ Str.bounded_full_split (Str.regexp "[()]") "toto (titi, tata (et tutu)) vont au parc (en courant)" 1024;;
  │ - : Str.split_result list =
  │ [Str.Text "toto "; Str.Delim "("; Str.Text "titi, tata "; Str.Delim "(";
  │  Str.Text "et tutu"; Str.Delim ")"; Str.Delim ")"; Str.Text " vont au parc ";
  │  Str.Delim "("; Str.Text "en courant"; Str.Delim ")"]
  └────

  Still finding hidden pearls in the stdlib after so many years!
  :slight_smile:


Parser for the Scala programming language?
══════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/parser-for-the-scala-programming-language/7541/18>


Deep in this thread, Yoann Padioleau announced
──────────────────────────────────────────────

  I ended up porting the recursive descent parser in the Scala compiler
  to OCaml …  I think it was the fastest way to get a working parser
  from OCaml …

  <https://github.com/returntocorp/pfff/blob/develop/lang_scala/parsing/Parser_scala_recursive_descent.ml>


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2021-05-04  8:57 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2021-05-04  8:57 UTC (permalink / raw)
  To: lwn, cwn, caml-list

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

Hello

Here is the latest OCaml Weekly News, for the week of April 27 to May
04, 2021.

Table of Contents
─────────────────

Ocaml-solidity, a new OCaml library for Solidity
Release of ocaml-pandoc 0.1.0
Stdlib vs Containers vs Batteries vs Base : Core functions comparison
Martin Jambon presentation on Semgrep, Wed April 21 @ 7pm Central
ocaml-lsp-server 1.6.0
Other OCaml News
Old CWN


Ocaml-solidity, a new OCaml library for Solidity
════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-ocaml-solidity-a-new-ocaml-library-for-solidity/7746/2>


Continuing the thread from last week, Fabrice Le Fessant announced
──────────────────────────────────────────────────────────────────

  I should add that the project is now available in the opam-repository,
  see [solidity-parser] and [solidity-typechecker].


[solidity-parser] <https://opam.ocaml.org/packages/solidity-parser/>

[solidity-typechecker]
<https://opam.ocaml.org/packages/solidity-typechecker/>


Release of ocaml-pandoc 0.1.0
═════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-release-of-ocaml-pandoc-0-1-0/7759/1>


Samuel Mimram announced
───────────────────────

  I have just released [ocaml-pandoc], a native OCaml library to write
  filters for [pandoc], which is a markdown-to-anything converter. It
  has allowed me to write some simple filters I needed (such as for
  including code snippets, which is not supported natively).

  The support is not complete yet however, I might add more if needed
  (and pull-requests are of course accepted :slight_smile:).


[ocaml-pandoc] <https://github.com/smimram/ocaml-pandoc>

[pandoc] <https://pandoc.org/>


Stdlib vs Containers vs Batteries vs Base : Core functions comparison
═════════════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/stdlib-vs-containers-vs-batteries-vs-base-core-functions-comparison/7766/1>


Jp R announced
──────────────

  You want to compare the main core functions found in the OCaml Stdlib
  (v4.12.0), Containers (v3.3), Batteries (v3.3.0) and Base (v0.14.1)
  libraries ?

  Check it out !

  <https://github.com/Fourchaux/ocaml-stdlib-containers-batteries-base-comparisons>


Vladimir Keleshev then added
────────────────────────────

  Someone reading this might be also interested in my (less formal)
  comparison between OCaml Stdlib and Base:
  <https://gist.github.com/keleshev/764edad011a6a7a40da11716b19ddb75>


Martin Jambon presentation on Semgrep, Wed April 21 @ 7pm Central
═════════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/martin-jambon-presentation-on-semgrep-wed-april-21-7pm-central/7709/5>


Claude Jager-Rubinson announced
───────────────────────────────

  The recording of Martin's talk is now available:
  <https://hfpug.org/2021/05/01/martin-jambon-9-languages-how-we-built-semgrep-a-polyglot-static-analysis-tool/>


Martin Jambon then added
────────────────────────

  Thanks Claude! The talk [starts at 1:45].


[starts at 1:45] <https://www.youtube.com/watch?v=H6TgK-LMA4Y&t=105s>


Ryan Slade then said
────────────────────

  [Comby] may also be of interest, it's a similar project also written
  in OCaml.


[Comby] <https://comby.dev/>


ocaml-lsp-server 1.6.0
══════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-ocaml-lsp-server-1-6-0/7774/1>


Rudi Grinberg announced
───────────────────────

  On behalf of the ocaml-lsp team, I'd like to announce version 1.6.0 of
  ocaml-lsp-server. The highlight of this release is the updated version
  of merlin which brings lots of new bug fixes.


1.6.0 (04/30/2020)
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

Features
┄┄┄┄┄┄┄┄

  • Code action to annotate a value with its type (#397)


Fixes
┄┄┄┄┄

  • Fix interface/implementation switching on Windows (#427)

  • Correctly parse project paths with spaces and other special
    characters that must be escaped.

  • Print types with `-short-paths' even if the project wasn't built yet


Other OCaml News
════════════════

From the ocamlcore planet blog
──────────────────────────────

  Here are links from many OCaml blogs aggregated at [OCaml Planet].

  • [Cryptography updates in OCaml and MirageOS]


[OCaml Planet] <http://ocaml.org/community/planet/>

[Cryptography updates in OCaml and MirageOS]
<https://hannes.nqsb.io/Posts/EC>


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2021-04-27 14:26 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2021-04-27 14:26 UTC (permalink / raw)
  To: lwn, cwn, caml-list

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

Hello

Here is the latest OCaml Weekly News, for the week of April 20 to 27,
2021.

Table of Contents
─────────────────

docs.ocaml.pro : an OCaml Documentation Hub
Decompress 1.4.0
elliptic curves - maintainable and verified (full stack, from primitives to TLS)
First release of Docteur, an opiniated read-only file-system for MirageOS
Ocaml-solidity, a new OCaml library for Solidity
Migrating to floatarray (blog post)
Old CWN


docs.ocaml.pro : an OCaml Documentation Hub
═══════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-docs-ocaml-pro-an-ocaml-documentation-hub/7718/1>


Fabrice Le Fessant announced
────────────────────────────

  We are pleased to announce that we just published the first version of
  the OCaml Documentation Hub on:

  <https://docs.ocaml.pro>

  The OCaml Documentation Hub can be used to browse the sources and the
  documentations of more than 2000 opam packages, following links
  between them when useful. This is a work-in-progress, and we are
  working on improving it with many more features, such as source
  annotations with types, full-text and type-driven searches,
  improvements in the general readability of documentation, etc.

  The site is generated using an open-source tool called digodoc,
  available on:

  <https://github.com/OCamlPro/digodoc>

  Digodoc is able to build a map of an opam switch, with links between
  files, opam packages, ocaml libraries, meta packages and ocaml
  modules. It is also able to generate documentation using odoc with
  cross-indexes between all these kinds of packages.

  We welcome feedback and contributions!  Enjoy !


Simon Cruanes said and Anil Madhavapeddy added
──────────────────────────────────────────────

  Great work on this site, and I love the domain name as well ;-)

        The cross linking between packages is fantastic.

  As a bit of background on why documentation cross-linking has taken so
  long, there is a lonnnggg history intertwined with many people's
  contributions to opam, build systems (ocamlbuild and dune),
  conventions (findlib and odig) and of course [odoc] itself.  The major
  milestones along the way have been:

  • [odoc 1.0], first began in 2014 as a quick project to pull together
    typing information from cmt[i] files, but which ran into the problem
    that it needs a consistent set of compiled cmt files to actually
    work, and so needs help from external tools to pull that set of
    compiled libraries together.
  • [odig], which pulls together multiple opam packages (and a
    filesystem layout for metadata) and runs odoc on then. This allowed
    for the creation of <https://docs.mirage.io> a few years ago which
    cross-references a smaller number of packages
  • opam-repo itself has had better and better bulk builds over the
    years to ensure that we can actually automatically compile all the
    artefacts needed for docs builds, thanks to efforts like [health
    check] and [ocurrent].
  • odoc 2.0, which featured a multi-year [rewrite] of the OCaml module
    resolver and introduced a new [output IR].  This forthcoming release
    was presented in this [OCaml 2020 talk] by @jonludlam.

  And now with all these pieces in place, the OCaml documentation spring
  has arrived! The OCamlPro one posted here as the first of the "new
  batch" of mass documentation indexers, and I'm aware of concurrent
  efforts by the odoc/ocaml.org maintainer teams to push a central one
  out to ocaml.org, as well as by the MirageOS team who are refreshing
  docs.mirage.io with the latest and greatest.  I'm sure when the dust
  has settled on all these indexers we can look for common pieces, but
  for now it's lovely to see so much innovation happening at pace.

  For the community: now is the time to fix your docstrings in your
  libraries, as there will many cool tools parsing and processing them,
  and rendering them into all kinds of output formats!

  To the [odoc contributors], thank you! The journey to get to this
  documentation site started here seven years ago:

  ┌────
  │ commit ef91571cab31d9ece7af965ed52eaaff57a12efc
  │ Author: Leo White <lpw25@cl.cam.ac.uk>
  │ Date:   Thu Oct 16 19:20:18 2014 +0100
  │ 
  │     Initial commit
  └────

  @lefessan one thing I'm not sure about in your site is the "copyright
  library authors" claim. That's murky legal ground – it's worth
  establishing if the odoc HTML has gone through a compilation process
  and so is no longer copyright the authors (just as a binary output is
  not copyright the original source code). If the output _is_ copyright
  the authors, then they have reasonable grounds to claim that you
  should also reproduce the copyright notice and other license
  restrictions. Personally, I prefer to claim that there is no copyright
  to the original authors in odoc output, and sidestep this issue.


[odoc] <https://github.com/ocaml/odoc>

[odoc 1.0] <https://github.com/ocaml/odoc>

[odig] <https://github.com/dbuenzli/odig>

[health check] <https://github.com/ocurrent/opam-health-check>

[ocurrent] <https://github.com/ocurrent/overview>

[rewrite] <https://github.com/ocaml/odoc/pull/439>

[output IR] <https://github.com/ocaml/odoc/pull/423>

[OCaml 2020 talk] <https://www.youtube.com/watch?v=wVyZ-KveN-w&t=3s>

[odoc contributors] <https://github.com/ocaml/odoc/graphs/contributors>


Fabrice Le Fessant replied
──────────────────────────

  Thanks @avsm , all these projects were indeed important milestones
  towards the creation of this site. However, I wouldn't want this
  history perspective to give the wrong feeling that building this site
  was easy, it is the result of a very good, long and hard work by the
  team at OCamlPro to make it work despite a road paved with many
  obstacles. It also benefited from OCamlPro's long history of
  innovative projects for the OCaml community, that lead for example in
  the past to Opam, [Try-OCaml], Memprof/[Memthol,] [Opam-builder],
  [Learn-OCaml], the Typerex tools (ocp-indent, ocp-index, ocp-build,
  etc.) and more recently [opam-bin] and [drom].

  As I said, this is a work-in-progress, and there are many features
  that we will be adding in the next months to make this website much
  easier to navigate, for users to rapidely reach the information that
  matters for them. We hope it will be inspirational for all the other
  developers who are working on similar projects, and we are looking
  forward to using their projects soon too!


[Try-OCaml] <https://try.ocamlpro.com/>

[Memthol,]
<https://www.ocamlpro.com/2020/12/01/memthol-exploring-program-profiling/>

[Opam-builder] <https://hal.inria.fr/hal-01352008>

[Learn-OCaml] <https://github.com/ocaml-sf/learn-ocaml>

[opam-bin] <https://github.com/OCamlPro/opam-bin>

[drom] <https://github.com/OCamlPro/drom/>


Daniel Bünzli said
──────────────────

  I'd just like to stress that `odig' documents OCaml package installs
  regardless of the package manager used as long the install structure
  follows [these conventions] (which are automatically followed by [dune
  installs]) .

  Also for people using my packages, I'd just like to mention they may
  miss important documentation bits on [https://docs.ocaml.pro] until
  [that issue] is resolved.


[these conventions]
<https://erratique.ch/software/odig/doc/packaging.html>

[dune installs]
<https://dune.readthedocs.io/en/stable/opam.html#odig-conventions>

[https://docs.ocaml.pro] <https://docs.ocaml.pro/>

[that issue] <https://github.com/OCamlPro/digodoc/issues/33>


Much later in the thread, Kiran Gopinathan said
───────────────────────────────────────────────

  It's not quite the same as hoogle, but merlin has a functionality to
  search for functions by type signature - the feature doesn't seem to
  get much attention apparently - probably the interface is a little
  lacking, but with some extra elisp tuning, it can work quite smoothly:

  <https://aws1.discourse-cdn.com/standard11/uploads/ocaml/original/2X/3/3c2d1c63fac7cbd7dd1bb5b9a406589e031cb795.gif>


Yawar Amin then added
─────────────────────

  The command line for this:

  ┌────
  │ ocamlmerlin single search-by-polarity -position 0 -query '-int +string'
  └────

  (To search for values of type `int -> string'.)


Decompress 1.4.0
════════════════

  Archive: <https://discuss.ocaml.org/t/ann-decompress-1-4-0/7724/1>


Charles Edouard Lecat announced
───────────────────────────────

Greetings everyone,
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  I am happy to announce the new release of [decompress 1.4.0],
  available for installation via OPAM. Decompress is a library
  containing a pure OCaml implementation of several compression
  algorithms:
  • RFC1951
  • Zlib
  • Gzip
  • LZO

  It's goal is to provide several algorithms for both the inflation and
  the deflation of objects, in the form of a stream API allowing to call
  the chosen algorithm one bit at a time. Such behavior allows for an
  easy use of decompress in situations where we would not be able to
  have the input in one go, or where we would like to output the result
  in a non blocking way. This new release comes with several
  improvements to the documentation and bug fixes, but even more, with a
  whole new implementation for the rfc 1951 and zlib algorithms.


[decompress 1.4.0]
<https://github.com/mirage/decompress/releases/tag/v1.4.0>


Non-stream implementation for rfc 1951 and zlib
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  Up to this day, decompress was used in several projects like
  ocaml-git. However, as time passed by, it appeared that in some cases,
  the current implementation of decompress was not the optimal solution:
  As useful as a stream implementation is, it requires to save a lot of
  information about the state of the compression, in order to resume it
  once we have enough input.

  This is why, in some cases where we would be sure that we have our
  whole input in one go, we might want to avoid all of these side-costs,
  and directly go to the point.


State of the art: libdeflate
┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄

  This new problematic in mind, we have started thinking about the
  existing implementations of these algorithms which were also bypassing
  the stream behavior. One implementation that proved to be a suitable
  example for our problem, was the library `libdeflate', an
  implementation in C. It's main advantages being: a better compression
  ratio than zlib and with faster runtime.

  It was used as the solid base for the OCaml implementation provided by
  this new release.


OCaml version of libdeflate, performances and use cases
┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄

  Inheriting the logic of libdeflate, the new implementation now has a
  better compression ratio, while being slightly faster at it. On the
  other side, the decompression is way faster, with `33% of speed
  increase in most tested cases: On the ~book2' (from the Calgary
  corpus) file:
  • `decompress' (stream): 15 Mb/s (deflation), 76 Mb/s (inflation),
    ratio: 42.46 %
  • `decompress' (non-stream): 17 Mb/s (deflation), 105 Mb/s
    (inflation), ratio: 34.66 %

  Now that this is in place, the users of decompress will be able to
  choose between the two versions, according to their needs. In the case
  of ocaml-git, the vast majority of the git objects are small and will
  be compressed in one go. This is why we updated with the new
  implementation when possible.


Writing optimized code and profiling it
┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄

  One of the biggest concerns of this release was to be able to produce
  optimized code. The base code being coded in C, a lot of sub-optimal
  behavior where ported in the OCaml version: `for' and `while' loops,
  references everywhere, mixes of `struct' and `union.', it needed a lot
  of clean up.

  This is why once the main iteration was done, we have spent several
  weeks profiling the code base, using the OCaml library `landmarks',
  `flamegraph' or simply the linux binary `perf'. This work, sometimes
  tedious, proved to be helpful and healthy for both the harmonization
  of the code and it's performances.


Decompress & MirageOS
┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄

  Compression algorithms are a really important piece in many projects,
  and operating systems do not avoid this.  `decompress' was coded from
  the start with the idea of being used in the much larger project
  MirageOS.

  This release is another opportunity to broaden MirageOS’s reach, by
  providing one more algorithm to it’s stack, allowing us to specialise
  even more the unikernels that would have a need for
  inflation/deflation algorithms. This more restrictive implementation,
  as we need to have the whole input in one go, will allow us to take
  advantage of the situation and give more flexibility for the user.

  The positive aspects of this release will most likely show up soon
  enough, as we make use of decompress to its full potential


elliptic curves - maintainable and verified (full stack, from primitives to TLS)
════════════════════════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-elliptic-curves-maintainable-and-verified-full-stack-from-primitives-to-tls/7729/1>


Hannes Mehnert announced
────────────────────────

  over the last month I worked on upgrading the cryptography stack for
  OCaml and MirageOS. I just published a [blog post]. Enhancments of
  [OCaml-TLS] ([usenix security paper from 2015]) and [X.509] are in
  place.

  The main achievement after TLS 1.3 support (since May 2020, 0.12.0) is
  that elliptic curve certificates are now supported. Elliptic curve
  cryptography uses [fiat]. The X509 implementation now supports PKCS 12
  (used by browsers and other software (e.g. OpenVPN) to bundle
  certificates and private keys).

  Get mirage-crypto-ec, x509 0.13.0 and tls 0.13.1 (all available in the
  opam-repository). Discussion and feedback appreciated.


[blog post] <https://hannes.robur.coop/Posts/EC>

[OCaml-TLS] <https://github.com/mirleft/ocaml-tls>

[usenix security paper from 2015] <https://usenix15.nqsb.io>

[X.509] <https://github.com/mirleft/ocaml-x509>

[fiat] <https://github.com/mit-plv/fiat-crypto>


First release of Docteur, an opiniated read-only file-system for MirageOS
═════════════════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-first-release-of-docteur-an-opiniated-read-only-file-system-for-mirageos/7743/1>


Calascibetta Romain announced
─────────────────────────────

  I'm glad to announce the first release of [`docteur'], a simple tool
  to make and use (in read-only) a "file-system" for [MirageOS]. As you
  know, with MirageOS, we don't have _sockets_, _kernel space_ or even
  _file-descriptor_. It's not possible to manipulate files
  _standalonely_ and many _primitives_ commonly available with the
  `unix' module don't exists in our space.

  Therefore, it is difficult to imagine making a website that displays
  local files or a database system. But in our spirit of separation of
  services, it becomes possible for your unikernel to communicate over
  the network to a "file system" or a database.

  For quite some time we have been experimenting with a file system
  external to our unikernel called Git. This is the case of [`pasteur']
  which saves the pastes in a Git repository. It is also the case of
  [`unipi'] or [Canopy] which display the content of a Git repository
  and can resynchronize with it using a hook. Or the case of [our
  primary DNS server] whose zone file comes from a Git repository - we
  can then trace all the changes on this file.

  However, we have several limitations:
  1) it requires the Git repository to load into memory in your
     unikernel
  2) it requires a communication (external with GitHub or internal in a
     private network)

  The persistent aspect is very important. We should always be able to
  launch a unikernel and not lose the data if our system shuts down.

  The mutable aspect (modify a file) is useful in some cases but not in
  others. As for `unipi' for example (a simple static web site), the
  difference between resynchronizing with a hook or restarting the
  unikernel with a new version of your filesystem is minor.


[`docteur'] <https://github.com/dinosaure/docteur>

[MirageOS] <https://mirage.io/>

[`pasteur'] <https://github.com/dinosaure/pasteur>

[`unipi'] <https://github.com/roburio/unipi>

[Canopy] <https://github.com/Engil/Canopy>

[our primary DNS server] <https://github.com/roburio/dns-primary-git>

Docteur as a second solution
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  This is where Doctor comes in. It solves both of our problems by
  offering the generation of a file system from scratch:
  • a Git repository (local or available on a service)
  • a specific folder

  Doctor is able to create a complete representation of a folder and to
  compress it at such a ratio that a generation of the documentation of
  several OPAM packages with all their versions making 14 Gb is reduced
  to an image of only 280 Mb!

  Such a high compression ratio is in particular due to a double level
  of compression by [`decompress'] and [`duff']. For more details,
  Docteur just generates a slightly modified PACK file with [carton].

  Then, Docteur proposes a simple library which makes available 2 ways
  to manipulate this image for your unikernel:
  1) a way that is fast but with a consequent boot time
  2) a slower way but with no cost to the boot time

  The first way will simply "analyze" the image to re-extract the layout
  of your file system. Then it uses the [ART data-structure] to save
  this layout. So, whenever you want a specific file and according to
  [ART benchmarks], you have access to the content very quickly.

  The problem remains the analysis which takes place at boot time and
  which can take a very long time (it depends essentially on the number
  of files you have). There can also be an impact on memory usage as the
  ART data structure is in memory - the more files there are, the bigger
  the structure is.

  The second method is more "silly". Each time you request a file, we
  will have to rebuild the entire path and therefore deserialize several
  objects (like folders). The advantage is that we don't analyze the
  image and we don't try to maintain a layout of your file system.


[`decompress'] <https://github.com/mirage/decompress>

[`duff'] <https://github.com/mirage/duff>

[carton] <https://github.com/mirage/ocaml-git/tree/master/src/carton>

[ART data-structure] <https://github.com/dinosaure/art>

[ART benchmarks] <https://dinosaure.github.io/art/bench/find.html>


Example
╌╌╌╌╌╌╌

  Docteur is meant to be simple. The generation of the image is done
  very simply by the command `make':
  ┌────
  │ $ docteur.make -b refs/heads/main https://github.com/dinosaure/docteur disk.img
  │ $ docteur.make -b refs/heads/main git@github.com:dinosaure/docteur disk.img
  │ $ docteur.make -b refs/heads/main git://github.com/dinosaure/docteur disk.img
  │ $ docteur.make -b refs/heads/main file://$(pwd)/dev/docteur disk.img
  └────

  Then, Docteur proposes 2 supports: Unix & [Solo5]. For Unix, you just
  have to name explicitly the image file to use. For the case of Solo5
  (and thus of virtualization). You just have to find a name for a
  "block device" and to reuse this name with the Solo5 "tender"
  specifying where the image is.
  ┌────
  │ $ cd unikernel
  │ $ mirage configure -t unix --disk disk.img
  │ $ make depends
  │ $ mirage build
  │ $ ./simple --filename README.md
  └────

  ┌────
  │ $ cd unikernel
  │ $ mirage configure -t hvt --disk docteur
  │ $ make depends
  │ $ mirage build
  │ $ solo5-hvt --block:docteur=disk.img -- simple.hvt --filename README.md
  └────

  Finally, Docteur proposes another tool that checks (and analyzes) an
  image to give you the version of the commit used (if the image comes
  from a Git repository) or the hash of your file system produced by the
  calculation of a [Merkle tree].
  ┌────
  │ $ docteur.verify disk.img
  │ commit	: ad8c418635ca6683177c7ff3b583e1ea5afea78f
  │ author	: "Calascibetta Romain" <romain.calascibetta@gmail.com>
  │ root	: bea10b6874f51e3f6feb1f9bcf3939933b2c4540
  │ 
  │ Merge pull request #11 from dinosaure/fix-tree-expanding
  │ 
  │ Fix how we expand our file-system
  └────


[Solo5] <https://github.com/Solo5/solo5>

[Merkle tree] <https://en.wikipedia.org/wiki/Merkle_tree>


Conclusion
╌╌╌╌╌╌╌╌╌╌

  Many times people ask me for a purpose in MirageOS such as a website
  or a particular service. I think that Docteur shows one essential
  thing about MirageOS, it is a tool and an ecosystem. But it's not an
  endpoint that is concretized in a specific application.

  Docteur is not THE solution to our problems and answers a specific use
  case. What is important to note is not what Docteur does but the
  possibility for our ecosystem and our tools to allow the development
  of Docteur. As it allows the development of a trillion applications!

  As such, I say to those people to "play" with MirageOS if they want to
  learn more. Our goal is not to show you applications that you could
  then deploy easily (even if we are working on this aspect too) but to
  give you the possibility to imagine your OS (independently from our
  vision)!

  And if you try, we'll be happy to help you!


Ocaml-solidity, a new OCaml library for Solidity
════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ocaml-solidity-a-new-ocaml-library-for-solidity/7746/1>


OCamlPro announced
──────────────────

  We are pleased to announce our new OCaml library, ocaml-solidity !
  [Ocaml-solidity] is a program manipulation library that provides a
  Solidity parser and typechecker.

  Our library is made for developers on Solidity code analysis, it
  builds a typechecked AST that can be analyzed with a provided
  visitor. Please note that our parser and typecheck conforms mostly to
  Solidity 0.7, inline assembly is not supported. Take a look at [our
  documentation].

  You can test it and report bugs just [here]!


[Ocaml-solidity] <https://github.com/OCamlPro/ocaml-solidity>

[our documentation] <https://ocamlpro.github.io/ocaml-solidity/>

[here] <https://github.com/OCamlPro/ocaml-solidity/issues>


Migrating to floatarray (blog post)
═══════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/migrating-to-floatarray-blog-post/7749/1>


Nicolás Ojeda Bär announced
───────────────────────────

  At LexiFi we recently migrated our codebase to use `floatarray' in
  place of `float array' in order to disable the "flat float array" mode
  in the compiler. If you are interested in finding out more about how
  we did it, we wrote a blog post about it
  <https://www.lexifi.com/blog/ocaml/floatarray-migration/>. Enjoy!


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2021-04-20  9:07 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2021-04-20  9:07 UTC (permalink / raw)
  To: lwn, cwn, caml-list

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

Hello

Here is the latest OCaml Weekly News, for the week of April 13 to 20,
2021.

Table of Contents
─────────────────

Preface (initial release)
OCaml Users and Developers Workshop 2021
Timere 0.1.3 - Dealing with time and time zones has never been easier
Release of `multipart_form.0.2.0'
Engineer position for the development of the Squirrel prover
Martin Jambon presentation on Semgrep, Wed April 21 @ 7pm Central
Old CWN


Preface (initial release)
═════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-preface-initial-release/7669/1>


Xavier Van de Woestyne announced
────────────────────────────────

  Hello, @d-plaindoux and @pytre and I are very happy to present
  *Preface*, a project that has occupied part of our free time for
  almost 2 years. We received a lot of help from various people (as
  mentioned in the [CREDITS] page), including some present on this forum
  (@gasche, @octachron and @snowleopard)

        Preface is an opinionated library designed to facilitate
        the handling of recurring functional programming idioms in
        [OCaml]. Many of the design decisions were made in an
        attempt to calibrate, as best as possible, to the OCaml
        language. Trying to get the most out of the module
        language. *The name "preface" is a nod to "Prelude"* .

  • [Github repository]
  • [Online documentation]


[CREDITS]
<https://github.com/xvw/preface/blob/master/CREDITS.md#warm-thanks-and-help>

[OCaml] <https://ocaml.org>

[Github repository] <https://github.com/xvw/preface>

[Online documentation]
<https://ocaml-preface.github.io/preface/Preface/index.html>

About the project, and motivation
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  When learning functional programming, one is often confronted with
  constructs derived (or not) from category theory.  Languages such as
  Haskell offer very complete libraries to use them, and thus,
  facilitate their learning. In OCaml, it often happens that these
  abstractions are buried in the heart of certain libraries/projects
  ([Lwt], [Cmdliner], [Bonsai], [Dune] etc.). This is why one of the
  objectives of Preface is to propose tools for concretising these
  abstractions, at least as a pedagogical tool.


[Lwt] <https://ocsigen.org/lwt/latest/manual/manual>

[Cmdliner] <https://erratique.ch/logiciel/cmdliner>

[Bonsai] <https://github.com/janestreet/bonsai>

[Dune] <https://dune.build>


Is Preface useful
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  Since OCaml allows for efficient imperative programming, Preface is
  probably not really useful for building software.  However, we (the
  maintainers) think that Preface can be useful for a few things:

  • technical experimentation with abstractions (especially those from
    the Haskell world) that allow programming in a fun style.
  • As an educational tool. Many teaching aids generally only offer the
    minimal interfaces to these abstractions. Preface tries to be as
    complete as possible.
  • It was a lot of fun to make. The last point is obviously the
    lightest but building Preface was really fun! So even if some people
    won't see the point… *we had fun making it*!

  Let's imagine this scenario! Oh, there's this article that seems to
  describe quite precisely how to solve `this complex problem',
  elegantly, using this `collection of abstractions'. After reading, the
  article is clear and I know how to use this `collection of
  abstractions' in practice. I would like to test it. Not having enough
  RAM to install Cabal, I decided to do it in OCaml. But as one
  abstraction leads to another, I am obliged to build an armada of
  things and I abandon my experimentation.

  So now, rather than doing it, locally, for the understanding of an
  article, I add it in Preface.


Additional links
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  The [README] is quite expansive on motivations and some design
  choices, but we have tried to add some concrete guides:
  • [ Understanding the module breakdown of Preface]
  • [Effect handling using Freer]
  • [Error handling with Result/Validation and a Free Applicative]

  And in addition here is a project, by a friend of ours, that uses
  Preface, to build static blog generators (very original isn't it :P),
  the code is highly documented and can be an entry point into how to
  use it: [Github repository of the project]


[README] <https://github.com/xvw/preface#preface>

[ Understanding the module breakdown of Preface]
<https://github.com/xvw/preface/blob/master/guides/option_instantiation.md>

[Effect handling using Freer]
<https://github.com/xvw/preface/blob/master/guides/freer_effect_handling.md>

[Error handling with Result/Validation and a Free Applicative]
<https://github.com/xvw/preface/blob/master/guides/error_handling.md>

[Github repository of the project]
<https://github.com/xhtmlboi/wordpress>


Conclusion
╌╌╌╌╌╌╌╌╌╌

  Preface does not offer much that is new, but we have tried to make it
  user-friendly and to document as much as possible the code and design
  choices. It's a lot of fun to build… and it will probably be just as
  much fun to maintain.

  *We are extremely open to contributions and feedback.*

  And my last words will be a warm thank you to the OCaml ecosystem that
  has facilitated so much of our development: Testing with [Alcotest]
  and [QCheck] is a pleasure. [Dune] is a fast and pleasant build
  system. [ODoc] has allowed us to have more control over the generation
  of documentation, especially with the `@inline' comment (on includes)
  which allows signatures from different modules to be merged. And [MDX]
  which I did not know at all and which is used extensively for guides.

  I hope you can find interest in this project! Good luck with the rest
  of the containment (for those concerned).


[Alcotest] <https://github.com/mirage/alcotest>

[QCheck] <https://github.com/c-cube/qcheck>

[Dune] <https://dune.build>

[ODoc] <https://github.com/ocaml/odoc>

[MDX] <https://github.com/realworldocaml/mdx>


OCaml Users and Developers Workshop 2021
════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ocaml-users-and-developers-workshop-2021/7673/1>


Frédéric Bour announced
───────────────────────

  It is my pleasure to invite submissions to the OCaml Users and
  Developers Workshop 2021, which is again co-located with ICFP and will
  be held virtually this year.

  The OCaml Users and Developers Workshop brings together industrial
  users of OCaml with academics and hackers who are working on extending
  the language, type system, and tools. Previous editions have been
  co-located with ICFP 2012 in Copenhagen, ICFP 2013 in Boston, ICFP
  2014 in Gothenburg, ICFP 2015 in Vancouver, ICFP 2016 in Nara, ICFP
  2017 in Oxford, ICFP 2018 in St Louis, ICFP 2019 in Berlin, and was
  virtual for ICFP 2020, following the OCaml Meetings in Paris in 2010
  and 2011.


Important Links
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  • [https://icfp21.sigplan.org/home/ocaml-2021 ]
  • [https://ocaml2021.hotcrp.com ]


[https://icfp21.sigplan.org/home/ocaml-2021 ]
<https://icfp21.sigplan.org/home/ocaml-2021>

[https://ocaml2021.hotcrp.com ] <https://ocaml2021.hotcrp.com>


Important dates
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  • Thursday 20th May (any time zone): Abstract submission deadline
  • Friday 18th July: Author notification
  • Friday 27th August: OCaml Workshop


Scope
╌╌╌╌╌

  Presentations and discussions focus on the OCaml programming language
  and its community. We aim to solicit talks on all aspects related to
  improving the use or development of the language and its programming
  environment, including, for example (but not limited to):

  • compiler developments, new backends, runtime and architectures
  • practical type system improvements, such as GADTs, first-class
    modules, generic programming, or dependent types
  • new library or application releases, and their design rationales
  • tools and infrastructure services, and their enhancements
  • prominent industrial or experimental uses of OCaml, or deployments
    in unusual situations.


Presentations
╌╌╌╌╌╌╌╌╌╌╌╌╌

  Presentations will be held in the online format. Each presentation
  comprise a prerecorded presentation and an interactive live Q&A
  session after the talk. Each talk will be re-translated three times in
  different time zones.  Session chairs and volunteers will assist the
  authors in preparing and casting the presentation. Each presentation
  will be made available through the ocaml.org website.


Submission
╌╌╌╌╌╌╌╌╌╌

  To submit a presentation, please register a description of the talk
  (about 2 pages long) at <https://ocaml2021.hotcrp.com/> providing a
  clear statement of what will be provided by the presentation: the
  problems that are addressed, the solutions or methods that are
  proposed.

  LaTeX-produced PDFs are a common and welcome submission format. For
  accessibility purposes, we ask PDF submitters to also provide the
  sources of their submission in a textual format, such as .tex
  sources. Reviewers may read either the submitted PDF or the text
  version.


Camera ready presentations
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  A pre-recorded versions of accepted presentation shall be provided
  before August, 13th. Volunteers will provide technical assistance to
  authors as well as provide necessary feedback and ensure that all
  videos match our quality standards.


ML family workshop
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  The ML family workshop, held on the previous day, deals with general
  issues of the ML-style programming and type systems, focuses on more
  research-oriented work that is less specific to a language in
  particular. There is an overlap between the two workshops, and we have
  occasionally transferred presentations from one to the other in the
  past. Authors who feel their submission fits both workshops are
  encouraged to mention it at submission time and/or contact the Program
  Chairs.


Program Commitee
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  • Frédéric Bour, Tarides, France
  • Cristina Rosu, Janestreet, UK
  • Hakjoo Oh, Korea University, Korea
  • Hugo Heuzard, Janestreet, UK
  • Jeffrey A. Scofield, Formalsim, USA
  • Jonathan Protzenko, MSR, USA
  • Joris Giovanangeli, Ahrefs, Singapore
  • Jun Furuse, Dailambda, Japan
  • Kihong Heo, KAIST, Korea
  • Kate Deplaix, OCaml Labs, UK
  • Medhi Bouaziz, Nomadic Labs, France
  • Simon Castellan, INRIA, France
  • Ryohei Tokuda, Idein, Japan
  • Vaivaswatha Nagaraj, Zilliqa, India
  • Youyou Cong, Tokyo Institute of Technology, Japan


Questions and contact
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  Please contact the PC Chair ([Frédéric Bour]) for any questions.


[Frédéric Bour] <mailto:frederic.bour@lakaban.net>


Timere 0.1.3 - Dealing with time and time zones has never been easier
═════════════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-timere-0-1-3-dealing-with-time-and-time-zones-has-never-been-easier/7173/2>


Darren announced
────────────────

  Timere 0.2.1 has landed!

  This release adds nanosecond precision support to timere (and
  fractional second support at various places), along with other small
  improvements.


Release of `multipart_form.0.2.0'
═════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-release-of-multipart-form-0-2-0/7704/1>


Calascibetta Romain announced
─────────────────────────────

  I am pleased to announce the release of [`multipart_form']. Throughout
  the development of [mrmime], we have gained a thorough knowledge of
  the RFCs about email. However, these RFCs also describe mechanisms
  that are found in HTTP/1.1.


[`multipart_form'] <https://github.com/dinosaure/multipart_form>

[mrmime] <https://github.com/mirage/mrmime>

Genesis
╌╌╌╌╌╌╌

  More specifically, a lot of work has been done on [RFC 2045] & [RFC
  2046] (see [RFC 7578 § 4]) which describe the `multipart' format
  (found in emails and in `HTTP/1.{0,1}' requests when serializing a
  `<form>').

  From this work (~ 2 years), we decided to extract the parts allowing
  to manipulate a `multipart/form-data' content for `HTTP/1.{0,1}'
  responses (plus [RFC 2183]). This resulted in the creation of
  `multipart_form'.

  This project is a cross between what many users have been waiting for
  (for [CoHTTP] and [http/af]), a knowledge of what exists and its
  limitations, and finally a development in the spirit of MirageOS.

  The result is an API that is _"full stream"_. Indeed. a question arose
  from the beginning, how to manipulate this format while:
  • not having access to a file system (MirageOS)
  • not exploding memory usage for file uploads


[RFC 2045] <https://tools.ietf.org/html/rfc2045>

[RFC 2046] <https://tools.ietf.org/html/rfc2046>

[RFC 7578 § 4] <https://tools.ietf.org/html/rfc7578#section-4>

[RFC 2183] <https://tools.ietf.org/html/rfc2183>

[CoHTTP] <https://github.com/mirage/ocaml-cohttp>

[http/af] <https://github.com/inhabitedtype/httpaf>


Memory bound implementation
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  With the help of @Armael and the [`memtrace'] tool, we were able to
  implement and extend `multipart_form' so that it is easier to use and
  really ensures our original assumption about memory consumption.

  So we experimented with use cases like uploading very large
  files. Here is the result that `memtrace' gives us with a 100Mb file:

  <https://aws1.discourse-cdn.com/standard11/uploads/ocaml/optimized/2X/9/92ee2ab6fa1d4da62d894749aa4b161a95b53fb2_2_1034x590.png>

  The application tries to save the games in files. We use [opium] (and
  thus http/af) but tests were also done with CoHTTP. The code is
  available [here] for people who want to reproduce.


[`memtrace']
<https://blog.janestreet.com/finding-memory-leaks-with-memtrace/>

[opium] <https://github.com/rgrinberg/opium>

[here]
<https://gist.github.com/dinosaure/299c421c95cec4255df7b9289eb53815>


Documentation & encoding
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  Finally, a major effort has been made in the documentation to explain
  in detail how to use `multipart_form'. Version `0.2.0' also adds a way
  to produce a `multipart/form-data' document (experimental) with the
  same constraints on memory usage.

  I hope this work will be useful to a lot of people. The documentation
  is available [here].


[here]
<https://dinosaure.github.io/multipart_form/multipart_form/index.html>


Engineer position for the development of the Squirrel prover
════════════════════════════════════════════════════════════

  Archive:
  <https://sympa.inria.fr/sympa/arc/caml-list/2021-04/msg00022.html>


David Baelde announced
──────────────────────

  We are looking for an engineer to support the development of Squirrel,
  an interactive theorem prover for security protocols. The position
  will be funded by ERC POPSTAR. You may find more details here:

  <https://people.irisa.fr/Stephanie.Delaune/internship/sujet-engineer-squirrel.pdf>

  Skilled OCaml developers would be most welcome!


Martin Jambon presentation on Semgrep, Wed April 21 @ 7pm Central
═════════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/martin-jambon-presentation-on-semgrep-wed-april-21-7pm-central/7709/1>


Claude Jager-Rubinson announced
───────────────────────────────

  Please join us this coming Wednesday at 7pm Central when @mjambon will
  talk about Semgrep, an open-source ployglot static analysis tool
  written in OCaml.

  Details and connection info are available at [Houston Functional
  Programmers].


[Houston Functional Programmers] <https://hfpug.org>


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2021-04-06  9:42 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2021-04-06  9:42 UTC (permalink / raw)
  To: lwn, cwn, caml-list, comp

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

Hello

Here is the latest OCaml Weekly News, for the week of March 30 to April
06, 2021.

Table of Contents
─────────────────

Ecosystem Engineer and Technical Writer positions
Release of cohttp 4.0.0
Timere-parse 0.0.2, natural language parsing of date, time and duration
agrid 0.1
State of OCaml and web assembly
containers 3.3
New OCaml books?
Old CWN


Ecosystem Engineer and Technical Writer positions
═════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/job-ecosystem-engineer-and-technical-writer-positions/7571/1>


Celine announced
────────────────

  [Tarides] is hiring an [Ecosystem Engineer] and a [Technical Writer].

  Tarides is a tech startup based in Paris and founded in 2018. We
  develop a software infrastructure platform to deploy secure,
  distributed applications with strict resource contraints and
  low-latency performance requirements.

  We welcome applications from people of all backgrounds. We are working
  hard to create a representative, inclusive and friendly team, because
  we know that different experiences, perspectives and backgrounds make
  for a better place.

  Please, don't hesitate to contact me if you have any question, I'll be
  more than happy to reply! :)


[Tarides] <https://tarides.com/>

[Ecosystem Engineer] <https://tarides.com/jobs/ecosystem-engineer>

[Technical Writer] <https://tarides.com/jobs/technical-writer>


Release of cohttp 4.0.0
═══════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-release-of-cohttp-4-0-0/7537/2>


Continuing this thread, Calascibetta Romain said
────────────────────────────────────────────────

        The work on the new conduit is steadily progressing and
        will be integrated in a new major release of cohttp in the
        future, once we will be confident that the API is
        settled. If you want to try using it immediately, then it
        is available as the [mimic ] library in ocaml-git.

  I just take the opportunity to show up a tutorial about `mimic' which
  is now available into the distribution of it: see [here]. Thanks for
  your work about the release process.


[mimic ] <https://github.com/mirage/ocaml-git/tree/master/src/mimic>

[here] <https://mirage.github.io/ocaml-git/mimic/index.html>


Timere-parse 0.0.2, natural language parsing of date, time and duration
═══════════════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-timere-parse-0-0-2-natural-language-parsing-of-date-time-and-duration/7532/2>


Continuing this thread, Darren said
───────────────────────────────────

  The demo site has been updated to use Timere-parse, you can now try
  interacting with `Timere_parse.timere' in web browser at
  <https://daypack-dev.github.io/timere-parse-demo/>


agrid 0.1
═════════

  Archive: <https://discuss.ocaml.org/t/ann-agrid-0-1/7587/1>


zapashcanon announced
─────────────────────

  I'm pleased to announce the first release of [agrid].

  Agrid stands for *Adjustable Grid*. Adjustable grids are basically two
  dimensional arrays whose width/height can be changed by adding or
  removing row/column at either end (one at a time).

  Here's a very short example :

  ┌────
  │ let () =
  │   let grid = Agrid.of_list [[1; 2]; [3; 4]] in
  │   let grid = Agrid.snoc_row grid (Flex_array.of_list [5; 6]) in
  │   Agrid.pp Format.pp_print_int Format.std_formatter grid
  │   (* prints:
  │    * 1; 2
  │    * 3; 4
  │    * 5; 6
  │    *)
  └────

  It's based on the great [flex-array] library by [Jean-Christophe
  Filliâtre] and is mainly a wrapper around it to make it easier for the
  special case of two dimensional arrays.

  It's been developped at [OCamlPro] while working on [mosaic] when we
  wanted to ease the dataset input process, switching from a basic
  textarea based input to something which looks like a spreadsheet (this
  work is not yet published on the online version).


[agrid] <https://ocamlpro.github.io/agrid>

[flex-array] <https://github.com/backtracking/flex-array>

[Jean-Christophe Filliâtre] <https://www.lri.fr/~filliatr/>

[OCamlPro] <https://www.ocamlpro.com/>

[mosaic] <https://mosaic.univ-lyon1.fr/>


gasche asked and zapashcanon replied
────────────────────────────────────

        Out of curiosity: In a spreadsheet, I would assume that
        inserting/removing rows or columns in the middle is also a
        useful operation. Would you be able to add this operation?

  It's not really a spreadsheet, it's more something [like this]. I
  don't think it would be really useful in the case of mosaic because
  for big inputs, users are more likely to import the data from a file.

  Anyway, it's possible to add this operation, but I can't think of an
  efficient way to do it. I'll think about it and may add such an
  operation. Actually, if it's added to flex-array, it would be trivial
  to add it to agrid, so I'll probably try to add it there.


[like this] <https://www.zapashcanon.fr/~leo/atable/>


State of OCaml and web assembly
═══════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/state-of-ocaml-and-web-assembly/2725/15>


Deep in this thread, Emilio Jesús Gallego Arias announced
─────────────────────────────────────────────────────────

  Yup, we didn't make it yet the "official" release, but it has been
  used by quite a few people to avoid lack of tail-call optimization in
  jsoo, live versions:
  • <https://jscoq.github.io/wa/>
  • <https://jscoq.github.io/wa/scratchpad.html>

  It literally flies.

  I guess @corwin-of-amber is the right person to comment more on his
  superb efforts.


Shachar Itzhaky then added
──────────────────────────

  Hi there @camarick; ocaml-wasm is very much bleeding-edge but it
  already works surprisingly well and I have used it to run Coq,
  esp. for the purpose of making the interactive version of Vols. I,II
  from the Software Foundations textbook (see
  <https://jscoq.github.io/ext/sf> and
  <https://jscoq.github.io/ext/sf/tools/jscoq-tester.html>).

  Of course @ejgallego is exaggerating when he says that it flies, it
  still runs OCaml bytecode in interpreted mode on top of the WASM
  JIT. Performance is pretty reasonable still, except in the case some
  intensive Coq tactics (in which case this is a third level of
  interpreter… :man_facepalming: ). The main gap right now is the
  standard libraries `str', `unix', and `threads', for which I have
  compiled empty stubs, because dynamic loading of libraries in WASI is
  still immature. I *have* been able to compile `num' and it works
  correctly because it does not depend on anything else. I am currently
  investigating how to build `zarith' (which requires `gmp') because Coq
  8.13 depends on it.

  So yeah, this is not at all the coveted WASM backend for `ocamlc', but
  it's one existing solution and you can hack on it right now. Any help
  or comments are welcome!


containers 3.3
══════════════

  Archive: <https://discuss.ocaml.org/t/ann-containers-3-3/7594/1>


Simon Cruanes announced
───────────────────────

  I'm glad to announce the release of containers 3.3. Containers is an
  extension to OCaml's standard library that strives to be compatible
  with it, with more features and a few additional modules to get
  dynamic arrays, heaps, S-expression parser/printer, etc.

  In this release, we have new support for parsing/printing canonical
  S-expressions (a simple binary-safe format), a code-generation module
  for bitfields, and many improvements to existing modules in particular
  in the interface between maps/set/hashtbl and iterators.

  More details [in the github release].

  Many thanks to the contributors, in particular @Fardale for his work
  on CI and auto-doc-generation.


[in the github release]
<https://github.com/c-cube/ocaml-containers/releases/tag/v3.3>


New OCaml books?
════════════════

  Archive: <https://discuss.ocaml.org/t/new-ocaml-books/5789/6>


Deep in this thread, Damien Guichard announced
──────────────────────────────────────────────

  I’m also working on a free culture book. The preview is at
  <https://damien-guichard.developpez.com/downloads/Algorithmic-with-OCaml.pdf>

  It’s under CC-BY-SA.

  Planned chapters include : Records, Type polymorphism, Modules as
  functions, Conceptual graphs.

  The reason why i don't contribute to @dmbaturin's effort is that my
  main topic is algorithmic, ocaml is more a good way than a goal.


Damien Guichard later added
───────────────────────────

  Sorry, you have to be a member of <https://www.developpez.com/> to
  access this link.

  Here is my 2nd try. I hope you don't need to be a member of
  <https://www.aeriesguard.com/> this time.
  <https://www.aeriesguard.com/media/get/504bfbe34d3f517c8acf37ffbe200f84698aca0c/Algorithmic-with-_OCaml.pdf>


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2021-03-30 14:55 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2021-03-30 14:55 UTC (permalink / raw)
  To: lwn, cwn, caml-list, comp

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

Hello

Here is the latest OCaml Weekly News, for the week of March 23 to 30,
2021.

Table of Contents
─────────────────

Theorem Proving with Coq and Ocaml
ocaml-aws 1.2
Release of `fmlib.0.2.0'
soupault: a static website generator based on HTML rewriting
Timere-parse 0.0.2, natural language parsing of date, time and duration
ocamlnet-4.1.9
Release of cohttp 4.0.0
New Try-Alt-Ergo website
Other OCaml News
Old CWN


Theorem Proving with Coq and Ocaml
══════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/theorem-proving-with-coq-ocaml/7524/1>


Gregory Malecha announced
─────────────────────────

  I lead the formal methods team at Bedrock Systems
  (<https://bedrocksystems.com>) and we are looking to hire a full-time
  engineer working on automation in the Coq proof assistant (which is
  written in Ocaml). We're very interested in candidates with strong
  Ocaml background especially in topics related to automated theorem
  proving, e.g. SAT/SMT solvers, datalog, superposition, resolution,
  etc. While Coq experience is great, you do not need to be a Coq expert
  to apply to this position, we're happy to marry your Ocaml expertise
  with our Coq expertise.

  Formal methods are at the core of BedRock's business and we are deeply
  committed to solving problems of system verification at industrial
  scale. We get FM techniques and insights into the code early on and
  use them to build, maintain, and evolve code. This includes developing
  more agile techniques to keep evolving verified systems once they're
  built.

  We have eight folks on the formal methods team today, hailing from
  MPI-SWS, MIT CSAIL, Princeton, and other leading research groups. If
  you're interested, send me an email or you can inquire more broadly at
  jobs@bedrocksystems.com.

  *Company overview:*

  BedRock is building a *trustworthy compute base for mission-critical
  applications* . The foundation of the platform is an open source,
  multi-core, capability-based micro-hypervisor that we are developing
  and verifying. On top of these deep specifications we are writing and
  verifying applications to provide an extensible and configurable core.

  Our contention is that the *time is ripe for verifiably trustworthy
  systems*, for everything from secure phones and industrial IoT to
  autonomous systems and financial infrastructure. With significant seed
  funding, great investors, and commercial projects underway, we are
  growing our team in Boston, the Bay Area, DC, and Germany.


ocaml-aws 1.2
═════════════

  Archive: <https://discuss.ocaml.org/t/ann-ocaml-aws-1-2/7526/1>


Tim Mc Gilchrist announced
──────────────────────────

  I'm pleased to announce the release of [ocaml-aws] 1.2.

  ocaml-aws aims to provide generated bindings to many AWS services
  using the botocore specifications. In this version we've bumped
  version bounds on a bunch of depedencies and also added new bindings
  for:
  • RDS
  • Route53
  • SDB
  • SQS

  Please check it out and report any issues.


[ocaml-aws] <https://opam.ocaml.org/packages/aws/>


Release of `fmlib.0.2.0'
════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-release-of-fmlib-0-2-0/7527/1>


Hbr announced
─────────────

  I am pleased to announce the second release (0.2.0) of fmlib, a
  functional library with managed effects.

  The library has up to now 4 components:

  • [Some standard datatypes]
  • [Pretty printing functions]
  • [Parsing combinator library]
  • [Primitives to compile to javascript]

  The last component is the new one in version 0.2.0. Internally it uses
  `js_of_ocaml' to compile to javascript. It is an easy to use library
  of primitive functions to access mainly browser functionality from
  ocaml and some rudimentary functions to access nodejs functionality.

  It can be installed via opam by

  ┌────
  │ opam update
  │ opam install fmlib
  │ opam install fmlib_js
  └────

  It is located at [github]


[Some standard datatypes]
<https://hbr.github.io/fmlib/odoc/fmlib/Fmlib_std/index.html>

[Pretty printing functions]
<https://hbr.github.io/fmlib/odoc/fmlib/Fmlib_pretty/Print/index.html>

[Parsing combinator library]
<https://hbr.github.io/fmlib/odoc/fmlib/Fmlib_parse/index.html>

[Primitives to compile to javascript]
<https://hbr.github.io/fmlib/odoc/fmlib_js/index.html>

[github] <https://github.com/hbr/fmlib>


Hbr added
─────────

  Hint: `fmlib' is still a bundle of three libraries i.e. three toplevel
  modules `Fmlib_std', `Fmlib_pretty' and `Fmlib_parse'. Therefore they
  have to be used in a `dune' file with

  ┌────
  │ (libraries fmlib.fmlib_std fmlib.fmlib_pretty fmlib.fmlib_parse ...)
  └────

  while the new library can be used with

  ┌────
  │ (libraries fmlib_js ...)
  └────

  This inconvenience will be corrected in the next release.


soupault: a static website generator based on HTML rewriting
════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-soupault-a-static-website-generator-based-on-html-rewriting/4126/14>


Daniil Baturin announced
────────────────────────

  [soupault 2.5.0] offers some features that are unique among SSGs.

  There are two new built-in widgets for rewriting internal links, which
  is useful if you don't host your website at the server root. For
  example, if you host it at `example.com/~user', you cannot just write
  `<img src="/header.png">': it will point to `example.com/header.png'
  while you want `example.com/~user/header.png' instead.

  The `relative_links' widget will convert all internal links to
  relative links according to their depth in the directory tree. For
  example, suppose you have `<img src="/header.png">' in your page
  template. Then in `about/index.html' that link will become `<img
  src="../header.png">'; in `books/magnetic-fields/index.html' it will
  be `<img src="../../header.png">' and so on. This way you can move the
  website to a subdirectory and it will still work.

  The `absolute_links' widget prepends a prefix to every internal
  link. Conceptually similar to the site URL option in other SSGs and
  CMSes, but works for all links, not only links generated by the SSG
  itself.


[soupault 2.5.0] <https://soupault.app/blog/soupault-2.5.0-release/>


Timere-parse 0.0.2, natural language parsing of date, time and duration
═══════════════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-timere-parse-0-0-2-natural-language-parsing-of-date-time-and-duration/7532/1>


Darren announced
────────────────

  I'm happy to announce the release of Timere-parse 0.0.2, the natural
  language parsing component of Timere, a date time handling and
  reasoning library. Both packages are under the [Timere repo].

  Timere-parse allows interpretation of common descriptions of date,
  time and duration.


[Timere repo] <https://github.com/daypack-dev/timere>

Date time examples
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  Input strings are in `""', indented lines are pretty printed output.

  ┌────
  │ "2020 jun 6 10am"
  │   Ok 2020-06-06T10:00:00Z
  │ "2020 jun 6th 10:15"
  │   Ok 2020-06-06T10:15:00Z
  │ "Australia/Sydney 2020 jun 6 10am"
  │   Ok 2020-06-06T10:00:00+10:00
  │ "01-06-2020 10:10"
  │   Ok 2020-06-01T10:10:00Z
  │ "2020/06/01 10am"
  │   Ok 2020-06-01T10:00:00Z
  │ "jul 6 2021 9:15am"
  │   Ok 2021-07-06T09:15:00Z
  │ "2020/06/01"
  │   Ok 2020-06-01T00:00:00Z
  └────


Duration examples
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  ┌────
  │ "24h"
  │   Ok 1 days 0 hours 0 mins 0 secs
  │ "16.5 hours"
  │   Ok 16 hours 30 mins 0 secs
  │ "1h20min"
  │   Ok 1 hours 20 mins 0 secs
  │ "1 hour 2.5 minutes"
  │   Ok 1 hours 2 mins 30 secs
  │ "100 seconds"
  │   Ok 1 mins 40 secs
  │ "2.25 minutes 1 seconds"
  │   Ok 2 mins 16 secs
  │ "5 days 6.5 hours"
  │   Ok 5 days 6 hours 30 mins 0 secs
  └────


Timere object examples
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  ┌────
  │ "2020 jun"
  │   Ok (pattern (years 2020) (months Jun))
  │ "jan"
  │   Ok (pattern (months Jan))
  │ jan 6 12pm to 2pm"
  │   Ok (bounded_intervals whole (duration 366 0 0 0) (points (pick mdhms Jan 6 12 0 0)) (points (pick hms 14 0 0)))
  │ "12th, 13 to 15, 20"
  │   Ok (pattern (month_days 12 13 14 15 20))
  │ "16th 7:30am"
  │   Ok (pattern (month_days 16) (hours 7) (minutes 30) (seconds 0))
  │ "16th 8am to 10am, 11am to 12pm"
  │   Ok (inter (pattern (month_days 16)) (union (bounded_intervals whole (duration 1 0 0 0) (points (pick hms 8 0 0))
  │ (points (pick hms 10 0 0))) (bounded_intervals whole (duration 1 0 0 0) (points (pick hms 11 0 0)) (points (pick hms
  │ 12 0 0)))))
  │ "2020 jun 16th 10am to jul 1 12pm"
  │   Ok (bounded_intervals whole (duration 366 0 0 0) (points (pick ymdhms 2020 Jun 16 10 0 0)) (points (pick mdhms Jul
  │ 1 12 0 0)))
  └────


Corpus
╌╌╌╌╌╌

  For the full corpus/examples, see [corpus/] for code and
  [corpus-outputs/] for generated outputs.


[corpus/] <https://github.com/daypack-dev/timere/tree/main/corpus>

[corpus-outputs/]
<https://github.com/daypack-dev/timere/blob/main/corpus-outputs>


ocamlnet-4.1.9
══════════════

  Archive:
  <https://sympa.inria.fr/sympa/arc/caml-list/2021-03/msg00028.html>


Gerd Stolpmann announced
────────────────────────

  there is now ocamlnet-4.1.9 available:

  • compatibility with upcoming OCaml-4.12
  • some fixes regarding TLS (https)
  • a few build-related details

  See the project page for download, documentation, a detailed
  changelog, and the mailing list:
  <http://projects.camlcity.org/projects/ocamlnet.html>

  The repository is at

  <https://gitlab.com/gerdstolpmann/lib-ocamlnet3/>

  opam follows soon.


Release of cohttp 4.0.0
═══════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-release-of-cohttp-4-0-0/7537/1>


Marcello Seri announced
───────────────────────

  We are glad to announce the [upcoming release] of [`cohttp 4.0.0'], a
  low-level OCaml library for HTTP clients and servers.

  This release comes with a big update of the documentation and the
  examples, both in the [README] and in the codebase, and improvements
  and bug fixes from many contributors 🙇 which you will find listed
  below.

  A huge thank you to all the people that helped to get this release
  ready by raising issues, participating in discussions, sending PRs,
  and otherwise using our library.


[upcoming release] <https://github.com/ocaml/opam-repository/pull/18385>

[`cohttp 4.0.0'] <https://github.com/mirage/ocaml-cohttp>

[README] <https://github.com/mirage/ocaml-cohttp>

The future of cohttp
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  To quote @avsm from [another post]

        The development process […] is driven by a simple
        principle that is inspired by OCaml itself: don't
        needlessly break backwards compatibility without good
        reason, and when it is necessary, justify it. Our tools
        are embedded in projects that have lifespans measured in
        the decades, and we take compatibility seriously. That’s
        why we take pains to provide migration paths […] that are
        as invisible as possible.

  Since in this release we have decided to include a number of fixes and
  improvements which modified Cohttp module signatures, we decided to
  signal the potential breackage by bumping the major version of the
  library. In most cases, however, you don't need to do anything and
  your code will keep working with the latest cohttp.

  Moving forward, we have agreed to start working on the API and the
  internals of cohttp to modernize it and get it ready for multicore
  support and also for eventual unification with the h2 stack that
  offers HTTP2/3 support.

  To be able to move forward and avoid stalling improvements for months,
  we will be less shy of major releases.  However, to remain true to the
  principle above, we will be careful to introduce one breakage at a
  time, carefully justify its need and provide a clear upgrade path in
  the changelog.

  The version history is:
  • cohttp 2.5.5: security backports (changelog below)
  • cohttp 3.0.0: skipped (explained below)
  • cohttp 4.0.0: the next release (changelog below)
  • cohttp 5.0.0: will include a long-awaited change in [how headers are
    treated]: which fixes a multitude of past issues and simplifies the
    internals of the module.

  For the people that need stability, *we have decided to keep
  backporting important security fixes to the `2.5.x' branch of the
  project*. In fact, `cohttp 2.5.5', released just a few days ago was
  the first release with the backport of a security issue.


[another post]
<https://discuss.ocaml.org/t/defining-standard-ocaml-development-lifecycle-processes/7486/5>

[how headers are treated]
<https://github.com/mirage/ocaml-cohttp/pull/747>


What happened to 3.0.0?
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  The release of `cohttp 3.0.0' has been long awaited, and we are
  extremely grateful to @dinosaure for the enormous work that went into
  designing and implementing `conduit 3.0.0' and `cohttp 3.0.0' (part of
  which remained in `4.0.0' as bug fixes and API improvements).

  However, a discussion started soon after the release pointing out that
  there could be further room of improvement also with the new design,
  particularly with respect to backwards compatibility. Since the design
  discussion did not reach consensus, these changes were reverted to
  preserve better compatibility with existing cohttp users and `cohttp
  3.0.0' was [marked as unavailable] on the opam repository.  As
  maintainers, our "lesson learnt" is to not do releases incrementally
  when they span multiple libraries: we were caught in an awkward spot
  when conduit 3 was released, but without cohttp 3.

  The work on the new conduit is steadily progressing and will be
  integrated in a new major release of cohttp in the future, once we
  will be confident that the API is settled. If you want to try using it
  immediately, then it is available as the [mimic] library in ocaml-git.


[marked as unavailable]
<https://github.com/mirage/ocaml-cohttp/issues/736>

[mimic] <https://github.com/mirage/ocaml-git/tree/master/src/mimic>


Change Log
╌╌╌╌╌╌╌╌╌╌

v4.0.0
┄┄┄┄┄┄

  • cohttp.response: fix malformed status header for custom status codes
    (@mseri @aalekseyev #752)
  • remove dependency to base (@samoht #745)
  • add GitHub Actions workflow (@smorimoto #739)
  • `cohttp-lwt-jsoo': Forward exceptions to caller when response is
    null (@mefyl #738)
  • Use implicit executable dependency for generate.exe (@TheLortex
    #735)
  • cohttp: update HTTP codes (@emillon #711)
  • cohttp: fix chunked encoding of empty body (@mefyl #715)
  • cohttp-async: fix body not being uploaded with unchunked Async.Pipe
    (@mefyl #706)
  • cohttp-{async, lwt}: fix suprising behaviours of Body.is_empty
    (@anuragsoni #714 #712 #713)
  • refactoring of tests (@mseri #709, @dinosaure #692)
  • update documentation (@dinosaure #716, @mseri #720)
  • fix deadlock in logging (@dinosaure #722)
  • improve media type parsing (@seliopou #542, @dinosaure #725)
  • [reverted] breaking changes to client and server API to use conduit
    3.0.0 (@dinosaure #692). However, as the design discussion did not
    reach consensus, these changes were reverted to preserve better
    compatibility with existing cohttp users. (#741, @samoht)

  *Potentially breaking changes*

  • remove `wrapped false' from the codebase (@rgrinberg #734)
  • cohttp: add Uti.t to uri scheme (@brendanlong #707)
  • cohttp-lwt-jsoo: rename Cohttp_lwt_xhr to Cohttp_lwt_jsoo for
    consistency (@mseri #717)
  • cohttp: fix transfer-encoding ordering in headers (@mseri #721)
  • lower-level support for long-running cohttp-async connections
    (@brendanlong #704)
  • add of_form and to_form functions to body (@seliopou #440, @mseri
    #723)
  • cohttp-lwt: partly inline read_response, fix body stream leak
    (@madroach @dinosaure #696).  Note: there is a new warning that may
    show up in your logs when bodies are leaked, see also [#730].
  • add comparison functions for Request.t and Response.t via
    ppx_compare (@msaffer-js @dinosaure #686)


[#730] <https://github.com/mirage/ocaml-cohttp/issues/730>


v2.5.5
┄┄┄┄┄┄

  • `Cohttp_async.resolve_local_file', `Cohttp_lwt.resolve_local_file'
    and `Cohttp_lwt_unix.resolve_file' are now the same code under the
    hood (`Cohttp.Path.resolve_local_file'). The old names have been
    preserved for compatibility, but will be marked as deprecated in the
    next release. This changes the behavior of
    `Cohttp_lwt_unix.resolve_file': it now percent-decodes the paths and
    blocks escaping from the docroot correctly. This also fixes and
    tests the corner cases in these methods when the docroot is
    empty. (@ewanmellor #755)

    *Double check your code base for uses of
     `Cohttp_lwt_unix.resolve_file': it is unsafe with respect to path
     handling*. If you cannot upgrade to `cohttp 2.5.5', you should
     modify your code to call `Cohttp_lwt.resolve_local_file' instead.


New Try-Alt-Ergo website
════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-new-try-alt-ergo-website/7555/1>


OCamlPro announced
──────────────────

  We are pleased to announce the new version of the [Try Alt-Ergo
  website]!

  As a reminder, Try Alt-Ergo allows you to write and run your problems
  in your browser without any server computation.  It was designed to be
  a powerful and simple tool to use.

  Updates concern these parts of the site:
  • A new back end in JavaScript
  • Front end with news features (Ace editor, top panel, right panel,
    etc.)

  Take a look at [our blogpost] to read how we have updated the Try
  Alt-Ergo website and what's new! You can also visit the [Try Alt-Ergo
  website] directly. As usual, do not hesitate to report bugs, to ask
  questions, or to give your feedback.


[Try Alt-Ergo website] <https://try-alt-ergo.ocamlpro.com/>

[our blogpost] <https://www.ocamlpro.com/2021/03/29/new-try-alt-ergo/>


Other OCaml News
════════════════

From the ocamlcore planet blog
──────────────────────────────

  Here are links from many OCaml blogs aggregated at [OCaml Planet].

  • [New Try-Alt-Ergo]
  • [TZComet's New Token Viewer]


[OCaml Planet] <http://ocaml.org/community/planet/>

[New Try-Alt-Ergo]
<https://www.ocamlpro.com/2021/03/29/new-try-alt-ergo/>

[TZComet's New Token Viewer]
<https://seb.mondet.org/b/0012-tzcomet-token-viewer.html>


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2021-03-23  9:05 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2021-03-23  9:05 UTC (permalink / raw)
  To: lwn, cwn, caml-list, comp

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

Hello

Here is the latest OCaml Weekly News, for the week of March 16 to 23,
2021.

Table of Contents
─────────────────

findlib-1.9.1
Conformist 0.2.1
Compiler Explorer now supports OCaml 4.12.0
Annoucement of OFLAT, a web-based platform to support courses on Formal Languages and Automata Theory
Old CWN


findlib-1.9.1
═════════════

  Archive:
  <https://sympa.inria.fr/sympa/arc/caml-list/2021-03/msg00014.html>


Gerd Stolpmann announced
────────────────────────

  a couple of installation problems slipped into findlib-1.9, mostly
  missing files in the release tarball, but also a FreeBSD
  incompatibility. For that reason, there is now findlib-1.9.1 fixing
  the problems (so far known, and I hope we caught them all).

  Same link as before:

  <http://projects.camlcity.org/projects/findlib.html>


Conformist 0.2.1
════════════════

  Archive: <https://discuss.ocaml.org/t/ann-conformist-0-2-1/7482/1>


jerben announced
────────────────

  I am happy to announce the release of conformist 0.2.1.

  [Conformist] deals with schema definition and validation. It supports
  decoding to bridge the gap between runtime types and static types
  without ppx.

  ┌────
  │ type occupation =
  │   | Mathematician
  │   | Engineer
  │ 
  │ type user =
  │   { occupation : occupation
  │   ; email : string
  │   ; birthday : int * int * int
  │   ; nr_of_siblings : int
  │   ; comment : string option
  │   ; wants_premium : bool
  │   }
  │ 
  │ let user occupation email birthday nr_of_siblings comment wants_premium =
  │   { occupation; email; birthday; nr_of_siblings; comment; wants_premium }
  │ ;;
  │ 
  │ let occupation_decoder = function
  │   | "mathematician" -> Ok Mathematician
  │   | "engineer" -> Ok Engineer
  │   | _ -> Error "Unknown occupation provided"
  │ ;;
  │ 
  │ let occupation_encoder = function
  │   | Mathematician -> "mathematician"
  │   | Engineer -> "engineer"
  │ ;;
  │ 
  │ let user_schema =
  │   Conformist.(
  │     make
  │       Field.
  │ 	[ custom
  │ 	    occupation_decoder
  │ 	    occupation_encoder
  │ 	    "occupation"
  │ 	    ~meta:()
  │ 	; string "email"
  │ 	; date "birthday"
  │ 	; int ~default:0 "nr_of_siblings"
  │ 	; optional (string "comment")
  │ 	; bool "wants_premium"
  │ 	]
  │       user)
  │ ;;
  │ 
  │   let input =
  │     [ "occupation", [ "engineer" ]
  │     ; "email", [ "test@example.com" ]
  │     ; "birthday", [ "2020-12-01" ]
  │     ; "nr_of_siblings", [ "3" ]
  │     ; "comment", [ "hello" ]
  │     ; "wants_premium", [ "true" ]
  │     ]
  │ 
  │ let user =
  │   Conformist.decode Schema.user_schema input
  │ 
  │ let validation_errors =
  │   Conformist.validate Schema.user_schema input
  └────

  The `user_schema' and the `user' create function are guaranteed to be
  in sync at compile time.


[Conformist] <https://github.com/oxidizing/conformist>


Compiler Explorer now supports OCaml 4.12.0
═══════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-compiler-explorer-now-supports-ocaml-4-12-0/7479/3>


Continuing this thread, Sora Morimoto announced
───────────────────────────────────────────────

  Today we deployed 4.12.0 flambda. It must already be available!


Annoucement of OFLAT, a web-based platform to support courses on Formal Languages and Automata Theory
═════════════════════════════════════════════════════════════════════════════════════════════════════

  Archive:
  <https://sympa.inria.fr/sympa/arc/caml-list/2021-03/msg00026.html>


Antonio Ravara announced
────────────────────────

  <http://ctp.di.fct.unl.pt/FACTOR/OFLAT/>

  To support students’ autonomous work on topics related with Formal
  Languages and Automata Theory (FLAT), interactive tools that allow
  them to experiment with examples and solve exercises are very
  important - several studies demonstrate this.

  There are applications with this aim. While some are impressively
  complete, but are mainly Desktop applications (like JFLAP), others
  that can be used via a web browser are under-developed. Moreover,
  these applications are often not fully interactive - illustrations or
  even step-by-step execution is key to understand the algorithms - and,
  due to the programming languages used, implement the concepts in a way
  quite distant from the textbook Mathematical definitions. Code that
  implements closely the definitions is also a relevant pedagogical
  tool.

  With three concerns in mind - availability in mobile devices,
  interactive run of the algorithms (or at least presenting clear
  explanations), and code following closely the definitions - we
  developed OFLAT, a web-based tool to represent and illustrate
  graphically classical mechanisms and algorithms of Formal Languages
  and Automata Theory. It includes not only exercises evaluated
  automatically and providing feedback, but also allows students to
  create their own exercises. An integration with a grading platform
  like Learn-OCaml is underway.

  The tool is implemented in OCaml and is organised in two parts: a
  library - OCamlFLAT - which concentrates the logic of FLAT concepts,
  and the interactive applicational part - OFLAT. To run on browsers,
  the application uses the OCaml to Javascript translator
  Js_of_OCaml. To implement the interactive graphics, it uses Cytoscape,
  a Javascript library for graphs. All code is available in the Git of
  the project: <https://gitlab.com/releaselab/leaf/OCamlFlat>,
  <https://gitlab.com/releaselab/leaf/OFLAT>.

  The development of new functionalities is ongoing (we're now working
  more animations and on Context-Free Grammar and Pushdown Automata).
  Comments most welcome.


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2021-03-16 10:31 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2021-03-16 10:31 UTC (permalink / raw)
  To: lwn, cwn, caml-list, comp

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

Hello

Here is the latest OCaml Weekly News, for the week of March 09 to 16,
2021.

Table of Contents
─────────────────

Links from the OCaml Discourse
findlib-1.9
Compiler Explorer now supports OCaml 4.12.0
Old CWN


Links from the OCaml Discourse
══════════════════════════════

The editor says
───────────────

  Due to a [global Discourse change] that disabled the mailing list
  mode, I was no able to collect the bodies of the news from the OCaml
  Discourse for several days. This has now been fixed and next week’s
  OCaml Weekly News should be as usual. In the meantime, here are links
  to the main announcements. Do not hesitate to [contact me] if you want
  to give feedback about this newsletter.

  • [Release 1.0.0 of bag]
  • [Plan for Dune 3.0]
  • [lascar 0.7.0 - a library for manipulating Labeled Transition
    Systems in OCaml]
  • [dirsift 0.0.3 - Search for directories by type]
  • [FSML 0.3.0 - an OCaml library for describing and describing
    synchronous finite state machines]
  • [Multicore OCaml: February 2021]
  • [VSCode OCaml Platform v1.7.0 - v1.8.0]
  • [ca-certs and ca-certs-nss]
  • [Js_of_Ocaml position at TrustInSoft]
  • [Senior Developer vacancy at Cryptosense, France (or remote)]
  • [hxd.0.3.1 - A simple hexdump tool in OCaml]
  • [Release of Gopcaml-mode (0.0.2) - Unicode & Compatibility Update]


[global Discourse change]
<https://meta.discourse.org/t/mailing-list-mode-mysteriously-deactivated/182650>

[contact me] <mailto:alan.schmitt@polytechnique.org>

[Release 1.0.0 of bag]
<https://discuss.ocaml.org/t/ann-release-1-0-0-of-bag/7464>

[Plan for Dune 3.0] <https://discuss.ocaml.org/t/plan-for-dune-3-0/7414>

[lascar 0.7.0 - a library for manipulating Labeled Transition Systems in
OCaml]
<https://discuss.ocaml.org/t/ann-lascar-0-7-0-a-library-for-manipulating-labeled-transition-systems-in-ocaml/7443>

[dirsift 0.0.3 - Search for directories by type]
<https://discuss.ocaml.org/t/ann-dirsift-0-0-3-search-for-directories-by-type/7435>

[FSML 0.3.0 - an OCaml library for describing and describing synchronous
finite state machines]
<https://discuss.ocaml.org/t/ann-fsml-0-3-0-an-ocaml-library-for-describing-and-describing-synchronous-finite-state-machines/7445>

[Multicore OCaml: February 2021]
<https://discuss.ocaml.org/t/multicore-ocaml-february-2021/7449>

[VSCode OCaml Platform v1.7.0 - v1.8.0]
<https://discuss.ocaml.org/t/ann-vscode-ocaml-platform-v1-7-0-v1-8-0/7424>

[ca-certs and ca-certs-nss]
<https://discuss.ocaml.org/t/ann-ca-certs-and-ca-certs-nss/6804/7>

[Js_of_Ocaml position at TrustInSoft]
<https://discuss.ocaml.org/t/js-of-ocaml-position-at-trustinsoft/7429>

[Senior Developer vacancy at Cryptosense, France (or remote)]
<https://discuss.ocaml.org/t/senior-developer-vacancy-at-cryptosense-france-or-remote/7431>

[hxd.0.3.1 - A simple hexdump tool in OCaml]
<https://discuss.ocaml.org/t/ann-hxd-0-3-1-a-simple-hexdump-tool-in-ocaml/7417>

[Release of Gopcaml-mode (0.0.2) - Unicode & Compatibility Update]
<https://discuss.ocaml.org/t/ann-release-of-gopcaml-mode-0-0-2-unicode-compatibility-update/7425>


findlib-1.9
═══════════

  Archive:
  <https://sympa.inria.fr/sympa/arc/caml-list/2021-03/msg00012.html>


Gerd Stolpmann announced
────────────────────────

  findlib-1.9 is out. Changes:

  • Overhaul how separately installed packages (e.g. num) are handled
    (by David Allsopp).
  • Switch to opam-2.0 file format (by David Allsopp).
  • Fix an incomaptibility with ocaml-4.13 (by David Allsopp).
  • Expose the native toplevel (by Louis Gesbert).
  • Fix an incompatibility with "Jane Street Style" (by Mark Laws).
  • Switch from m4 to sed (by kit-ty-kate).

  For manual, download, manuals, etc. see here:

  <http://projects.camlcity.org/projects/findlib.html>

  An updated OPAM package will follow soon.


Compiler Explorer now supports OCaml 4.12.0
═══════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-compiler-explorer-now-supports-ocaml-4-12-0/7479/1>


Sora Morimoto announced
───────────────────────

  Sorry to the OCaml hacker using Compiler Explorer for the late update
  (it took some time to deploy the infrastructure, etc.), but it now
  supports OCaml 4.12.0, but also 4.10.2 and 4.11.2!

  <https://godbolt.org>


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2021-03-09 10:58 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2021-03-09 10:58 UTC (permalink / raw)
  To: lwn, cwn, caml-list, comp

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

Hello

Here is the latest OCaml Weekly News, for the week of March 02 to 09,
2021.

Table of Contents
─────────────────

Working on an app to learn and execute OCaml on iPhone/iPad/Mac for beginners
ERic (Entity-Relation interactive calculator) version 0.3
OCaml Café: Tue, March 9 @ 7-9pm (CST)
Functional Programming User Study (Specifically in OCaml)
OCaml 4.12.0 released (with 4.11.2 too)
Other OCaml News
Old CWN


Working on an app to learn and execute OCaml on iPhone/iPad/Mac for beginners
═════════════════════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/working-on-an-app-to-learn-and-execute-ocaml-on-iphone-ipad-mac-for-beginners/7392/1>


Nathan Fallet announced
───────────────────────

  I started to work on a new project recently: My goal is to provide an
  iOS app for beginners to learn OCaml and practice on their device.  I
  think it is a good idea to get started easily.

  Here are some screenshots of what I’ve done so far:

  <https://aws1.discourse-cdn.com/standard11/uploads/ocaml/optimized/2X/e/ef66cf62d1ab605542033f09040cc964787cbb65_2_462x1000.jpeg>

  I’m open to feedback and opinion about this project idea


Nathan Fallet then added
────────────────────────

  I made it available for pre order on the App Store - I will keep
  improving it with time, and I think it can be a great tool for
  beginners

  [https://apps.apple.com/app/ocaml-learn-code/id1547506826]


[https://apps.apple.com/app/ocaml-learn-code/id1547506826]
<https://apps.apple.com/app/ocaml-learn-code/id1547506826>


Yawar Amin replied
──────────────────

  This is really cool. I just want to point out that your app is the
  sole search result for 'OCaml' in the App Store.  So that's a first
  :-)

  Incidentally, there is an 'OCaml Toplevel' app on the Android Play
  Store:
  <https://play.google.com/store/apps/details?id=fr.vernoux.ocaml>

  Your app looks more sophisticated though. Hopefully one day we have
  something like [Swift Playgrounds] and people can start learning OCaml
  interactively on their devices directly.


[Swift Playgrounds] <https://www.apple.com/ca/swift/playgrounds/>


ERic (Entity-Relation interactive calculator) version 0.3
═════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-eric-entity-relation-interactive-calculator-version-0-3/7408/1>


Damien Guichard announced
─────────────────────────

  The [programming languages zoo] is a great resource for wanna-be
  interpreter/compiler writers. The [ICFP 2000 programming contest] is
  another great resource for wanna-be ray tracers. However until now
  there has been no OCaml resource for wanna-be Knowledge Representation
  tool-ers. This makes sound like KR tool is a more difficult area than
  other projects. ERic v0.3 demonstrates the opposite as it's about 1200
  lines size (lexer & hand-written parser included) and reads/writes a
  [Conceptual Graph] Interchange Format (CGIF) notation.

  • ERic v0.3 [Zip archive]
  • ERic v0.3 [SVN repository]


[programming languages zoo] <http://plzoo.andrej.com/>

[ICFP 2000 programming contest]
<https://www.cs.cornell.edu/icfp/contest_results.htm>

[Conceptual Graph] <https://en.wikipedia.org/wiki/Conceptual_graph>

[Zip archive]
<http://damien-guichard.developpez.com/downloads/ERic-0.3.zip>

[SVN repository] <http://subversion.developpez.com/projets/ERic/trunk/>


OCaml Café: Tue, March 9 @ 7-9pm (CST)
══════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ocaml-cafe-tue-march-9-7-9pm-cst/7409/1>


Claude Jager-Rubinson announced
───────────────────────────────

  Please join us next Tuesday at 7pm Central time for the second meeting
  of OCaml Café.  Zoom connection info is available at [Houston
  Functional Programmers].

  OCaml Café offers a friendly, low stakes opportunity to ask questions
  about the OCaml language and ecosystem, work through programming
  problems that you’re stuck on, and get feedback on your code.
  Especially geared toward new and intermediate users, experienced OCaml
  developers will be available to answer your questions.

  Whether you’re still trying to make sense of currying or can spot
  non-tail-recursive code from across the room, we hope that you’ll join
  us with your questions about OCaml, or just to hang out with the OCaml
  community.


[Houston Functional Programmers] <https://hfpug.org>


Functional Programming User Study (Specifically in OCaml)
═════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/functional-programming-user-study-specifically-in-ocaml/7410/1>


Ahan Malhotra announced
───────────────────────

  We are doing user studies to help us understand how to help people
  understand and navigate complex information about programming
  documentation, *specifically in OCaml*. You will complete a series
  tasks that help us understand working memory and how you navigate a
  new interface. After examining a layout of the data (interface) for a
  short, predetermined amount of time, you will be asked a set of
  comprehension and/or qualitative questions to measure whether the
  methods of presenting this information has any impact on your
  performance.

  *The study will take around 55 minutes, and you will be entered into a
  lottery for a $150 Amazon gift card as compensation for your time.*

  *A bit more about this study*

  The user study will be done virtually on Zoom. You will be asked to
  various tasks with the interface. The interface is deployed as a
  public web application so you don’t have to install anything. This
  research is governed by Harvard University's Committee on the Use of
  Human Subjects.

  *Eligibility*

  You also don’t have to be an expert in anything to participate. You
  just need to be fluent in English and over 18 years of age.

  If you are interested, please fill out this survey to confirm your
  eligibility, and we will follow up to schedule the study session:
  <https://forms.gle/q6vkyEE2tSjjZoiSA>

  If you have any questions, please email
  ahanmalhotra@college.harvard.edu.


OCaml 4.12.0 released (with 4.11.2 too)
═══════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ocaml-4-12-0-released-with-4-11-2-too/7358/13>


Continuing this thread from last week, Hannes Mehnert said
──────────────────────────────────────────────────────────

  Congratulations to the new release. For the curious who intend to
  install a flambda version of 4.12 and are surprised that
  `ocaml-variants.4.12.0+flambda' does not exist, from [this thread] the
  opam layout has changed, and now the following works:

  ┌────
  │ $ opam sw create <my-switch-name> --packages=ocaml-variants.4.12.0+options,ocaml-options-only-flambda
  └────

  There are more configuration options available, take a look at the
  output of `opam search ocaml-option' for all options. (I've not been
  involved with this development. I don't quite understand why there is
  for each `Y' a `ocaml-option-Y' and a `ocaml-options-only-Y'.) I also
  have not figured out whether there's a way to pass `-O3' in the just
  created switch.

  Maybe it is worth to embed such information in the very nicely styled
  OCaml manual (considering that opam got quite some traction over the
  years and is recommended for OCaml developers)?


[this thread]
<https://discuss.ocaml.org/t/ocaml-4-12-0-first-release-candidate/7294>


Other OCaml News
════════════════

From the ocamlcore planet blog
──────────────────────────────

  Here are links from many OCaml blogs aggregated at [OCaml Planet].

  • [Release of Frama-Clang 0.0.10]
  • [Qubes-lite with KVM and Wayland]
  • [Florence and beyond: the future of Tezos storage]
  • [The ReScript Association]


[OCaml Planet] <http://ocaml.org/community/planet/>

[Release of Frama-Clang 0.0.10]
<https://frama-c.com/fc-plugins/frama-clang.html>

[Qubes-lite with KVM and Wayland]
<https://roscidus.com/blog/blog/2021/03/07/qubes-lite-with-kvm-and-wayland/>

[Florence and beyond: the future of Tezos storage]
<https://tarides.com/blog/2021-03-04-florence-and-beyond-the-future-of-tezos-storage>

[The ReScript Association]
<https://rescript-lang.org/blog/rescript-association-rebranding>


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2021-02-23  9:51 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2021-02-23  9:51 UTC (permalink / raw)
  To: lwn, cwn, caml-list, comp

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

Hello

Here is the latest OCaml Weekly News, for the week of February 16 to 23,
2021.

Table of Contents
─────────────────

OCamlFormat 0.17.0
Set up OCaml 1.1.8
Set up OCaml 1.1.9
OCaml 4.12.0, first release candidate
Ppxlib.0.22: an update on the state of ppx
OCaml-based trading firm is hiring remote devs
ocamlearlybird 1.0.0 beta1
OCaml for ARM MacOS
Old CWN


OCamlFormat 0.17.0
══════════════════

  Archive: <https://discuss.ocaml.org/t/ann-ocamlformat-0-17-0/7287/1>


Guillaume Petiot announced
──────────────────────────

  On behalf of the OCamlFormat development team I am pleased to announce
  the release of [ocamlformat.0.17.0] :tada:.

  OCamlformat is an auto-formatter for OCaml code, writing the parse
  tree and comments in a consistent style, so that you do not have to
  worry about formatting it by hand, and to speed up code review by
  focusing on the important parts.

  OCamlFormat is beta software. We expect the program to change
  considerably before we reach version 1.0.0. In particular, upgrading
  the `ocamlformat' package will cause your program to get
  reformatted. Sometimes it is relatively pain-free, but sometimes it
  will make a diff in almost every file. We are working towards having a
  tool that pleases most usecases in the OCaml community, please bear
  with us!

  To make sure your project uses the last version of ocamlformat, please
  set
  ┌────
  │ version=0.17.0
  └────
  in your `.ocamlformat' file.

  Main changes in `ocamlformat.0.17.0' are:

  • the `let-open' option, deprecated since 0.16.0, has been removed
  • support for OCaml 4.06 and 4.07 has been removed, minimal version
    requirement bumped to OCaml 4.08
  • the `extension-sugar' option, deprecated since 0.14.0, has been
    removed
  • the syntax of infix set/get operators is now preserved (`String.get'
    and similar calls used to be automatically rewritten to their
    corresponding infix form `.()', that was incorrect when using the
    `-unsafe' compilation flag. Now the concrete syntax of these calls
    is preserved)
  • all sugared extension points are now preserved
  • injectivity type annotations (OCaml 4.12 feature) are now supported
  • various fixes about comments positions

  We encourage you to try ocamlformat, that can be installed from opam
  directly ( `opam install ocamlformat' ), but please remember that it
  is still beta software. We have a [FAQ for new users ] that should
  help you decide if ocamlformat is the right choice for you.


[ocamlformat.0.17.0] <https://github.com/ocaml-ppx/ocamlformat>

[FAQ for new users ]
<https://github.com/ocaml-ppx/ocamlformat#faq-for-new-users>


Set up OCaml 1.1.8
══════════════════

  Archive: <https://discuss.ocaml.org/t/ann-set-up-ocaml-1-1-8/7288/1>


Sora Morimoto announced
───────────────────────

Changed
╌╌╌╌╌╌╌

  • The Windows opam wrapper is fractionally less-archaically named
    opam.cmd, with no loss in arcaneness.
  • Export `CYGWIN_ROOT' on the Windows runners, allowing bash to be
    invoked as `%CYGWIN_ROOT%\bin\bash~/~$env:CYGWIN_ROOT\bin\bash' (and
    similarly for Cygwin `setup-x86_64.exe').
  • The Windows runner no longer prepends `%CYGWIN_ROOT%\bin' to `PATH'.


Fixed
╌╌╌╌╌

  • Switches in Unix are now properly initialized before running depext.

  <https://github.com/avsm/setup-ocaml/releases/tag/v1.1.8>


Set up OCaml 1.1.9
══════════════════

  Archive: <https://discuss.ocaml.org/t/ann-set-up-ocaml-1-1-9/7293/1>


Sora Morimoto announced
───────────────────────

Fixed
╌╌╌╌╌

  • Further fix to switch initialisation.

  <https://github.com/avsm/setup-ocaml/releases/tag/v1.1.9>


OCaml 4.12.0, first release candidate
═════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ocaml-4-12-0-first-release-candidate/7294/1>


octachron announced
───────────────────

  The release of OCaml 4.12.0 is expected next week. We have created a
  release candidate that you can test. Most opam packages should work
  with this release candidate (without the need for an alpha
  repository).

  Compared to the last beta, this new release only contains one fix for
  Solaris and illumos.

  If you find any bugs, please report them here:
   <https://github.com/ocaml/ocaml/issues>

  Happy hacking,

  – Florian Angeletti for the OCaml team.


Installation instructions
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  The base compiler can be installed as an opam switch with the
  following commands
  ┌────
  │ opam update
  │ opam switch create 4.12.0~rc1 --repositories=default,beta=git+https://github.com/ocaml/ocaml-beta-repository.git
  └────
  If you want to tweak the configuration of the compiler, you can pick
  configuration options with
  ┌────
  │ opam update
  │ opam switch create <switch_name> --packages=ocaml-variants.4.12.0~rc1+options,<option_list>
  │ --repositories=default,beta=git+https://github.com/ocaml/ocaml-beta-repository.git
  └────
  where `<option_list>' is a comma separated list of ocaml-option-*
  packages. For instance, for a flambda and afl enabled switch:
  ┌────
  │ opam switch create 4.12.0~rc1+flambda+afl --packages=ocaml-variants.4.12.0~rc1+options,ocaml-option-flambda,ocaml-option-afl
  │ --repositories=default,beta=git+https://github.com/ocaml/ocaml-beta-repository.git
  └────
  All available options can be listed with `opam search ocaml-option'.

  The source code is available at these addresses:

  • <https://github.com/ocaml/ocaml/archive/4.12.0-rc1.tar.gz>
  • <https://caml.inria.fr/pub/distrib/ocaml-4.12/ocaml-4.12.0~rc1.tar.gz>


Ppxlib.0.22: an update on the state of ppx
══════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ppxlib-0-22-an-update-on-the-state-of-ppx/7296/1>


Nathan Rebours announced
────────────────────────

  We're happy to announce the release of ppxlib.0.22.0, the fist release
  of ppxlib fully compatible with OCaml 4.12.  The main and only feature
  of this release is the bump of the internal OCaml AST used by ppxlib
  from 4.11 to 4.12, allowing you to use 4.12 language features with
  ppxlib and any ppxlib-based ppx.  Note that ppxlib was compatible with
  the 4.12 compiler since 0.19.0 but that you couldn't use 4.12 language
  features until now.

  This is the third such AST bump release since we announced our plan to
  improve the state of the PPX ecosystem [here] and we though it'd be a
  good time to report back to you and tell you how things are going on
  this front.

  For those of you who aren't familiar with this plan, the goal is to
  upstream a minimal, stable, ocaml-migrate-parsetree-like API on top of
  the compiler-libs called `Astlib'. It will allow us to keep ppxlib and
  any ppx based on ppxlib compatible with OCaml trunk at all time.  To
  allow better performances and a clear compisition semantic, all the
  ppxlib-based ppx-es need to use the same AST (as opposed to
  ocaml-migrate-parsetree based ppx-es) so from a certain perspective,
  this plan simply moves the breaking API up one step, from
  compiler-libs to ppxlib.  In order to greatly ease the maintainenance
  of ppx-es and to prevent opam-universe splits we decided that
  everytime we cut a breaking ppxlib release, we will send patches to
  keep the existing ppx-es compatible with the latest version and
  therefore with the latest OCaml compilers and language features.

  While this seems like a tremendous task and a huge amount of work,
  dune and other tools that raised in its wake such as [opam-monorepo]
  incredibly simplified this kind of work.

  Ahead of OCaml releases, we prepare a branch of ppxlib with the
  upgraded AST. We then fetch opam-repository to gather a list of
  sensible reverse dependencies (i.e. packages whose latest version
  depends on ppxlib and is compatible with ppxlib's latest version) and
  assemble a dune workspace with a clone of each of those reverse
  dependencies, our ppxlib branch and all of their dependencies thanks
  to opam-monorepo.  We then use dune to build all the packages we're
  interested in and simply follow the compilation errors until
  everything builds successfully with the new ppxlib.  What remains is
  to create PRs on the relevant repositories to upstream those changes,
  after which maintainers have everything they need to cut a new
  compatible release.

  Most of this process is automated using scripts but it still requires
  a bit of handiwork. We aim at extracting tools to further improve this
  workflow and reduce the time and effort required but it has been
  surprisingly smooth. Our experience with the 4.10, 4.11 and 4.12
  upgrades so far is that most reverse dependencies don't need an
  upgrade and that it's far less demanding for one person to upgrade all
  the packages that need it than it would be for each individual
  maintainers to understand the changes in the AST and do the upgrade
  themselves.

  It's worth noting that for this to work well, the ppx-es and all their
  dependencies have to build with dune. We do maitain a separate
  opam-repository with dune ports of commonly used packages so in
  practice most projects fall into this category but a few exceptions
  remain and they are therefore not taken into account for this upgrade
  process.

  We're also trying to improve the tracking of the upgrade's progress
  and for the 4.12 compatible release we created a [github project] to
  have a list of all the packages we considered and see where they
  are. We also keep track of the packages we had to exclude and why.
  During this upgrade, we considered 80 opam packages, out of which only
  4 needed to be patched and 6 had to be excluded from the process as we
  couldn't reasonably get them to build in our workspace.

  Once we have a better idea of what makes a package easy to upgrade we
  plan on releasing a set of reasonable rules to follow to benefit from
  those upgrades, we'll keep you updated on this!

  All in all we're pretty happy with this new process and although it
  needs to be refined, we're confident it can grow into something
  sustainable by creating tools and CI to support it. Hopefully these
  will also benefit the wider community and help grow a healthier Opam
  universe.


[here] <https://discuss.ocaml.org/t/ppx-omp-2-0-0-and-next-steps/6231>

[opam-monorepo] <https://github.com/ocamllabs/opam-monorepo>

[github project] <https://github.com/ocaml-ppx/ppxlib/projects/2>


Jason Nielsen asked
───────────────────

  Curious about the current status of `Astlib'.  I was closely following
  [ppx] at one point but it hasn't seen much activity recently.  Thanks
  for all your hard work.


[ppx] <https://github.com/ocaml-ppx/ppx>


Jérémie Dimino
──────────────

  It's in progress. Not much happened in the past couple of months while
  we were finishing the port of a few projects to ppxlib and doing the
  4.12 upgrade. But @pitag re-started working `Astlib' as of a week
  ago. You can follow our progression via [the public meeting notes].

  Note however that the [ppx] project was for our original goal or
  providing a "forever stable" API for ppx rewriters. It has been in
  pause since August 2020 while were trying the "upgrade the world"
  method, which as @NathanReb pointed out is working pretty well
  practice. At this point, it's looking more and more likely that we
  won't resurect the ppx project.


[the public meeting notes] <https://github.com/ocaml-ppx/ppxlib/wiki>

[ppx] <https://github.com/ocaml-ppx/ppx>


OCaml-based trading firm is hiring remote devs
══════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ocaml-based-trading-firm-is-hiring-remote-devs/7298/1>


Michael Bacarella announced
───────────────────────────

  BTG is a trading firm founded by ex-Jane Street devs looking to hire
  some more devs.

  The role is primarily remote, working with the rest of our mostly
  remote team, though we hope to resume regular on-sites in Puerto Rico.

  We operate 24/7 and will consider employees anywhere in the world.

  Prior experience with OCaml is a plus, though any solid programming
  experience with an interest in functional programming and strong
  static types is also fine.

  Comfort navigating Linux is essential.

  Shoot me a message with a copy of your résumé or C.V. to discuss the
  opportunity further: [michael.bacarella@gmail.com]

  Feel free to re-post this elsewhere.


[michael.bacarella@gmail.com] <mailto:michael.bacarella@gmail.com>


ocamlearlybird 1.0.0 beta1
══════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-ocamlearlybird-1-0-0-beta1/7180/21>


文宇祥 announced
────────────────

  Hi, all. All the issues of beta1 have been fixed. Beta2 will be
  released soon.

  <https://github.com/ocaml/opam-repository/pull/18191>


OCaml for ARM MacOS
═══════════════════

  Archive: <https://discuss.ocaml.org/t/ocaml-for-arm-macos/6019/24>


Aaron L. Zeng announced
───────────────────────

  I noticed that opam 2.08 is now available for ARM Macs using
  [Homebrew], and I was able to confirm on my machine.

  `brew install opam' away :)


[Homebrew] <https://github.com/Homebrew/homebrew-core/pull/71605>


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]


[send me a message] <mailto:alan.schmitt@polytechnique.org>

[the archive] <https://alan.petitepomme.net/cwn/>

[RSS feed of the archives] <https://alan.petitepomme.net/cwn/cwn.rss>

[online] <http://lists.idyll.org/listinfo/caml-news-weekly/>

[Alan Schmitt] <https://alan.petitepomme.net/>


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

^ permalink raw reply	[flat|nested] 102+ messages in thread
* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2021-02-16 13:53 Alan Schmitt
  0 siblings, 0 replies; 102+ messages in thread
From: Alan Schmitt @ 2021-02-16 13:53 UTC (permalink / raw)
  To: lwn, cwn, caml-list, comp

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

Hello

Here is the latest OCaml Weekly News, for the week of February 09 to 16,
2021.

Table of Contents
─────────────────

opam 2.0.8 release
opam 2.1.0~beta4
Set up OCaml 1.1.6
Set up OCaml 1.1.7
Old CWN


opam 2.0.8 release
══════════════════

  Archive: <https://discuss.ocaml.org/t/ann-opam-2-0-8-release/7242/1>


R. Boujbel announced
────────────────────

  We are pleased to announce the minor release of [opam 2.0.8].

  This new version contains some fixes, mainly for sandbox and fish
  scripts. You can find more information in this [blog post], and more
  detailed in the [release note].

  /opam is a source-based package manager for OCaml. It supports
  multiple simultaneous compiler installations, flexible package
  constraints, and a Git-friendly development workflow./


[opam 2.0.8] <https://github.com/ocaml/opam/releases/tag/2.0.8>

[blog post] <https://opam.ocaml.org/blog/opam-2-0-8>

[release note] <https://github.com/ocaml/opam/releases/tag/2.0.8>


opam 2.1.0~beta4
════════════════

  Archive: <https://discuss.ocaml.org/t/ann-opam-2-1-0-beta4/7252/1>


David Allsopp announced
───────────────────────

  On behalf of the opam team, it gives me great pleasure to announce the
  third beta release of opam 2.1. Don’t worry, you didn’t miss beta3 -
  we had an issue with a configure script that caused beta2 to report as
  beta3 in some instances, so we skipped to beta4 to avoid any further
  confusion!

  We encourage you to try out this new beta release: there are
  instructions for doing so in [our wiki]. The instructions include
  taking a backup of your `~/.opam' root as part of the process, which
  can be restored in order to wind back. _Please note that local
  switches which are written to by opam 2.1 are upgraded and will need
  to be rebuilt if you go back to opam 2.0_. This can either be done by
  removing `_opam' and repeating whatever you use in your build process
  to create the switch, or you can use `opam switch export
  switch.export' to backup the switch to a file before installing new
  packages. Note that opam 2.1 _shouldn’t_ upgrade a local switch unless
  you upgrade the base packages (i.e. the compiler).


[our wiki]
<https://github.com/ocaml/opam/wiki/How-to-test-an-opam-feature>

What’s new in opam 2.1?
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  • Switch invariants
  • Improved options configuration (see the new `option' and expanded
    `var' sub-commands)
  • Integration of system dependencies (formerly the opam-depext
    plugin), increasing their reliability as it integrates the solving
    step
  • Creation of lock files for reproducible installations (formerly the
    opam-lock plugin)
  • CLI versioning, allowing cleaner deprecations for opam now and also
    improvements to semantics in future without breaking
    backwards-compatibility
  • Performance improvements to opam-update, conflict messages, and many
    other areas
  • New plugins: opam-compiler and opam-monorepo


Switch invariants
┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄

  In opam 2.0, when a switch is created the packages selected are put
  into the “base” of the switch. These packages are not normally
  considered for upgrade, in order to ease pressure on opam’s
  solver. This was a much bigger concern early on in opam 2.0’s
  development, but is less of a problem with the default mccs solver.

  However, it’s a problem for system compilers. opam would detect that
  your system compiler version had changed, but be unable to upgrade the
  ocaml-system package unless you went through a slightly convoluted
  process with `--unlock-base'.

  In opam 2.1, base packages have been replaced by switch
  invariants. The switch invariant is a package formula which must be
  satisfied on every upgrade and install. All existing switches’ base
  packages could just be expressed as `package1 & package2 & package3'
  etc. but opam 2.1 recognises many existing patterns and simplifies
  them, so in most cases the invariant will be `"ocaml-base-compiler" {=
  4.11.1}', etc. This means that `opam switch create my_switch
  ocaml-system' now creates a _switch invariant_ of `"ocaml-system"'
  rather than a specific version of the `ocaml-system' package. If your
  system OCaml package is updated, `opam upgrade' will seamlessly switch
  to the new package.

  This also allows you to have switches which automatically install new
  point releases of OCaml. For example:

  ┌────
  │ opam switch create ocaml-4.11 --formula='"ocaml-base-compiler" {>= "4.11.0" & < "4.12.0~"}'
  │ --repos=old=git+https://github.com/ocaml/opam-repository#a11299d81591
  │ opam install utop
  └────

  Creates a switch with OCaml 4.11.0 (the `--repos=' was just to select
  a version of opam-repository from before 4.11.1 was released). Now
  issue:

  ┌────
  │ opam repo set-url old git+https://github.com/ocaml/opam-repository
  │ opam upgrade
  └────

  and opam 2.1 will automatically offer to upgrade OCaml 4.11.1 along
  with a rebuild of the switch. There’s not yet a clean CLI for
  specifying the formula, but we intend to iterate further on this with
  future opam releases so that there is an easier way of saying “install
  OCaml 4.11.x”.


opam depext integration
┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄

  opam has long included the ability to install system dependencies
  automatically via the [depext plugin]. This plugin has been promoted
  to a native feature of opam 2.1.0 onwards, giving the following
  benefits:

  • You no longer have to remember to run `opam depext', opam always
    checks depexts (there are options to disable this or automate it for
    CI use). Installation of an opam package in a CI system is now as
    easy as `opam install .', without having to do the dance of `opam
    pin add -n/depext/install'. Just one command now for the common
    case!
  • The solver is only called once, which both saves time and also
    stabilises the behaviour of opam in cases where the solver result is
    not stable. It was possible to get one package solution for the
    `opam depext' stage and a different solution for the `opam install'
    stage, resulting in some depexts missing.
  • opam now has full knowledge of depexts, which means that packages
    can be automatically selected based on whether a system package is
    already installed. For example, if you have *neither* MariaDB nor
    MySQL dev libraries installed, `opam install mysql' will offer to
    install `conf-mysql' and `mysql', but if you have the MariaDB dev
    libraries installed, opam will offer to install `conf-mariadb' and
    `mysql'.


[depext plugin] <https://github.com/ocaml-opam/opam-depext>


opam lock files and reproducibility
┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄

  When opam was first released, it had the mission of gathering together
  scattered OCaml source code to build a [community repository]. As time
  marches on, the size of the opam repository has grown tremendously, to
  over 3000 unique packages with over 18000 unique versions. opam looks
  at all these packages and is designed to solve for the best
  constraints for a given package, so that your project can keep up with
  releases of your dependencies.

  While this works well for libraries, we need a different strategy for
  projects that need to test and ship using a fixed set of
  dependencies. To satisfy this use-case, opam 2.0.0 shipped with
  support for _using_ `project.opam.locked' files. These are normal opam
  files but with exact versions of dependencies. The lock file can be
  used as simply as `opam install . --locked' to have a reproducible
  package installation.

  With opam 2.1.0, the creation of lock files is also now integrated
  into the client:
  • `opam lock' will create a `.locked' file for your current switch and
    project, that you can check into the repository.
  • `opam switch create . --locked' can be used by users to reproduce
    your dependencies in a fresh switch.

  This lets a project simultaneously keep up with the latest
  dependencies (without lock files) while providing a stricter set for
  projects that need it (with lock files).


[community repository] <https://github.com/ocaml/opam-repository>


CLI Versioning
┄┄┄┄┄┄┄┄┄┄┄┄┄┄

  A new `--cli' switch was added to the first beta release, but it’s
  only now that it’s being widely used. opam is a complex enough system
  that sometimes bug fixes need to change the semantics of some
  commands. For example:

  • `opam show --file' needed to change behaviour
  • The addition of new controls for setting global variables means that
    the `opam config' was becoming cluttered and some things want to
    move to `opam var'
  • `opam switch create 4.11.1' still works in opam 2.0, but it’s really
    an OPAM 1.2.2 syntax.

  Changing the CLI is exceptionally painful since it can break scripts
  and tools which themselves need to drive `opam'.  CLI versioning is
  our attempt to solve this. The feature is inspired by the `(lang dune
  ...)' stanza in `dune-project' files which has allowed the Dune
  project to rename variables and alter semantics without requiring
  every single package using Dune to upgrade their `dune' files on each
  release.

  Now you can specify which version of opam you expected the command to
  be run against. In day-to-day use of opam at the terminal, you
  wouldn’t specify it, and you’ll get the latest version of the CLI. For
  example: `opam var --global' is the same as `opam var --cli=2.1
  --global'. However, if you issue `opam var --cli=2.0 --global', you
  will told that `--global' was added in 2.1 and so is not available to
  you. You can see similar things with the renaming of `opam upgrade
  --unlock-base' to `opam upgrade --update-invariant'.

  The intention is that `--cli' should be used in scripts, user guides
  (e.g. blog posts), and in software which calls opam. The only decision
  you have to take is the _oldest_ version of opam which you need to
  support. If your script is using a new opam 2.1 feature (for example
  `opam switch create --formula=') then you simply don’t support opam
  2.0. If you need to support opam 2.0, then you can’t use `--formula'
  and should use `--packages' instead. opam 2.0 does not have the
  `--cli' option, so for opam 2.0 instead of `--cli=2.0' you should set
  the environment variable `OPAMCLI' to `2.0'. As with _all_ opam
  command line switches, `OPAMCLI' is simply the equivalent of `--cli'
  which opam 2.1 will pick-up but opam 2.0 will quietly ignore (and, as
  with other options, the command line takes precedence over the
  environment).

  Note that opam 2.1 sets `OPAMCLI=2.0' when building packages, so on
  the rare instances where you need to use the `opam' command in a
  _package_ `build:' command (or in your build system), you _must_
  specify `--cli=2.1' if you’re using new features.

  There’s even more detail on this feature [in our wiki]. We’re still
  finalising some details on exactly how `opam' behaves when `--cli' is
  not given, but we’re hoping that this feature will make it much easier
  in future releases for opam to make required changes and improvements
  to the CLI without breaking existing set-ups and tools.


[in our wiki]
<https://github.com/ocaml/opam/wiki/Spec-for-opam-CLI-versioning>


What’s new since the last beta?
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

  • opam now uses CLI versioning ([#4385])
  • opam now exits with code 31 if all failures were during fetch
    operations ([#4214])
  • `opam install' now has a `--download-only' flag ([#4036]), allowing
    opam’s caches to be primed
  • `opam init' now advises the correct shell-specific command for `eval
    $(opam env)' ([#4427])
  • `post-install' hooks are now allowed to modify or remove installed
    files ([#4388])
  • New package variable `opamfile-loc' with the location of the
    installed package opam file ([#4402])
  • `opam update' now has `--depexts' flag ([#4355]), allowing the
    system package manager to update too
  • depext support NetBSD and DragonFlyBSD added ([#4396])
  • The format-preserving opam file printer has been overhauled
    ([#3993], [#4298] and [#4302])
  • pins are now fetched in parallel ([#4315])
  • `os-family=ubuntu' is now treated as `os-family=debian' ([#4441])
  • `opam lint' now checks that strings in filtered package formulae are
    booleans or variables ([#4439])

  and many other bug fixes as listed [on the release page].


[#4385] <https://github.com/ocaml/opam/pull/4385>

[#4214] <https://github.com/ocaml/opam/issues/4214>

[#4036] <https://github.com/ocaml/opam/issues/4036>

[#4427] <https://github.com/ocaml/opam/pull/4427>

[#4388] <https://github.com/ocaml/opam/pull/4388>

[#4402] <https://github.com/ocaml/opam/pull/4402>

[#4355] <https://github.com/ocaml/opam/issues/4355>

[#4396] <https://github.com/ocaml/opam/pull/4396>

[#3993] <https://github.com/ocaml/opam/issues/3993>

[#4298] <https://github.com/ocaml/opam/pull/4298>

[#4302] <https://github.com/ocaml/opam/pull/4302>

[#4315] <https://github.com/ocaml/opam/issues/4315>

[#4441] <https://github.com/ocaml/opam/pull/4441>

[#4439] <https://github.com/ocaml/opam/issues/4439>

[on the release page]
<https://github.com/ocaml/opam/releases/tag/2.1.0-beta4>


New Plugins
╌╌╌╌╌╌╌╌╌╌╌

  Several features that were formerly plugins have been integrated into
  opam 2.1.0. We have also developed some _new_ plugins that satisfy
  emerging workflows from the community and the core OCaml team. They
  are available for use with the opam 2.1 beta as well, and feedback on
  them should be directed to the respective GitHub trackers for those
  plugins.


opam compiler
┄┄┄┄┄┄┄┄┄┄┄┄┄

  The [`opam compiler'] plugin can be used to create switches from
  various sources such as the main opam repository, the ocaml-multicore
  fork, or a local development directory. It can use Git tag names,
  branch names, or PR numbers to specify what to install.

  Once installed, these are normal opam switches, and one can install
  packages in them. To iterate on a compiler feature and try opam
  packages at the same time, it supports two ways to reinstall the
  compiler: either a safe and slow technique that will reinstall all
  packages, or a quick way that will just overwrite the compiler in
  place.


[`opam compiler'] <https://github.com/ocaml-opam/opam-compiler>


opam monorepo
┄┄┄┄┄┄┄┄┄┄┄┄┄

  The [`opam monorepo'] plugin lets you assemble standalone dune
  workspaces with your projects and all of their opam dependencies,
  letting you build it all from scratch using only Dune and OCaml. This
  satisfies the “monorepo” workflow which is commonly requested by large
  projects that need all of their dependencies in one place. It is also
  being used by projects that need global cross-compilation for all
  aspects of a codebase (including C stubs in packages), such as the
  MirageOS unikernel framework.


[`opam monorepo'] <https://github.com/ocamllabs/opam-monorepo>


Next Steps
╌╌╌╌╌╌╌╌╌╌

  This is anticipated to be the final beta in the 2.1 series, and we
  will be moving to release candidate status after this. We could really
  use your help with testing this release in your infrastructure and
  projects and let us know if you run into any blockers. If you have
  feature requests, please also report them on [our issue tracker] – we
  will be planning the next release cycle once we ship opam 2.1.0
  shortly.


[our issue tracker] <https://github.com/ocaml/opam/issues>


Set up OCaml 1.1.6
══════════════════

  Archive: <https://discuss.ocaml.org/t/ann-set-up-ocaml-1-1-6/7276/1>


Sora Morimoto announced
───────────────────────

  This release includes a change to make the OCaml CI workflow on
  Windows faster!

        I tested this on one of my repos where the build itself is
        mere seconds. Before this change, setup-ocaml needed an
        average of 5:39 to install OCaml+opam and 1:53 to build
        the dependencies of the library. After this change, it
        needs an average of 3:15 for the installation and 1:27 for
        the deps.


Changed
╌╌╌╌╌╌╌

  • Windows installs Cygwin to `D:\cygwin', using faster Azure temporary