[Caml-list] Attn: Development Editor, Latest OCaml Weekly News

Alan Schmitt
2022-03-22T13:01:27Z

[-- 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 --]