From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr 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 BAFF67F0D9 for ; Thu, 27 Aug 2015 04:51:18 +0200 (CEST) IronPort-PHdr: 9a23:rH5jPB1yHIhcVvSPsmDT+DRfVm0co7zxezQtwd8ZsegVI/ad9pjvdHbS+e9qxAeQG96LsLQa0aGI4+jJYi8p39WoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6kO74TNaIBjjLw09fr2zQd6JyZrtnL7is7ToICx2xxOFKYtoKxu3qQiD/uI3uqBFbpgL9x3Sv3FTcP5Xz247bXianhL7+9vitMU7q3cY6Lod8JtLWKD+OqA5VqBwDTI8Mmlz6te4mwPESF6v4X0TWGJeoBpBBQeNuBv9VIXxuy3177stiAGVOMT3SfY/XjH0vPQjcwPhlCpSb21xy2rQkMEl1K8= Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=bobzhang1988@gmail.com; spf=Pass smtp.mailfrom=bobzhang1988@gmail.com; spf=None smtp.helo=postmaster@mail-qk0-f172.google.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of bobzhang1988@gmail.com) identity=pra; client-ip=209.85.220.172; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="bobzhang1988@gmail.com"; x-sender="bobzhang1988@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of bobzhang1988@gmail.com designates 209.85.220.172 as permitted sender) identity=mailfrom; client-ip=209.85.220.172; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="bobzhang1988@gmail.com"; x-sender="bobzhang1988@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-qk0-f172.google.com) identity=helo; client-ip=209.85.220.172; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="bobzhang1988@gmail.com"; x-sender="postmaster@mail-qk0-f172.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BkAgBqet5VlazcVdFdhBsBPIMjqDyGRYtZh3OBODkTAQEBAQEBAQEQAQEBAQcNCQkfMIIdggkWER0BGx0BAxIQNwIlEQEFAUkHB4d2AQMSBaYwgS8+MYtAgWyCeYoWChknDVeEWQEBCAEBAQEBFwEFDohlgWWFJGmCcC+BFAWVNQeMcohoD5AbNYEXF4QqVYJNAQEB X-IPAS-Result: A0BkAgBqet5VlazcVdFdhBsBPIMjqDyGRYtZh3OBODkTAQEBAQEBAQEQAQEBAQcNCQkfMIIdggkWER0BGx0BAxIQNwIlEQEFAUkHB4d2AQMSBaYwgS8+MYtAgWyCeYoWChknDVeEWQEBCAEBAQEBFwEFDohlgWWFJGmCcC+BFAWVNQeMcohoD5AbNYEXF4QqVYJNAQEB X-IronPort-AV: E=Sophos;i="5.17,420,1437429600"; d="scan'208,217";a="174981888" Received: from mail-qk0-f172.google.com ([209.85.220.172]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 27 Aug 2015 04:51:17 +0200 Received: by qkbm65 with SMTP id m65so3634098qkb.2 for ; Wed, 26 Aug 2015 19:51:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:subject:date:message-id:cc:to:mime-version; bh=lIss3ZxjtGh3LAM1lB5OMmTrNWEPx2FtjQJBa7VqJQc=; b=gDiI5h4fPHYIApBDs2rJpWZuePL1B+cqLqcMKsIKvTf2RpGnwvWIfOu1w2q4b9kjcO sp3cu/zdw5fWLJrf/StQ16MGY4ypjjw9aWylfLca/EqW55St8+IOqks524iJq2g5Hqc8 XhoOBvz9blUlr5YevPyyVPGJW3QAq935nJQE9J/TQTKWwFWpfY7VtyekV2PHvRKHypYL K9VBOTus/yW3xH6om7AUP+f5Q+PUWOLsgfKhm861WIVsCqoZyWwv1BWcs1lqLymGDk6I a7t79sOiCYKn30NAdE7GxAeIdXomfExG5hk5af31GZHblNW7Z6MgI2Fr2b/07re9VNgh FiDg== X-Received: by 10.55.198.11 with SMTP id b11mr2853101qkj.53.1440643876306; Wed, 26 Aug 2015 19:51:16 -0700 (PDT) Received: from [192.168.1.128] (65-78-2-104.c3-0.nyr-ubr3.nyr.ny.cable.rcn.com. [65.78.2.104]) by smtp.gmail.com with ESMTPSA id f10sm493026qhc.12.2015.08.26.19.51.15 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 26 Aug 2015 19:51:15 -0700 (PDT) From: Hongbo Zhang Content-Type: multipart/alternative; boundary="Apple-Mail=_439D8B4C-3E47-4DAC-836A-D19FFA7316D4" Date: Wed, 26 Aug 2015 22:52:19 -0400 Message-Id: <1C02B1E2-D17D-4008-998E-B17048C62DFA@gmail.com> Cc: Hongbo Zhang To: caml-list@inria.fr Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) X-Mailer: Apple Mail (2.2098) Subject: [Caml-list] We need a rich standard library distributed with OCaml, really --Apple-Mail=_439D8B4C-3E47-4DAC-836A-D19FFA7316D4 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Dear OCaml developers, I would like to spend one hour in writing down my experience that why I= had to write some small utilities again and again, since this happened so = many times that I believe you might come across such issues before. I am doing some compiler hacking tonight, I needed a utility function = =E2=80=9CString.split=E2=80=9D which split a string into a list of strings = by whitespace, it is just one liner if you use str library. However, since = I am doing some low level stuff, I would try to avoid such big dependency, = and I am pretty sure that I have ever written it for at least three times,= I just hoped that I could get it done quickly, so I am looking into batter= ies that if I can steal some code, I have to copy some code instead of depe= nd on batteries, batteries is too big for my projects. `BatString.nsplit` s= eems to fit for what I needed, I copied the definition of `BatString.nsplit= ` into REPL, no luck, it depends on some previously defined functions, then= I copied the whole module `BatString` into REPL, still no luck, it depende= d on another module `BatReturn`, then I stopped here, it=E2=80=99s time to = write my own ad-hoc thrown-away `String.split` function again. OCaml is my favorite programming language, and I am very productive at i= t, however, I was annoyed by such things from time to time. We do have four= *standard libraries* alternatives: batteries, core, extlib and ocaml-conta= iners. In my opinion, none of them matches the beauty of the OCaml language= itself and probably will never catch up if we don=E2=80=99t do anything.=20 Note that I don=E2=80=99t want to be offensive to any of these librarie= s, just my personal feedback that why I think it is not a good standard lib= rary, I appreciated a lot to people who contribute their precious time in m= aintaining these libraries, better than nothing : ) - Batteries(extlib) It=E2=80=99s big with dependencies between different modules (OCaml d= oes not have a good story in dead code elimination), some of its modules ar= e of low quality, for example, batEnum is used everywhere while its impleme= ntation is buggy. batIO makes things even worse since it is not compatible = with standard library, some type signatures mismatched IIRC. - ocaml-containers Mostly one man=E2=80=99s project - core I believe core has high quality, however, it suffers the same problem= as batteries, a big dependency. There is a blocking issue, its development= process is opaque, for an open source community, I would prefer a standard= library developed in an open environment.=20 I am not expecting that we could have a standard library as rich as py= thon, but for some utilities, I do believe that shipped with standard libra= ry or officially supported is the best solution. Thanks =E2=80=94 Hongbo=20= --Apple-Mail=_439D8B4C-3E47-4DAC-836A-D19FFA7316D4 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Dear OCaml develop= ers,
    I would like to spend one hour in writing= down my experience that why I had to write some small utilities again and = again, since this happened so many times that I believe you might come acro= ss such issues before.
    I am doing some c= ompiler hacking tonight, I needed a utility function =E2=80=9CString.split= =E2=80=9D which split a string into a list of strings by whitespace, it is = just one liner if you use str library. However, since I am doing some low l= evel stuff, I would try to avoid such big dependency, and I am pretty sure = that I have ever written it  for at least three times, I just hoped th= at I could get it done quickly, so I am looking into batteries that if I ca= n steal some code, I have to copy some code instead of depend on batteries,= batteries is too big for my projects. `BatString.nsplit` seems to fit for = what I needed, I copied the definition of `BatString.nsplit` into REPL, no = luck, it depends on some previously defined functions, then I copied the wh= ole module `BatString` into REPL, still no luck, it depended on another mod= ule `BatReturn`, then I stopped here, it=E2=80=99s time to write my own ad-= hoc thrown-away `String.split` function again.
  =  OCaml is my favorite programming language, and I am very productive a= t it, however, I was annoyed by such things from time to time. We do have f= our *standard libraries* alternatives: batteries, core, extlib and ocaml-co= ntainers. In my opinion, none of them matches the beauty of the OCaml langu= age itself and probably will never catch up if we don=E2=80=99t do anything= . 
    Note that I don=E2=80=99t want t= o be offensive to any of these libraries, just my personal feedback that wh= y I think it is not a good standard library, I = appreciated a lot to people who contribute their precious time in maintaini= ng these libraries, better than nothing : )
&n= bsp;   - Batteries(extlib)
      I= t=E2=80=99s big with dependencies between different modules (OCaml does not= have a good story in dead code elimination), some of its modules are of lo= w quality, for example, batEnum is used everywhere while its implementation= is buggy. batIO makes things even worse since it is not compatible with st= andard library, some type signatures mismatched IIRC.
=     - ocaml-containers
      = Mostly one man=E2=80=99s project
    - core<= /div>
      I believe core has high quality, = however, it suffers the same problem as batteries, a big dependency. There = is a blocking issue, its development process is opaque, for an open source = community, I would prefer a standard library developed in an open environme= nt. 
    I am not expecting that we cou= ld have a  standard library as rich as python, but for some utilities,= I do believe that shipped with standard library or officially supported is= the best solution.
   Thanks =E2=80=94 Hong= bo 
= --Apple-Mail=_439D8B4C-3E47-4DAC-836A-D19FFA7316D4--