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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id C4D5F7FE36 for ; Fri, 1 Jul 2016 14:44:35 +0200 (CEST) IronPort-PHdr: 9a23:bedsChU/ijBq2UzXWG86+8y4iGbV8LGtZVwlr6E/grcLSJyIuqrYZh2Pt8tkgFKBZ4jH8fUM07OQ6PG4HzVRqsvZ+Fk5M7V0HycfjssXmwFySOWkMmbcaMDQUiohAc5ZX0Vk9XzoeWJcGcL5ekGA6ibqtW1aJBzzOEJPK/jvHcaK1oLshrj0osyYPl0ArQH+SIs6FA+xowTVu5teqqpZAYF19CH0pGBVcf9d32JiKAHbtR/94sCt4MwrqHwI6LoJvvRNWqTifqk+UacQTHF/azh0t/vQqALbQACTynwZW2QQ2loUUkmWpC39C6b4qCz8/s983jKZLIWiXLU1Xy+h/o9pQRnlkzsdOjMltmrQj5ojorhcpUeNqhV5i7LUZ4SNL/14NvfRcNocXmpMRNpRUClZGYS6R4QKBusFe+1fqt+u9BM1sRKiCFz0V6vUwThSiyqzgPQ3 Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=deansherthompson@gmail.com; spf=Pass smtp.mailfrom=deansherthompson@gmail.com; spf=None smtp.helo=postmaster@mail-it0-f49.google.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of deansherthompson@gmail.com) identity=pra; client-ip=209.85.214.49; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="deansherthompson@gmail.com"; x-sender="deansherthompson@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of deansherthompson@gmail.com designates 209.85.214.49 as permitted sender) identity=mailfrom; client-ip=209.85.214.49; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="deansherthompson@gmail.com"; x-sender="deansherthompson@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-it0-f49.google.com) identity=helo; client-ip=209.85.214.49; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="deansherthompson@gmail.com"; x-sender="postmaster@mail-it0-f49.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BzAADqZHZXhjHWVdFdhBR8qCOTKCKFdgKBOTwQAQEBAQEBAQERAQEBCAsLCSEvgjKCGgEBBAESER0BGxILAQMBCwYFCwMKAgIJHQICIQIRAQUBChIGExICBweHcwEDDwgOpiiBMT4xizuBaoJaBYZgChknAwpSg0kBAQEBAQEBAQEBAQEBAQEBAQEBAQEUAgYQcYceCIJOgkOBYxqDASuCLwWGUAyHJYpbNIYJhi6CDYI4hwUOhV+IFoY0MIEPNYInEQuBaFKIdAEBAQ X-IPAS-Result: A0BzAADqZHZXhjHWVdFdhBR8qCOTKCKFdgKBOTwQAQEBAQEBAQERAQEBCAsLCSEvgjKCGgEBBAESER0BGxILAQMBCwYFCwMKAgIJHQICIQIRAQUBChIGExICBweHcwEDDwgOpiiBMT4xizuBaoJaBYZgChknAwpSg0kBAQEBAQEBAQEBAQEBAQEBAQEBAQEUAgYQcYceCIJOgkOBYxqDASuCLwWGUAyHJYpbNIYJhi6CDYI4hwUOhV+IFoY0MIEPNYInEQuBaFKIdAEBAQ X-IronPort-AV: E=Sophos;i="5.26,557,1459807200"; d="scan'208";a="183472675" Received: from mail-it0-f49.google.com ([209.85.214.49]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 01 Jul 2016 14:44:34 +0200 Received: by mail-it0-f49.google.com with SMTP id h190so16058127ith.1 for ; Fri, 01 Jul 2016 05:44:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=wP9bBehN8KTu54nlslDCqJlKyv1bjn9nY0xmUnT/Q8c=; b=GJkugA2hDBNv6Jsx8OHIShNmPA5KnTnzBQ95/OR3uMVUMY97vioni+pTlZuIFk5M8z Vi1eAQQsRKhHua3a4EXPonEGq8uEQqbwJJZmSwdEj2jEoDHijx+1GsMrykSb0YR1/c9T EzxVXGsobMV7NPi8oxQkcLiDh+/7u0f8mt6G5cwq9FBG7sloEYMsDhKIdcG1TOBPh9RJ q6ngGc/ZJi5FQhJXbGTHAPmvWGHjRg7Ka8TR0SUtqfR4g0SQ4T+BVeeUQ9c797mKAB+a 8sYXBnTBxgEJaTaTO8SGNd0koNlGbQEQqPkyBSKO3eOVKdNAwsBMc8p9xSVls+vkCTQg GNxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=wP9bBehN8KTu54nlslDCqJlKyv1bjn9nY0xmUnT/Q8c=; b=e1+huKOV5qFupEHPYaRrIQnuSHGTFaiGsiLLzdMcgJJLOuTOp/1EVTd8yQGxZdzC5Q ikzbvA5axAofpLabCZSsbd1Wyc5hdQovvf3/Mw4LDfcys7wSD8s5WzXHEO1dDuGPy8Yf XyX0B1NxFRw9Z3NodnIQFkXjGoiw4x0MFN7WduY7fr5dSMLVhxHZ3HToOfaj0XucFhdh FSM62jU4N3YVb4hKUWkFMS/C3eJVzXAMKODCnnCoFBeobMZeXPlMibPKVo5jYhASe2xE XEYQXgtcGpskdptjQ/dWrbY6XwTmU8RbyNQw4XZ0Ssl8OPjlbvcXsShfPVsoSckM2oG3 wWHg== X-Gm-Message-State: ALyK8tJT6LXHTpyLfMX0vZo0CX8m+UMLLvuYuQOW+9QDRpytBfighu209bCozeWR5kUmnw== X-Received: by 10.36.64.73 with SMTP id n70mr28259338ita.53.1467377072959; Fri, 01 Jul 2016 05:44:32 -0700 (PDT) Received: from [192.168.0.34] (mobile-166-176-249-174.mycingular.net. [166.176.249.174]) by smtp.gmail.com with ESMTPSA id i13sm5340186ita.18.2016.07.01.05.44.31 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 01 Jul 2016 05:44:32 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) From: Dean Thompson In-Reply-To: Date: Fri, 1 Jul 2016 08:44:31 -0400 Cc: Ivan Gotovchits , caml-list , Jeremy Yallop Content-Transfer-Encoding: quoted-printable Message-Id: <6FB9D602-BBED-4175-B230-0F181DB61824@gmail.com> References: <7785E51D-EC74-4A78-8840-D4A7C18E3C56@gmail.com> To: Yaron Minsky X-Mailer: Apple Mail (2.3124) Subject: Re: [Caml-list] how to encourage adoption of OCaml? Yaron, since you describe janestreet/lwt-async as "an experiment in this di= rection=E2=80=9D, could you give a quick overview of how a practical lwt-as= ync would compare with what was done there? Dean > On Jun 30, 2016, at 8:13 PM, Yaron Minsky wrote: >=20 > I'm not at all sure that the decoupling is possible or wise for Async. > My intuition is that this is too complex of a problem with too much > need for careful optimization to be able to have a simple, shared > generic data structure for this. >=20 > The solution that seems most plausible to me is to settle on one > implementation, and port the API of one library to run on top of the > other. There was indeed an experiment in this direction that was done > by Jeremie Dimino: >=20 > https://github.com/janestreet/lwt-async >=20 > That said, until we resolve the binary size issues with Core and > therefore Async, I doubt that this solution would be appealing to the > full community of lwt users. >=20 > y >=20 > On Thu, Jun 30, 2016 at 9:13 AM, Ivan Gotovchits wrote: >>=20 >>=20 >> On Thu, Jun 30, 2016 at 8:12 AM, Yaron Minsky >> wrote: >>>=20 >>> A few thoughts: >>>=20 >>> As Anil said, we're working on an updated RWO, which should resolve the >>> camlp4 issue. >>>=20 >>> As for mixing and matching between libraries that do and don't depend on >>> Core, there's actually little difficulty here. Core sticks to the stand= ard >>> interchange types (array, string, option, list, char, and now result) t= hat >>> are provided by the stdlib, so whether you use Core (or Core_kernel) be= comes >>> more a matter of personal preference, and shouldn't hinder interoperabi= lity. >>>=20 >>> One remaining problem with Core is the minimal executable size, which is >>> currently much bigger if you use Core. We're considering some work in t= hree >>> next few months to make this much better. >>>=20 >>> Async and Lwt are a real problem. They provide very similar functionali= ty, >>> and mixing and matching between two schedulers is not so easy. I'd love= to >>> see some resolution here, but it's not clear what the solution would be. >>=20 >> The solution would be to use the same approach as with standard types. We >> need a common base inductive type for `Lwt.t` (aka `Ivar.t`), which will >> represent a value which is defined in some point in the future (hence a >> `future` is a good name). Another type is for capturing a concept of a >> variable that can have multiple values in the future, that is represente= d as >> `Lwt_stream.t` or `Pipe`. Currently in both Lwt and Async the main thread >> type is tightly coupled with the underlying implementation, especially in >> Async (Lwt.t can be easily decoupled). >>>=20 >>> y >>>=20 >>> On Jun 30, 2016 6:32 AM, "Dean Thompson" >>> wrote: >>>>=20 >>>> From my understanding so far, it seems to me that mixing and matching >>>> Core and not-Core would be tough? Everything from result types to Lwt = vs >>>> Async? Given the inspirational and educational power of Real World OCa= ml, >>>> many newcomers will face this issue. >>>>=20 >>>> Dean >>>>=20 >>>>=20 >>>>> On Jun 30, 2016, at 6:17 AM, Jeremy Yallop wrote: >>>>>=20 >>>>>> On 30 June 2016 at 11:01, Dean Thompson >>>>>> wrote: >>>>>> It is hard for me to judge because I came through RWO, but it appears >>>>>> to me that the lack of consensus on standard library comes up pretty >>>>>> quickly. >>>>>=20 >>>>> I think the standard library situation is much less of a concern than >>>>> it once was, now that it's easy to distribute small OCaml packages and >>>>> manage dependencies. >>>>>=20 >>>>> In the past distribution difficulties discouraged dependencies: for >>>>> example, even though many people prefer the design of ocaml-re and >>>>> ocaml-pcre to the regular expression facilities in the standard >>>>> library, the administrative overhead of an additional dependency made >>>>> the standard library the easier choice overall. In that situation >>>>> it's desirable for the standard library to be large and featureful. >>>>> Nowadays there's much less benefit to having regular expression >>>>> support in the standard library, since depending on ocaml-re or >>>>> ocaml-pcre is just a matter of adding a line to an opam file and a few >>>>> lines to the build configuration. >>>>>=20 >>>>> The standard library still has a useful role to play, since it's >>>>> easier to make libraries interoperate if they can communicate via >>>>> common types, and several recent and proposed changes have that kind >>>>> of role in mind. For example, the latest release of OCaml added a >>>>> 'result' type to the standard library, which was previously defined in >>>>> incompatible but essentially equivalent ways in several libraries: >>>>>=20 >>>>> https://github.com/ocaml/ocaml/pull/147 >>>>>=20 >>>>> and there's a proposal for adding iterators to various container types >>>>> for the next release currently under discussion: >>>>>=20 >>>>> https://github.com/ocaml/ocaml/pull/635 >>>>=20 >>>> -- >>>> Caml-list mailing list. Subscription management and archives: >>>> https://sympa.inria.fr/sympa/arc/caml-list >>>> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners >>>> Bug reports: http://caml.inria.fr/bin/caml-bugs >>=20 >>=20