caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Alan Schmitt <>
To: "lwn" <>, "cwn"  <>,,
Subject: [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
Date: Tue, 20 Oct 2020 10:15:54 +0200	[thread overview]
Message-ID: <> (raw)

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


Here is the latest OCaml Weekly News, for the week of October 13 to 20,

Table of Contents

Dialo is hiring frontend and backend OCaml developers (Remote)
Progress 0.1.0
Brr 0.0.1, a toolkit for programming browsers
New release of Conduit
Easy cross compilation using esy
OCaml User Survey 2020

Dialo is hiring frontend and backend OCaml developers (Remote)


Wojtek Czekalski announced

  [Dialo] is an early stage company with an experienced founding
  team. Assembling a team that consists of the best and brightest is our
  top priority. In the immediate term we are building a visual
  programming language for conversational AI. Our long term vision is
  that personalized contact we are enabling will cause deeper
  relationships between users and businesses and turn all interactions
  into a unified long term customer journey.

  The work is quite demanding when it comes to both ideation and
  implementation. We are aiming to provide a room for growth both
  technically and/or as a leader. For current open source maintainers we
  are willing to sponsor your work on OSS for 20% of time.

  We use OCaml for frontend and backend (along with Python for machine
  learning, natural language processing). We are hiring people for
  different positions. Both people with extensive experience and
  newcomers are encouraged to apply. We try to find the sharpest people
  rather than checking boxes with particular skills.

  The official job posting:
  <> We are
  also hiring for two other (related) positions:
  • <>
  • <>

[Dialo] <>

Progress 0.1.0

  Archive: <>

Craig Ferguson announced

  I'm pleased to announce the first release of [`Progress'], now
  available on Opam.


  `Progress' is a small library for quickly defining and using progress
  bars in OCaml programs. It aims to provide the following:

  • support for rendering multiple progress bars simultaneously;
  • responds dynamically to changes in terminal size;
  • allows user-defined progress bar layouts.

[`Progress'] <>

Defining your own progress bars

  The example animation above uses a pre-provided progress bar layout
  that should meet many needs ([`Progress_unix.counter']), but it's
  fairly easy to re-define it ourselves using the low-level
  [`Progress.Segment'] API:

  │ let counter filename =
  │   let proportion i = Int64.to_float i /. 1_000_000. in
  │   let open Progress in
  │   Segment.(
  │     list
  │       [
  │ 	const filename;
  │ 	Units.bytes of_pp;
  │ 	Progress_unix.stopwatch ();
  │ 	bar ~mode:`ASCII proportion;
  │ 	using proportion (Units.percentage of_pp);
  │       ]
  │     |> box_winsize ~fallback:80  (* Dynamically scale to window size *)
  │     |> periodic 100              (* Re-render once every 100 updates *)
  │     |> accumulator Int64.add 0L  (* Accumulate progress updates *))
  │   |> make ~init:0L

  The `Segment' combinators are similar to those of general-purpose
  pretty-printing libraries (e.g.  [`pp'] and [`fmt']), but are equipped
  with extra logic for "stateful" segments and segments that can have
  dynamic width. Together, these make for a convenient way to express
  common patterns when pretty-printing progress bars. For instance, the
  stateful segment `periodic' seen above can be used to ensure that very
  frequent updates from a hot-loop do not result in too much time spent
  re-rendering the output.

  The library is not yet feature-complete, but should still be
  reasonably useful :slightly_smiling_face: Happy hacking!



[`pp'] <>

[`fmt'] <>

Brr 0.0.1, a toolkit for programming browsers


Daniel Bünzli announced

  I'd like to announce the first release of Brr.

  The TL; DR is:
        If you are looking for a productive way to program
        browsers with js_of_ocaml but without ppx and ghost OCaml
        objects, give Brr a try.

  The details:

        Brr is a toolkit for programming browsers in OCaml with
        the [`js_of_ocaml'] compiler. It provides:
        • Interfaces to a [selection] of browser APIs.
        • Note based reactive support (optional and experimental).
        • An [OCaml console] developer tool for live interaction
          with programs running in web pages.
        • A JavaScript FFI for idiomatic OCaml programming.

        Brr is distributed under the ISC license. It depends on
        [Note] and on the `js_of_ocaml' compiler and runtime – but
        not on its libraries or syntax extension.

  • Homepage: <>
  • API Docs & manuals: <> or
    `odig doc brr'
  • Install: `opam install brr'

  Brr is essentially what I need to be productive for browser
  programming with js_of_ocaml: an obvious FFI with JavaScript objects
  as abstract data types without OCaml object phantom types and binding
  documentation precisely linking into MDN.

  The OCaml console is the hack on the cake. In the past I often found
  it frustrating to have OCaml programs running in my webpages and be
  greeted with a JavaScript prompt in the browser dev tools.  Quite a
  bit of polishing could be done on that though. Some of which should
  likely directly be done upstream in the toplevel machinery
  (e.g. identifier completion, a better toploop API and support for easy
  pretty printer installation). It would also be nice if we could cut
  down on `js_of_ocaml''s toplevel compilation times ;–)

  Parts of Brr have been seriously dogfooded in the past but that new
  incarnation is largely untested for now and certain APIs might need
  adjustements. Early adopters should study actual binding coverage,
  expect glitches and little breakages in the future.

  The Note reactive functionality was also seriously used in the past
  but Note itself needs a new design round and I don't have the
  ressources to do it right now, expect breakage, don't pay too much
  attention to it for now.

  My thanks to the `js_of_ocaml' developers for the nice ocaml to
  javascript compiler and a special shootout to Hugo Heuzard for not
  getting mad at me when pinging him directly for questions.

  Happy browser compatibility bug hunting,

[`js_of_ocaml'] <>


[OCaml console]

[Note] <>

gasche asked

  It's not really released, but I'm curious about [Note] now: this is a
  new FRP library from you, the author of [React] (the FRP library for
  OCaml, not the Javascript framework of the same name).

  Would you say a few words on why you went for a different library? My
  guess would be that React depends on runtime mechanisms (weak
  pointers) that are not well-supported in Javascript-lang; but even if
  the guess is right, I'm not sure what would be the impact on the API
  or properties of the library.

[Note] <>

[React] <>

Daniel Bünzli replied

        Would you say a few words on why you went for a different

  `Note' is the result from seeing people (and myself) struggling to use
  ~React~/FRP "correctly" over the years.

  Some of this, I largely attribute to ergonomic problems with the
  API. It's my hope for `Note' to address most of these points (one
  thing that still needs to be done is replace fix points by a simple
  lazy infinitesimal delay combinator).

  I don't think I could have made all these changes in `React' itself so
  I found it better to start a new library. Also I lost the trademark on
  the name :–)

  `Note' also tries to provide a much simpler implementation. `React''s
  implementation was based on the [FrTime Phd thesis]. It's quite subtle
  and involved and, as you suggested, uses weak pointer. `Note' tries to
  avoid them since those are not available in the browser (but you have
  things like [MutationObservers] which I use as gc in Brr's Note-based
  [reactive dom support]).

  However not using weak pointers has a semantic uncleanness cost whose
  impact I'm unsure yet – without discipline from the programmer it may
  lead to subtle and hard to track bugs when the reactive graph changes
  dynamically, which I'm a bit wary of.

  When my brain dumped `Note' I wrote a few more technical points in the
  readme you can read them [here].

[FrTime Phd thesis] <>


[reactive dom support]

[here] <>

New release of Conduit


Calascibetta Romain announced

  *Conduit 3.0.0*

  Hello everyone,

  We're glad to announce the new release of [`conduit'], a framework
  that allows to _abstract_ over transfer protocols. One of its main
  advantages is allowing the implemententation of _free-dependencies_

[`conduit'] <>


  There are several ways to abstract over an implementation in
  OCaml. However, those solutions are often lost deep in the stack of
  protocols and allowing the user to choose the implementations of the
  sub-procotols implies growing complexity as we move up through the
  stack. (For example, allowing to abstract over the implementation of
  the TLS protocol from the implementation of the HTTP protocol)

  One of those solutions, the _functors_, can rapidly become a hellish
  nightmare for the end-user. This is especially true in the case of
  MirageOS, which literally wants to abstract over everything!

  This is why Conduit was implemented: it aims to provide to the user a
  cleaner abstraction mechanism which would allow the protocol
  developers to get rid of most of the responsibilities concerning the
  choice of sub-protocols (Like which TLS implementation use between
  OpenSSL or our great [ocaml-tls] library), while giving the end-users
  an easy way to compose the protocols of their choice and inject them
  in the stack via conduit.

[ocaml-tls] <>

Usage of Conduit

  Such a framework allows us to separate the logic of a protocol from
  underlying implementation needed to communicate with a peer. The
  distribution of Conduit comes with [a simple tutorial] which explains
  step by step how to implement a _ping-pong_ client & server and, most
  importantly, how to upgrade them with TLS.

  With Conduit, we ensure the compatibility with MirageOS (and specially
  [mirage-tcpip]) while being useful for others. Of course, Conduit is
  not mandatory to ensure this compatibility, but it helps us for
  _higher_ libraries such as [ocaml-git]/[Irmin] or [Cohttp].

[a simple tutorial]

[mirage-tcpip] <>

[ocaml-git] <>

[Irmin] <>

[Cohttp] <>

Specific improvements

◊ Abstract and destruct it!

  The most requested feature on the new version of Conduit is the
  ability to _destruct_ the [Conduit.flow][conduit-flow]. The ability to
  abstract the protocol comes with the _abstract_ type
  `Conduit.flow'. The new version permits to _destruct_ it to a
  well-known value (such as an UNIX socket):

  │ let handler flow = match flow with
  │   | Conduit_lwt.TCP.T (Value file_descr) ->
  │     let peer = Lwt_unix.getpeername file_descr in
  │     ...
  │   | flow -> ... (* other kind of protocol *)
  │ let run =
  │   Cohttp_lwt_unix.serve ~handler
  │     { sockaddr= Unix.inet_addr_loopback }

◊ The dispatch of the protocol

  The second most interesting feature of Conduit is the full control
  over the dispatch between protocols by the end-user. From a concrete
  information such as an `Uri.t', the end-user is able to describe how
  Conduit should choose the protocol (and with which value it should try
  to initiate the connection):

  │ let my_tls_config = Tls.Config.client ...
  │ let connect uri =
  │   let edn = Conduit.Endpoint.of_string
  │     (Uri.host_with_default ~default:"localhost" uri) in
  │   let resolvers = match Uri.scheme uri with
  │     | Some "https" ->
  │       let port = Option.value ~default:443 (Uri.port uri) in
  │       Conduit_lwt.add
  │ 	Conduit_lwt_tls.TCP.protocol
  │ 	(Conduit_lwt_tls.TCP.resolve ~port ~config:my_tls_config)
  │ 	Conduit.empty
  │     | Some "http" | None ->
  │       let port = Option.value ~default:80 (Uri.port uri) in
  │       Conduit_lwt.add
  │ 	Conduit_lwt.TCP.protocol
  │ 	(Conduit_lwt.TCP.resolve ~port)
  │ 	Conduit.empty in
  │   Conduit_lwt.resolve ~resolvers edn >>= fun flow ->
  │   ...

◊ An explicit way to launch a server

  Conduit comes with a new API for the server-side, where everything
  becomes explicit: no dispatch, no hidden choice. It proposes now a
  simple function to start the usual server loop:

  │ let run handler =
  │   Conduit_lwt.serve ~handler
  │     Conduit_lwt.TCP.service
  │     { Conduit_lwt.TCP.sockaddr= Unix.(ADDR_INET (inet_addr_loopback, 8080)
  │     ; capacity= 40 }


  Conduit is used by many libraries (~150 packages) and we spend 2
  months to track this breaking-change.  Currently, it's mostly about
  [Cohttp] and [Irmin] and both have a PR according the new version of
  Conduit. These packages will be released as soon as we can with the
  new version of Conduit.

[Cohttp] <>

[Irmin] <>


  Conduit is a piece required by many libraries but nobody really uses
  it. This new version wants to replace and redefine more concretely
  what Conduit is. The update is [huge] for us but small for people
  where we tried to keep the same global idea of the abstraction.

  I would like to thank many people (MirageOS core team, Cohttp peoples,
  some not so famous guys of the Reason/OCaml eco-system) who followed
  us on this deep development (and tried and iterated on our
  version). It does not change too much our world, but it paves the way
  for a better MirageOS/OCaml eco-system.

  As a french guy, I just would like to say: Conduit est mort, Vive

[huge] <>

Easy cross compilation using esy


EduardoRFS announced

  I've been working on this for a couple of months now, and now it is
  ready for an initial announcement of my tools to cross compiling OCaml
  and ReasonML Native.


What it can do

  Out of box it can cross compile most dune and topkg, packages
  available on opam for a couple of platforms, there is also patches for
  popular packages.

  You can also compile opam packages by making an wrapper, like



  Your package should build with OCaml 4.10, and all the packages that
  are built for the `host' will also be build for the `target', so
  sometimes you need to fix a package that you will not use directly.

  Some packages you will need to pin to a `dune-universe' fork version

How to use it

  │ ## compile your project
  │ esy
  │ ## generate the wrapper
  │ esy add -D generate@EduardoRFS/reason-mobile:generate.json
  │ esy generate android.arm64
  │ ## build for android.arm64
  │ esy @android.arm64


  All of the following are tested from Linux and macOS, but I would
  suppose that FreeBSD should be also working as a build system.


What I tested

  In the past I was able to build `Revery' the UI framework for
  `Android' and `iOS'

  But recently I did compile `esy' the package manager itself for all of
  the following platforms above from an `Arch Linux x86_64' and `macOS
  Catalina x86_64'. Including `iOS', with the right version of OCaml it
  will run inside of the new `macOS ARM64' and inside of a jailbroken

OCaml User Survey 2020


gasche announced

  We are happy to announce the [OCaml User Survey 2020]. We are trying
  to get a better picture of the OCaml community and its needs. It would
  be very useful if you could fill the survey (10-15 minutes), and share
  it widely with other OCaml programmers!

  The survey is run by the [OCaml Software Foundation]. Thanks in
  particular to our sponsors OCamlPro (@MuSSF) for preparing many of the
  questions, Jane Street (@Yaron_Minsky) for excellent feedback, and to
  Kim @K_N Nguyễn for his technical help.

  This is our first year running the survey, we hope to continue in
  following years. There are many things to improve; please feel free to
  give us feedback! (There is a feedback question at the end of the
  survey, or you can post here, or send me a message/email.)

  The survey was inspired by programming-language surveys ran by other
  communities. See for example past survey results for [Go], [Haskell],
  [Rust], and [Scala].

[OCaml User Survey 2020] <>

[OCaml Software Foundation] <>

[Go] <>

[Haskell] <>

[Rust] <>

[Scala] <>


  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

  If you also wish to receive it every week by mail, you may subscribe

  [Alan Schmitt]

[send me a message] <>

[the archive] <>

[RSS feed of the archives] <>

[online] <>

[Alan Schmitt] <>

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

             reply	other threads:[~2020-10-20  8:16 UTC|newest]

Thread overview: 112+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-20  8:15 Alan Schmitt [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-07-26 17:54 Alan Schmitt
2022-07-19  8:58 Alan Schmitt
2022-07-12  7:59 Alan Schmitt
2022-07-05  7:42 Alan Schmitt
2022-06-28  7:37 Alan Schmitt
2022-06-21  8:06 Alan Schmitt
2022-06-14  9:29 Alan Schmitt
2022-06-07 10:15 Alan Schmitt
2022-05-31 12:29 Alan Schmitt
2022-05-24  8:04 Alan Schmitt
2022-05-17  7:12 Alan Schmitt
2022-05-10 12:30 Alan Schmitt
2022-05-03  9:11 Alan Schmitt
2022-04-26  6:44 Alan Schmitt
2022-04-19  5:34 Alan Schmitt
2022-04-12  8:10 Alan Schmitt
2022-04-05 11:50 Alan Schmitt
2022-03-29  7:42 Alan Schmitt
2022-03-22 13:01 Alan Schmitt
2022-03-15  9:59 Alan Schmitt
2022-03-01 13:54 Alan Schmitt
2022-02-22 12:43 Alan Schmitt
2022-02-08 13:16 Alan Schmitt
2022-02-01 13:00 Alan Schmitt
2022-01-25 12:44 Alan Schmitt
2022-01-11  8:20 Alan Schmitt
2022-01-04  7:56 Alan Schmitt
2021-12-28  8:59 Alan Schmitt
2021-12-21  9:11 Alan Schmitt
2021-12-14 11:02 Alan Schmitt
2021-11-30 10:51 Alan Schmitt
2021-11-16  8:41 Alan Schmitt
2021-11-09 10:08 Alan Schmitt
2021-11-02  8:50 Alan Schmitt
2021-10-19  8:23 Alan Schmitt
2021-09-28  6:37 Alan Schmitt
2021-09-21  9:09 Alan Schmitt
2021-09-07 13:23 Alan Schmitt
2021-08-24 13:44 Alan Schmitt
2021-08-17  6:24 Alan Schmitt
2021-08-10 16:47 Alan Schmitt
2021-07-27  8:54 Alan Schmitt
2021-07-20 12:58 Alan Schmitt
2021-07-06 12:33 Alan Schmitt
2021-06-29 12:24 Alan Schmitt
2021-06-22  9:04 Alan Schmitt
2021-06-01  9:23 Alan Schmitt
2021-05-25  7:30 Alan Schmitt
2021-05-11 14:47 Alan Schmitt
2021-05-04  8:57 Alan Schmitt
2021-04-27 14:26 Alan Schmitt
2021-04-20  9:07 Alan Schmitt
2021-04-06  9:42 Alan Schmitt
2021-03-30 14:55 Alan Schmitt
2021-03-23  9:05 Alan Schmitt
2021-03-16 10:31 Alan Schmitt
2021-03-09 10:58 Alan Schmitt
2021-02-23  9:51 Alan Schmitt
2021-02-16 13:53 Alan Schmitt
2021-02-02 13:56 Alan Schmitt
2021-01-26 13:25 Alan Schmitt
2021-01-19 14:28 Alan Schmitt
2021-01-12  9:47 Alan Schmitt
2021-01-05 11:22 Alan Schmitt
2020-12-29  9:59 Alan Schmitt
2020-12-22  8:48 Alan Schmitt
2020-12-15  9:51 Alan Schmitt
2020-12-01  8:54 Alan Schmitt
2020-11-03 15:15 Alan Schmitt
2020-10-27  8:43 Alan Schmitt
2020-10-06  7:22 Alan Schmitt
2020-09-29  7:02 Alan Schmitt
2020-09-22  7:27 Alan Schmitt
2020-09-08 13:11 Alan Schmitt
2020-09-01  7:55 Alan Schmitt
2020-08-18  7:25 Alan Schmitt
2020-07-28 16:57 Alan Schmitt
2020-07-21 14:42 Alan Schmitt
2020-07-14  9:54 Alan Schmitt
2020-07-07 10:04 Alan Schmitt
2020-06-30  7:00 Alan Schmitt
2020-06-16  8:36 Alan Schmitt
2020-06-09  8:28 Alan Schmitt
2020-05-19  9:52 Alan Schmitt
2020-05-12  7:45 Alan Schmitt
2020-05-05  7:45 Alan Schmitt
2020-04-28 12:44 Alan Schmitt
2020-04-21  8:58 Alan Schmitt
2020-04-14  7:28 Alan Schmitt
2020-04-07  7:51 Alan Schmitt
2020-03-31  9:54 Alan Schmitt
2020-03-24  9:31 Alan Schmitt
2020-03-17 11:04 Alan Schmitt
2020-03-10 14:28 Alan Schmitt
2020-03-03  8:00 Alan Schmitt
2020-02-25  8:51 Alan Schmitt
2020-02-18  8:18 Alan Schmitt
2020-02-04  8:47 Alan Schmitt
2020-01-28 10:53 Alan Schmitt
2020-01-21 14:08 Alan Schmitt
2020-01-14 14:16 Alan Schmitt
2020-01-07 13:43 Alan Schmitt
2019-12-31  9:18 Alan Schmitt
2019-12-17  8:52 Alan Schmitt
2019-12-10  8:21 Alan Schmitt
2019-12-03 15:42 Alan Schmitt
2019-11-26  8:33 Alan Schmitt
2019-11-12 13:21 Alan Schmitt
2019-11-05  6:55 Alan Schmitt
2019-10-15  7:28 Alan Schmitt
2019-09-03  7:35 Alan Schmitt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).