[cwn] Attn: Development Editor, Latest OCaml Weekly News

Alan Schmitt alan.schmitt at polytechnique.org
Tue Oct 4 05:58:56 PDT 2022


Hello

Here is the latest OCaml Weekly News, for the week of September 27 to
October 04, 2022.

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

How to dump many floats in binary format so that OCaml can read them in later
Beta of neovim treesitter-reason
data-encoding 0.7
New OCaml meetup group in Toulouse (in French)
opam-mirror: a MirageOS unikernel that provides an opam repository and cache
Aches.1.0.0, Ringo.1.0.0
Multicore with opam–instructions?
Other OCaml News
Old CWN


How to dump many floats in binary format so that OCaml can read them in later
═════════════════════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/how-to-dump-many-floats-in-binary-format-so-that-ocaml-can-read-them-in-later/9995/1>


A long time ago, UnixJunkie asked
─────────────────────────────────

  I need to write out to disk many floats from a Python script (but that
  could also be from a C program). Later, I would like to read them as
  32bit floats in OCaml. What is the format I should use? I want to use
  32bit floats, because 64bit floats would be two times more data. I
  guess 32 bits precision is way enough for what I am doing.


pukkamustard replied
────────────────────

  Maybe something like CBOR would work for you? It’s a standardized
  binary serialization format that has [a dedicated datatype for 32bit
  floats] and there are implementations for OCaml and Python (and many
  other languages).

  Shameless plug: I am the author of a CBOR implementation for OCaml:
  <https://opam.ocaml.org/packages/cborl/>


[a dedicated datatype for 32bit floats]
<https://www.rfc-editor.org/rfc/rfc8949.html#name-floating-point-numbers-and->


UnixJunkie said and Xavier Leroy replide
────────────────────────────────────────

        Nice, so for integers, I should be using:
        Stdlib.output_binary_int and input_binary_int.

  No. These functions operate on the low 32 bits of values of type
  `int', meaning that on 32-bit platforms you’ll lose some bits.

  For reliable encoding/decoding of 32 and 64-bit integers, please use
  `Bytes.{get,set}_int{32,64}_{le,be,ne}', which also let you control
  the endianness you want to use.


Carmelo Piccione said
─────────────────────

  This might be too heavy handed for you but [hdf5] is a decent choice
  for serializing and loading back up large numerical datasets,
  especially if your data is shaped like a typical dataframe.

  It has a proven track record as it is often used by the scientific
  computing community and the finance industry as well. They like the
  fact that it’s high performance, standardized, and supports
  hierarchies and thus multiple datasets within one file. You can also
  memory map to it or use filters and chunking to avoid loading the
  entire file.

  The biggest negative: there is only a complex C library implementation
  of it which is inevitably wrapped to other languages, including ocaml.


[hdf5] <https://github.com/vbrankov/hdf5-ocaml>


Beta of neovim treesitter-reason
════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-beta-of-neovim-treesitter-reason/10541/1>


Danielo Rodríguez announced
───────────────────────────

  I’m happy to share that my neovim plugin for adding tree-sitter
  support for reason (which is a fork of the rescript tree-sitter plugin
  for neovim) has now reached an “usable” state. It still needs
  development, and there are things that still only make sense for
  rescript, but it is already helping me in my everyday work. Everybody
  is welcome to contribute if you find it valuable. Not sure if this is
  interesting in an Ocaml forum, but I guess that some people may use
  the reason syntax, and since there is no Reason forum anymore, I will
  be posting it here and in rescript one.

  Here is the project:
  <https://github.com/danielo515/nvim-treesitter-reason>


data-encoding 0.7
═════════════════

  Archive: <https://discuss.ocaml.org/t/ann-data-encoding-0-7/10545/1>


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

  Version 0.7 of the Data-encoding library has just been released.

  Data-encoding is a library for describing binary and JSON encodings
  for your various OCaml types and for serialising to and deserialising
  from those descriptions.

  The library is used within the [Tezos project]. It is [hosted on
  Gitlab] under the MIT License. It is distributed on `opam'.


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

[hosted on Gitlab] <https://gitlab.com/nomadic-labs/data-encoding>


New OCaml meetup group in Toulouse (in French)
══════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/new-ocaml-meetup-group-in-toulouse-in-french/10420/5>


R. Boujbel announced
────────────────────

  Le premier meetup se tiendra le 11 octobre à 18h à la [Manufacture des
  Tabacs]. Merci de nous informer de votre présence en vous inscrivant
  sur [cette page] contenant les détails de la session.

  Au plaisir de vous y retrouver !


[Manufacture des Tabacs]
<https://www.ut-capitole.fr/accueil/campus/vie-etudiante/plans-dacces/plan-ut-capitole-la-manufacture-des-tabacs>

[cette page]
<https://www.meetup.com/fr-FR/ocaml-toulouse/events/288464047/>


opam-mirror: a MirageOS unikernel that provides an opam repository and cache
════════════════════════════════════════════════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-opam-mirror-a-mirageos-unikernel-that-provides-an-opam-repository-and-cache/10549/1>


Hannes Mehnert announced
────────────────────────

  We at [robur] developed [opam-mirror] in the last month and run a
  public opam mirror at <https://opam.robur.coop> (updated hourly).

  This was nice collaborative work with @reynir and @dinosaure, and we
  have an article <https://hannes.robur.coop/Posts/OpamMirror> and the
  source code <https://git.robur.io/robur/opam-mirror>

  Enjoy reading, feedback welcome. :D


[robur] <https://robur.coop>

[opam-mirror] <https://git.robur.io/robur/opam-mirror>


Aches.1.0.0, Ringo.1.0.0
════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/ann-aches-1-0-0-ringo-1-0-0/10552/1>


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

  Version 1.0.0 of the Aches and Ringo libraries have just been
  released.

  Aches provide various caches (Sets, Maps) with various policies
  (FIFO/LIFO, Strong/Weak, etc.). It also makes a distinctions between
  value caches (caches for in-memory values which are ultimately cleaned
  by the GC) and resource caches (caches which model resources such as
  file-descriptors which need some cleaning-up), providing different
  mechanisms for retrieval to help ensure all resources are properly
  cleaned as needed.

  Ringo is a support library for Aches which may also be of interest to
  other developers. It provides doubly-linked lists and rings.

  Finally, the Aches-lwt library provides caches for values which can
  take some time to obtain, in the form of Lwt promises — for instance,
  the content of a file stored on a remote machine.

  This is the first stable release of Ringo, Aches, and Aches-lwt;
  future versions will adhere to the semantic versioning scheme.

  The libraries are used within the [Tezos] project. They are hosted on
  a single repository on [Gitlab] under the MIT License. They are
  distributed on `opam'.


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

[Gitlab] <https://gitlab.com/nomadic-labs/ringo>


Multicore with opam–instructions?
═════════════════════════════════

  Archive:
  <https://discuss.ocaml.org/t/multicore-with-opam-instructions/10548/9>


Yawar Amin announced
────────────────────

  If anyone is interested–I wrote a post with a Multicore/Eio
  experiment:
  <https://dev.to/yawaramin/practical-ocaml-multicore-edition-3gf2>


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

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

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

  • [Mirroring the opam repository and all tarballs]


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

[Mirroring the opam repository and all tarballs]
<https://hannes.robur.coop/Posts/OpamMirror>


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 at 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/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/caml-news-weekly/attachments/20221004/6a90ca73/attachment-0001.html>


More information about the caml-news-weekly mailing list