caml-list - the Caml user's mailing list
 help / Atom feed
From: Alan Schmitt <>
To: "lwn" <>, "cwn"  <>,,
Subject: [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
Date: Tue, 05 May 2020 09:45:41 +0200
Message-ID: <> (raw)

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


Here is the latest OCaml Weekly News, for the week of April 28 to May
05, 2020.

Table of Contents

Lwt now has let* syntax
JOSE 0.3.0 - Now with 100% more encryption
Are there learning materials for OCaml for those with no programming experience?
The recent evolution of utop, lambda-term, zed and underneath projects
Looking for "lovely, idiomatic" examples of Ocaml used for shell-scripting in the manner of Perl/Python (but esp. Perl)

Lwt now has let* syntax

  Archive: []

Anton Bachin announced

  [Lwt] now has `let*' and `let+' syntax, which can be used like this:

  │ open Lwt.Syntax
  │ let () =
  │   let request =
  │     let* addresses = Lwt_unix.getaddrinfo "" "80" [] in
  │     let google = Lwt_unix.((List.hd addresses).ai_addr) in
  │     Lwt_io.(with_connection google (fun (incoming, outgoing) ->
  │       let* () = write outgoing "GET / HTTP/1.1\r\n" in
  │       let* () = write outgoing "Connection: close\r\n\r\n" in
  │       let* response = read incoming in
  │       Lwt.return (Some response)))
  │   in
  │   let timeout =
  │     let* () = Lwt_unix.sleep 5. in
  │     Lwt.return None
  │   in
  │   match (Lwt.pick [request; timeout]) with
  │   | Some response -> print_string response
  │   | None -> prerr_endline "Request timed out"; exit 1

  This is now released in Lwt [5.3.0]. Thanks to Rahul Kumar for adding
  `let*', and @CraigFe for adding `let+'!



Thomas Coopman asked

  Awesome this looks great.

  2 quick questions:

  1. I don't see this new version documented on ocsigen yet? Is that a
     build that needs to be done manually?
  2. Is `ppx_lwt' still recommend for some usecases like `try%'? For
     what cases is one preferred over the other?

Anton Bachin replied

  Good questions :slight_smile:

  1. The docs generation is blocked on an Ocsigen "internal" package
     `wikidoc', which has not been updated to support 4.08. So,
     effectively, `let*' is exactly what is preventing docs generation
     for the time being. I'll post the docs as soon as that is fixed.
  2. `ppx_lwt' is probably still the recommended way, because of better
     backtraces, and things like `try%lwt'. `let*' is nice for people
     that don't want to use the PPX. They can still benefit from a
     monadic syntax.

JOSE 0.3.0 - Now with 100% more encryption


Ulrik Strid announced

  I recently released a version 0.3.0 of JOSE.


  It now includes some of the JWE (JSON Web Encryption) spec. A huge
  thank you goes out to @hannes for helping me implementing one of the
  gnarlier combinations of decryption that I could then use as a base
  for encryption and more `alg' and `enc'.

  I also refactored the JWK (JSON Web Keys) implementation to unify and
  simplify the representation. It is now possible to use a private key
  for anything a public key can do since it's a superset.

  A special thanks to @anmonteiro for helping me with the design and
  reviewing my code.

Are there learning materials for OCaml for those with no programming experience?


Aaron Christianson asked

  OCaml is a language with some advanced features, but a very gentle
  learning curve. It seems like it would be well-suited to teaching
  beginners to program (a few tricky error messages notwithstanding),
  but I haven't seen many resources targeted at teaching programming
  from scratch. Does anyone here know any?

Daniel Bünzli replied

  There is [*OCaml from the Very Beginning*] written by @JohnWhitington.

[*OCaml from the Very Beginning*]

Nicolás Ojeda Bär also replied

  An excellent (free) book is "LE LANGAGE CAML"

Pierre also replied

  There's also [CS3110] from Cornell University. Here's [the
  textbook]. It's pretty great!


[the textbook]

The recent evolution of utop, lambda-term, zed and underneath projects


ZAN DoYe announced

  Hi, dear OCaml guys! We've been keeping quiet for more than one year
  though utop, lambda-term, zed and some related projects were still
  evolving during the period of time. This is because of two reasons:

  1. The new feature had nothing to do with the fields where most OCaml
     developers are working on:



     Recognizing, editing, fuzzy searching for Character
     Variation(mainly for ancient CJK characters).

     Nevertheless, the new feature brought us a good side effect – the
     long-existing [Issue with asian charset] was resolved. UTop users
     will notice the refinement naturally, so no announcement was

  2. I didn't deem the first few new editions of zed 2 and lambda-term 2
     stable enough.

[Issue with asian charset]

3.0 era

  This time, we are entering zed 3, lambda-term 3 era. The features
  introduced since zed 2, lambda-term 2 are quite stable now and the new
  feature coming to us will have a bit more impact, especially to vim
  users. So it's worthwhile to draft an announcement:

◊ VI Editing Mode


  OCaml guys, hope you enjoy this.

List of notable changes:

  • zed 2:
    • wide, combined glyph(Character Variation, IPA, CJK …)
    • add wanted_column support for wide width character

  • lambda-term 2:
    • wide, combined glyph(Character Variation, IPA, CJK …)
    • add horizontal scrolling support for wide width character

  • zed 3:
    • add new actions for convenience

  • lambda-term 3:
    • `LTerm_read_line': add initial support for vi editing mode:
    • motions:
      • h l 0 ^ $
      • j k gg G
      • w W e E b B ge gE
      • f F t T
      • aw iw aW iW
      • include or inner ( ), [ ], { }, < >, ' and "
      • generic quote: aq? iq? where ? could be any character
      • bracket matching: jump back and forth between matched brackets
    • delete, change, yank with motions
    • paste: p P
    • line joining: J

  for a full list of the changes, please visit the homepages of each

Projects underneath:

  • [charInfo_width]: Determine column width for a character
  • [mew] & [mew_vi]: Modal editing witch & Its VI interpreter
    complement. In a word, modal editing engine generators.




What's next

◊ VI Editing Mode

  1. Visual mode

  2. register support and more vi compatible


  We've recorded more then 100 thousand entries about the structure of
  CJK characters, what is a character consists of, how are the
  sub-assemblies glue together etc. And as a complement to
  charInfo_width, we may release a new project called charInfo_structure

Looking for "lovely, idiomatic" examples of Ocaml used for shell-scripting in the manner of Perl/Python (but esp. Perl)


Chet Murthy announced

  I wonder if there are people who have written nontrivial Ocaml code
  for shell-scripting, that they think exemplifies the right way to do
  it.  I've been a Perl hacker for 25yr, and so when I reach for Ocaml
  to write stuff that should be Perl shell-scripts, I always find it a
  bit painful, and there's a significant overhead to getting the job
  done.  Some of that is applying ocaml to a new domain, but some of it
  is that I'm just not using the right idioms and tools (and there are
  so many to choose from).

  So if anybody has good pointers, I'd appreciate learning about them.

Bikal Lem

  Haven't tried it myself, but this looks promising …

  At least it has the great Sean Connery in its README so possibly worth
  delving a bit. :)

Hezekiah Carty

  [bos] seems like it can do a lot of what you're looking for. It's at
  least worth taking a look, though it may not be at Perl levels of
  concise for this kind of task.


Martin Jambon

  I tried to summarize my take on the subject into this gist:

  I'm not aware of the existence of such tool, but this is how I might
  design it. This should be reminiscent of camlp4's quotation and
  anti-quotation system, which allows alternating between two syntaxes
  within a source file.


  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]


[Alan Schmitt]

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

         reply index

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

Reply instructions:

You may reply publically 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

caml-list - the Caml user's mailing list

Archives are clonable: git clone --mirror

AGPL code for this site: git clone public-inbox