caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Alan Schmitt <alan.schmitt@polytechnique.org>
To: "lwn" <lwn@lwn.net>, "cwn"  <cwn@lists.idyll.org>,
	caml-list@inria.fr, comp@lists.orbitalfox.eu
Subject: [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
Date: Tue, 05 May 2020 09:45:41 +0200	[thread overview]
Message-ID: <87368eddui.fsf@m4x.org> (raw)

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

Hello

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)
Old CWN


Lwt now has let* syntax
═══════════════════════

  Archive: [https://discuss.ocaml.org/t/lwt-now-has-let-syntax/5651/1]


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 "google.com" "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_main.run (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+'!


[Lwt] https://github.com/ocsigen/lwt

[5.3.0] https://github.com/ocsigen/lwt/releases/tag/5.3.0


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

  Archive:
  [https://discuss.ocaml.org/t/ann-jose-0-3-0-now-with-100-more-encryption/5667/1]


Ulrik Strid announced
─────────────────────

  I recently released a version 0.3.0 of JOSE.

  [https://github.com/ulrikstrid/reason-jose]
  [https://ulrikstrid.github.io/reason-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?
════════════════════════════════════════════════════════════════════════════════

  Archive:
  [https://discuss.ocaml.org/t/are-there-learning-materials-for-ocaml-for-those-with-no-programming-experience/5684/1]


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*] http://ocaml-book.com/


Nicolás Ojeda Bär also replied
──────────────────────────────

  An excellent (free) book is "LE LANGAGE CAML"
  [https://caml.inria.fr/pub/distrib/books/llc.pdf].


Pierre also replied
───────────────────

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


[CS3110] https://www.cs.cornell.edu/courses/cs3110/2020sp/

[the textbook]
https://www.cs.cornell.edu/courses/cs3110/2019sp/textbook/


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

  Archive:
  [https://discuss.ocaml.org/t/the-recent-evolution-of-utop-lambda-term-zed-and-underneath-projects/5687/1]


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:

     [https://aws1.discourse-cdn.com/standard11/uploads/ocaml/original/2X/a/a30d5fb6fc075a50801b387299cc820965d48ca0.png]

     [https://aws1.discourse-cdn.com/standard11/uploads/ocaml/original/2X/9/91b88f0c492702212f00f17af1bf0e18ee1a463b.png]

     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
     needed.

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


[Issue with asian charset]
https://github.com/ocaml-community/lambda-term/issues/2

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

  [https://aws1.discourse-cdn.com/standard11/uploads/ocaml/original/2X/c/ca11924046977d89d4345ad135977c6960470edc.gif]

  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
  project.


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.


[charInfo_width] https://bitbucket.org/zandoye/charinfo_width/

[mew] https://github.com/kandu/mew

[mew_vi] https://github.com/kandu/mew_vi


What's next
╌╌╌╌╌╌╌╌╌╌╌

◊ VI Editing Mode

  1. Visual mode

     [https://aws1.discourse-cdn.com/standard11/uploads/ocaml/original/2X/7/7cc45010710ad28d8d1e859e9b28806469ef8080.gif]
  2. register support and more vi compatible


◊ CJKV

  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)
═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════

  Archive:
  [https://discuss.ocaml.org/t/looking-for-lovely-idiomatic-examples-of-ocaml-used-for-shell-scripting-in-the-manner-of-perl-python-but-esp-perl/5703/1]


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 …
  [https://github.com/janestreet/shexp].

  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.


[bos] https://erratique.ch/software/bos


Martin Jambon
─────────────

  I tried to summarize my take on the subject into this gist:
  [https://gist.github.com/mjambon/bb07b24f89fa60c973735307ce9c6cb9]

  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.


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@polytechnique.org

[the archive] http://alan.petitepomme.net/cwn/

[RSS feed of the archives] http://alan.petitepomme.net/cwn/cwn.rss

[online] http://lists.idyll.org/listinfo/caml-news-weekly/

[Alan Schmitt] http://alan.petitepomme.net/


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

             reply	other threads:[~2020-05-05  7:45 UTC|newest]

Thread overview: 112+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-05  7:45 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-20  8:15 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-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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=87368eddui.fsf@m4x.org \
    --to=alan.schmitt@polytechnique.org \
    --cc=caml-list@inria.fr \
    --cc=comp@lists.orbitalfox.eu \
    --cc=cwn@lists.idyll.org \
    --cc=lwn@lwn.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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).