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

Alan Schmitt
2024-05-07T07:30:29Z

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

Hello

Here is the latest OCaml Weekly News, for the week of April 30 to May
07, 2024.

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

Deploying Ocsigen applications
OCaml linting tools and techniques
dune 3.15
bitgenerators v0.1.0
checked_oint v0.1.0
Liquidsoap 2.2.5 is out!
OCaml 5.2.0 - First Release Candidate
Announcing DBCaml, Silo, Serde Postgres and a new driver for postgres
Pretty Printing in OCaml: Format Primer
Send us Talk and Workshop Proposals for Fun OCaml 2024 in Berlin, September 16+17
OCaml Workshop 2024 at ICFP – announcement and call for proposals
Other OCaml News
Old CWN

Deploying Ocsigen applications
══════════════════════════════

Archive:
<https://discuss.ocaml.org/t/deploying-ocsigen-applications/14572/1>

Hans Ole Rafaelsen announced
────────────────────────────

I have written a short text on how Ocsigen applications might be
packed in order to be deployed to other nodes, that don't have your
development environment installed.

[Deploying Ocsigen]

If you happen to have a better way, or solutions to parts that I have
not been able to solve, please let me know.

[Deploying Ocsigen] <https://github.com/hansole/deploying_ocsigen>

OCaml linting tools and techniques
══════════════════════════════════

Archive:
<https://discuss.ocaml.org/t/blog-ocaml-linting-tools-and-techniques/14574/1>

Simmo Saan announced
────────────────────

Recently, I started wondering about linting tools for OCaml, so I went
looking. This ended up being a quite extensive survey. Therefore, I
decided to publish my findings in a blog post: [OCaml linting tools
and techniques].

In particular, I focused on linting with dune and Ppxlib because
there's many variations out there. In the post I describe the
technical choices that go into such linters and provide an overview of
those that work and how well. In the process of experimenting, I tried
them out myself and published them as demos on GitHub:
[sim642/dune-lint-demo].

Feel free to let me know if I missed any tools out there or you have
any questions/comments. There isn't much information about this out
there (and existing tool does it slightly differently), so I hope this
overview benefits others as well.

[OCaml linting tools and techniques]
<https://sim642.eu/blog/2024/05/01/ocaml-linting>

[sim642/dune-lint-demo] <https://github.com/sim642/dune-lint-demo>

dune 3.15
═════════

Archive: <https://discuss.ocaml.org/t/ann-dune-3-15/14438/2>

Etienne Millon announced
────────────────────────

We've released 3.15.1 and 3.15.2. The latter is particularly important
for Coq users since it fixes a regression in incremental compilation
introduced in 3.13.0.

Here's the combined changelog:

Fixed
╌╌╌╌╌

• Fix overflow in sendfile stubs (copy of large files could fail or
end with truncated files) (#10333, @tonyfettes)
• Fix crash when a rule with a directory target is disabled with
`enabled_if` (#10382, fixes #10310, @gridbugs)
• melange: remove all restrictions around virtual libraries in
Melange. They may be used as otherwise in libraries and
executables. (#10412, @anmonteiro)
• spawn: fix compatibility with RHEL7 (#10428, @emillon)
• If no directory targets are defined, then do not evaluate
`enabled_if` (#10442, @rgrinberg)
• Fix a bug where Coq projects were being rebuilt from scratch each
time the dependency graph changed. (#10446, fixes #10149, @alizter)

bitgenerators v0.1.0
════════════════════

Archive:
<https://discuss.ocaml.org/t/ann-bitgenerators-v0-1-0/14577/1>

zoj613 announced
────────────────

Hi everyone. I'd like to announce the first release of
[bitgenerators]. This library implements an OCaml port of NumPy's
bitgenerator interface for working with Psuedo-random numbers (see:
<https://numpy.org/doc/stable/reference/random/bit_generators/index.html>).

• This library implements several PRNGs that are exposed through this
common interface. It also implements an `SeedSequence' module for
seeding PRNGs using high quality initial states based on the ideas
discussed [here].
• Morever, the module provides functions that help easily generate
independent and non-overlapping instances of a PRNG for use in
parallel computation in a /reproducible/ manner.
• Implemented PRNG's include [PCG64], [SFC64], [Philox4x64],
[Xoshiro256**] and [ChaCha]. All of which pass stringent statistical
randomness tests like PractRand and Testu01.
• The API documentation can be found [here]
• The source code is hosted on github:
<https://github.com/zoj613/bitgenerators>
• The README file contains examples of how the library can be used.

This is my first Ocaml project and therefore I would highly appreciate
feedback from experienced users regarding it's usefulness and possibly
how it could be improved (e.g. usability and performance). I tried to
keep the implementation as functional as possible, though not very
sure if that's the best approach here.

[bitgenerators] <https://github.com/zoj613/bitgenerators>

[here]
<https://www.pcg-random.org/posts/developing-a-seed_seq-alternative.html>

[PCG64] <https://www.cs.hmc.edu/tr/hmc-cs-2014-0905.pdf>

[SFC64] <https://pracrand.sourceforge.net/RNG_engines.txt>

[Philox4x64] <https://ieeexplore.ieee.org/document/6114424/>

[Xoshiro256**] <https://prng.di.unimi.it/>

[ChaCha] <https://cr.yp.to/chacha/chacha-20080128.pdf>

[here]
<https://zoj613.github.io/bitgenerators/bitgenerators/Bitgen/index.html>

checked_oint v0.1.0
═══════════════════

Archive: <https://discuss.ocaml.org/t/ann-checked-oint-v0-1-0/14580/1>

Sima Kinsart announced
──────────────────────

I'd like to announce a new library: [`checked_oint']. It implements
checked arithmetic for both signed and unsigned integers of 8, 16, 32,
64, and 128 bits. Unlike `stdint' or `ocaml-integers', routines in
this library either return an option or raise an exception when a
result of an arithmetic operation cannot be represented in a desired
integer type. In addition, it contains abstractions for manipulating
arbitrary integers and integer types in a generic and type-safe
manner, which I find quite useful for compiler/interpreter
implementations.

Usage example:

┌────
│ open Checked_oint
│
│ let () =
│ let x = U8.of_int_exn 50 in
│ let y = U8.of_int_exn 70 in
│ assert (U8.equal (U8.add_exn x y) (U8.of_int_exn 120));
│ assert (Option.is_none (U8.mul x y))
└────

Feel free to ask any questions in the comments.

[`checked_oint'] <https://github.com/Hirrolot/checked_oint>

Liquidsoap 2.2.5 is out!
════════════════════════

Archive:
<https://discuss.ocaml.org/t/ann-liquidsoap-2-2-5-is-out/14582/1>

Romain Beauxis announced
────────────────────────

Liquidsoap `2.2.5' has out! Full release details are here:
<https://github.com/savonet/liquidsoap/releases/tag/v2.2.5>

Liquidsoap is a statically typed scripting general-purpose language
with dedicated operators and backend for all thing media, streaming,
file generation, automation, HTTP backend and more.

This is hopefully the *last* release of the `2.2.x' release cycle
before we kick off the new `2.3.x' release cycle. We've got a couple
feature to bring there and then it'll be ready for more testing.

Liquidsoap `2.2.5' has some good bugfixes and some minor changes but
its most exciting feature is the *autocue* . It was developed in close
collaboration with several users. The feature is an opt-in crossfade
extension that computes the /perfect/ crossfade transitions for your
tracks.

Over the years, it's been very interesting to maintain an application
and language that is now pretty large and complex using the OCaml
compiler and ecosystem. It's amazing to see how easy it is now to
build integrate new packages. It also brings in some interesting,
real-life challenges such as some very specific [memory issues].

Next, we would like to work on optimizing the language by introducing
modules, to reduce the standard library's memory footprint, and to use
the new OCaml parallelism to fully leverage CPU and memory usage when
streaming large amount of data such as video streams.

[memory issues] <https://github.com/ocaml/ocaml/issues/13123>

OCaml 5.2.0 - First Release Candidate
═════════════════════════════════════

Archive:
<https://discuss.ocaml.org/t/ocaml-5-2-0-first-release-candidate/14584/1>

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

The release of OCaml 5.2.0 is imminent. As a final step, we are
publishing a release candidate to check that everything is in order
before the release in the upcoming week(s).

If you find any bugs, please report them on [OCaml's issue tracker].

Compared to the second beta, this release contains one small
compiler-libs printer fix and one configuration tweak.

The full change log for OCaml 5.2.0 is available [on GitHub]. A short
summary of the changes since the second beta release is also available
below.

[OCaml's issue tracker] <https://github.com/ocaml/ocaml/issues>

[on GitHub] <https://github.com/ocaml/ocaml/blob/5.2/Changes>

Installation Instructions
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

The base compiler can be installed as an opam switch with the
following commands on opam 2.1 and later:
┌────
│ opam update
│ opam switch create 5.2.0~rc1
└────

The source code for the release candidate is also directly available
on:

• [GitHub]
• [OCaml archives at Inria]

[GitHub] <https://github.com/ocaml/ocaml/archive/5.2.0-rc1.tar.gz>

[OCaml archives at Inria]
<https://caml.inria.fr/pub/distrib/ocaml-5.2/ocaml-5.2.0~rc1.tar.gz>

Fine-Tuned Compiler Configuration
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

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> ocaml-variants.5.2.0~rc1+options <option_list>
└────
where `<option_list>' is a space-separated list of `ocaml-option-*'
packages. For instance, for a `flambda' and `no-flat-float-array'
switch:
┌────
│ opam switch create 5.2.0~rc1+flambda+nffa ocaml-variants.5.2.0~rc1+options ocaml-option-flambda ocaml-option-no-flat-float-array
└────

All available options can be listed with `opam search ocaml-option'.

Changes since the second beta
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌

• [#13130]: Minor fixes to `pprintast' for raw identifiers and local
module open syntax for types. (Chet Murthy, review by Gabriel
Scherer)
• [#13100] Fix detection of `zstd' when compiling with `musl-gcc'
(David Allsopp, review by Samuel Hym)

[#13130] <https://github.com/ocaml/ocaml/issues/13130>

[#13100] <https://github.com/ocaml/ocaml/issues/13100>

Announcing DBCaml, Silo, Serde Postgres and a new driver for postgres
═════════════════════════════════════════════════════════════════════

Archive:
<https://discuss.ocaml.org/t/announcing-dbcaml-silo-serde-postgres-and-a-new-driver-for-postgres/14585/1>

Emil Priver announced
─────────────────────

<https://priver.dev/blog/dbcaml/dbcaml-project/>

Pretty Printing in OCaml: Format Primer
═══════════════════════════════════════

Archive:
<https://discuss.ocaml.org/t/blog-pretty-printing-in-ocaml-format-primer/14599/1>

Vladimir Keleshev announced
───────────────────────────

Hi folks, I wrote another +monad+ Format tutorial.

<https://keleshev.com/pretty-printing-in-ocaml-a-format-primer>

Here's some of layouts that are covered:

┌────
│ [[],
│ ["one", "two", "three"],
│ ["one",
│ "two",
│ "three",
│ "four",
│ "five",
│ "six",
│ "seven",
│ "eight",
│ "nine",
│ "ten"]]
└────

┌────
│ [
│ [],
│ ["one", "two", "three"],
│ [
│ "one",
│ "two",
│ "three",
│ "four",
│ "five",
│ "six",
│ "seven",
│ "eight",
│ "nine",
│ "ten",
│ ]
│ ]
└────

┌────
│ [ []
│ , [ "one", "two", "three" ]
│ , [ "one"
│ , "two"
│ , "three"
│ , "four"
│ , "five"
│ , "six"
│ , "seven"
│ , "eight"
│ , "nine"
│ , "ten"
│ ]
│ ]
└────

I tried to share some of my experience using Format. As a bonus—JSON
pretty printer.

Send us Talk and Workshop Proposals for Fun OCaml 2024 in Berlin, September 16+17
═════════════════════════════════════════════════════════════════════════════════

Archive:
<https://discuss.ocaml.org/t/send-us-talk-and-workshop-proposals-for-fun-ocaml-2024-in-berlin-september-16-17/14603/1>

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

*Fun OCaml 2024* is a *2 days open source hacking event* dedicated to
OCaml enthusiasts and professionals. We focus on the impact and
potential of OCaml for solving real-world problems and get together
in Berlin for a conference/hackathon over two days:
• Day 1 (Monday, September 16): talks (which are live-streamed) and
socializing/hacking.
• Day 2 (Tuesday, September 17): Workshops and hacking.

Topics we're interested in:
• how you use OCaml in your business / in your projects
• OCaml libraries, frameworks, and other Open Source projects built on
OCaml
• hands-on demonstrations that encourage people to try things on the
second day of the event or at home
• seeing actual code and reasoning behind design decisions
• experience reports

For more details, check out the website and the CFP linked from there:

<https://fun-ocaml.com>

Registration for attendees will be announced later this week in
advance, but is not open yet.

Thanks! :sparkles: :orange_heart: :camel:

OCaml Workshop 2024 at ICFP – announcement and call for proposals
═════════════════════════════════════════════════════════════════

Archive:
<https://discuss.ocaml.org/t/ocaml-workshop-2024-at-icfp-announcement-and-call-for-proposals/14371/5>

Sonja Heinze continued this thread
──────────────────────────────────

As mentioned above, the submission deadline for the OCaml Workshop at
ICFP is getting closer.

As a new note: A few weeks after the OCaml Workshop at ICFP, there'll
be the new initiative [Fun OCaml] in Berlin. It's super exciting to
have three OCaml-related workshops (first the ML Workshop and the
OCaml Workshop at ICFP, and then Fun OCaml) over the course of a few
weeks, and we're also very much looking forward to Fun OCaml!

We've already mentioned that when reading the submissions, as every
year, we'll collaborate closely with the organizers of the ML workshop
at ICFP, which intersects with the OCaml Workshop on talks with a
strong theoretical and research-oriented focus. We'll also collaborate
with the organizers of Fun OCaml this year, which might intersect on
talks with a strong practical focus. With collaboration, we mainly
mean potentially transferring submissions from one workshop to another
after checking in with the authors (side-note: if you want your
presentation to be taken into account for a potential transfer, you
need to respect the earlier of the two submission deadlines).

Best, and looking forward to this exciting year of OCaml workshops,
@Armael and @pitag

[Fun OCaml]
<https://discuss.ocaml.org/t/send-us-talk-and-workshop-proposals-for-fun-ocaml-2024-in-berlin-september-16-17/14603>

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

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

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

• [We Host Our First OCaml Retreat in India!]

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

[We Host Our First OCaml Retreat in India!]
<https://tarides.com/blog/2024-05-01-we-host-our-first-ocaml-retreat-in-india>

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: 33418 bytes --]