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

Alan Schmitt
2024-08-06T09:00:44Z

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

Hello

Here is the latest OCaml Weekly News, for the week of July 30 to August
06, 2024.

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

Ppxlib dev meetings
Pragmatic Category Theory
ppxlib.0.33.0
OCaml-LSP 1.19.0 for OCaml 5.2
MlFront - A packaging system for OCaml
OCaml.org Newsletter: July 2024
Other OCaml News
Old CWN

Ppxlib dev meetings
═══════════════════

Archive: <https://discuss.ocaml.org/t/ppxlib-dev-meetings/12441/28>

Continuing this thread, Patrick Ferris announced
────────────────────────────────────────────────

Meeting notes are available here:
<https://github.com/ocaml-ppx/ppxlib/wiki/Dev-Meeting-2024-07-23>

Thank you to all of the participants. If anyone is interested in
adding items for the next meeting in August do ping me.

Until then happy ppx-ing :))

Pragmatic Category Theory
═════════════════════════

Archive:
<https://discuss.ocaml.org/t/pragmatic-category-theory/15056/1>

Dmitrii Kovanikov announced
───────────────────────────

I started writing a series on *Pragmatic Category Theory for
Beginners* focusing on real-world use cases rather than theory. All
code examples are in OCaml.

The first part was just finished:
• [Part 1: Semigroup Intro]

It's just the beginning, and I have plans to describe more and provide
more examples in future parts. I also plan to make a video version as
well.

I hope you'll enjoy it!

[Part 1: Semigroup Intro]
<https://dev.to/chshersh/pragmatic-category-theory-part-1-semigroup-intro-1ign>

ppxlib.0.33.0
═════════════

Archive: <https://discuss.ocaml.org/t/ann-ppxlib-0-33-0/15061/1>

Nathan Rebours announced
────────────────────────

The Ppxlib dev team is happy to announce the release of
`ppxlib.0.33.0'.

You can find the full changelog for this release [here].

[here] <https://github.com/ocaml-ppx/ppxlib/releases/tag/0.33.0>

Warning silencing for `[@@deriving ..]' generated code
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

This release's main feature is a series of improvement to flags
controlling unused value/module/type warnings silencing.

The `ppxlib' driver generates warning silencing items to prevent
`[@@deriving ...]' generated code to trigger unused code
warnings. Three warnings are disabled that way:
• Warning 32: unused value
• Warning 60: unused module
• Warning 34: unused type

The first two are disabled for values and modules generated by the
deriver while the third is disabled for the types in the type
declaration to which the `[@@deriving ...]' attribute is attached.

This feature was added a long time ago to avoid manually disabling
those warnings when working with derivers that generate a set of
values and modules only to use a subset of those. Alternatively, the
unused type warning silencing was added to allow defining an alias
type only to be consumed by a deriver, e.g.:
┌────
│ type error = [`Not_found | `Invalid_arg] [@@deriving to_string]
└────

We since then believe that we should not disable warnings lightly, as
this behaviour makes it difficult to find and remove dead code. The
right approach in those situations should be to fix the PPX derivers
so that they are more configurable and can be used without triggering
such warnings.

We will start to move toward removing this feature, but since it is
still useful in some places, we had to come up with a plan to allow
transitioning out of it.

In `ppxlib.0.31.0' we added the `-unused-code-warnings' driver flag
and the `?unused_code_warnings''s `Deriving.V2.make' optional argument
to control whether to silence Warnings 32 and 60. When both are set to
`true', by the user and the deriver authors, the warnings are not
silenced.

As of `ppxlib.0.33.0', these also control the silencing of Warning 34
(unused type). `force' can now be passed to the
`-unused-code-warnings' flag in order to disable warnings silencing,
regardless of the derivers opting in.

This allows users to test whether their codebase and their set of
derivers rely on warning silencing or not and to use those results to
eliminate dead code and/or report issues upstream to the derivers they
use.

We also added a separate `-unused-type-warnings' flag that works
similarly to `-unused-code-warnings' (i.e., depends on the value of
the `?unused_code_warnings' argument), but it only controls Warning 34
silencing, as it turns out it is less likely to cause unwanted
warnings than with the other two. This will allow users to disable it
more easily, without having to deal with Warnings 32 and 60 straight
away.

We want to encourage users to try those on their codebase in order to
see the impact it has. Did you have dead code lying around that
slipped past undetected? Does this trigger unwanted warnings because
of deriver's generated code?

The plan is to give the ecosystem some time to try those features and
adapt by fixing individual derivers and flipping
`?unused_code_warnings' to true as they do. After a while, we will
swap the default value of the driver flag to `true' so that only
derivers that haven't opted in will enable warning silencing. Then as
time goes we will swap the default of the `Deriving.make' argument so
that derivers will instead have to explicitly opt out to get the
warning silencing. Finally, once we are confident the ecosystem is in
a good enough state, we will remove this feature altogether.

Other features
╌╌╌╌╌╌╌╌╌╌╌╌╌╌

`ppxlib.0.33.0' also comes with a couple of new features for PPX
authors:
• A couple new `Ast_builder' functions: `elist_tail' and `plist_tail'
that can be used to build list expressions and patterns with a
custom tail: `elist_tail [expr1; expr2] tail_expr' returns the
expression for `expr1::expr2::tail_expr'.
• `Context_free.special_function'', a new version of
`special_function' that allows passing a `Longident.t' directly
rather that relying on parsing the string argument to a
`Longident.t'.

Finally, the release includes a few bug fixes to `Longident.parse' and
`Code_path.main_module_name' and fixes the `location-check' flag so it
is not required to also pass `-check' to enable location checks. It
also fixes the 5.2 migrations locations, as we used to build nodes
with inconsistent locations when migrating `Pexp_function' nodes.

Huge thanks to our external contributors
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

We would like to thank our external contributors who have been a huge
part of this release: @octachron, @vg-b, and @jchavarri, and a special
mention to @mbarbin, who has not only contributed a lot to the warning
silencing features but has been extensively testing and providing very
useful feedback on them.

And of course, as usual, we'd like to thank the OCaml Software
Foundation who has been funding my work on Ppxlib and on this release,
making all of this possible!

OCaml-LSP 1.19.0 for OCaml 5.2
══════════════════════════════

Archive:
<https://discuss.ocaml.org/t/ann-ocaml-lsp-1-19-0-for-ocaml-5-2/15071/1>

vds announced
─────────────

I am happy to announce, on behalf of the ocaml-lsp team, the release
of `ocaml-lsp-server' `1.19.0' and associated libraries. This release
primary goal is to bring official support for OCaml 5.2 🐫.

Features
╌╌╌╌╌╌╌╌

• Add custom
[~ocamllsp/getDocumentation~](/ocaml-lsp-server/docs/ocamllsp/getDocumentation-spec.md)
request (ocaml/ocaml-lsp#1336)
• Add support for OCaml 5.2 (ocaml/ocaml-lsp#1233)

Fixes
╌╌╌╌╌

• Kill unnecessary ocamlformat processes with sigterm rather than
sigint or sigkill (ocaml/ocaml-lsp#1343)

MlFront - A packaging system for OCaml
══════════════════════════════════════

Archive:
<https://discuss.ocaml.org/t/ann-mlfront-a-packaging-system-for-ocaml/15072/1>

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

Here are the introductory paragraphs from its overview:

`MlFront' adds a Java-like packaging system to OCaml. The
`MlFront' name is a homage to `cfront' which was tooling
that translated "C with Classes" (now known as C++) into C
code. Similarly, `MlFront'-based tools can translate OCaml
with packages into conventional OCaml. … At its most
basic core, `MlFront' gives a well-defined, consistent
meaning to a module reference like
`AcmeWidgets_Std.Activities.Manufacturing' across the
domains of:

1. OCaml source code.
2. findlib libraries.
3. opam packages.

`MlFront' is Apache 2.0 licensed and is meant to be used by build
systems (Dune, ocamlbuild, DkCoder) and package managers (opam). One
of its critical dependencies is [codept].

You can read more about `MlFront' in the following posts (with more
coming):

• [https://diskuv.com/mlfront/overview-1/]
• [https://diskuv.com/mlfront/overview-2/]

/Cross-post notice: The first article was posted at
[https://lobste.rs/s/7ghslo/overview_ocamlfront]; no comments
(:(). But I still like to get first-hand feedback on what works well
in other languages, so please chime in even if you don't feel that
OCaml is your strong suit./

[codept] <https://github.com/Octachron/codept>

[https://diskuv.com/mlfront/overview-1/]
<https://diskuv.com/mlfront/overview-1/>

[https://diskuv.com/mlfront/overview-2/]
<https://diskuv.com/mlfront/overview-2/>

[https://lobste.rs/s/7ghslo/overview_ocamlfront]
<https://lobste.rs/s/7ghslo/overview_ocamlfront>

OCaml.org Newsletter: July 2024
═══════════════════════════════

Archive:
<https://discuss.ocaml.org/t/ocaml-org-newsletter-july-2024/15087/1>

Sabine Schmaltz announced
─────────────────────────

Welcome to the July 2024 edition of the OCaml.org newsletter! This
update has been compiled by the OCaml.org maintainers. You can find
[previous updates] on Discuss.

Our goal is to make OCaml.org the best resource for anyone who wants
to get started and be productive in OCaml. The OCaml.org newsletter
provides an update on our progress towards that goal and an overview
of the changes we are working on.

We couldn't do it without all the amazing people who help us review,
revise, and create better OCaml documentation and work on issues. Your
participation enables us to so much more than we could just by
ourselves. Thank you!

This newsletter covers:
• *Community-Driven Development of OCaml.org*
• *Recipes for the OCaml Cookbook:* Help us make the OCaml Cookbook
really useful by contributing and reviewing recipes for common
tasks!
• *Community & Marketing Pages Rework:* Implementation work in
progress.
• *General Improvements:* As usual, we also worked on general
maintenance and improvements, so we're highlighting some of the
work that happened below.

[previous updates] <https://discuss.ocaml.org/tag/ocamlorg-newsletter>

Community-Driven Development of OCaml.org
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

After reworking most of the OCaml.org website to be more useful, more
usable, and nicer to look at, the team at Tarides that has been
working on OCaml.org is disbanding. However, OCaml.org will continue
to be maintained and extended by by the OCaml Platform and OCaml
compiler contributors, as well as by the wider OCaml community.

You can reach out to [the OCaml.org maintainers] to discuss any bigger
changes or additions you'd like to make. Contributions to improve
existing features and bug fixes are always welcome!

[the OCaml.org maintainers]
<https://github.com/ocaml/ocaml.org?tab=readme-ov-file#maintainers>

◊ Open Issues for Contributors

You can find [open issues for contributors here]!

[open issues for contributors here]
<https://github.com/ocaml/ocaml.org/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22+no%3Aassignee>

Recipes for the OCaml Cookbook
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

The OCaml Cookbook is a place where OCaml developers share how to
solve common tasks using packages from the ecosystem.

A recipe is a code sample and explanations on how to perform a task
using a combination of open-source libraries.

The Cookbook is live at [ocaml.org/cookbook].

Here's how you can help:

1. Help review the [open pull requests for cookbook recipes]!
2. Contribute new recipes and tasks for the cookbook!

Thank you all for the many contributions! One area where we could use
help is in reviewing and improving the suggested recipes and tasks.

*Relevant PRs and Activities:*
• (open) PR: cookbook recipes for parse-command-line-arguments
[ocaml/ocaml.org#2573] by [@richardhuxton]
• (open) PR: Cookbook Check a Webpage for Broken Links
[ocaml/ocaml.org#2581] by [@ggsmith842]
• (open) PR: cookbook: "create and await promises": Lwt, Async
[ocaml/ocaml.org#2584] by [@richardhuxton]
• (open) PR: CookBook: read-csv - basic example of reading records
from a CSV string [ocaml/ocaml.org#2589] by [@danielclarke]
• (open) PR: Cookbook: Email regex patch [ocaml/ocaml.org#2591] by
[@F-Loyer]
• Fixes and Improvements to existing recipes:
• PR: Update 00-uri.ml: missing arg [ocaml/ocaml.org#2618] by
[@ttamttam]

[ocaml.org/cookbook] <https://ocaml.org/cookbook>

[open pull requests for cookbook recipes]
<https://github.com/ocaml/ocaml.org/pulls?q=is%3Apr+is%3Aopen+label%3ACookbook>

[ocaml/ocaml.org#2573] <https://github.com/ocaml/ocaml.org/pull/2573>

[@richardhuxton] <https://github.com/richardhuxton>

[ocaml/ocaml.org#2581] <https://github.com/ocaml/ocaml.org/pull/2581>

[@ggsmith842] <https://github.com/ggsmith842>

[ocaml/ocaml.org#2584] <https://github.com/ocaml/ocaml.org/pull/2584>

[ocaml/ocaml.org#2589] <https://github.com/ocaml/ocaml.org/pull/2589>

[@danielclarke] <https://github.com/danielclarke>

[ocaml/ocaml.org#2591] <https://github.com/ocaml/ocaml.org/pull/2591>

[@F-Loyer] <https://github.com/F-Loyer>

[ocaml/ocaml.org#2618] <https://github.com/ocaml/ocaml.org/pull/2618>

[@ttamttam] <https://github.com/ttamttam>

Community & Marketing Pages Rework
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

We have [UI designs for the reworked and new pages of the community
section], and implementation is being worked on by [@oyenuga17], our
former Outreachy intern!

*Relevant PRs and Activities:*
• PR: Implement new community overview page [ocaml/ocaml.org#2605] by
[@oyenuga17]
• PR: Fix typo and case inconsistencies on community page
[ocaml/ocaml.org#2616] by [@pjlast]
• PR: Redesign OCaml Planet Page [ocaml/ocaml.org#2617] by
[@oyenuga17]

[UI designs for the reworked and new pages of the community section]
<https://www.figma.com/file/7hmoWkQP9PgLTfZCqiZMWa/OCaml-Community-Pages?type=design&node-id=637%3A4539&mode=design&t=RpQlGvOpeg1a93AZ-1>

[@oyenuga17] <https://github.com/oyenuga17>

[ocaml/ocaml.org#2605] <https://github.com/ocaml/ocaml.org/pull/2605>

[ocaml/ocaml.org#2616] <https://github.com/ocaml/ocaml.org/pull/2616>

[@pjlast] <https://github.com/pjlast>

[ocaml/ocaml.org#2617] <https://github.com/ocaml/ocaml.org/pull/2617>

General Improvements and Data Additions
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

*Summary:*
• The selected OS is now part of the anchor tag of the URL on the
<https://ocaml.org/install> page. This allows people to link to
quick install instructions for a specific OS.
• We appreciate the contributions to the OCaml documentation!
• We're checking for backlinks to OCaml.org again with Ahrefs.

*Relevant PRs and Activities:*
• (open) PR: Build on OCaml 5 (ocamlnet -safe-string workaround)
[ocaml/ocaml.org#2609] by [@aantron]
• PR: Ahref tag [ocaml/ocaml.org#2571] by [@cuihtlauac]
• PR: Issue #2583: Added OS Anchor Tags to ocaml.org/install
[ocaml/ocaml.org#2600] by [@SisyphianLiger]
• PR: Performance: cache search index digest until ocaml-docs-ci
computes it [ocaml/ocaml.org#2620] by [@sabine]
• Documentation
• PR: Unwrapped libraries [ocaml/ocaml.org#2562] by [@cuihtlauac]
• PR: Explain folders bin, lib and _build [ocaml/ocaml.org#2568] by
[@cuihtlauac]
• PR: Use `layout opam' in `.envrc' in opam path doc
[ocaml/ocaml.org#2597] by [@smorimoto]
• PR: Use sudo in install tutorial [ocaml/ocaml.org#2558] by
[@cuihtlauac]
• PR: Add documentation about comments to Tour of Ocaml
[ocaml/ocaml.org#2613] by [@NoahTheDuke]
• PR: Fix Example referencing Type not yet Defined
[ocaml/ocaml.org#2606] by [@avlec]
• Refactor + Code health:
• PR: Open Data_intf in data.mli [ocaml/ocaml.org#2563] by
[@cuihtlauac]
• PR: Make data error file path copy-paste ready
[ocaml/ocaml.org#2567] by [@cuihtlauac]
• PR: Test ocaml/setup-ocaml v3 [ocaml/ocaml.org#2570] by
[@cuihtlauac]
• PR: Update ocaml/setup-ocaml to v3 [ocaml/ocaml.org#2565] by
[@smorimoto]
• PR: Refactoring parts from PR #2443 [ocaml/ocaml.org#2576] by
[@cuihtlauac]
• PR: Bump peter-evans/create-pull-request from 5 to 6
[ocaml/ocaml.org#2588] by [@dependabot]
• PR: Set OCaml to 4.14.2 [ocaml/ocaml.org#2587] by [@cuihtlauac]
• PR: fix: write directory instead of folder [ocaml/ocaml.org#2572]
by [@ashish0kumar]
• PR: sync debug-ci and ci [ocaml/ocaml.org#2582] by [@cuihtlauac]
• Data
• PR: changelog: dune 3.16.0 [ocaml/ocaml.org#2566] by [@emillon]
• PR: (data) add OCaml.org newsletter June 2024
[ocaml/ocaml.org#2575] by [@sabine]
• PR: Add changelog for the latest merlin releases
[ocaml/ocaml.org#2580] by [@voodoos]
• PR: Add changelog for the latest ocaml-lsp release
[ocaml/ocaml.org#2593] by [@PizieDust]
• PR: Add missing changelog for opam 2.2.0 [ocaml/ocaml.org#2598] by
[@kit-ty-kate]
• PR: Add changelog entry for ppxlib.0.33.0 release
[ocaml/ocaml.org#2615] by [@NathanReb]

[ocaml/ocaml.org#2609] <https://github.com/ocaml/ocaml.org/pull/2609>

[@aantron] <https://github.com/aantron>

[ocaml/ocaml.org#2571] <https://github.com/ocaml/ocaml.org/pull/2571>

[@cuihtlauac] <https://github.com/cuihtlauac>

[ocaml/ocaml.org#2600] <https://github.com/ocaml/ocaml.org/pull/2600>

[@SisyphianLiger] <https://github.com/SisyphianLiger>

[ocaml/ocaml.org#2620] <https://github.com/ocaml/ocaml.org/pull/2620>

[@sabine] <https://github.com/sabine>

[ocaml/ocaml.org#2562] <https://github.com/ocaml/ocaml.org/pull/2562>

[ocaml/ocaml.org#2568] <https://github.com/ocaml/ocaml.org/pull/2568>

[ocaml/ocaml.org#2597] <https://github.com/ocaml/ocaml.org/pull/2597>

[@smorimoto] <https://github.com/smorimoto>

[ocaml/ocaml.org#2558] <https://github.com/ocaml/ocaml.org/pull/2558>

[ocaml/ocaml.org#2613] <https://github.com/ocaml/ocaml.org/pull/2613>

[@NoahTheDuke] <https://github.com/NoahTheDuke>

[ocaml/ocaml.org#2606] <https://github.com/ocaml/ocaml.org/pull/2606>

[@avlec] <https://github.com/avlec>

[ocaml/ocaml.org#2563] <https://github.com/ocaml/ocaml.org/pull/2563>

[ocaml/ocaml.org#2567] <https://github.com/ocaml/ocaml.org/pull/2567>

[ocaml/ocaml.org#2570] <https://github.com/ocaml/ocaml.org/pull/2570>

[ocaml/ocaml.org#2565] <https://github.com/ocaml/ocaml.org/pull/2565>

[ocaml/ocaml.org#2576] <https://github.com/ocaml/ocaml.org/pull/2576>

[ocaml/ocaml.org#2588] <https://github.com/ocaml/ocaml.org/pull/2588>

[@dependabot] <https://github.com/dependabot>

[ocaml/ocaml.org#2587] <https://github.com/ocaml/ocaml.org/pull/2587>

[ocaml/ocaml.org#2572] <https://github.com/ocaml/ocaml.org/pull/2572>

[@ashish0kumar] <https://github.com/ashish0kumar>

[ocaml/ocaml.org#2582] <https://github.com/ocaml/ocaml.org/pull/2582>

[ocaml/ocaml.org#2566] <https://github.com/ocaml/ocaml.org/pull/2566>

[@emillon] <https://github.com/emillon>

[ocaml/ocaml.org#2575] <https://github.com/ocaml/ocaml.org/pull/2575>

[ocaml/ocaml.org#2580] <https://github.com/ocaml/ocaml.org/pull/2580>

[@voodoos] <https://github.com/voodoos>

[ocaml/ocaml.org#2593] <https://github.com/ocaml/ocaml.org/pull/2593>

[@PizieDust] <https://github.com/PizieDust>

[ocaml/ocaml.org#2598] <https://github.com/ocaml/ocaml.org/pull/2598>

[@kit-ty-kate] <https://github.com/kit-ty-kate>

[ocaml/ocaml.org#2615] <https://github.com/ocaml/ocaml.org/pull/2615>

[@NathanReb] <https://github.com/NathanReb>

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

From the ocaml.org blog
───────────────────────

Here are links from many OCaml blogs aggregated at [the ocaml.org
blog].

• [The slides presented at Frama-C Days 2024 are available]
• [Monoculture of Insecurity: How CrowdStrike's Outage Exposes the
Risks of Unchecked Complexity in Cybersecurity]
• [Upcoming OCaml Events (Aug 2024 and onwards)]

[the ocaml.org blog] <https://ocaml.org/blog/>

[The slides presented at Frama-C Days 2024 are available]
<https://frama-c.com/html/publications/frama-c-days-2024/index.html>

[Monoculture of Insecurity: How CrowdStrike's Outage Exposes the Risks
of Unchecked Complexity in Cybersecurity]
<https://tarides.com/blog/2024-08-01-monoculture-of-insecurity-how-crowdstrike-s-outage-exposes-the-risks-of-unchecked-complexity-in-cybersecurity>

[Upcoming OCaml Events (Aug 2024 and onwards)]
<https://ocaml.org/events>

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
to the [caml-list].

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

[caml-list] <https://sympa.inria.fr/sympa/info/caml-list>

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

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