From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 584D17F168 for ; Fri, 28 Aug 2015 11:07:52 +0200 (CEST) IronPort-PHdr: 9a23:MeszCR1bU4qG/1PxsmDT+DRfVm0co7zxezQtwd8ZsegRKvad9pjvdHbS+e9qxAeQG96LsLQZ2qL/iOPJZy8p2d65qncMcZhBBVcuqP49uEgeOvODElDxN/XwbiY3T4xoXV5h+GynYwAOQJ6tL2PbrnD61zMOABK3bVMzfbSuXNODx+2MlMmMuLTrKz1SgzS8Zb4gZD6Xli728vcsvI15N6wqwQHIqHYbM85fxGdvOE7B102kvpT4yqV+6DxdsO4N8MtJUKOyP/hpDO9uNhoNdiUFoerxtBbCSwKT530TF0QO1yFVGBDI5w2yHsqp83iyiu0o0yCfOYjyTKsocTWk9aZiDhHy2wkdMDts6ieMoshxhq9BvAO6ugZxhYDOM9LdD+Z3Yq6IJYBSfmFGRMsEBn1M Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=r.3@libertysurf.fr; spf=None smtp.mailfrom=r.3@libertysurf.fr; spf=None smtp.helo=postmaster@smtp4-g21.free.fr Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of r.3@libertysurf.fr) identity=pra; client-ip=212.27.42.4; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="r.3@libertysurf.fr"; x-sender="r.3@libertysurf.fr"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of r.3@libertysurf.fr) identity=mailfrom; client-ip=212.27.42.4; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="r.3@libertysurf.fr"; x-sender="r.3@libertysurf.fr"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@smtp4-g21.free.fr) identity=helo; client-ip=212.27.42.4; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="r.3@libertysurf.fr"; x-sender="postmaster@smtp4-g21.free.fr"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CgAgB9JOBVmwQqG9RVCYJOgSFpBoMdqg+QIYIshXsCgT88EAEBAQEBAQEBEAEBAQEBBgsLCSEugh2CBwEBBCMERyYYDQQZAkcSGRIJh34DFgmhXI9jjzoDhScLAQEBAR2KX4EDhC8oMAuCaYFDBYV0DI89hQaJfZhTEYIjHYFWPDOBSIEFAQEB X-IPAS-Result: A0CgAgB9JOBVmwQqG9RVCYJOgSFpBoMdqg+QIYIshXsCgT88EAEBAQEBAQEBEAEBAQEBBgsLCSEugh2CBwEBBCMERyYYDQQZAkcSGRIJh34DFgmhXI9jjzoDhScLAQEBAR2KX4EDhC8oMAuCaYFDBYV0DI89hQaJfZhTEYIjHYFWPDOBSIEFAQEB X-IronPort-AV: E=Sophos;i="5.17,424,1437429600"; d="scan'208,217";a="175164051" Received: from smtp4-g21.free.fr ([212.27.42.4]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Aug 2015 11:07:30 +0200 Received: from zimbra27-e5.priv.proxad.net (unknown [172.20.243.177]) by smtp4-g21.free.fr (Postfix) with ESMTP id A56FC4C8081 for ; Fri, 28 Aug 2015 11:07:30 +0200 (CEST) Date: Fri, 28 Aug 2015 11:07:30 +0200 (CEST) From: r.3@libertysurf.fr To: caml-list@inria.fr Message-ID: <95750525.83374316.1440752850493.JavaMail.root@zimbra27-e5.priv.proxad.net> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_83374315_1514861553.1440752850492" X-Originating-IP: [172.16.79.17, 143.196.127.2] X-Mailer: Zimbra 7.2.0-GA2598 (ZimbraWebClient - FF3.0 (Linux)/7.2.0-GA2598) X-Authenticated-User: r.3@libertysurf.fr Subject: Re: [Caml-list] We need a rich standard library distributed with OCaml, really ------=_Part_83374315_1514861553.1440752850492 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable +1 for 80% of it=20 and I would add :=20 - String.split : char list -> string -> string list=20 - Hashtbl.keys=20 I also think it is very valuable that inria maintains the stdlib. I prefer = to see it kept maintained as inria standard distribution packaged with ocam= l, even if that would imply less features on the compiler.=20 On 27/08/2015 11:34, Edouard Evangelisti wrote:=20 Dear all,=20 Thanks for this inspiring discussion.=20 The integration of large pieces of code into OCaml standard library is mayb= e not the best solution as it will never fulfill everyone's needs. I like t= he idea of having a Swiss army knife standard library rather than a heavy w= eight set of tools. However, filling existing minor gaps in the standard li= brary would probably improve programmers day-to-day experience. Below are s= ome examples:=20 - Integers, floats and options, for instance, would deserve their own modul= e for functor application.=20 - More functions on option type, such as eval, iter, map. Something like th= is:=20 let eval f x =3D try Some (f x) with _ -> None=20 let iter f =3D function None -> () | Some x -> f x=20 let map f =3D function None -> None | Some x -> eval f x=20 - The standard library includes incr and decr on integer references, but no= ne of the useful C-like operators with assignment such as +=3D that save a = lot of time in situations (there are some) where references are heavily use= d.=20 let ( +=3D ) r n =3D r :=3D !r + n=20 - An efficient set of string searching functions would help a lot (no regex= p). Something like Boyer-Moore, KMP or even Rabin-Karp algorithms.=20 - String.explode / implode to convert to/from char list.=20 - Trivial functions such as read_file or read_text_file .=20 - The identity function!=20 - All fold functions should have a foldi counterpart, and the same set of i= terators should occur in all modules.=20 Then, for more specialized requirements, I think it may be better to contri= bute directly to improve third party libraries.=20 Kind regards,=20 Edouard=20 2015-08-27 9:20 GMT+01:00 Daniil Baturin < daniil@baturin.org > :=20
-----BEGIN PGP SIGNED MESSAGE-----=20 Hash: SHA256=20 It often provokes exact same feelings as OCaml standard library,=20 especially the prelude. There are also reimplementations of it, e.g.=20 https://hackage.haskell.org/package/classy-prelude=20 GHC authors also keep the old stuff for backwards compatibility.=20 What I think can serve as a source of inspiration is the Haskell=20 Platform or the Python distribution. They are distributed with a set of=20 more or less self-contained modules that once were or still are=20 third-party libraries. This is especially convenient on platforms not=20 friendly to automatic package management.=20 On 08/27/2015 02:07 PM, S=C3=A9bastien Hinderer wrote:=20 > Hi,=20 >=20 > Thanks for having started this thread.=20 >=20 > I am wondering to which extent the standard library of a language such=20 > as Haskell could be a source of inspiration for OCaml?=20 >=20 > Cheers,=20 >=20 > S=C3=A9bastien.=20 >=20 -----BEGIN PGP SIGNATURE-----=20 Version: GnuPG v2=20 iQIcBAEBCAAGBQJV3shSAAoJEEcm35UR4K8fSmwP+wURGWzi/onbTmr0dltA8aRK=20 XB6FKEyiwLarEMHKnLPiT3uZhDVbaSvDolPGzPuU3eq0/kih0z/0R4l2WAUG8QuP=20 cbdcVAd0Po+fSfSrgNtl+luH9fpUiE0EtDWcZxviZSerZoObcPcIK68FkgQbBs5T=20 vlJ7MjuNguYI26tDrBsSAzDZ+FqFGYj9/ykmUNF42aPUqD7GQXFKY6iBgFoTCpze=20 v9zbPnDoPjShe1Guk72GbmHU+b5xwEXe0bFpWj3O6pM5sXOnQ9jbLNRM70wSvGkX=20 V17NexWd4HyqVhoSRHy+CnrFUHuzEhBJQARhq1nYoypY6DiYyOSg58uw5EWJC/vH=20 YXl0LP60sXrhY4ZJ4YUvv86DFpqGGtNftRThNRTq0o7LULXIt3JRyVp9f+fVhxB4=20 FW8dk2xzbyMijKCLMdbrbLJhbQ7znTfCt8PLnyemVFdc+Ficne/j+D0YOoWCyX+b=20 vyc7xAQn14ZvywMxS/Ii9SRKZO8jqmjlhnoTa+AiF9Ve9KYbIJ3d9hX/9cw+blmo=20 3EuUbo0K3DbIWUvNYMFsR+03mY5WyfO9UX5zcI/j5hP+DqxqrHEvNeHo/7/8IYiZ=20 nI2B0cGwk5JX58+htaaR1rs3FDT7YI3mdoDzmLjVtdnqlRLhUvmHHqraZJQt/QhR=20 DOx3brrv1loX0DPvr0SM=20 =3DFpx0=20 -----END PGP SIGNATURE-----=20 --=20 Caml-list mailing list. Subscription management and archives:=20 https://sympa.inria.fr/sympa/arc/caml-list=20 Beginner's list: http://groups.yahoo.com/group/ocaml_beginners=20 Bug reports: http://caml.inria.fr/bin/caml-bugs=20 --=20 Edouard Evangelisti=20 Post doctoral Research Associate=20 Sainsbury Laboratory, Cambridge University (SLCU)=20 Bateman Street=20 Cambridge CB2 1LR (United Kingdom)=20
------=_Part_83374315_1514861553.1440752850492 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable <= div style=3D'font-family: times new roman,new york,times,serif; font-size: = 12pt; color: #000000'> =20=20 =20=20=20=20 =20=20 =20=20
+1 for 80% of it

and I would add :
- String.split : char list -> string -> string list
- Hashtbl.keys

I also think it is very valuable that inria mai= ntains the stdlib. I prefer to see it kept maintained as inria standard dis= tribution packaged with ocaml, even if that would imply less features on th= e compiler.



On 27/08/2015 11:34, Edouard Evangelisti wrote:
Dear all,

Thanks for this inspiring discussion.

The integration of large pieces of code into OCaml standard library is maybe not the best solution as it will never fulfill everyone's needs. I like the idea of having a Swiss army knife standard library rather than a heavy weight set of tools. However, filling existing minor gaps in the standard library would probably improve programmers day-to-day experience. Below are some examples:

- Integers, floats and options, for instance, would deserve their own module for functor application.

- More functions on option type, such as eval, iter, map. Something like this:
let eval f x =3D try Some (f x) with _ -> None
let iter f =3D function None -> () | Some x -> f x
let map f =3D function None -> None | Some x -> eval f x


- The standard library includes incr and decr on integer references, but none of the useful C-like operators with assignment such as +=3D that save a lot of time in situations (there are some) where references are heavily used.
let ( +=3D ) r n =3D r :=3D !r + n

- An efficient set of string searching functions would help a lot (no regexp). Something like Boyer-Moore, KMP or even Rabin-Karp algorithms.
- String.explode / implode to convert to/from char list.
- Trivial functions such as read_file or read_text_fi= le.
- The identity function!
- All fold functions should have a foldi counterpart, and the same set of iterators should occur in all modules.

Then, for more specialized requirements, I think it may be better to contribute directly to improve third party libraries.

Kind regards,
Edouard



2015-08-27 9:20 GMT+01:00 Daniil Baturin <daniil@baturin.org>:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

It often provokes exact same feelings as OCaml standard library,
especially the prelude.  There are also reimplementations = of it, e.g.
https://hackage.haskell.org/package/cl= assy-prelude

GHC authors also keep the old stuff for backwards compatibility.

What I think can serve as a source of inspiration is the Haskell
Platform or the Python distribution. They are distributed with a set of
more or less self-contained modules that once were or still are
third-party libraries. This is especially convenient on platforms not
friendly to automatic package management.

On 08/27/2015 02:07 PM, S=C3=A9bastien Hinderer wrote:
> Hi,
>
> Thanks for having started this thread.
>
> I am wondering to which extent the standard library of a language such
> as Haskell could be a source of inspiration for OCaml?
>
> Cheers,
>
> S=C3=A9bastien.
>


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJV3shSAAoJEEcm35UR4K8fSmwP+wURGWzi/onbTmr0dltA8aRK
XB6FKEyiwLarEMHKnLPiT3uZhDVbaSvDolPGzPuU3eq0/kih0z/0R4l2WAUG8QuP
cbdcVAd0Po+fSfSrgNtl+luH9fpUiE0EtDWcZxviZSerZoObcPcIK68FkgQbBs5T
vlJ7MjuNguYI26tDrBsSAzDZ+FqFGYj9/ykmUNF42aPUqD7GQXFKY6iBgFoTCpze
v9zbPnDoPjShe1Guk72GbmHU+b5xwEXe0bFpWj3O6pM5sXOnQ9jbLNRM70wSvGkX
V17NexWd4HyqVhoSRHy+CnrFUHuzEhBJQARhq1nYoypY6DiYyOSg58uw5EWJC/vH
YXl0LP60sXrhY4ZJ4YUvv86DFpqGGtNftRThNRTq0o7LULXIt3JRyVp9f+fVhxB4
FW8dk2xzbyMijKCLMdbrbLJhbQ7znTfCt8PLnyemVFdc+Ficne/j+D0YOoWCyX+b
vyc7xAQn14ZvywMxS/Ii9SRKZO8jqmjlhnoTa+AiF9Ve9KYbIJ3d9hX/9cw+blmo
3EuUbo0K3DbIWUvNYMFsR+03mY5WyfO9UX5zcI/j5hP+DqxqrHEvNeHo/7/8IYiZ
nI2B0cGwk5JX58+htaaR1rs3FDT7YI3mdoDzmLjVtdnqlRLhUvmHHqraZJQt/QhR
DOx3brrv1loX0DPvr0SM
=3DFpx0
-----END PGP SIGNATURE-----



--
Caml-list mailing list.  Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-lis= t
Beginner's list: http://groups.yahoo.co= m/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs



--
Edouard Evangelisti
Post doctoral Research Associate
Sainsbury Laboratory, Cambridge University (SLCU)
Bateman Street
Cambridge CB2 1LR (United Kingdom)


=20=20 = ------=_Part_83374315_1514861553.1440752850492--