Previous week Up Next week

Hello

Here is the latest OCaml Weekly News, for the week of April 25 to May 02, 2017.

  1. PPX is harmful to our community in the long term
  2. aws-s3 0.9.0
  3. Other OCaml News

PPX is harmful to our community in the long term

Archive: https://sympa.inria.fr/sympa/arc/caml-list/2017-04/msg00132.html

Continuing this thread, Yaron Minsky said:
Anil Madhavapeddy wrote:

> Olaf Hering  wrote:
>>
>> Fabrice Le Fessant wrote:
>>
>>> A lot of people use `autoconf` to generate `./configure` scripts, and the
>>> standard practice is to keep the `./configure` script so that people don't need
>>> to run `autoconf` to just compile and install the software. Maybe projects
>>
>> This is and was a huge mistake to promote 'configure&&make' instead of
>> autogen.sh&&configure&&make. Having a set of uptodate autotools
>> installed is easy and cheap, they are not runtime dependencies. The
>> result of that wrongdoing is a huge pile of broken and/or incomplete configure.ac.
>
> Indeed -- we spent years in OpenBSD dealing with patching broken versions
> of libtool scripts that embedded incorrect behaviour on our particular platforms,
> and were stubbornly included in upstream distributions without being regenerated.
>
>> Do not repeat that mistake, whatever it means in the OCaml world.
>
> A similar analogue in the OCaml world may be the inclusion of autogenerated
> files from _oasis. The inclusion of the autogenerated files like myocamlbuild.ml
> was a holdover from a pre-opam world when it was painful to install all the
> build dependencies of OASIS.
>
> Nowadays, it's quite easy to install oasis and run `oasis setup` in a project
> to get the latest build rules, and the checked in autogenerated files only
> get in the way and/or are increasingly complex due to having to deal with
> multiple OCaml versions (e.g. for String.lowercase vs String.lowercase_ascii).
>
> Bundling pre-evaluated ppx output in a release tarball runs the same risk...
>
> Our experience in Mirage with PPX has been to find a balance -- we do not let
> it proliferate beyond type_conv usage or ppx_cstruct for binary formats. Some
> libraries (such as the TLS stack) do not use it all. One of the heaviest uses
> of camlp4 in the past for us was the pa_lwt syntax extension, and most libraries
> have gone towards explicit Lwt.bind() calls instead of using the ppx alternative.
>
> I'm hopeful that ocaml-migrate-parsetree will make it easier for us to test
> common libraries on dev versions of OCaml. In practise with 4.05, it has been
> non-ppx changes that have been blocking testing -- for instance the close-on-exec
> flag addition to the Unix module caused rippling breakage through Lwt and other
> platform libraries. That's not to say that PPX isn't a problem, but it has
> gotten significantly easier to deal with since Fred's work on migrate-parsetree.

We're very similar, except that we now do use a monadic syntax pretty
pervasively. I wrote about this here:

https://blogs.janestreet.com/let-syntax-and-why-you-should-use-it/

and am if anything more convinced that it's a worthwhile idiom. Monads and
Applicatives are useful in so many places (beyond Async and Lwt) that having
syntactic support for them is really nice, especially for the let .. and
constructs.
      
Jacques Carette then added:
As co-author of the now-obsolete pa_monad, I emphatically agree!
      

aws-s3 0.9.0

Archive: https://sympa.inria.fr/sympa/arc/caml-list/2017-04/msg00135.html

Anders Peter Fugmann announced:
It is my pleasure to announce aws-s3 0.9.0

aws-s3 implements operations to manipulate objects in Amazons Simple Storage
Service (S3). Operations include: get, put, delete, delete_multi and ls. The
library also includes functions to get machine role and security token
(credentials) through AWS Identity and Access Management service (IAM).

The library uses async for concurrency.

aws-s3 is available though opam and from github[1]

/Anders

[1] https://github.com/andersfugmann/aws-s3
      

Other OCaml News

From the ocamlcore planet blog:
Here are links from many OCaml blogs aggregated at OCaml Planet,
http://ocaml.org/community/planet/.

Looking for a technical writer
 https://blogs.janestreet.com/looking-for-a-technical-writer/

What do you mean ExceptT doesn't Compose?
 http://www.mega-nerd.com/erikd/Blog/CodeHacking/Haskell/what_do_you_mean.html

New opam features: local switches
 http://www.ocamlpro.com/2017/04/27/new-opam-features-local-switches/

Caveat Configurator: how to replace configs with code, and why you might not want to
 https://blogs.janestreet.com/caveat-configurator-how-to-replace-configs-with-code-and-why-you-might-not-want-to/
      

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