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 5889E7F164 for ; Mon, 7 Mar 2016 02:38:54 +0100 (CET) IronPort-PHdr: 9a23:hpfnPheDASgJoHWevep3WLlflGMj4u6mDksu8pMizoh2WeGdxc6yZR7h7PlgxGXEQZ/co6odzbGG7OawASdbv96oizMrTt9lb1c9k8IYnggtUoauKHbQC7rUVRE8B9lIT1R//nu2YgB/Ecf6YEDO8DXptWZBUiv2OQc9HOnpAIma153xjLDtvc2LKF4WzBOGIppMbzyO5T3LsccXhYYwYo0Q8TDu5kVyRuJN2GlzLkiSlRuvru25/Zpk7jgC86l5r50IeezAcq85Vb1VCig9eyBwvZWz9EqLcQzawXAVV2FetxNJBwnD41neX4zt+n/xv+95nS2bJtHeTLYuWD3k4b09GzHyjyJSBjkl+WSfoMVqiqVK6EawoAB2xoTdeoeSJdJxe6rceZURQm8XDZUZbDBIHo7pN9hHNOEGJ+sN6tCl/1Y= Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=yotambarnoy@gmail.com; spf=Pass smtp.mailfrom=yotambarnoy@gmail.com; spf=None smtp.helo=postmaster@mail-yk0-f171.google.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of yotambarnoy@gmail.com) identity=pra; client-ip=209.85.160.171; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="yotambarnoy@gmail.com"; x-sender="yotambarnoy@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of yotambarnoy@gmail.com designates 209.85.160.171 as permitted sender) identity=mailfrom; client-ip=209.85.160.171; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="yotambarnoy@gmail.com"; x-sender="yotambarnoy@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-yk0-f171.google.com) identity=helo; client-ip=209.85.160.171; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="yotambarnoy@gmail.com"; x-sender="postmaster@mail-yk0-f171.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0DXAABa2txWjqugVdFdhHkGqDUEA4cdjFeHKQc7EQEBAQEBAQEBEAEBAQEHCwsJHzGCLYItER0BGx4DEgkHNwIkAREBBQEiNYdqAQMSoQSCB4ExPjGLNoFqgleEcAoZJw1RhBoBBQoEhgmLPwstE4EnBY4kiQaBI4xKjnqNFxEegQ82gkCBbh4uiT0BAQE X-IPAS-Result: A0DXAABa2txWjqugVdFdhHkGqDUEA4cdjFeHKQc7EQEBAQEBAQEBEAEBAQEHCwsJHzGCLYItER0BGx4DEgkHNwIkAREBBQEiNYdqAQMSoQSCB4ExPjGLNoFqgleEcAoZJw1RhBoBBQoEhgmLPwstE4EnBY4kiQaBI4xKjnqNFxEegQ82gkCBbh4uiT0BAQE X-IronPort-AV: E=Sophos;i="5.22,548,1449529200"; d="scan'208,217";a="167350548" Received: from mail-yk0-f171.google.com ([209.85.160.171]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 07 Mar 2016 02:38:53 +0100 Received: by mail-yk0-f171.google.com with SMTP id z7so4989266yka.0 for ; Sun, 06 Mar 2016 17:38:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=+OGWAiaCQaXO8c4Sv2SYNglXu6ZXCLYsZ0cRQF2bc+w=; b=UFgz9RtaN30S8/xHktiFavpA6UjDQuNuy2S9pyztRnDN/EhrjKMDj47+3D87USE4ca OdtGJCrR/M5mGHa0lfRIj8Np8UXF9LvD0HUgEPOtLM+atY8o6vf8l3WlgRhJsZzkUItz hnnwIYndV+tf5i/uR+oYNqRXW9Whu8ZLuo9ydrJnok9TMMJ4/IJLnYQHvsb3cO9u4YUi 4lD2q5haHiL86zRg4qLj+OjPcHDAADke8/bd26bahe/sPEGD/ZfvN6IthfllSrgY0mtx V58ASx7SVwCfy0XblBqDoiOknDdBtHFFmr9TVRQwu0g8rULEuF0EIS3Htk1QFgbGSbat 5Gjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=+OGWAiaCQaXO8c4Sv2SYNglXu6ZXCLYsZ0cRQF2bc+w=; b=JZgPNgB1aagrPLBXZ0nfmGjMTal/oKAR2SfKpotBACDibfgl0t9Ixjncwov7pFA4i1 GuRu4aCiT9QFNRFxuPP7fqNkHPD48K1ft6KC+K0u8Ik7GQsGj1dGAnaABPxB2gaCQaiq dlqkrNk5YaAef646bA6Anmln/j7JakGENEDes2p6jH8O4d/BFmhqAPjogYISwi27D/i0 kzp54cg5fYZ/fmEpweGt3QB1s65CuA7RVKSaUfhDfbvABKmpGwBneHWtnrXLvOI/X0AT 7pnTTDC2HntTOQpeFhZITcxqLCKTQ+wobh0B6A61zs3jZh/s/RZsbEmjHr2WETz8bMoq 6HYg== X-Gm-Message-State: AD7BkJKA06RcMoJA10wfm4Qvsy1WZcGuICfqMgc+niSoNd2kcFzDcMUsp0Xytmjh+ywi8s3z38uFN/HkL2u0qw== X-Received: by 10.37.13.83 with SMTP id 80mr11257596ybn.49.1457314732021; Sun, 06 Mar 2016 17:38:52 -0800 (PST) MIME-Version: 1.0 Received: by 10.37.13.3 with HTTP; Sun, 6 Mar 2016 17:38:32 -0800 (PST) From: Yotam Barnoy Date: Sun, 6 Mar 2016 20:38:32 -0500 Message-ID: To: Ocaml Mailing List Content-Type: multipart/alternative; boundary=001a11c06ad8ed9f79052d6b8607 Subject: [Caml-list] Question about Lwt/Async --001a11c06ad8ed9f79052d6b8607 Content-Type: text/plain; charset=UTF-8 Hi all I'm thinking about my next project in OCaml, and I'm wondering how many users of OCaml currently use Lwt or Async regularly. One of the advantages of OCaml over Haskell (which I'm not crazy about) is the fact that you don't have to constantly be stuck inside a monad. However, once you want to use these user-level threading libraries, you're essentially tied to a monad. It also means that the usage of any other monad from Lwt/Async code is out -- OCaml doesn't have the monad transformer infrastructure to layer monads easily as far as I can tell (am I wrong?). I mean, even in Haskell using Monad Transformers is a pain (IMO). Also, what happens to general utility functions that aren't rewritten for Async/Lwt -- as far as I can tell, being in non-monadic code, they will always starve other threads, since they cannot yield to another Async/Lwt thread. Is this perception correct? If so, this seems to imply that you either write your code to cooperate within these frameworks and suffer the monad, or don't, and make it near-impossible for Lwt/Async users to make use of your code. I would like to get an idea of the usage level of these libraries, as well as the burden of writing compatible code, any difficulties etc. Also, I'd like to get a sense of the domains that benefit from these libraries. Some domains (such as gaming) traditionally involve a continuous main loop, and would thus only suffer from the additional overhead of queuing in these libraries. -Yotam --001a11c06ad8ed9f79052d6b8607 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi all

I'm thinking about my next p= roject in OCaml, and I'm wondering how many users of OCaml currently us= e Lwt or Async regularly.

One of the advantages of= OCaml over Haskell (which I'm not crazy about) is the fact that you do= n't have to constantly be stuck inside a monad. However, once you want = to use these user-level threading libraries, you're essentially tied to= a monad. It also means that the usage of any other monad from Lwt/Async co= de is out -- OCaml doesn't have the monad transformer infrastructure to= layer monads easily as far as I can tell (am I wrong?). I mean, even in Ha= skell using Monad Transformers is a pain (IMO).

Al= so, what happens to general utility functions that aren't rewritten for= Async/Lwt -- as far as I can tell, being in non-monadic code, they will al= ways starve other threads, since they cannot yield to another Async/Lwt thr= ead. Is this perception correct? If so, this seems to imply that you either= write your code to cooperate within these frameworks and suffer the monad,= or don't, and make it near-impossible for Lwt/Async users to make use = of your code.

I would like to get an idea of the u= sage level of these libraries, as well as the burden of writing compatible = code, any difficulties etc. Also, I'd like to get a sense of the domain= s that benefit from these libraries. Some domains (such as gaming) traditio= nally involve a continuous main loop, and would thus only suffer from the a= dditional overhead of queuing in these libraries.

= -Yotam
--001a11c06ad8ed9f79052d6b8607--